Development of a System Dynamics Model to Guide Retail Food Store Policies in Baltimore City

Policy interventions to improve food access and address the obesity epidemic among disadvantaged populations are becoming more common throughout the United States. In Baltimore MD, corner stores are a frequently used source of food for low-income populations, but these stores often do not provide a range of affordable healthy foods. This research study aimed to assist city policy makers as they considered implementing a Staple Food Ordinance (SFO) that would require small stores to provide a range and depth of stock of healthy foods. A System Dynamics (SD) model was built to simulate the complex Baltimore food environment and produce optimal values for key decision variables in SFO planning. A web-based application was created for users to access this model to optimize future SFOs, and to test out different options. Four versions of potential SFOs were simulated using this application and the advantages and drawbacks of each SFO are discussed based on the simulation results. These simulations show that a well-designed SFO has the potential to reduce staple food costs, increase corner store profits, reduce food waste, and expand the market for heathy staple foods.


Introduction
Obesity and other diet-related chronic diseases are at epidemic levels throughout the United States, and some of the highest rates are seen among disadvantaged urban populations [1]. In recent years, many communities have developed and tested different policy strategies, such as sugar-sweetened beverage taxes [2][3][4] and junk food taxes [5] to encourage healthy food demands among consumers, urban farm tax credits [6] to incentivize the construction of new supermarkets in low-income areas [7], and other approaches. While some of these approaches appear to have been successful in modifying the food environment, and have even lead to positive dietary shifts [8][9][10][11][12][13], the impact on obesity has not yet been demonstrated.
The causes of obesity and related chronic illnesses are multifactorial and complex [33][34][35]. Not only are there multiple causes, operating at different levels, but each of these factors

Retailer Dimension of the SFO Visual Model
The retailer dimension contains elements of the system that the corner store owner controls. This dimension includes two distinct flows: the flow of a particular food (e.g., tomatoes) and the flow of money, which are illustrated in Figure 1.
The flow of food involves the Wholesaler and the Actual Stock, which act as containers that hold food items. The containers are represented as rectangle boxes shown in Figure 1. The corner store can buy food from the Wholesaler's supply, while the Actual Stock is the supply of food on the corner store's shelves. Flows are set up to and from these stocks so that food can move through the system. Flows are represented as double-line arrows shown in Figure 1. The Wholesaler to Store flow represents the corner store purchasing food from the wholesaler, the Store to Customers flow represents food that leaves the system when customers purchase it, and the Waste flow represents food that leaves the system when it spoils. The small clouds in Figure 1 represent where the flows leaving the system. Three valves on the flow arrow control the rate at which food moves through each flow in this system. Money enters the system when customers purchase food, which is represented by the Revenue flow into the Cumulative Profit stock. Money flows out of the system along three cost flows when the corner store pays its operating expenses. The Cost of Store Stock represents the money the corner store pays the wholesaler for food items, while the Cost of Replenishment represents the money the store pays to have food items delivered. The Cost of Storage represents the overhead costs associated with storing food items on the shelves. Four valves control the rate at which money moves through these revenue and cost flows. Once the movement of food and money through the system is established, elements that control the flow valves are added. These control mechanisms are represented by arrows that originate from containers, variables, or other valves and point to the valve they affect, such as the blue arrows shown in Figure 2. These arrows represent causal relationships rather than flows of materials.
Within the food flow, the Perishability variable represents the rate at which food spoils and affects the Waste valve. The Waste valve is also controlled by the Actual Stock Once the movement of food and money through the system is established, elements that control the flow valves are added. These control mechanisms are represented by arrows that originate from containers, variables, or other valves and point to the valve they affect, such as the blue arrows shown in Figure 2. These arrows represent causal relationships rather than flows of materials.
Within the food flow, the Perishability variable represents the rate at which food spoils and affects the Waste valve. The Waste valve is also controlled by the Actual Stock and the Store to Customers valve, since the food will spoil if the rate at which it is purchased is slow relative to the amount of food on the shelf. The Store to Customers flow valve is controlled by the Actual Stock of food on the shelves, since the customers can only buy as much food as there is in the store.
In the money flow, revenue is generated as customers purchase food, so the Revenue flow valve is controlled by the Store to Customers flow. The corner store must pay the unit price for each food item it buys from the wholesaler, so the Cost of Store Stock valve is controlled by the Unit Cost variable and the Wholesaler to Store valve. Likewise, the store must pay for the delivery of each food item from the wholesaler, so the Cost of Replenishment valve depends on the Wholesaler to Store valve and the Cost of Delivery for each food item. The Ease of Delivery variable affects the Cost of Delivery. The store's Cost of Infrastructure depends on its Infrastructure Capacity and the Actual Stock for All Foods on the shelves. The Cost of Infrastructure and the Actual Stock factor into the Cost of Storage for each food item. The Total Unit Cost for a food item includes its Unit Cost, the Cost of Infrastructure, and the Cost of Delivery. The Weekly Profit the corner store makes depends on the Revenue flow and the three Cost flows.
Nutrients 2021, 13, x FOR PEER REVIEW 4 of 28 and the Store to Customers valve, since the food will spoil if the rate at which it is purchased is slow relative to the amount of food on the shelf. The Store to Customers flow valve is controlled by the Actual Stock of food on the shelves, since the customers can only buy as much food as there is in the store.
In the money flow, revenue is generated as customers purchase food, so the Revenue flow valve is controlled by the Store to Customers flow. The corner store must pay the unit price for each food item it buys from the wholesaler, so the Cost of Store Stock valve is controlled by the Unit Cost variable and the Wholesaler to Store valve. Likewise, the store must pay for the delivery of each food item from the wholesaler, so the Cost of Replenishment valve depends on the Wholesaler to Store valve and the Cost of Delivery for each food item. The Ease of Delivery variable affects the Cost of Delivery. The store's Cost of Infrastructure depends on its Infrastructure Capacity and the Actual Stock for All Foods on the shelves. The Cost of Infrastructure and the Actual Stock factor into the Cost of Storage for each food item. The Total Unit Cost for a food item includes its Unit Cost, the Cost of Infrastructure, and the Cost of Delivery. The Weekly Profit the corner store makes depends on the Revenue flow and the three Cost flows.

Consumer Dimension of the SFO Visual Model
The consumer dimension contains the elements of the corner store system that consumers influence directly. In this dimension, consumer Demand for a type of food affects that food's Price, and the Price, in turn, affects Demand, creating a Demand-Price feedback loop. Additionally, the Demand depends on the food's Taste, Healthiness, and Convenience of Preparation since these features influence a consumer's decision to purchase food. Demand is also influenced by the Actual Stock for All Foods in the store because a store with a wide variety of foods will attract more customers. The Price of a type of food affects the Revenue flow and depends on the Total Unit Cost and the Actual Stock of that particular food in the store. The variables and controls of consumers dimension of the visual model is shown in the yellow area in Figure 3. To illustrate the relationship between variables such as Price and Demand, a simple Economic Model is built based on the law of demand in microeconomics. The law of demand basically introduced an inverse relationship between price and demand [52]. Several related variables, such as Minimum

Consumer Dimension of the SFO Visual Model
The consumer dimension contains the elements of the corner store system that consumers influence directly. In this dimension, consumer Demand for a type of food affects that food's Price, and the Price, in turn, affects Demand, creating a Demand-Price feedback loop. Additionally, the Demand depends on the food's Taste, Healthiness, and Convenience of Preparation since these features influence a consumer's decision to purchase food. Demand is also influenced by the Actual Stock for All Foods in the store because a store with a wide variety of foods will attract more customers. The Price of a type of food affects the Revenue flow and depends on the Total Unit Cost and the Actual Stock of that particular food in the store. The variables and controls of consumers dimension of the visual model is shown in the yellow area in Figure 3. To illustrate the relationship between variables such as Price and Demand, a simple Economic Model is built based on the law of demand in microeconomics. The law of demand basically introduced an inverse relationship between price and demand [52]. Several related variables, such as Minimum Stock and Amount Supplied, are added to this Price-Demand relationship to make it fit the needs in our model. The Economic Model is a sub-model of the system consisting of Stock and Amount Supplied, are added to this Price-Demand relationship to make it fit the needs in our model. The Economic Model is a sub-model of the system consisting of the elements in red and yellow in Figure 4 below and it is explained in greater detail in Appendix B.

Ordinance Dimension of the SFO Visual Model
The ordinance dimension contains the elements of the food system that the government seeks to control by introducing an SFO. The Minimum Stock variable represents the amount of a staple food that the SFO requires the corner store to stock, while the Enforcement variable represents how strictly the government enforces this minimum standard. These variables affect the Wholesaler to Store flow in the supply dimension because the corner store must purchase at least the minimum amount of a staple food from the wholesaler. The Promotions to Corner Store Owners variable represents SFO-sponsored training that corner store owners and employees receive to improve store management and comply with the ordinance. The Promotions to Consumers variable represents SFO advertising that influences consumers to buy the staple food products at the store. These two variables affect Demand in the consumer dimension. The variables and controls in ordinance dimension are shown in the green area in Figure 4.

Ordinance Dimension of the SFO Visual Model
The ordinance dimension contains the elements of the food system that the government seeks to control by introducing an SFO. The Minimum Stock variable represents the amount of a staple food that the SFO requires the corner store to stock, while the Enforcement variable represents how strictly the government enforces this minimum standard. These variables affect the Wholesaler to Store flow in the supply dimension because the corner store must purchase at least the minimum amount of a staple food from the wholesaler. The Promotions to Corner Store Owners variable represents SFO-sponsored training that corner store owners and employees receive to improve store management and comply with the ordinance. The Promotions to Consumers variable represents SFO advertising that influences consumers to buy the staple food products at the store. These two variables affect Demand in the consumer dimension. The variables and controls in ordinance dimension are shown in the green area in Figure 4.  The quantity of tomatoes that the corner store needs each week is the max the stock required by the SFO and the customer demand for tomatoes the wee The corner store purchases ysupply from the wholesaler, which is the difference bet quantity of tomatoes needed and the quantity of tomatoes left over from the week, with a minimum of zero tomatoes purchased (A1). The store's weekly sto matoes, yactual, is the sum of ysupply and the left-over tomatoes (A2). The total am food stocked in the store, yactual_all, is the sum of yactual for each of the 22 types of f A4). The quantity of tomatoes that the customers demand this week, ydemand, dep The Mathematical Model expresses all of the relationships described by the Visual Model in mathematical language that a computer can use to run simulations. This section describes the development of the SD equation set that runs the model simulations. All of the equations referenced in this section can be found in Appendix A.
As with the Visual Model, the Mathematical Model is divided into two flows; the flow of food and the flow of money. These flows occur for each of the 22 types of food and the profits are added together to determine the total profit of the system. Tomatoes will be used as the representative food in the following description of the Mathematical Model.
The SD equations consist of six types of variables: 1.
(x) data inputs rated on a scale from 1 to 5 6.
(p) slope and intersection parameters for each equation found by the data processing techniques described in Section 2.3 The quantity of tomatoes that the corner store needs each week is the maximum of the stock required by the SFO and the customer demand for tomatoes the week before. The corner store purchases y supply from the wholesaler, which is the difference between the quantity of tomatoes needed and the quantity of tomatoes left over from the previous week, with a minimum of zero tomatoes purchased (A1). The store's weekly stock of tomatoes, y actual , is the sum of y supply and the left-over tomatoes (A2). The total amount of food stocked in the store, y actual_all , is the sum of y actual for each of the 22 types of food (A3, A4). The quantity of tomatoes that the customers demand this week, y demand, depends on the price of tomatoes, incentives from the SFO, the quality of the tomatoes, and the total amount of food stocked in the store (A5). The quantity of tomatoes that the customers purchase this week, y cust , is the minimum of y actual and y demand , since customers cannot purchase more tomatoes than those that are stocked (A6). Once all purchases are made, the model calculates how many tomatoes are wasted, y waste , which is the difference between the quantity of tomatoes that spoiled this week and the quantity purchased by customers, y cust , with a minimum of zero tomatoes wasted (A7). Equation (A7) assumes that older food is always sold before newer food and depends on the particular food's shelf life. The quantity of left-over tomatoes at the end of the week, y actual_end , is the difference between y actual and the tomatoes that left the system when they were purchased, y cust , or wasted, y waste (A8).
The flow of money depends on the corner store's operating costs. The unit cost of delivery, c delivery is a function of the ease of delivery (A9). The unit cost of storage, c storage , depends on the store's infrastructure capacity and the total amount of food stocked in the store (A10). The total unit cost, c total , is the sum of c delivery , c storage , and the unit cost of a tomato from the wholesaler, c store (A11). This total unit cost determines the price of tomatoes for consumers, c cust , by using the Economic Model. The money that the store spends on tomatoes each week is found by multiplying these unit costs by the tomato quantities described above: m supply is the product of c store and y supply ; m storage is the product of y actual and c storage ; and m delivery is the product of c delivery and y supply (A12, A13, A14). The money the store makes from the sale of tomatoes, m cust , is the product of c cust and y cust (A15). The corner store's weekly profit from tomatoes, m profit , is calculated by subtracting the money the store spends on its expenses from m cust (A16).

Data Collection to Parameterize the Model
Research assistants administered surveys to corner store owners and customers to parameterize key variables in the model. A total of 25 store owners were asked Likert scale-style questions for 22 different healthy foods. Questions related to their perceptions of the food's profitability, shelf life, optimal stock, customer demand, and ease of storage and delivery. All store owner interviews occurred at the corner store. A total of 23 regular store customers were interviewed about their opinions on the food's price, taste, convenience of preparation, healthiness, and their likelihood of purchasing the food in different settings. Customers were also asked to rate these categories in order of importance to them when they purchase food. Interviews were conducted in a convenience sample occurring at corner stores and Baltimore City recreation centers.

Data Processing
Data from the surveys given to corner store owners and customers were processed to determine the parameters in the SD equations. The processing methods described in this section were repeated separately for each type of food. The following assumptions were made during data processing: The unit delivery cost is 5% of the price [53].

2.
The unit storage cost is 10% of the price plus the effect of the Actual Stock for All Foods variable.

3.
The maximum price is 200% of the average price and represents when there is no demand for the food because the price is too high.

Linear Regression to Parameterize the SD Equations
Parameters p 10 and p 11 are the intersection and slope parameters for the unit cost of delivery equation (A9). Values for these parameters were found by using linear regression, a process in which the parameters of a linear equation are evaluated using a set of ordered pairs of values for the independent and dependent variables. The predictor vector X contains values of the independent variable, which in this case were the survey responses for the Ease of Delivery variable from each corner store. The response vector Y contains values of the dependent variable, which in this case were the survey responses for the Price Nutrients 2021, 13, 3055 8 of 28 variable from each corner store. These price values were multiplied by 0.05 to convert them to the unit delivery cost based on Assumption 1 above. The linear regression equation to find parameters p 10 and p 11 is: Parameters p 12 and p 13 are the intersection and slope parameters for the unit cost of storage Equation (A10). These values were calculated using the same method as above, except in this case the predictor vector X contained the survey results for the Infrastructure Capacity variable for each store and the response vector Y contained survey results for the Price variable for each store multiplied by 0.10 to find the unit storage cost, based on Assumption 2.

Demand Projection to Prepare Survey Data for Multi-Objective Linear Regression
Extra steps were required to process the y demand survey data before calculating the parameters in the demand Equation (A5). Some corner store owners only completed part of the survey and did not provide data on prices or perceived customer demand. Additionally, the preferred amount of stock was nearly constant among store owners, so these data were not useful for regression. This created incomplete data in the store owner dataset that could not be used directly in the Y vector representing y demand . The consumer dataset had sufficient demand data, however, so a processing method that combined data from both datasets was used to predict the demand for each food. The demand projection equations referenced below can be found in Appendix D.
First, a particular store owner's desired stock was found by taking the minimum of the store owner's preferred amount of stock and the store owner's perceived customer demand in the store owner dataset. Store owners generally rated their preferred amount of stock as 5 on a scale from 1 to 5, so since this number was nearly constant, the minimum of the store owner's preferred stock and their perceived customer demand was used for r desired_storeOwner in Equation (A32). This rating was converted to a quantity of food using Equation (A32) and the Survey Scale to Amount of Stock Conversion Table below  (Table 1). The actual consumer demand at a particular store from the consumer dataset, demand consumer , was multiplied by the ratio of the average store owner demand to the average customer demand to project demand in Equation (A33). This demand value was entered into the Y vector for each store. For foods that did not have any store owner data to use in Equation (A33), the average of the mean values of store owner demand, µ demand_storeOwner , for all other types of food was used to find dmd proj .

Multi-Objective Linear Regression to Parameterize the SD Equations
Multi-objective linear regression was used to determine parameters p 1 through p 6 because the demand depends on more than one independent variable. This required the creation of an X matrix, where the column vectors contain scaled survey data on employee training, advertising to customers, and the food's taste, healthiness, and convenience of preparation. Y vector representing demand as dependent variable and the X matrix of independent variables was used in a multi-objective linear regression model to determine p 1 through p 6 . The multi-objective linear regression equation is: Nutrients 2021, 13, 3055 9 of 28 Once parameters p 1 through p 6 were calculated, parameter p 7 in Equation (A6), which is the slope of the demand-price curve, could be found using the maximum demand and maximum price values, which are associated with the y intersection and the x intersection of the demand-price curve, respectively. The maximum demand was calculated by multiplying parameters p 1 through p 6 by five and adding these values together, since five is the maximum scaled value for each independent variable in Equation (A6). The maximum price was calculated by multiplying the price of a food item by two, based on Assumption 3 above. The price was the mean of the prices reported by corner store owners in the surveys or, if there were no price data for a particular type of food, the price estimate came from an online database [54,55]. In this case, the highest reported price was used because food sold at corner stores is typically more expensive than food sold in grocery stores. Parameter p 7 , the slope of the demand-price curve, was then calculated by dividing the maximum demand by the maximum price.

Simulation Method
There are two types of variables in the simulation:

1.
Input Variables, which users enter values for before running the simulation. These variables allow users to adapt the model for their specific environment. These variables are orange in Figure 5.

2.
Result Variables, which the simulation reports values for once it has finished. These variables allow users to see how changes to input variables affect the success of the corner store. These variables are green in Figure 5.
Nutrients 2021, 13, x FOR PEER REVIEW maximum price values, which are associated with the y intersection and the x interse of the demand-price curve, respectively. The maximum demand was calculated by tiplying parameters p1 through p6 by five and adding these values together, since f the maximum scaled value for each independent variable in Equation (A6). The maxi price was calculated by multiplying the price of a food item by two, based on Assum 3 above. The price was the mean of the prices reported by corner store owners in the veys or, if there were no price data for a particular type of food, the price estimate from an online database [54,55]. In this case, the highest reported price was used bec food sold at corner stores is typically more expensive than food sold in grocery s Parameter p7, the slope of the demand-price curve, was then calculated by dividin maximum demand by the maximum price.

Simulation Method
There are two types of variables in the simulation: 1. Input Variables, which users enter values for before running the simulation. T variables allow users to adapt the model for their specific environment. These v bles are orange in Figure 5. 2. Result Variables, which the simulation reports values for once it has finished. T variables allow users to see how changes to input variables affect the success o corner store. These variables are green in Figure 5.

Pre-Simulation Profit Maximization
We applied a profit maximization algorithm in order to pre-determine the val each result variable that produces the optimal profit for the corner store in each time Performing the maximization algorithm before the simulation improves computat efficiency. Each result variable is initialized as a two-dimensional matrix with rows contain the value of the variable as time increases and columns that contain the val the variable as the price increases. Before the simulation begins, a profit maximiz

Pre-Simulation Profit Maximization
We applied a profit maximization algorithm in order to pre-determine the value of each result variable that produces the optimal profit for the corner store in each time step. Performing the maximization algorithm before the simulation improves computational efficiency. Each result variable is initialized as a two-dimensional matrix with rows that contain the value of the variable as time increases and columns that contain the value of the variable as the price increases. Before the simulation begins, a profit maximization algorithm is run for each time step to determine the optimal price of the food. During the simulation, the variable values associated with the optimal price for each time step will be chosen from the result variable matrices. Further details on the profit maximization algorithm can be found in Appendix C.

Simulation Runs
The simulation is initialized so that the value of each result variable is zero and the minimum stock of each food required by the SFO is also zero. The variable t ordinance tracks when the corner store will be required to stock each type of food. The model requires two time steps for the values of result variables to converge after a new food is introduced, so t ordinance is set so that a new staple food is required by the SFO every two time steps. The simulation also allows the corner store to stock a type of food before the SFO requires it if this generates profit.
The simulation begins in the third time step, because of a two time step delay, and runs for 60 time steps that represent 60 weeks. This time period allows the SFO to set minimum requirements for each of the 22 types of food and allows all of the result variables to converge to equilibrium values by the end of the simulation. In each time step, the simulation runs the 16 equations in the SD equation set separately for each type of food. The equations are always the same, but the parameter values change depending on the survey data for each type of food, as described in Section 2.3. The simulation records the values of the result variables for every food in each time step. The equilibrium value of each result variable at the end of the simulation is the global optimum value for that variable in the system.

User Interface (UI)
The simulation was coded in JavaScript for easy integration into an HTML web-based application referred to as the User Interface (UI), which users can access to run the model. The UI contains sliders that allow users to set the values of input variables, as seen in Figure 6a,b. Users can set the values for each type of food separately, or they can set the values for an entire food group (e.g., "Grains"). Users can also choose which result variables they would like the UI to display. The results section of the UI can display bar graphs of the optimal variable values in the last time step or time series over the entire simulation.
Four buttons at the top of the UI allow users to quickly view the simulation results for four sample ordinances that this simulation tested for corner stores in Baltimore. The results of these four simulations are discussed in Section 3. For further details and a link to the UI, see [56]. Figure 6a,b. Users can set the values for each type of food separately, or they can set the values for an entire food group (e.g., "Grains"). Users can also choose which result variables they would like the UI to display. The results section of the UI can display bar graphs of the optimal variable values in the last time step or time series over the entire simulation.
Four buttons at the top of the UI allow users to quickly view the simulation results for four sample ordinances that this simulation tested for corner stores in Baltimore. The results of these four simulations are discussed in Section 3. For further details and a link to the UI, see [56].

Results
Four test simulations of possible SFOs were run to illustrate the results this model can provide. The four simulations developed are referred to as Supplemental Nutrition Assistance Program minimum requirement (SNAP Minimum), SNAP proposed depth of stock (SNAP Depth) [57], Minneapolis SFO [58], and Special Supplemental Nutrition Program for Women, Infants, and Children (WIC) [59], and are presented in greater detail below ( Table 2). The sliders for input variables related to customer demand (e.g., Healthiness, Taste) were set to the highest scaled value for all four simulations, while input variables related to SFO requirements (e.g., Enforcement, Minimum Stock) were varied according to the SFO requirements in Table 2. Sample results for each test simulation are provided for four key outputs: weekly profit, weekly stock, customer demand, and recommended sale price.

Results
Four test simulations of possible SFOs were run to illustrate the results this model can provide. The four simulations developed are referred to as Supplemental Nutrition Assistance Program minimum requirement (SNAP Minimum), SNAP proposed depth of stock (SNAP Depth) [57], Minneapolis SFO [58], and Special Supplemental Nutrition Program for Women, Infants, and Children (WIC) [59], and are presented in greater detail below ( Table 2). The sliders for input variables related to customer demand (e.g., Healthiness, Taste) were set to the highest scaled value for all four simulations, while input variables related to SFO requirements (e.g., Enforcement, Minimum Stock) were varied according to the SFO requirements in Table 2. Sample results for each test simulation are provided for four key outputs: weekly profit, weekly stock, customer demand, and recommended sale price. The first test simulation was run using SNAP Minimum SFO requirements for the ordinance input variables. The Supplemental Nutrition Assistance Program (SNAP) is a federal anti-hunger program that provides nutrition benefits to low-income individuals and families to supplement their food budget and allow them to purchase healthy and nutritious foods [58]. Stores participating in this program must meet minimum requirements for the amount of staple foods stocked in their store [60]. Figure 7a,b show the results of this SFO simulation. See Table A1 in Appendix E for more detailed numerical results.
The next simulation was run using the SNAP Depth SFO requirements. These requirements come from the same federal program as above, but reflect the fact that in 2016, there was a proposal to raise the minimum stock requirements for staple foods and increase the level of enforcement [61]. These changes were never made. Figure 7c,d show the results of this simulation. See Table A2 in Appendix E for more detailed numerical results.
Nutrients 2021, 13, x FOR PEER REVIEW 12 of 28 nutritious foods [58]. Stores participating in this program must meet minimum requirements for the amount of staple foods stocked in their store [60]. Figure 7a,b show the results of this SFO simulation. See Table A1 in Appendix E for more detailed numerical results. The next simulation was run using the SNAP Depth SFO requirements. These requirements come from the same federal program as above, but reflect the fact that in 2016, there was a proposal to raise the minimum stock requirements for staple foods and increase the level of enforcement [61]. These changes were never made. Figure 7c,d show the results of this simulation. See Table A2 in Appendix E for more detailed numerical results.
The third simulation was run using the Minneapolis SFO requirements. The Minneapolis Staple Food Ordinance was the first of its kind in the United States when it was adopted in 2008 and has undergone several revisions since its inception. The ordinance requires grocery stores, corner stores, gas stations, dollar stores, and pharmacies to stock a certain quantity of food items in 10 different categories (e.g., fruits and vegetables, whole grains, etc.) [62]. Figure 7e,f show the results of this simulation. See Table A3 in Appendix E for more detailed numerical results.
The final simulation was performed using WIC SFO requirements. The Special Supplemental Nutrition Program for Women, Infants, and Children (WIC) provides federal grants for supplemental foods, health care referrals, and nutrition education to low-income pregnant women, postpartum women, infants, and children [59]. The simulation results for this program are shown in Figure 7g,h. See Table A4 in Appendix E for more detailed numerical results. The SNAP Minimum SFO is characterized by low required minimum stocks and moderate enforcement. These requirements resulted in a profitable system that produced the highest weekly profit of the four SFO simulations, as shown in Figure 7a. Most foods yielded positive weekly profits, while only three foods produced negative profits. The majority of the foods have approximately equal levels of actual supply in the store and customer demand, which results in no waste for these foods as shown in Table A1. This resulted in higher profits because no money was wasted by paying supply, delivery, and storage costs for food that spoiled before it was sold. The SNAP Minimum SFO was effective because supply closely followed demand, resulting in high weekly profits.
The SNAP Depth SFO had high required minimum stocks and high enforcement, so the amount of food stocked in the store was much higher than customer demand levels, as seen in Figure 7d. This caused high levels of food waste, as shown in Table A2, which contributed to the negative overall weekly profit in Figure 7c. The SNAP Depth SFO illustrates that restrictive SFOs increase the waste of foods while causing corner stores to lose money, which can reduce compliance with the ordinance.
Though none of the foods in the Minneapolis SFO generated a negative weekly profit, the total weekly profit was slightly lower than in the SNAP Minimum SFO, as seen in Figure 7e. The Minneapolis SFO had moderate required minimum stocks and low enforcement, so the supply of staple foods was entirely driven by customer demand, which results in no waste at all, as shown in Table A3. The more relaxed minimum stock and enforcement levels contributed to lower staple food supply levels, so the Minneapolis SFO facilitates less growth in the staple food market compared to the SNAP Minimum SFO. The third simulation was run using the Minneapolis SFO requirements. The Minneapolis Staple Food Ordinance was the first of its kind in the United States when it was adopted in 2008 and has undergone several revisions since its inception. The ordinance requires grocery stores, corner stores, gas stations, dollar stores, and pharmacies to stock a certain quantity of food items in 10 different categories (e.g., fruits and vegetables, whole grains, etc.) [62]. Figure 7e,f show the results of this simulation. See Table A3 in Appendix E for more detailed numerical results.
The final simulation was performed using WIC SFO requirements. The Special Supplemental Nutrition Program for Women, Infants, and Children (WIC) provides federal grants for supplemental foods, health care referrals, and nutrition education to low-income pregnant women, postpartum women, infants, and children [59]. The simulation results for this program are shown in Figure 7g,h. See Table A4 in Appendix E for more detailed numerical results.
The SNAP Minimum SFO is characterized by low required minimum stocks and moderate enforcement. These requirements resulted in a profitable system that produced the highest weekly profit of the four SFO simulations, as shown in Figure 7a. Most foods yielded positive weekly profits, while only three foods produced negative profits. The majority of the foods have approximately equal levels of actual supply in the store and customer demand, which results in no waste for these foods as shown in Table A1. This resulted in higher profits because no money was wasted by paying supply, delivery, and storage costs for food that spoiled before it was sold. The SNAP Minimum SFO was effective because supply closely followed demand, resulting in high weekly profits.
The SNAP Depth SFO had high required minimum stocks and high enforcement, so the amount of food stocked in the store was much higher than customer demand levels, as seen in Figure 7d. This caused high levels of food waste, as shown in Table A2, which contributed to the negative overall weekly profit in Figure 7c. The SNAP Depth SFO illustrates that restrictive SFOs increase the waste of foods while causing corner stores to lose money, which can reduce compliance with the ordinance.
Though none of the foods in the Minneapolis SFO generated a negative weekly profit, the total weekly profit was slightly lower than in the SNAP Minimum SFO, as seen in Figure 7e. The Minneapolis SFO had moderate required minimum stocks and low enforcement, so the supply of staple foods was entirely driven by customer demand, which results in no waste at all, as shown in Table A3. The more relaxed minimum stock and enforcement levels contributed to lower staple food supply levels, so the Minneapolis SFO facilitates less growth in the staple food market compared to the SNAP Minimum SFO.
Another issue with this ordinance should also be considered. Due to very low enforcement of the ordinance, corner store owners may choose not to stock any staple foods in order to increase their profits, which is what actually occurred in Minneapolis [42]. This scenario shows that relaxed SFOs may fail altogether because staple foods are not stocked.
The WIC SFO produces a positive net weekly profit for the corner store despite the fact that many specific foods produce negative weekly profits, as seen in Figure 7g. The WIC SFO has high levels of enforcement for all foods, but the required minimum stock varies from moderate to high depending on the food, thus allowing the ordinance to "tune" the market by requiring higher stocks for certain targeted foods. This generated higher customer demand for these foods, though the demand was not always high enough to produce a profit. Foods with moderate minimum required stocks could fluctuate more depending on demand, producing higher profits that balanced out the losses of the targeted foods. This allows the corner store to expand the staple food market while still producing a profit. Additionally, by considering the perishability of the different types of food when setting ordinance requirements, even the foods with higher supply than demand result in no waste, as shown in Table A4.

Discussion
This paper presents the first simulation of a staple foods ordinance, a new type of policy that is being tested to improve the urban food environment from both supply and demand aspects. Using a group design process and data from Baltimore corner stores and consumers, this study developed and tested a system dynamics model for implementing a staple food ordinance under several different scenarios. The model provided recommendations for which features of an SFO are most effective and sustainable for improving Baltimore's food system, and these findings were shared with city officials to assist in the development of future food policies. A major strength of the model is that it was parameterized using data from actual corner stores and community members, which enhances its credibility among city policy makers.
The simulation model was developed through collaboration between city policy makers, community researchers, and modelers. The city policy makers specified the requirements and relevant considerations for developing an SFO model to improve the healthy food environment in Baltimore City and decided to use corner stores as the focus research group. The community researchers investigated the focus research group and collected data for the model based on the specified requirements. The modelers developed the system dynamics model based on the survey results provided by the community researchers. Similar group design processes have been implemented in previous studies. In a study on integrating complex systems methods to improve obesity prevention intervention [63], the community team, called the COMPACT Team, investigated the focus community and provided the necessary information for the modelers, called the SUS Systems Map Team, to develop the complex systems model. In another study [64], the community researchers collected survey data for the modelers to build an agent-based model of the obesity intervention program. This SFO study had an additional group of collaborators, the city policy makers, whose expertise provided the community researchers and the modelers with a clearer understanding of the research purpose and goals. This allowed the community researchers to collect better information for the modelers, which produced a more accurate model of the system.
Our model provides important insights for city policy makers developing SFOs. The simulations indicated that a heavily prescriptive SFO, such as the SNAP Depth SFO, would be untenable for small food retailers because such a set of requirements results in negative profits and extensive food waste. On the other hand, our model showed that a relaxed ordinance such as the Minneapolis SFO has little effect on the growth of the staple food market. An intermediate SFO that targets specific foods can be used to expand the market for those foods while still maintaining a profitable system with no food waste, as demonstrated by the simulation of the WIC SFO. The varied results for these three scenarios illustrate the importance of effective SFO planning to expand the market for staple foods without resulting in financial losses and food waste.
The sample size of survey data collected from 25 corner store owners and 23 consumers is relatively small, which limits the accuracy of the model. Hence, the model's accuracy can be further improved by collecting additional survey responses from both corner store owners and consumers. Additionally, while the model is generally designed to fit any corner store scenario, small adjustments are required for the model to work well in different environments. For example, the SD equation parameters should be calculated to reflect the conditions of the specific food environment. This could involve collecting data on the prices of foods from particular wholesalers, incorporating seasonal data into the projected prices of fruits and vegetables, or estimating the overhead costs associated with maintaining a corner store in a particular area, among other characteristics of the specific food environment.
The work presented has several limitations. The simulation model developed is largely from the perspective of small corner store owners. Outcomes are expressed in terms of profits and losses, food waste, and amount of store stock, among other metrics that are important to these particular stakeholders. Additional refinements of the model could be expressed in terms of potential impact on consumer diet or health, for example. A second limitation of this model is the way that ordinance enforcement is characterized. The experience of the Minneapolis SFO showed that lack of consistent enforcement reduced the effectiveness of the ordinance, since policymakers had difficulty reaching a consensus on acceptable and practical ways to enforce the SFO. This shortcoming can be addressed by developing a parameterized sub-model to simulate the effects of several variables related to enforcement and determine an optimal enforcement approach.

Conclusions
This paper introduced a System Dynamics model that can assist with the development of staple food ordinances in the city of Baltimore. The goal of these ordinances is to increase the availability of staple foods in low-income areas of the city where residents typically purchase food at corner stores that may not stock healthy foods. This System Dynamics model considers several key elements of corner store systems in order to model the complex interactions between corner stores, wholesalers, customers, and government policies. A visual model was presented to qualitatively illustrate the relationships that affect the flow of food and the flow of money in corner store systems. The visual model was adapted to a mathematical model that uses equations to describe the relationships between elements in the system quantitatively. Four simulations of the mathematical model were run through the User Interface to predict the effects of different ordinances on the corner store system. These simulations showed that a poorly designed ordinance may cause corner stores to lose money and waste more food. A well-designed ordinance has the potential to increase corner store profits, reduce food waste, and expand the market for staple foods. This userfriendly System Dynamics model can be developed further to eventually aid policymakers in the ordinance planning process by forecasting the effects of policies on the complex dynamics of the Baltimore food environment.

Conflicts of Interest:
The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.

Appendix A. SD Mathematical Equations
The following 16 equations form the SD equation set for the mathematical model. This section describes the variables in each equation in more detail. Variables that are time-dependent use parenthetical notation to denote the time step in units of weeks (e.g., c storage (i)). The time step i represents the current time step, "this week," and the time step i-1 represents the previous time step, "last week". Variables related to the total amount of all foods stocked in the store are often evaluated in the time step i-2 because the model requires two time steps for these variables to converge after a new food is introduced into the model. y supply (i) = max(s required × x enforcement − y actual_end (i-1), y demand (i-1) − y actual_end (i-1), 0), y actual_all-food (j)(i) = y actual (i), y actual_all (i) = Σ y actual_all-food (j)(i), In Equations (A3) and (A4), y actual_all (units): Actual Stock for All Foods in the corner store. y actual_all-food (units): Actual Stock in the store of the specific food (j) in time step (i). y demand (i) = p 1 + p 2 × x training + p 3 × x signage + p 4 × x convenience + p 5 × x taste + p 6 × x healthiness − p 7 × c cust + p 8 × y actual_all (i-2), In Equation (A5), x training (scale 1-5): Promotion to Store Owner (Training, for example), a rating of the incentives the ordinance provides to promote store compliance.
x signage (scale 1-5): Promotion to Consumer (Signage, for example), a rating of the incentives the ordinance provides to encourage consumers to purchase staple foods at the store.
x convenience (scale 1-5): Convenience of Preparation, a rating of how easy the food is to prepare x taste (scale 1-5): Taste, a rating of how good the food tastes x healthiness (scale 1-5): Healthiness, a rating of how healthy the food is c cust ($/unit): Price for customers to purchase one unit of this food from the store. p 1 -p 6 : Parameters for the demand equation found by running multi-objective linear regression on the data. p 7 : Slope of the Demand Curve based on price-demand data. p 8 : Parameter for the Actual Stock of All Foods that affects the demand for each food.
y cust (i) = min(y demand (i), y actual (i)), In Equation (A6): y cust (units/week): Store to Customers, the amount of food purchased from the store by customers each week.
y waste (i) = max((y actual (i))/p 9 − y cust (i), 0), In Equation (A7), y waste (units/week): Waste, the amount of food wasted by the store each week. p 9 : Perishability, the shelf life of each food. y actual_end (i) = y actual (i) − y cust (i) − y waste (i), c delivery = p 10 + x delivery × p 11 , In Equation (A9), c delivery ($/unit): Cost of Delivery, the average cost to deliver a unit of food to the store from the wholesaler.
x delivery (scale 1-5): Ease of Delivery, a rating of how easy it is to deliver the food to the store from the wholesaler. p 10 : Intersection parameter for the Cost of Delivery equation found by running linear regression on store owner data. p 11 : Slope parameter for the Cost of Delivery equation found by running linear regression on store owner data.
c storage (i) = p 12 + p 13 × s infra + p 14 × y actual_all (i-2), In Equation (A10), c storage ($/unit): Cost of Storage, the cost to store a unit of food in the store, includes the cost of shelf space, refrigeration, electricity, and other overhead costs. s infra (scale 1-5): Infrastructure Capacity, a rating that measures the available space in the store to store food. p12: Intersection parameter for the Cost of Storage equation found by running linear regression on store owner data.
p13: Slope parameter for the Cost of Storage equation found by running linear regression on store owner data. p14: Parameter for the Actual Stock of All Foods that affects the unit cost of storage for each food.
c total (i) = c delivery + c storage (i) + c store , In Equation (A11), c total ($/unit): Total Unit Cost for the corner store to purchase the food from the wholesaler, including supply, delivery, and storage costs. c store ($/unit): Cost of Store Stock, the cost for the corner store to purchase a unit of food from the wholesaler.

Appendix B. Economic Model
At the core of the mathematical model is the economic model, which is used to understand the relationship between the price of food and the customer demand for food, as expressed in Equation (A5). A demand curve is a concept from basic economic theory that relates price and demand. This model assumes a linear relationship between price and demand, so the demand curve is expressed mathematically as: In this equation, c cust is the price of the food, a is the slope parameter of the curve, and y 0 is the maximum demand value at the point where the demand curve intersects the vertical demand axis. The theoretical relationship between price and demand is illustrated in Figure A1a.
tical demand axis. The theoretical relationship between price and demand is illustrated in Figure A1a.
We incorporate the demand curve into the model by combining Equation (A5) with Equation (A17), which yields the following: y0 = p1 + p2 × xtraining + p3 × xsignage + p4 × xconvenience + p5 × xtaste + p6 × xhealthiness + p8 × yactual_all(i-2), (A18) a = 1/p7, (A19) Figure A1b shows a sample relationship between price and demand using Equations (A18) and (A19) with "Fresh Oranges" data. The economic model maximizes the corner store's profit in each time step while accounting for the effects of ordinance requirements, customer demand, and food waste. Figure A2 illustrates this graphically by plotting amounts of food as a function of price in a given time-step. The units of all the y variables and s variables are constant amounts of food independent of time. The economic model maximizes the corner store's profit in each time step while accounting for the effects of ordinance requirements, customer demand, and food waste. Figure A2 illustrates this graphically by plotting amounts of food as a function of price in a given time-step. The units of all the y variables and s variables are constant amounts of food independent of time. The green dashed line in Figure A2 shows that as price increases, ydemand decreases [65]. In zone 1, ydemand is greater than the minimum stock required by the ordinance, srequired, so the amount of food stocked in the store, yactual, is the same as the demand. In zone 2, the demand drops below the minimum required stock so the actual amount of food stocked in the store will be the same as the minimum required stock. The system is in equilibrium when supply equals demand, so both ysupply, the amount of food supplied by the warehouse, and ycust, the amount of food purchased by customers, decrease as demand decreases to maintain equilibrium in zones 1 and 2 [65].
The grey dashed line in Figure A2 plots the amount of food that spoils in each time step as a function of price. The amount of food that spoils is equal to yactual/nlife, where nlife is the shelf life of the food. If ydemand is greater than the amount of food that will spoil in this time step, then no food is wasted because all of it is purchased by customers. If ydemand drops below the amount of food that will spoil, as in zone 3, then the wasted food will need to be replenished by ysupply. The plot for ysupply remains constant after this point be- The green dashed line in Figure A2 shows that as price increases, y demand decreases [65]. In zone 1, y demand is greater than the minimum stock required by the ordinance, s required , so the amount of food stocked in the store, y actual , is the same as the demand. In zone 2, the demand drops below the minimum required stock so the actual amount of food stocked in the store will be the same as the minimum required stock. The system is in equilibrium when supply equals demand, so both y supply , the amount of food supplied by the warehouse, and y cust , the amount of food purchased by customers, decrease as demand decreases to maintain equilibrium in zones 1 and 2 [65].
The grey dashed line in Figure A2 plots the amount of food that spoils in each time step as a function of price. The amount of food that spoils is equal to y actual /n life , where Nutrients 2021, 13, 3055 20 of 28 n life is the shelf life of the food. If y demand is greater than the amount of food that will spoil in this time step, then no food is wasted because all of it is purchased by customers. If y demand drops below the amount of food that will spoil, as in zone 3, then the wasted food will need to be replenished by y supply . The plot for y supply remains constant after this point because it is equal to the amount of food that spoils in this time step.
The three zones in Figure A2 represent three possible scenarios for the movement of food through the corner store system. The processes for maximizing profit in each scenario are described below.
In zone 1, the demand is higher than the minimum stock required by the ordinance, so the actual stock in the store will equal the demand in order to maximize profit. This means that all of the food purchased from the wholesaler will become the actual stock of food in the store, and all of the store's stock will be sold to customers in order to meet the demand. Mathematically, y actual = y cust = y supply = y demand , Substituting y demand for the other amount variables in Equation (A12) through (A15) and combining these new equations with Equation (A16), the profit can be calculated as: By replacing c cust in Equation (A20) with Equation (A17), Equation (A20) can be rewritten as: The derivative of Equation (A21) is calculated with respect to y demand and set equal to zero to calculate the demand associated with the maximum profit: y demand = y 0 /2 − (c store + c delivery + c storage )/(2 × a), The maximum profit occurs when the demand is lower than y 0 /2 because the second term in Equation (A23) is always positive. This means that the profit will increase as demand decreases toward y 0 /2. Assuming that the minimum required stock is greater than y 0 /2, this means that the profit will be maximized when the supply and demand equal the minimum stock because the actual stock cannot drop below this value. The price should be set to the point where the demand curve intersects the constant line for s required to maximize profit. Readers should note that the case when the minimum required stock is less than y 0 /2 was not considered because the goal of a minimum stock is to encourage corner stores to stock healthy foods. If the demand is high enough to begin with, a lower minimum stock will have no effect on the corner store. Figure A3 shows the optimal condition for zone 1. The grey area under the minimum required stock line represents the revenue that the corner store makes, while the green, blue, and orange areas represent the costs associated with purchasing, storing, and delivering the food. than y0/2 was not considered because the goal of a minimum stock is to encourage corner stores to stock healthy foods. If the demand is high enough to begin with, a lower minimum stock will have no effect on the corner store. Figure A3 shows the optimal condition for zone 1. The grey area under the minimum required stock line represents the revenue that the corner store makes, while the green, blue, and orange areas represent the costs associated with purchasing, storing, and delivering the food. In zone 2, the demand is lower than the minimum stock required by the ordinance but higher than the amount of food that will spoil in this time step. The store will stock the minimum amount of food required by the ordinance and this will be higher than the amount of food that customers demand and purchase. The amount of food the corner store must purchase from the wholesaler is equal to the amount of food purchased by customers because none of the food spoils on the shelves. Mathematically, yactual = srequired > ycust = ysupply = ydemand, Based on the above relationships, ydemand is substituted for ycust and ysupply in Equations (A12), (A14), and (A15), while srequired is substituted in for yactual in Equation (A13). As in zone 1, these four equations are substituted in for the monetary variables in Equation (A16) and combined with Equation (A17) to yield the following profit equation: Figure A3. Optimal profit condition in zone 1.
In zone 2, the demand is lower than the minimum stock required by the ordinance but higher than the amount of food that will spoil in this time step. The store will stock the minimum amount of food required by the ordinance and this will be higher than the amount of food that customers demand and purchase. The amount of food the corner store must purchase from the wholesaler is equal to the amount of food purchased by customers because none of the food spoils on the shelves. Mathematically, y actual = s required > y cust = y supply = y demand , Based on the above relationships, y demand is substituted for y cust and y supply in Equations (A12), (A14), and (A15), while s required is substituted in for y actual in Equation (A13). As in zone 1, these four equations are substituted in for the monetary variables in Equation (A16) and combined with Equation (A17) to yield the following profit equation: Taking the derivative of Equation (A24) with respect to y demand and setting it equal to zero yields the demand associated with the maximum profit in zone 2: In this case, c storage is constant with respect to demand because the store always stocks the minimum required stock, so this cost does appear in Equation (A26). The price should be set so that demand satisfies Equation (A26) to maximize profit. Figure A4 shows the optimal condition for zone 2. ydemand = y0/2 − (cstore + cdelivery)/(2 × a), In this case, cstorage is constant with respect to demand because the store always stocks the minimum required stock, so this cost does appear in Equation (A26). The price should be set so that demand satisfies Equation (A26) to maximize profit. Figure A4 shows the optimal condition for zone 2. In zone 3, demand is lower than both the minimum required stock and the amount of food that will spoil in this time step. As in zone 2, the actual stock will be equal to the minimum required stock and the amount of food purchased by customers will equal the demand. The amount of food purchased from the wholesaler will now be greater than the amount of food purchased by customers because the store must replenish the additional food that is wasted. Mathematically, ycust = ydemand < ysupply < yactual = srequired, Here, ysupply will be exactly equal to the amount of food that spoils in this time step, regardless of whether or not some of this food is purchased by customers: ysupply = yactual/nlife, Following the same substitution process as in the other two zones: mprofit = ccust × ydemand − (cstore + cdelivery) × ysupply − cstorage × srequired = (a × (y0 − ydemand)) × ydemand − (cstore + cdelivery) × ysupply − cstorage × srequired, Taking the derivative with respect to ydemand and setting this equal to zero yields the demand associated with the maximum profit in zone 3: Figure A4. Optimal profit condition in zone 2.
In zone 3, demand is lower than both the minimum required stock and the amount of food that will spoil in this time step. As in zone 2, the actual stock will be equal to the minimum required stock and the amount of food purchased by customers will equal the demand. The amount of food purchased from the wholesaler will now be greater than the amount of food purchased by customers because the store must replenish the additional food that is wasted. Mathematically, y cust = y demand < y supply < y actual = s required , Here, y supply will be exactly equal to the amount of food that spoils in this time step, regardless of whether or not some of this food is purchased by customers: y supply = y actual /n life , Following the same substitution process as in the other two zones: m profit = c cust × y demand − (c store + c delivery ) × y supply − c storage × s required = (a × (y 0 − y demand )) × y demand − (c store + c delivery ) × y supply − c storage × s required , Taking the derivative with respect to y demand and setting this equal to zero yields the demand associated with the maximum profit in zone 3: (dm profit )/(dy demand ) = a × (y 0 − 2 × y demand ), In this case, c delivery and c store are both constant with respect to y demand because the store must always purchase the amount of food that is wasted, which is a constant. Assuming that y waste > y 0 /2, the profit will increase as demand approaches y 0 /2, so the optimal demand occurs just before leaving zone 3, that is, when the demand is exactly equal to the amount of food that will spoil. Figure A5 shows a potential condition in zone 3, rather than the optimal one, to illustrate the effects of y waste.
In this case, cdelivery and cstore are both constant with respect to ydemand because the store must always purchase the amount of food that is wasted, which is a constant. Assuming that ywaste > y0/2, the profit will increase as demand approaches y0/2, so the optimal demand occurs just before leaving zone 3, that is, when the demand is exactly equal to the amount of food that will spoil. Figure A5 shows a potential condition in zone 3, rather than the optimal one, to illustrate the effects of ywaste. Figure A5. Sub-optimal condition in zone 3.
demand consumer (units/week): The amount of a particular food that consumers demand at a particular store in the consumers' dataset. µ demand_consumer (units/week): The mean value of consumer demand across all corner stores for a particular food. dmd proj (units/week): Projected demand data used for linear regression.