Urban Agriculture Oriented Community Planning and Spatial Modeling in Chinese Cities

There are three main contradictions associated with urbanization: population growth and food demand, urban sprawl and production space, and production patterns and energy consumption. The pressure of urbanization has led to a mismatch between production and consumption in space and pattern. The current status and trends in urban food system planning illustrated that sustainable consumption and production were closely related to their spatial layout. The paper took a simulated sustainable food system in urban community as an example. It formulated a rational spatial planning strategy based on urban agriculture of different scales, technologies, and efficiencies, quantified productive community metrics to accommodate different scales of urban space, and wrote algorithms to develop a spatial model of a meta-cellular automaton that coupled consumer housing with productive surfaces. Finally, by comparing and optimizing the spatial patterns of multiple solutions, urban agriculture-oriented urban community planning was developed. The model was only a preliminary attempt at food system planning, but it explored the distribution patterns of housing and agriculture within a given territory in three steps: theoretical strategy-morphological simulation-planning design while meeting urban and productivity indicators. It demonstrated the feasibility of productive spaces and explored a planning strategy for urban communities that supports sustainable consumption and production.


Challenges to Sustainable Urban Food Supply
At the current pace, the Asia-Pacific region will not be able to achieve any of the 17 Sustainable Development Goals (SDGs) by 2030, especially SDG 12-Responsible Consumption and Production, which has regressed [1]. The relationship between urbanization and the food crisis is based on the following facts.
(1) Population growth and food demand. With more than half of the world's population [2], cities consume 67-76% of the world's energy and emit 71-76% of greenhouse gases [3], and urban problems have become a major factor in the global existential crisis. Fifty-five percent of the world's population will live in urban areas in 2018 and the proportion is expected to be as high as 68% in 2050 [2]. By then, even after deducting some of the amount spent on biofuels, the amount of agricultural products will need to increase by 70% [4]. With nearly 690 million people currently suffering from hunger, or 8.9% of the world's population, a figure that has been increasing year after year since 2015, breaking a decade-long slowdown, the COVID-19 pandemic is expected to worsen the overall outlook for food security and nutrition [5].
(2) Urban expansion and agricultural land. Over the past 50 years, more than 20% of the world's natural vegetation has been converted to cropland, and urban areas are expanding at an annual rate of 3-7% [6]. Urbanization will reduce the global arable land area by 1.8-2.4% by 2030, with 80% of this reduction occurring in Asia and Africa. However, even with increased crop yields, a net expansion of 70 million hectares of arable land would be required by 2050 [7]. (3) Urban layout and food transportation. Excessive food miles in today's cities are causing serious pollution and environmental damage. Food production accounts for only one-fifth of all energy consumed by urban food systems, while processing and transportation account for four-fifths [8].
The COVID-19 pandemic has swept through 186 countries between December 2019 and March 2020, and the number of people facing severe or extreme food insecurity is expected to increase from 135 million in January 2020 to 265 million by the end of 2020 [9]. Major challenges include severe disruptions in food supply chains, economic barriers that limit access to food, and food waste due to labor shortages [10].
China has the same problem. In 2011, all countries in the world food market combined traded only 81.6% of China's food needs, and in 2019 it will be only 91.7% [11]. At the same time that food self-sufficiency has been declining year after year, arable land has been drastically reduced to 0.09 hectares per person, less than 40% of the global average, and is still declining year after year [12]. About 1% of China's 1.4 billion people leave the land for the cities each year, and urban construction has encroached on a large amount of farmland [13]. In China, food production and processing costs account for only 30% of retail prices, while logistics costs are about 70%. The Chinese Academy of Social Sciences reports that the urbanization rate of China's population is expected to reach 65.5% in 2025 and that there could be a food deficit of about 130 million tons [14]. By that time, China's food supply and demand problems will be even greater, the conflict between urban development and agricultural land will be more acute, and the energy wasted in producing and obtaining food will be more serious. The imbalance between production and consumption in cities has become so pronounced that cities of the future should be more extensive and proactive in all aspects of sustainable production.
The Food and Agriculture Organization (FAO) report also reveals other pitfalls that are easy to overlook [15]: (1) The crisis is not only hunger but also obesity. If the food crisis is inefficient, "high efficiency" has "all forms of malnutrition." (2) Efficiency brings yield but also ecological loss. The incidence of food shortages and soaring prices are important factors in the phenomenon of social unrest, but the overexploitation of land for agriculture also causes an ecological crisis. (3) In addition to the economic cost of access to food, there is an environmental cost. The current model of food production and distribution relies heavily on cheap labor, fossil fuels, and efficiency on a large scale, with a huge ecological footprint and food miles.
While the drivers behind these trends in food insecurity and malnutrition vary, exploring better spatial relationships in the planning of productive community food systems oriented towards urban agriculture could contribute to progress in mitigating crises, replenishing arable land, coping with shortages, shortening supply chains, and increasing the specialization and diversity of food supplies.

Status and Trends in Urban Food Systems Planning
Urban food systems are less visible than other urban systems such as transport, housing, employment, and even the environment, and have been overlooked by planners [16]. The reason for this invisibility is the long-standing divide between urban development and food issues [17]. The 2013 5th Annual Meeting of the AESOP Sustainable Food Planning Group in Montpellier, France adopted approaches such as Food Justice [18,19] in the United States or Food Planning [20,21] in Europe and focused on how to renew the role of agriculture in sustainable urban development.
The 2016 Urban Food Planning: the Seeds of Transformation in Developed Countries [22] has provided a comprehensive and systematic review of the intellectual, theoretical, and practical developments in the field of urban food planning in North America and Europe over the past two decades. Research work on urban food systems has been summarized in three trends [23]: (1) Analysis of the organization, flows, and spatial dynamics between urban development and food, particularly the logistics of food procurement or urban metabolism. Foodsheds [24], Foodscapes [25], and Food Deserts [26] are key concepts in these approaches. (2) Analysis of local food systems, focusing on the causal relationship between local food production and urban sustainability. Increasingly, residents and governments are participating in alternative food networks through urban gardening, shortened food chains, direct producer marketing, and food education. (3) Analysis of design approaches and public policies for integrating agriculture and food into urban planning [27,28].
The 2016 Global Food Policy Report sets out six requirements for current urban food systems: efficient, inclusive, sustainable, smart climate response, healthy nutrition orientation, and a sound business environment [29]. The 2030 Agenda for Sustainable Development also suggests that sustainable agriculture and food systems are necessarily closely related to sustainable cities and communities [30]. In addition, since the FAO's Food for the Cities Initiative, more and more cities have joined this social movement, such as 210 cities worldwide that have signed the Milan Urban Food Police Pact; 52 cities in the UK have joined Sustainable Food Place; 25 cities in France have joined Terres en ville, and the City Region Food Systems Programme is proposed for 2019 to reinforce rural-urban linkages for climate resilient food systems.
Agronomy, ecology, and sociology were the earliest studies of food systems in China, mainly from the perspective of ecological economics to study the energy flow of agricultural ecosystems [31], the formation of logistics and its impact on economic and social development [32], as well as the supervision and regulation of social policies and regulations [33]. Urban agriculture entered the field of architecture and planning in China earlier, but the content directly related to the food system has been slightly delayed compared with other professions.
Urban agriculture has been in the field of architecture and planning in China for a long time, but the content directly related to food systems has been slightly delayed compared to other professions. The research began with the introduction of the experiences of countries such as the Netherlands [34] and the United States [35,36], with a preference for a strategic analysis with case studies. In addition, it also studied western modern urban food planning theory and attempted to analyze the problem from a food system perspective in the process of integrating urban agriculture into the planning system [37,38].
All of these studies, as described above, aim to promote the sustainability of urban food systems. Current research on food systems has evolved from city-food relationships to inclusion in urban planning and design, but food systems still seem to have a relatively low profile in terms of wanting to be supported and recognized by urban systems. Thus, urban agriculture-oriented productive community food systems were not only a concept, but also an approach that considered food issues as an important component of sustainable urban lifestyles. But how to make the spatial planning of urban communities more compatible and sustainable with food systems becomes a key question, and what would be the morphological model for achieving partial self-sufficiency?

Community Planning Proposals Related to Urban Agriculture
The history of cities and agriculture in food system planning has received increasing attention in recent years [39]. The development of urban food provisioning after the Industrial Revolution can be roughly divided into five phases [40]: (1) the reconfiguration of urban-rural relations between the 18th and early 20th centuries; (2) the modernization of cities, agriculture, and marketized food in the early 20th century; (3) the rethinking of large-scale mechanized agriculture in the mid-20th century; (3) the radical liberal development of urban farms in the 1970s; (5) urbanization and agriculture from the 1980s to the present (Table A1).
After 2005, agricultural practices have become more frequent in cities as a result of both the wave of food localization and the theme of sustainable development [41]. There are some theories of urban planning related to agriculture that focus on the problem of reconstructing urban spatial systems by improving urban agriculture, mainly including Continuous Productive Urban Landscapes (CPULs) [27], Agrarian Urbanism (or Agriculture Urbanism) [42], Food Urbanism [43], and Food-Sensitive Planning and Urban Design (FSPUD) [44] (Table A2). The main strategies of these theories all include a spatial typology of multi-scale urban agriculture aimed at matching and integrating different urban spaces and as part of a sustainable infrastructure.
There have been different perspectives on how a spatial model of a city or community should be constructed [45]. Frei Otto proposed a network of pathways driven by function and scale and used magnetic needles and rags in water basins to simulate the formation of organic communities before computer technology became widespread [46]. Richard T.T.F. developed the mosaic principle of landscape structure, which states that the basic spatial elements of any pattern on land are patches, corridors, and matrices [47]. Michael Batty's urban agglomeration simulations using DLA (Diffuse Limited Aggregation) have been able to reproduce similar patterns of urban growth using simple computational rules [48]. Stephen Marshall deals more directly with the form of buildings and the small-scale organization of networks within cities [49]. These simulations all use population density, coverage, and floor area ratio as key indicators of urban organization generation.
In addition, by analyzing the three cases of Edible Rotterdam [50], Mapping Urban Agricultural Potential [51], and Self-Sufficient Neighborhood Prototype [52] (Table A3), the paper summarized the main approaches to planning strategies and spatial models: creating a matrix of urban agricultural types, quantifying urban spatial parameters, developing coupling rules for housing and farming, and three-dimensional visual models.

Spatial Planning Strategy
First, a database of multi-scale urban agriculture types was created, drawing on the methods summarized above (Table 1). Then, a matrix of community urban agriculture types would be established as a spatial planning strategy through the 3 dimensions of scale, technology, and efficiency. (1) Spatial scale of forms and patterns. According to the relationship between urban and rural areas and the scale, they could be roughly divided into several types: micro-agriculture, family garden or backyard, community garden or allotment, urban farm and suburban farm, and the key elements of the classification of different types were: area, location, property rights, and business model. (2) Vertical and horizontal intensification techniques. The production technologies could be divided into three categories by their difficulty and direction of expansion: (1) ecological intensification, which gave priority to urban environmental issues and increased the biodiversity of local cities; (2) vertical intensification, which increased the efficiency of space use by overlapping the vertical use of a particular site or building; (3) horizontal intensification, which increased the efficiency of time use by providing access to multiple activities or functions on a particular site. (3) The combined benefits of inputs and returns. To ensure a sustainable operating model for the planning strategy as well as economic viability, different food production required a certain scale and a minimum return, such as a minimum continuous scale to be profitable. In addition, the social and ecological benefits of urban agriculture were often the easiest to ignore and the most difficult to assess.
The three types of community food system spatial planning strategies with different emphases were coupled into a richer three-dimensional matrix of food system spatial types ( Figure 1). It could provide food system planning strategies under different conditions in new cities and could be used in existing cities as a screening condition for improved food system planning.

Scale Location
Downtown roof/Balcony

Quantification of Indicators
The indicators that need to be quantified for urban agriculture-oriented community planning include overall spatial parameters, proportion of growing areas, and yield per unit area.
(1) Spatial characteristics of urban communities Referring to the previously mentioned spatial modeling cases and Space Matrix [53], four descriptors of urban space were identified. The basic indicators of a productive community model included: population density (D), coverage (C), floor area ratio (FAR), and open space ratio (OSR), where OSR provided a more intuitive description of the amount of ground-level non-built space per square meter, indicating the pressure on non-built space. A higher OSR implied a relatively open urban experience, while a lower OSR indicated a highly dense environment.

Quantification of Indicators
The indicators that need to be quantified for urban agriculture-oriented community planning include overall spatial parameters, proportion of growing areas, and yield per unit area.
(1) Spatial characteristics of urban communities Referring to the previously mentioned spatial modeling cases and Space Matrix [53], four descriptors of urban space were identified. The basic indicators of a productive community model included: population density (D), coverage (C), floor area ratio (FAR), and open space ratio (OSR), where OSR provided a more intuitive description of the amount of ground-level non-built space per square meter, indicating the pressure on non-built space. A higher OSR implied a relatively open urban experience, while a lower OSR indicated a highly dense environment.
(2) Dwelling and production area per capita Reviewing previous urban agriculture studies and cases, fruits and vegetables of controlled scale were suitable for introduction into the inner city, while cereals and livestock required larger contiguous plots of land to be economically viable. In order to build a productive community model, standard quantities of dwelling area per capita and fruit and vegetable growing area per capita were obtained from the Dietary Guidelines for Chinese Residents [54], the China Household Development Report [55], and the China Rural Statistical Yearbook [56] (Table 2). Daily per capita fruit intake (Mr2) Vegetable unit area yield (a1) Fruit unit area yield (a2) Annual vegetable production area (S1) Annual fruit production area (S2) In order to simplify the simulation, the calculation criteria were approximated to standard units. Further, to make the settlement pattern more flexible and diverse, a dwelling unit would be divided into 3-4 room cells, which meant subdividing into individuals rather than households. The community food system spatial planning simulation would use the following configuration: for each person (P), one standard cell (C) will be required for dwelling: 6 m × 6 m = 36 m 2 and 3 (C) = 108 m 2 for vegetable and fruit cultivation ( Figure 2). This figure was close to the ratio between household members and the required production area in Viljoen and Bohn's study (i.e., 100 m 2 per person) [27].

OSR
(1) (2) Dwelling and production area per capita Reviewing previous urban agriculture studies and cases, fruits and vegetables of controlled scale were suitable for introduction into the inner city, while cereals and livestock required larger contiguous plots of land to be economically viable. In order to build a productive community model, standard quantities of dwelling area per capita and fruit and vegetable growing area per capita were obtained from the Dietary Guidelines for Chinese Residents [54], the China Household Development Report [55], and the China Rural Statistical Yearbook [56] (Table 2). Daily per capita fruit intake (Mr2) Vegetable unit area yield (a1) Fruit unit area yield (a2) Annual vegetable production area (S1) Annual fruit production area (S2) In order to simplify the simulation, the calculation criteria were approximated to standard units. Further, to make the settlement pattern more flexible and diverse, a dwelling unit would be divided into 3-4 room cells, which meant subdividing into individuals rather than households. The community food system spatial planning simulation would use the following configuration: for each person (P), one standard cell (C) will be required for dwelling: 6 m × 6 m = 36 m 2 and 3 (C) = 108 m 2 for vegetable and fruit cultivation ( Figure 2). This figure was close to the ratio between household members and the required production area in Viljoen and Bohn's study (i.e., 100 m 2 per person) [27].  (3) Productivity intensity (PI) per unit of land area Simulated production intensity values were set based on the yields of the various types of urban agriculture in the actual cases presented in Table 1. Productivity improvement per unit of land area could be achieved in a number of ways, and while the actual productivity gradient was not linear, the growing area in the model would be idealized using a productivity gradient of 1-10 (PI), while rooftop planting was technically limited (PI = 3). PI = 1 was equivalent to a year's supply of fruits and vegetables for 36 m 2 , and PI = 3 means that the 36 m 2 unit would provide one year's supply of fruits and vegetables for one person. Depending on the actual production intensity values, PI = 3 with ready-made greenhouse technology, PI = 5 with highly specialized greenhouse technology and PI = 10 with high-tech energy-intensive greenhouses (Figure 3).  Table 1. Productivity improvement per unit of land area could be achieved in a number of ways, and while the actual productivity gradient was not linear, the growing area in the model would be idealized using a productivity gradient of 1-10 (PI), while rooftop planting was technically limited (PI = 3). PI = 1 was equivalent to a year's supply of fruits and vegetables for 36 m², and PI = 3 means that the 36 m² unit would provide one year's supply of fruits and vegetables for one person. Depending on the actual production intensity values, PI = 3 with ready-made greenhouse technology, PI = 5 with highly specialized greenhouse technology and PI = 10 with high-tech energy-intensive greenhouses (Figure 3).

Simulation Rules
Community food system spatial planning simulations resemble meta-automated machine algorithms with three main rules for generating logic (Figure 4).

Simulation Rules
Community food system spatial planning simulations resemble meta-automated machine algorithms with three main rules for generating logic (Figure 4).
Community food system spatial planning simulations resemble meta-automated machine algorithms with three main rules for generating logic (Figure 4).
(1) Each dwelling unit was configured with three adjacent planting units, and each placement of a dwelling unit was selected by friendliness (F) to be adjacent to or away from other dwelling units.  Then, the program flow chart ( Figure 5) was drawn based on the above simulation rules and the algorithm was written in python language (Appendix B). The input and output parameters of this simulation model were as follows.
Input parameters:  (1) Each dwelling unit was configured with three adjacent planting units, and each placement of a dwelling unit was selected by friendliness (F) to be adjacent to or away from other dwelling units. The output also included spatial morphological texture maps, productivity intensity distribution maps, and isometric maps of community simulations.

•
Output parameters: The output also included spatial morphological texture maps, productivity intensity distribution maps, and isometric maps of community simulations.

Sample Testing
The size and distribution needs of community food systems were influenced by the interplay of production intensity (PI), population density (D) and friendliness (F), which was reflected in spatial patterns: "locally compact or evenly dispersed" horizontally and "undulating" vertically. The sample test would generate 12 results using 3 friendliness levels (F = 0.45, F = 0.85, F = 0.95) and 4 population density targets (D = 140, D = 200, D = 220, D = 280). The statistics would yield spatial morphological texture maps and productivity gradients and distributions, which would help to understand a population density threshold that was more conducive to community agriculture and distributed production and marketing, and refined the community food system model.
Observing the spatial morphological texture of the 12 sets of simulation results revealed the following ( Figure 6). left to the lower right showed that when the distribution of communities was very different (and the production intensity of roof planting changed accordingly), they occupied more or less the same area (and the productivity gradient of ground planting was also similar). This could be interpreted in the context of a real planning project: by designing a number of relatively concentrated "large" buildings, it was possible to accommodate more inhabitants and food supplies on the same or even less land than in a number of separate "small" buildings.  (1) Community food systems could simulate a wide range of scenarios where population density and production intensity were within reasonable limits, but variation was still evident.
(2) The current simulation factors only considered residential and planting matches, which were too homogeneous. (3) The main reasons for the "chaotic" state were the lack of components of the food system in urban communities other than production, the need to supplement the components of processing, transport, consumption, and recovery, as well as to increase basic parameters such as circulation and communication to help produce more stable results. (4) Dwelling units were not controlled in terms of lower and upper limits of fragmentation and concentration, such as sunlight pacing, fire safety distances, etc.
In summary, the problems exposed by the current sample testing were largely due to the use of only one pair of relationships ("residential-agricultural") in the community food system model and the lack of feedback effects of other relationship conditions. The model also needed to be tested for viability in larger scale urban practice, i.e., the idealized 4 ha community model as in Section 3.2 and the 16 ha urban model planning program in Section 3.3.
Observing the productivity intensity and distribution plots of the 12 sets of simulation results revealed the following (Figure 7).  (1) The more evenly distributed the site, the more evenly distributed the production intensity, and the production intensity increased slowly with land shortage (first vertical column). However, at (F = 0.45, D = 280), there was a cliff in the overall production intensity gradient when the above-ground growing intensity gradient was normal. The reason was that the community was overly dependent on rooftop agriculture for food supply at high occupancy and low open rates, so the introduction of indoor facility agriculture could be considered for mitigation. (2) The site distribution was moderate, with an increase in population density converting some of the low-intensity ground cultivation to high-intensity rooftop greenhouses (second vertical column). However, at (F = 0.85, D = 220) and (F = 0.85, D = 280), with high population densities, relatively low occupancy and high open rates, a "rooftop barrier" emerged-the high production intensity of rooftop greenhouses leads to limit the increase in the production intensity of above-ground cultivation. The reason for this was the way and distance in which dwellings access food. (3) The more concentrated the site distribution, the more pronounced the barrier to rooftop planting, but it eased as population density increased (third vertical column). Mitigation options one was to construct "high intensity planting belts" to serve large collections of dwelling units, as shown in yellow area on the Figure 7, and option two was to require high intensity rooftop greenhouses on almost all buildings. (4) The more uneven distribution of sites led to greater differences between productivity gradients at the same population density (each horizontal row). However, there was a problem of uncontrolled ratios between production intensities. In practice, the more complex the spatial distribution of the community, the more diverse the food system and the more targeted the production approach (corresponding to different production intensities), rather than relying only on high-intensity planting areas (either roof or ground) to meet food needs. (5) The overall view showed a clear diagonal dividing line between "normal" and "abnormal" from top right to bottom left. On the other hand, the contrast between the two groups from the upper left to the lower right showed that when the distribution of communities was very different (and the production intensity of roof planting changed accordingly), they occupied more or less the same area (and the productivity gradient of ground planting was also similar). This could be interpreted in the context of a real planning project: by designing a number of relatively concentrated "large" buildings, it was possible to accommodate more inhabitants and food supplies on the same or even less land than in a number of separate "small" buildings.

Community Models
Three sets of 600m × 600m community models corresponding to Stoke Newington in London, Brooklyn Heights in New York, and Gracia in Barcelona, respectively, provided an initial indication that there was an opportunity to construct a form of distribution in urban organizations that fully integrated housing and farming by limiting the distances at which communities are allowed to move agriculture ( Figure 8). Targeting actual population densities would require communities to develop vertically and increase agricultural productivity. The community model, while not quite reaching the level of a complete food system, pointed the way to subsequent research.
(1) The current community model was only a small part of the theoretical model, and the logical rules should be more detailed according to the real situation of urban agricultural activities; for example, the intensity of cultivation should be tied to the area, location, and other spatial elements, and the spatial pattern is not sufficiently constrained. (2) Filtering and linking food supply and distribution nodes need to be applied to the topology of the food transportation network, and maximizing the value of local production and consumption need to link community public buildings, energy, water resources, social networks, etc. to form a true community food system model.
(3) The algorithm was prone to misjudge the causes of the results produced, which required other methods to quantitatively evaluate the results and guarantee accurate resolution of indicators in urban space. Although the simulation model did not exactly match the real city, its functions included testing the rigor of the theoretical model, providing scale predictions for the design, or even just exploring other possibilities. (4) As a community food system simulation, although the color matrix patches could show the basic morphology, it lacked the fine three-dimensional effects to show more details. The self-organizing feedback mechanism of the system dynamics proposed by the theoretical model was inadequate, and the simulation parameters were currently modified by artificially processing the production results.
(2) Filtering and linking food supply and distribution nodes need to be applied to the topology of the food transportation network, and maximizing the value of local production and consumption need to link community public buildings, energy, water resources, social networks, etc. to form a true community food system model. (3) The algorithm was prone to misjudge the causes of the results produced, which required other methods to quantitatively evaluate the results and guarantee accurate resolution of indicators in urban space. Although the simulation model did not exactly match the real city, its functions included testing the rigor of the theoretical model, providing scale predictions for the design, or even just exploring other possibilities. (4) As a community food system simulation, although the color matrix patches could show the basic morphology, it lacked the fine three-dimensional effects to show more details. The selforganizing feedback mechanism of the system dynamics proposed by the theoretical model was inadequate, and the simulation parameters were currently modified by artificially processing the production results. (a)

Planning Programme
This spatial simulation model was not just a neighborhood, but a prototype. The urban agriculture-oriented spatial growth algorithm could be implemented throughout the city and the larger region, and the results of each implementation would vary depending on the context of the location. As an example, an urban super-residential project had a total land area of 16 hectares, of which 230,400 m 2 was residential, which translated into a population density (D) of 400 and required a coverage ratio (C) of 0.53, a floor area ratio (FAR) of 6.08, and a green space ratio of 100%.
Adjusting parameters to an actual urban project, the simulation model provided design guidance for "Second Nature: Eco-reconstruction Terraced Forest Urban Ecological," a plan for future urban food systems (Figure 9). It integrated food production (terraces and forests), food logistics (transportation), and food consumption (buildings) to recreate the urban metabolism and explored a new concept of productive cities for future sustainable development-from consumption to production, globalization to localization, centralization to distribution, singularity to integration.

Planning Programme
This spatial simulation model was not just a neighborhood, but a prototype. The urban agriculture-oriented spatial growth algorithm could be implemented throughout the city and the larger region, and the results of each implementation would vary depending on the context of the location. As an example, an urban super-residential project had a total land area of 16 hectares, of which 230,400 m 2 was residential, which translated into a population density (D) of 400 and required a coverage ratio (C) of 0.53, a floor area ratio (FAR) of 6.08, and a green space ratio of 100%.
Adjusting parameters to an actual urban project, the simulation model provided design guidance for "Second Nature: Eco-reconstruction Terraced Forest Urban Ecological," a plan for future urban food systems (Figure 9). It integrated food production (terraces and forests), food logistics (transportation), and food consumption (buildings) to recreate the urban metabolism and explored a new concept of productive cities for future sustainable development-from consumption to production, globalization to localization, centralization to distribution, singularity to integration.  The main strategies and features of spatial planning of food systems were as follows ( Figure 10). both saved land and shaded. The terraced agricultural landscape in the opening courtyard extended the strolling leisure space to the residents on each floor, and provided a second escape route that was not normally available in high-rise buildings.
In short, community planning oriented towards urban agriculture, which aims to "open source and reduce costs simultaneously, balance production and ecology," if promoted, could significantly reduce the ecological footprint deficit and mitigate climate warming trends.  (1) Second nature covered by food production All large motorized roads were covered by buildings, available urban surfaces (roofs, terraces, courtyards, etc.) were planted with fruit trees and vegetables, light-transmitting photovoltaic roofs were erected on the parts with good sunlight conditions, and the sites covered with food production were integrated with the external natural environment to meet the land demand for food production.
(2) Eco-building for green production Terraced home layouts provided homes with planted front yards suitable for growing, farming, and managing fruits and vegetables. Whether for home consumption or for market, the healthy nutritional and economic benefits could also provide employment opportunities for residents and shape the community farmer in the food system.
(3) Three-dimensional integrated urban form Through the integration of terraces, transportation, and architecture, it created zero distance food miles, breaking the flat urban form and isolated monolithic buildings. Building-covered roads both saved land and shaded. The terraced agricultural landscape in the opening courtyard extended the strolling leisure space to the residents on each floor, and provided a second escape route that was not normally available in high-rise buildings.
In short, community planning oriented towards urban agriculture, which aims to "open source and reduce costs simultaneously, balance production and ecology," if promoted, could significantly reduce the ecological footprint deficit and mitigate climate warming trends.

Conclusions
The tension between sustainable urban development and overstretched resource consumption called for a new sustainable food system. Research on food systems had increased significantly over the past decade, but had been limited to strategic, policy, and theoretical planning, and research on sustainable food system models in urban transformation was relatively scarce.
As Caroline Steel argues, the current food system problems are rooted in a long-standing underestimation of the economic costs of natural capital [17]. As the basic resources of the current urban food system become increasingly scarce, we could see that the underlying assumptions that led to the spatial separation of production and consumption were flawed. While historically, it seemed inevitable to consider urban land values to move agriculture within existing transport boundaries, from the perspective of the coming crisis, these economic assumptions could no longer be taken as inevitable.
Therefore, this paper proposed a food systems-based model of productive urban community planning that considered urban agriculture as an integral part of green infrastructure. In contrast to the current urban model, the productive city concept [57] was that in addition to passively reducing urban consumption, it should be more proactive in green production, including material, energy, and space resources, in an effort to maximize sustainable urban development.
Productive cities had experimented with innovation by reflecting food systems directly into spatial planning through urban agriculture-oriented community planning, from theoretical models for planning strategies, to simulation models for morphological predictions, to design models for spatial planning, paving the way for holistic productive city research and providing a reference for building urban communities that support sustainable consumption and production.
In urban agriculture-oriented community planning, agriculture and city were viewed as a system of expandable cellular units. These units were organized into an interdependent network of "cultivation units (production)" and "dwelling units (consumption)." The model took local conditions as inputs and adapted the outputs to different land-use requirements in urban, suburban, and non-urban contexts. At the macroscopic scale, the result was a gradient in production intensity that allows for a heterogeneous distribution of production surfaces and building densities, and was capable of meeting a variety of production and urban indicators.
In a comparison of these spatially competing but functionally interdependent scenarios, this paper explored opportunities for new urban spaces and typologies to address competing demands for urban land and the large surface areas needed to feed urban populations. Local food production would significantly reduce transportation costs and environmental impacts, and benefit from new food system cycles. The resulting new urban spaces would allow urban consumers to rethink their food sources and provided new opportunities for work and play.
This paper demonstrated the potential of using algorithmic design tools in planning future cities. The ability of an urban agriculture-oriented community planning model to generate various solutions (in the form of spatial patterns) based on given inputs was key to successful future implementation. So far, however, the spatial model of community planning had not resulted in a hierarchical network, and further research would differentiate road flows according to the functional needs of residents and optimized the spatial organization of the city through feedback loops.
Cities of the future would be huge systems that were interactive, holistic, organized, and more complex. It was important to introduce new concepts such as productive cities and use new technologies such as big data and artificial intelligence algorithms. However, translating these into practical urban spatial planning strategies still required more in-depth research.