The Role of Biowaste: A Multi-Objective Optimization Platform for Combined Heat, Power and Fuel

Biomass, bioenergy and negative emission technologies are inherent to the future design of energy systems. Urban clusters have a growing demand for fuel, heat and electricity, which is both a challenge and an opportunity for biomass-based technologies. Their deployment should meet demand, while minimizing environmental impact and staying cost-competitive. We develop a systematic approach for the design, evaluation and ranking of biomass-to-X production strategies under uncertain market conditions. We assemble state-of-the-art and innovative conversion technologies, based on feedstock, by-products and waste characteristics. Technical specifications, as well as economic and environmental aspects are estimated based on literature values and industry experts input. Embedded into a bi-level mixed-integer linear programming formulation, the framework identifies and assesses current and promising strategies, while establishing the most robust and resilient designs. The added value of this approach is the inclusion of sub-optimal routes which might outperform competing strategies under different market assumptions. The methodology is illustrated in the anaerobic digestion of food and green waste biomass used as a case study in the current Swiss market. By promoting a fair comparison between alternatives it highlights the benefits of energy integration and poly-generation in the energy transition, showing how biomass-based technologies can be deployed to achieve a more sustainable future.


INTRODUCTION
The global energy system is changing due to the need of curbing greenhouse gas emissions. The large majority of European countries have set ambitious goals by defining a carbon-neutral policy by 2050. Achieving a sustainable future relies not only on the introduction of renewable feedstocks and energy sources but also on efficient and integrated systems. Energy from biomass is one of the most widely explored research fields in energy and environmental science. Defined as a carbon-neutral energy source, biomass can be regarded as a promising energy storage option, compensating for the progressive phase-out of fossil fuels. In this context, Sepulveda et al. (Nestor, 2021) have recently highlighted the role of firm low-carbon technologies in balancing future energy systems, decisively contributing for cost-effective zero-emission systems. The policy-enhanced requirement to generate negative CO 2 emissions places biomass in the center of renewable energy use (IRENA, 2016). As of 2018, modern bioenergy 1 roughly represented half of the generated renewable energy while accounting for only 5% of global final energy consumption (REN21, 2020). The potential to achieve a higher share exists: as a versatile feedstock, biomass has a large plethora of downstream processing options, including the production of different fuels, on top of heat and electricity.
Future energy strategies plan a massive deployment of renewable energy, intensifying periods of surplus electricity (summer) with periods of intense demand (winter). As pointed out by Candra, Hartmann, and Nelles (Candra et al., 2018) the greater the share of renewables, the more frequently the price of electricity will approach zero. For debottlenecking the offset of demand and supply and its implication on electricity price, chemical storage can be applied. In periods with surplus electricity, chemical storage -offered by thermochemical biomass conversion -benefits from a cheap (or even free) electricity market, while electricity production is economically unattractive. We should not be surprised then to find a growing need for flexible poly-generation systems that can easily accommodate seasonal fluctuations.
As a broad category, biomass is a limited resource disputed for food, feed and fuel as recently reviewed by Muscat et al. (2020). The ongoing debate pertains to the competition for land, water, labor and capital. Biowaste, however, does not suffer from such competition. A growing concern with sustainability metrics and circular economy regards it as a resource, questing for attractive economic and environmental conversion routes, beyond the prime safe disposal concern. Urban biowaste, in particular, represents the organic residue issuing from households, municipalities, and industries that is separately collected from other municipal solid waste fractions (Steubing et al., 2010). It accounts for food waste (FW) residues from either households or professionals and municipal residues such as garden leftovers and sweepings, commonly labeled as green waste (GW). In Switzerland, as pointed out by Burg et al. (2019), urban biowaste generation has been steadily increasing for the past 20 years. Steubing et al. (2010) noted that from a current sustainable energy potential of 8.2 PJ, only 5.5 PJ (67%) is presently used. The study does not mention, however, the efficiency of the conversion processes. The unused biowaste potential triggers, besides a clear energy loss, an additional problem from an environmental perspective due to the natural partial decomposition of organic fractions into nitrous oxide (N 2 O) and methane (CH 4 ). Burg et al. (2019) went further and estimated the long-term (up to 2050) potential of wet bioenergy resources in Switzerland by means of a Monte Carlo simulation. Based on an increasing trend in consumer patterns and waste generation, side by side with better management policies and consumer engagement, the study calls for and validates long-term investment in biomass-toenergy infrastructure. In particular, anaerobic digestion and biogas generation are expected to dominate biowaste management policy by 2050. However, the study does not explore different digestate (the remainder of anaerobic digestion) disposal alternatives or biogas downstream processing but rather assumes their use as a fertilizer and an energy source, respectively. Moreover, the approach foregoes the potential risk of soil contamination as highlighted in Nkoa (2014), and misses the important energy system perspective of employing biogas as a chemical building block.
Collection and transport of biomass to conversion facilities are non-negligible factors. Schnorf et al. (2021) studied key biomass transport chains in Switzerland and identified the cost as the main barrier to biomass transport, whereas energetic and environmental benefits largely justify the involved logistics. On economic grounds, break-even distances range from 36 to 477 km, depending on the feedstock, and requiring between 0.4 and 5% of its embodied energy. The decentralized fashion of urban biowaste collection, spatially distributed according to population demographics, sets an average distance between source nodes and treatment facilities below 30 km -thereby not jeopardizing the transportation of biomass from an economic point of view.
Current state-of-the-art technologies for energy production, such as combined heat and power (CHP), rely heavily on fossil fuels. The defossilization of the energy sector opens the door to new technologies, such as heat pumps or geothermal wells, along with more versatile feedstocks. Urban biowaste, in particular, can be converted to store energy products by a variety of means, such as digestion, gasification or liquefaction. As borne out by Celebi et al. (2019), a combination of technologies is particularly suitable not only to address high-temperature heat needs but also to boost system and conversion efficiency. While digestion produces biogas, the co-generation of digestate can be thermally valued in either gasification or liquefaction units, producing excess heat in the medium-to high-temperature range by cooling down producer gas and liquid products, respectively. Enhanced heat integration allows further recovery which can be used for electricity production (via expansion/steam turbine), process integration with different energy-intensive stages such as drying or even the integration with other industrial clusters.
Biomass gasification is a thermochemical process designed to obtain value-added products (CH 4 , H 2 , CO, CO 2 ), from potentially low-cost feedstocks, combining high efficiency (Gassner and Maréchal, 2012) and desirably low investment and operating costs. Urban biowaste and digestate, oftentimes readily available, constitute a potentially free feedstock, making them a viable and promising energy source. Moreover, gasification is able to handle lignocellulosic rich streams which anaerobic digestion -the state-of-the art technology for biowaste -cannot. According to Sikarwar et al. (2016) the three most common gasifiers -the fixed bed, the fluidized bed and the entrained flow -contribute to the gasification capacity of handling a wide range of biomass compositions, making it a suitable technology to value seasonal-dependent waste fractions. Gasification comprises several steps prior to the gasifier such as feedstock drying, pyrolysis and partial combustion. Air is the most common gasifying media, but oxygen, steam of carbon monoxide are also used. However, investment costs can be as 1 excludes biomass used for cooking and heating in inefficient stoves. much as three times the one of incineration (Sikarwar et al., 2016).
Watery feedstocks, among which food waste or digestate, are better handled by catalytic hydrothermal gasification (CHTG), in which water is kept at supercritical conditions, prompting inorganic salts precipitation. It overcomes the need for the pre-drying step associated with conventional gasification, since it requires a pumpable (below 20 wt% solids) input material. CHTG, when compared to conventional gasification, shows higher overall conversion efficiency and reduced tar formation . However, it requires both high-pressure (above 220 bar) and high-temperature (above 400°c) conditions which impact the investment cost. Nevertheless, as pointed out by Sikarwar et al. (2016) the poly-generation concept of biomass gasification brings flexibility and increased efficiency due to potential mass and heat integration synergies.
Several authors, among which Granacher (2019), have addressed gasification and liquefaction technologies for biomass. Damartzis and Zabaniotou (2011) reviewed and ranked different biomass-to-biofuels gasification designs based on economic and environmental performance metrics. Korberg et al. (2021) highlighted the use of gasification to valorize different biomass types in a low-carbon future scenario, while Magagula et al. (2021) simulated and investigated ways to promote energyneutral gasification processes. Segurado et al. (2019) reviewed polygeneration systems coupled with biomass gasification; although hindered from the economic perspective, biomass gasification requires more study and would profit from optimization frameworks that are able to capture different market realities. Mian et al. (2015) studied hydrothermal gasification of microalgae in a multi-objective optimization framework; Gassner and Maréchal developed a thermoeconomic optimization decision-support methodology for lignocellulosic biomass, whereas Celebi et al. (2019) developed a similar concept for woody biomass. Castro-Amoedo et al. (2020) considered both gasification and liquefaction for sewage sludge. Together these studies provide important insights into the thermochemical pathways to convert different types of feedstock. Cheng et al. (2020) reviewed a large number of studies on urban biowaste and emphasized the need to develop a wide range of value-added products, promoting a bio-based circular economy, rather than focusing on the peculiar aspects of anaerobic digestion and composting.

Research Gaps and Objectives
Biomass treatment technologies are manifold and hold promising potential. Their combination and potential synergies are of uttermost importance in a fast and evolving energy system. The literature is abundant with examples of single conversion technologies, but rather neglects holistic and integrated approaches, especially when embedding uncertainty features.
In this work we provide a strategic perspective on how to move toward economically and environmentally sound biowaste conversion systems, by considering a systematic approach. Developing a methodology to simultaneously assess, compare and rank system designs, contributes to close the gap in the future bio-based economy. Indeed, the discussion is of particular relevance in the context of rapid urbanization, increasing environmental awareness and regulations, and the interaction between environment and energy systems. We critically assess, in an operational context, the economic, environmental and thermodynamic aspects of solutions. A two-level optimization framework, using a mixed-integer linear programming (MILP) model is built to study system designs under different pricing and market conditions -showing how they can provide benefits to the local energy ecosystem.
By applying our modeling framework to a cluster of 400,000 people equivalent, this work provides a prime example on the opportunities arising from the poly-generation of heat, electricity and fuels in urban biowaste treatment. We expand on the benefits of anaerobic digestion by showing that, when coupled with biogas upgrade and digestate treatment units, it opens the door to inexpensive fuel production, whether in the form of synthetic natural gas, formic acid or both. Constant biowaste generation and a non-limiting demand for each final product are assumed. Different economic assumptions introduce flexibility to handle volatile resource prices while profiting from changes across the year, such as carbon-free or zero-marginal cost renewable electricity production. The insights we derive are applicable to other biomass-based systems and should contribute to broadening the discussion on the best strategy for handling biomass feedstocks and meeting the current and future energy demand.
The paper is outlined as follows: in Section 2 the methodology is outlined, starting with the conversion modeling strategy, followed by the energy integration model and mathematical formulation, and leading to the evaluation and ranking system. The specifications of the case study are discussed alongside modeling options. In Section 3, we apply the methodology to the case study; system designs are clustered, analyzed, evaluated and ranked, highlighting the robustness of the procedure, but also bottlenecks and limitations. Section 4 concludes the work, arguing on the suitability of the methodology to handle biomass-based challenges and contribute to the future energy system.

METHODS AND APPLICATION
The optimization of complex integrated energy systems, as mentioned in Maronese et al. (2015) and Tock and Maréchal (2015), is very time consuming, underscoring the need to develop and use a methodology that sets-up simple parameterized models. Thermodynamic, economic and environmental aspects need to be considered simultaneously for identifying promising designs inside an intricate structure without requiring complex solving strategies. A master-slave partition on a bi-level optimization methodology ( Figure 1) is developed for this purpose. The master level controls multi-objective framework by sending optimization inputs to the MILP -which works at the slave level -further retrieving design variables and performance indicators. It is a variation of the comprehensive Analyse Generate Interpret Report and React (AGIR) approach, first proposed by Maréchal and Kalitventzeff (1997). Therein, the Analyse step consists in the definition of system boundaries and identification of possible system units with their corresponding economic and environmental models. In the Generate step, optimization tools are used to create a list of system configurations by activating and sizing units while defining appropriate operating conditions. Interpret creates meaningful indicators for the associated values of decision values, whereas Report and React is responsible for the user interaction part, ultimate responsible to define, upon proper interpretation, a new AGIR procedure.

Superstructure
A superstructure is built by aggregating into a single entity all process models related to the conversion of the feedstock to different products and by-products. There is no practical limit to the number of process models to be added, provided they are suitable to handle the feedstocks and intermediate products.
A superstructure defines the main process steps -setting up thermodynamic and technically feasible operating conditionswhile accounting for physical and chemical transformations, in addition to resource needs and heat requirements. Options for heat recovery and the energy conversion system (utility systems) are added, such as heat pumps, Rankine cycles and gas boilers. The quantity and quality of available data shapes the accuracy of the overall model. Flowsheeting software (e.g., Aspen) can be used for a conversion technology or a utility system, while models not involving thermodynamic considerations are based on literature values. Each model defines an interface with the rest of the process, with the internal mathematical formulation used to describe input/ output relations appearing as a blackbox for the energy integration and process synthesis model. This feature allows combining models from different software and literature sources. The major challenge is the accurate representation of operating conditions on mass and energy balances; these balances define material conversion but also heat (with corresponding temperature levels θ k , if applicable) and power requirements, further used for energy integration. To build a thermo-environomic representation for the energy integration optimization problem, an economic model is used to estimate operating and investment costs, whereas a life cycle assessment one links material and energy flows with the corresponding life cycle inventory process. A key attribute of this approach is the embedded linearity of all features with respect to a reference size -therefore assuming constant efficiency.

Energy Integration Model
The total cost of the process is minimized by computing thermodynamically feasible energy targets. These targets are achieved by optimizing heat recovery and combining heat, power and fuel generation while activating different conversion units -hence defining the least expensive energy conversion system. The problem is solved using a MILP (described in Section 2.3).
The energy integration model relies on the definition and identification of hot and cold stream profiles and respective minimum approach temperature, which allows to define hot and cold composite curves. Pinch identification (Linnhoff and Hindmarsh, 1983;Maréchal and Kalitventzeff, 1998a) and graphical analysis enable further process suggestions and improvements regarding conversion technologies and heat integration. The quality of process integration has a direct FIGURE 1 | Solution generation procedure; blue and red shapes refer to the master and slave level, respectively. Green shapes are user controlled.
Frontiers in Energy Research | www.frontiersin.org September 2021 | Volume 9 | Article 718310 impact on the process performance, and should be tackled by key performance indicators.

Mathematical Formulation
The overall problem follows a MILP formulation, allowing for the inclusion of the discrete (binary) and continuous behavior of the system, while ensuring the required robustness. Discrete time intervals t ∈ T {1, 2, . . . , t t }, with duration t t op , are employed to account for time-dependent variables and parameters, capturing the dynamic nature of the problem. The system is represented through units belonging to the set U, grouped in 2 subsets: process units (PU) and utility units (UU). The former represent units added with a fixed size (Eq. 8), associated with either a demand and/or a system imperative (e.g., waste collection), while the latter represent energy technologies and markets used to satisfy process units -sized between a minimum (f min u ) and maximum (f max u ) values (Eq. 6). Each unit can supply, demand or convert resources (r ∈R) and heat, within temperature intervals k ∈ K {1, 2, . . . , n k }.
The MILP objective is the minimization of total cost -Tc (Eq. 1). Operating expenditures -Opex (Eq. 2) account for fixed (c op, 1 u ) and variable (c op, 2 u ) units operating cost, as well as resources import (c̃− r,t ) and export (c̃+ r,t ) costs, associated with the amount imported (Ṁ− r,t ) and exported (Ṁ+ r,t ), respectively. Annualized capital expenditures -Capex (Eq. 3) -consider fixed (c̃i nv, 1 u ) and variable (c̃i nv, 2 u ) fractions, annualized with a project lifetime (n) and an interest rate (i). Binary variables (y u,t , y u ) are used for utility selection and continuous variables (f u,t , f u ) for unit sizing (Eq. 7) The ϵ constraint method is used for multi-objective optimization, by constraining the environmental impact (Eq. 5). Sobol sampling is used to generate different values of ϵ m ; s m,ϵ refers to the entrances on the sampling matrix S M,P ; ϵ max and ϵ min , to upper and lower boundaries coming from single optimization of the environmental impact, respectively. The approach works as a grid in the objective domain, with M market scenarios generation and P uncertain parameters, the latter identified by a ( ) on the respective definition. min fu, yu, fu,t , yu,t Tc Opex + Capex (1) with: Material and energy flow models contain physical properties used to define both mass and energy requirements. ṁ+ r,u,t and ṁ− r,u,t define the reference mass flowrate of resource r produced and consumed, respectively, in unit u at time step t. Equation 9 establishes that requirements for each resource are satisfied by inside production and imports. The resource consumption interacts with the overall resource balance and ensures that import, export and production are balanced, as formulated in Eq. 10. The mass balance is closed for each resource layer (Eq. 11), with the amount of resource r per consuming/supplying unit j/i in time step t (Ṁ− r,j,t /Ṁ+ r,j,t ) balanced by internal needs and connection flowrates of resource r between supplying unit i (SU) and consuming unit j (CU) given by _ m r,i,j,t -(Eqs. 12, 13).
nu u 1 The approach developed in Maréchal and Kalitventzeff (1998b), based on the work of Linnhoff and Hindmarsh (1983) is used to satisfy the minimum energy requirements. The energy balance is closed in each temperature interval k (Eq. 14) and residual heat (Ṙt ,k ) flows from higher (k) to lower (k − 1) temperature (θ) levels. Following thermodynamic feasibility, cascaded heat flows are positive, and values in both the first and the last interval k are zero (Eq. 15). q̇u ,t,k is the reference heat load for unit u in time step t and temperature interval k.
Cf nu u 1 y u , ∀u: y u 1 nu u 1 y u

Solution Generation and Clustering
Varying market settings -at the random sequence generator level -ensures the generation of configurations which, under constant/ nominal market conditions, would not emerge. The procedure is controlled by the master (multi-objective optimization) level and executed by the slave MILP model. The former is responsible for receiving random Sobol parameters and forward them to the latter that minimizes total cost, while deciding on the existence and size of each superstructure unit. The master level stores configurations and repeats the procedure for the M market scenarios generated. The generation procedure is neither sensitive to repeated solutions nor to numerically-close ones. Indeed, solutions exist with designs close enough to be considered identical in practical applications. By applying clustering, the number of relevant solutions is reduced according to a similarity measure. The number of clusters is decided based upon state-of-the-art Silhouette (Rousseeuw, 1987) and Elbow (Davies and Bouldin, 1979) methods, following data normalization, which removes the mean and scales data to unit variance. The K-medoids algorithm is used for clustering, relying upon the set of existing solutions for centroid representation, avoiding therefore non-realistic centroids as provided by the k-means algorithm. As clustering is not based on KPIs but rather on configurations, sub-optimal solutions under current market conditions are selected, which might then become optimal on a different set of market values.

Ranking and Performance Evaluation
The use of a quasi Monte-Carlo (QMC) simulation, making use of a low-discrepancy Sobol sequence, recomputes performance indicators for each cluster centroid and for each set of market conditions. The use of a quasi-random sequence is associated with higher sampling efficiency, compared to classic pseudorandom methods (Hou et al., 2019), which justifies its increasing use in sensitivity and uncertainty analysis. This procedure allows to bound and rank solutions, but also to produce statistical insights. For each set of market conditions and for each KPI, a solution is rewarded with 1 point if it is among the top-three performances. Scores are then normalized, outlining the design with the best probabilistic performance globally (defining a total score) and per KPI -thus promoting a robust, informed and reliable decision-making procedure. As design problems involve decisions on a long time-horizon (normally 10-20 years), the need to account for market variability and unpredictability is paramount. In that regard, et al. (Moret et al., 2017) highlighted the relevance of economic scenarios on energy planning systems and signaled the risk of using a priori selection of uncertain parameters.

Main Highlights of the Methodology
Although our method can run with no user intervention, it would benefit from an interactive user -focusing on providing thoughtful and subjective insight. Based upon the solutions ranking, the user evaluates the suitability of each configuration while taking into account the objective criteria provided by optimization (user satisfied #2, Figure 1). If satisfied, the process ends and proceeds for decision. If not, provided the designs are judged adequate, the user can control and change the parameters at the QMC simulation step, recomputing performance indicators and retrieving new results until an acceptable outcome is reached. On the other hand, if a reasonable design is not reached (user satisfied #1, Figure 1), steering market conditions at the master level will generate a new set of configurations. The robustness of the model allows for minimal involvement, mainly circumscribed to a phase when a large set of solutions is available. This reinforces the confidence of non-specialists in optimization tools and promotes engagement, reducing the likelihood of missing good solutions.

Case-Study Application
A biowaste superstructure is depicted in Figure 2, with connections for different combined heat, power and fuel strategies. The units in gray require investment, updated to 2019 values using the chemical engineering plant cost index (CEPCI). Biowaste generation of 3.75 t/h and 4.5 MW corresponds to 400,000-person equivalent, which is used as the reference population. The network diagram (Supplementary Appendix Figure A9) shows both the source nodes and the biowaste treatment facility. A monthly resolution (twelve time steps) covering a full year of operation is used to capture the variation of seasonal parameters and make use of data provided by the industrial partner.

Superstructure Modeling
Models are the core of the conversion process description, allowing to formulate the transformation from feedstock to final value-added products. Surrogate and blackbox models, which are simplified representations of complex systems, originate from literature values, experts input or detailed simulation models in flowsheet software. Belsim (2018) and Al-Malah (2016), both simulation software, use compositions and characteristics of digestate to generate simplified models. Each model has a reference flow or size (e.g., reference input digestate) that is linearly scaled considering input/output of mass and energy flows. Regardless of the size, constant efficiency is assumed; costs have a linear dependency with unit's size. Supplementary Appendix Tables A7 and A8 summarize key assumptions and input/output values. In particular, temperatureenthalpy profiles are defined and fixed for each conversion unit, therefore not subjected to optimization. Supplementary Appendix Tables A5 and A6 describe environmental and economic assumptions, respectively. In this section only the most relevant modeling strategies are presented. Our case study limits impact categories to global warming potential (GWP) using the IPCC 2013 GWP100a impact method. Its widespread use and bench-marking potential motivated the choice. However, it might not be the most adequate indicator to tackle digestate use as a fertilizer or even future concerns with the use and production of some conversion technologies; impact categories relative to land, waste or other biological levels could be considered. Subsidies and gate-fees, which are difficult to estimate, were also excluded.

Feedstock and Pre-treatment
Anaerobic digesters are able to handle different organic waste fractions, provided contamination is kept to a minimum. Three biowaste fractions (s ∈ S) are considered: green waste (GW), food waste (FW) and whey. GW is ground and sieved to guarantee a maximum particle size of 10 cm, and FW is ground and mixed with water -ensuring a pumpable sludge prior to digester inlet. Whey does not undergo any pre-treatment prior to its use.

Digester
The digester is modeled as a semi-continuous reactor, working on the thermophilic range (55°c), with a variable residence time. Biowaste quantities and composition ( Figure 3A) reflect seasonality, which impacts the digester residence time, while external temperature influences digester heat demand ( Figure 3B). Following the approach of Wellinger, Murphy et al. (2013) and Castro-Amoedo (2019), biogas generation is modeled as a first-order kinetic reaction (Eq. 22).
Biogas s,t M s,t · TS s,t · VS s,t · BMP s,t · (1 − e −ks,t ·trt ) CH 4 f raction M s,t , TS s,t , VS s,t , BMP s,t and k s,t represent respectively the mass, total solids, volatile solids, bio-methane potential and the kinetic parameter of feedstock s in time-step t. tr t represents the residence time per time-step t and CH 4 fraction corresponds on average to 0.5344. All parameters have been reconciled by mean square error minimization using real data from 2019 (Supplementary Appendix Figure A10). The values are in line with those reported by Holliger et al. (2017) for the same treatment facility.

Biogas and CO 2 Upgrade
Biogas can be used on a conventional boiler to co-generate heat and electricity or in separation units which are able to split its main components -CH 4 and CO 2 -for additional upgrading. Pressure Swing adsorption (PSA), monoethanolamine (MEA), Water scrubbing and polymeric dry membranes were considered according to their suitability for biogas upgrading, as discussed by Allegue and Hinge (2012) and Wien Institute of Chem (2012). These technologies were not the object of detailed flowsheet simulation, but properties described by Murphy et al. (2013), Kohl and Nielsen (1997), Huertas et al. (2011) and Urban (2009) were used and summarized accordingly. Production of SNG requires at least 96% CH 4 fraction (Celebi et al., 2019), with the level of H 2 S below 5 ppm, to avoid corrosion and potential oxidation to sulfur dioxide, a highly environmentally impactful gas (Allegue and Hinge, 2012).
Different C1-chemicals can be obtained by promoting CO 2based upgrading routes: • Formic acid: produced according to the process described in Jens et al. (2019) comprising the reaction of CO 2 and H 2 at 50°c and 94 bar, with subsequent by-products removed by distillation. A reactive distillation column at 200 mbar and 180°c produces formic acid with adequate market purity.

Digestate
The digestate, a carbon-and oxygen-rich sludge, is mainly composed of undigested volatile fractions and lignocellulosic components, and contains approximately 50% of the biowaste inlet energy. Four different conversion pathways are considered: • Catalytic hydrothermal gasification (CHTG): the main steps involved are feedstock preparation (hydrolysis), salt separation, fixed bed catalytic reaction, water absorption tower and membrane upgrade. The modeling follows the description of Mian et al. (2015) and is adapted to digestate characteristics. • Gasification: comprises air drying and optional torrefaction and pyrolysis which reduces the amount of heat needed for gasification. Circulated fluidized bed and entrained flow reactors with both indirect-and direct-heat were considered for the intermediate syngas production. The modeling approach described in Gassner and Maréchal (2012) and Celebi et al. (2019) was used. Depending on the gasifier technology, different compositions of syngas are to be expected; a gas processing step, comprising a water-gas shift reactor finely tunes the composition for downstream fuel generation coupled with CO 2 separation units. Final specification is fuel dependent. Di-methyl ether (DME) should be produced with 99.88 vol%, at 25°c and 1 bar; Fischer-Tropsch (FT) fuel at 25°c and 1 bar; Methanol (MeOH) with 99.4 vol%, at 25°c and 1 bar, and substitute natural gas (SNG) at 96%, 25°c and 50 bar. Thermal profiles are described in Supplementary Appendix Table A8. • Hydrothermal liquefaction (HTL): Liquefaction has a filtration preparation step to ensure a cake with 20 wt% solids followed by a reactor, which operates at 340°c and 220 bar. A three-phase separation stage originates biocrude, a CO 2 -rich gaseous stream and a solid residue (biochar) routed to thermal valorisation. The values and structure used are adapted from Castro-Amoedo et al. (2020) and Biller et al. (2018) to the digestate characteristics. • Discard/Fertilizer: State-of-the-art digestate disposal comprising screening, mechanical water removal step and air drying, with a fraction thermo-valorized and the remaining disposed as fertilizer.

Utilities
The utilities section consists of additional technologies that allow closing the energy balance. The co-generation solid oxide fuel cell-gas turbine (SOFC-GT) is modeled according to Facchinetti et al. (2011) and Suciu et al. (2019) whereas the co-generation solid oxide electrolysis cell (SOEC) and the alkaline electrolyser (AEC) are adapted from Wang et al. (2018) and Suciu et al. (2019). Celebi et al. (2019) used a steam boiler fired by natural gas as a representative proxy of the European boiler family. The same consideration and modeling approach is taken in this work. Steam, produced in a Rankine cycle, is the industrial heat carrier per excellence due to good heat transfer properties, as well as preferable prices and high safety. The generation level is set at high pressure (50 bar) and distributed according to different pressure levels, chosen according to the temperature-enthalpy profiles. A superstructure approach as described in Wallerand et al. (2018), is used for heat pumps with pressure levels chosen to fit the temperature requirements of digester and district heating network. Neither the refrigeration fluid (ammonia) nor the pressure levels are subject to optimization.

Market Conditions
Distinct configurations are expected under different market conditions and economic assumptions. Resource prices, such as electricity, SNG and heat, have a seasonality trend which is particularly relevant for energy systems design. Figure 4 shows the monthly average resource prices obtained from industry and local providers for 2019 -used as the representative yearalongside the electricity grid carbon intensity for Switzerland, obtained using the tool described in Kantor and Santecchia (2019). The use of heating oil, heat pumps, electricity and natural gas contribute to the price of heat according to their share, retrieved from the Ecoinvent database (Wernet et al., 2016). Motivated by growing electricity demand and renewable energy penetration, uncertainty associated with energy systems is considered to be on the high-level. Therefore a 50% variation on the seasonal trend is considered ( Table 2). Prices for different fuels are the average between 2016 and 2019 (Comtrade Comtrade, 2021), and a medium-level uncertainty (30%) is considered. We further assume that Fischer-Tropsch fuels can replace diesel and therefore show a similar market cost, while biocrude, due to the need of a preprocessing step, replaces crude oil on a 50% basis. Kim et al. (2013) considered three levels of investment cost uncertainty linked with biomass-to-fuels technology maturity and complexity; the medium range value of 30% is here taken. The interest rate is employed to discount investment and assess project profitability, taking an average value of 0.08, which should reflect the risk and premium associated with investment. Due to a low level of maturity associated with some technologies, 50% variation is used. The ranking and evaluation phase (Section 2.6) counts, in addition to all the parameters from the generation phase, with three additional taxation-based parameters: 1) a CO 2 tax which allows to translate into monetary units a solution's environmental impact; 2) a premium on SNG that is common practice in Europe to promote the upgrade of biogas to gridlevel quality and 3) an additional waste tax, that could be used to help financing greener solutions. The values were chosen based upon the generation phase: for each solution and market condition the value of the three taxes were computed to break-even with the solution with the lowest total cost. The values are within acceptable market ranges and prospect policies.

RESULTS AND DISCUSSION
The continuous generation of biowaste and the ongoing pressure on natural resources urges for flexible energy systems, whereas increasing complexity claims for comprehensive approaches. Our two-stage approach embraces the challenge and attempts to provide useful insight and quantitative decision support, leaving subjective duties to the user. An urban biowaste casestudy validates the pertinence of the methodology. The MILP formulation comprises 74,650 variables (3,978 binary) and 47,873 constraints. The mipgap was set to 0.01% and the solving time is 23 min on a 8-Core Xeon 2.4 GHz processor with 16.0 Gb of RAM. The MILP is solved 1,000 (M 1,000) times for different generation parameters (p 11) combination.

Solutions Clustering and Solution Identification
The original solutions were sorted based on thirty-seven dimensions in the feature space, which correspond to the used MILP decision variables. Based upon the Silhouette and Elbow methods -Supplementary Appendix Figure A11 -10 clusters are chosen to conveniently represent the set of 197 unique solutions. The optimization procedure, as described in our methodology, is used to generate a database of solutions built on different market assumptions, instead of relying on a fixed (and highly uncertain) set of market values. Solutions are characterized by their intrinsic aspects: energy flows ( Figure 5A), technology activation ( Figure 5B) and efficiencies ( Figure 5C), rather than by performance indicators.
Investment foreshadows a shift from biogas as a fuel to its use as a chemical building block. Indeed, configurations with moderate investments rely on importing electricity -profiting from periods with low costs and excess supply -to maximize the production of formic acid. Higher investments also entail the coproduction of SNG. This trend is further supported by an increasingly complex technology mix (b): formic acid production and electrolysis are the first investments, whereas for higher values, gasification technologies and biogas purification units are activated; the use of heat pumps is activated for the highest values of investment, which are simultaneously associated with the highest global efficiency. The shift toward fuel production is notorious for a wide range of investment, corroborated by a large chemical contribution to the global efficiency (c). Figure 6 depicts the grand composite curve of two configurations: without investment (corresponding to the current scenario) and with the largest average one (141 $/t bw ). In the former, biogas is used as a fuel to drive a Rankine cycle which supplies both the internal digester needs and a district heating system, whereas the use of gasification units coupled with heat pumps on the latter changes the heat integration configuration. The system is better integrated with low temperature heat supplied by heat pumps, biogas upgrade, and digestate headed toward gasification units, further enhancing heat recovery and integration, while simultaneously producing SNG.
Solutions are further evaluated by economic criteria which use the same parameters distribution (although not mandatory) of the generation stage, accrued by a tax on CO 2 emissions, a premium on SNG, and a waste tax.

Market Conditions and Ranking
Market conditions are used for solution generation but are also part of performance indicator calculation. The use of different market conditions renders solutions more or less attractive, depending on the list of performance indicators and priorities. Figure 7 shows Opex, Tc and Impact as a function of Capex, resulting from a QMC simulation. Increasing investment entails on average, as expected, a reduction in operating cost; however, for the low range of investments (below 26 $/t bw ), the environmental impact follows an increasing trend. This can be explained by a shift toward electricity import and a low quantity of added-value chemical production, which is nevertheless enough to justify a significant average decrease in total cost performance. Filled markers identify two relevant solutions for decision-makers and practitioners: the solution with average minimum total cost (blue, diamond) and the solution with average minimum environmental impact (green, square). The wide confidence interval range depicts overlapping situations in which other solutions might have lower total cost and environmental impact. A robust approach is thus warranted to rank and choose among solutions.
The use of traditional Pareto trade-off analysis hinders the comparison between more than three KPIs, constraining the amount of information that can be obtained. Table 3 expands on the graphical information by including all the considered KPIs: the central position corresponds to the average value and the 95% confidence interval is represented by the sub-and superscript values; values are sorted by increasing Capex and negative values correspond to profit (or negative emissions) situations.
The reference configuration, entailing zero investment, is the most penalizing design in average economic terms. Increasing investment, even as little as 5 $/t bw , promotes a 10% average reduction reduction in total cost, associated with the added-value of formic acid production. However, the impact substitution credit is not enough to either cover the burden associated with production or the electricity imports. Only for higher investments (greater than 26 $/t bw ), and thus increased formic acid production, does the system convert itself into a net negative emission system; for these set of solutions not only environmental impact but also costs reach their average minimum. If we take a closer look, environmental impact is consistently negative above 26 $/t bw , which is a remarkable result: properly managed, urban biowaste constitutes a net CO 2 sink, asserting its relevance in the prospective environmental policies. Solutions' pay-back time (except the largest investment) does not surpass 3 years, which stands low compared with typical lifetime of engineering projects.
As a thermodynamic KPI, global efficiency only reaches higher than the reference value for the highest investments which are associated with SNG co-production and also with a greater number of units, which can be understood as a need for more process equipment, workers and safety measures. In all the intermediate investments, despite a more complex system, the shift toward value-added chemicals does not encompass a more efficient system.
Decision-making based on averages is commonplace in engineering applications. However, using averages forestalls deeper analyses and relations. The use of confidence intervals instead, protects against uncertainty to a much higher degree, which is paramount in energy systems. For example, depending on market conditions the reference solution can be either an environmental burden or a net emissions sink. Other solutions and KPIs show a similar dichotomy.
The use of a ranking system allows arguing then on a probabilistic base, conditioned to the set of market parameters ( Table 4). Based upon the parameters distribution, each configuration is ranked according to the probability of belonging to the three best alternatives for the set of KPIs -which are ultimately a userdefined choice. Due to the absence of investment, the reference solution outperforms all the others in Capex, pay-back time and complexity factor, although statistically underperforming in other economic and environmental impact categories. On the other end of the spectrum, solutions with the highest investment perform statistically better on Impact, Opex, total cost, and global efficiency, albeit with an increased complexity degree.
Some caveats on the interpretation are warranted: the number and type of KPIs, their weighting on the total score and the assumed parameters distribution, all of which play a significant role in ranking and evaluation. For instance, a different set of priorities is likely to radically change the decision: based only on mathematical objectives (ranking P1, blue), the solution with the average investment of  26 $/t bw outperforms in approximately one quarter of all market scenarios. The inclusion of other user indicators (P2), under the assumption of uniform weights, sharply decreases the interest of that design while promoting the reference one, which performs statistically better in 19% of the cases. The solution with an average investment of 20 $/t bw is never amid the top-three configurations in any KPI, which perfectly showcases the decouple of solution generation and ranking. Decision-maker intervention and subjective analysis is crucial for fine tuning and analysis. The user has available a large set of parameters that are ultimately responsible for solution ranking and might serve as guidelines in policy-making. Figure 8 shows solutions (identified by their average investment) that achieve the lowest total cost for each market configuration. Only 1,000 points and four parameters are shown for the sake of clarity and simplicity. The right side underlines the role of the CO 2 tax as the main driver in total cost. For values above 300 /t CO 2 and regardless of other parameters, the solution with an average investment of 26 $/t bw is systematically preferred (but for lower values of SNG premium and waste tax, whereupon it competes with high investment designs), translated by an investment in catalytic hydrothermal gasification for digestate upgrade, and the production of formic acid after biogas upgrade. For more modest carbon tax values the solution of 32 $/t bw is preferred for high SNG incentives and waste taxes, whereas the solution with 34 $/t bw dominates in the lower range. Both solutions promote gasification, with the latter combining both dry and hydrothermal options. The left side of the figure, despite less trend informative, reinforces the predominant role of carbon taxation. Nonetheless, solutions with low average investment are associated with higher electricity price, waste tax and SNG premium, while high investment options dominate markets with low costs of electricity and waste tax.

CONCLUSION
Sustainable development goals comprise the gradual replacement of fossil fuels, progressive deployment of renewable energy and negative CO 2 emissions. Biomass is able to address all of these dimensions, thus its critical role in the energy transition. In this work we propose a two-stage optimization approach for the design of robust energy systems, applied to an anaerobic digestion plant which is, according to Burg et al. (2019), the present and future dominant conversion technology for urban biowaste treatment in Switzerland. The applied methodology addresses the challenge of biogas separation and upgrading, while dealing with complex and difficult to digest lignocellulosic fractions. Biogenic CO 2 and surplus electricity periods promote fuel synthesis, contributing to close the gap between electricity supply and demand, and therefore improving the system resilience. We show that greater diversity, which is represented by activating different technologies, reduces costs, emissions and promotes efficiency. The use of heat pumpsactivated on the high-range of investment -associated with heat integration strategies, greatly contributes for a far superior system with increased efficiency. Synergies are explored and translated into user-defined metrics, showcasing the added-benefit to the local energy ecosystem.
The main advantage of our approach lies in the use of different market conditions for solution generation and clustering, avoiding the bias toward configurations that marginally outperform under prevailing market conditions. Indeed, the uncertainty associated with existing energy systems asks for frameworks that allow a systematic analysis of market settings -enabling the emergence of sub-optimal designs. As performance indicators are not the driver for solution generation, but are rather used for ranking and evaluation, their number can be easily adapted to account for user preferences or multi-stakeholders positions. The robustness of the approach is highlighted in the use of an approach for design ranking and evaluation. Moderate investment solutions (between 26 and 34 $/t bw ) are more robust, as they statistically achieve lower values of total cost and lower environmental impacts, by combining gasification units (dry and hydrothermal options) with biogas separation and CO 2 upgrade to formic acid.
Policy-makers could also benefit from our approach. Feed-in tariffs, institutional incentives for substitute natural gas production, a CO 2 tax or a consumer waste tax can be calculated from this work. The developed methodology is thus appropriate to handle exogenous uncertainty embedded in a multi-period framework, with systematic generation, evaluation and ranking of system configurations. With our approach, we believe and hope to contribute for an interdisciplinary effort to address the clean energy transition in which cutting-edge biomass-based models are paramount.

DATA AVAILABILITY STATEMENT
The raw data supporting the conclusions of this article will be made available by the authors, without undue reservation.

AUTHOR CONTRIBUTIONS
RC-A: conceptualization, methodology, modeling, results generation and analysis; data validation and visualisation; writing -original draft preparation and corrections. NM: modeling and data visualisation. JG: conceptualization, validation, writing-reviewing and editing. FM: supervision and conceptualization; writing-reviewing and editing.

ACKNOWLEDGMENTS
The authors would like to acknowledge SATOM SA, especially Mr. Daniel Baillifard and Mr. Julian Dovat for the precious discussions on organic waste valorization and detailed technical information which contributed to the accuracy of this study. The authors financially acknowledge the European Union's Horizon 2020 research and innovation programme under the Marie Sklodowska-Curie grant agreement No 754354 and No SEP-210500079, and the Swiss Competence Center for Energy Research SCCER-EIP.