## 4 Objective Function Setting
### Global Cost  
The economic evaluation indicators for a building's lifecycle typically include Net Present Value (NPV), Annuity (NA), Internal Rate of Return (IRR), Cost-Effectiveness Ratio (a), and Payback Period, among others. In the recast of the EU Energy Performance of Buildings Directive (EPBD) 2010, global cost (Cg) is introduced as an indicator to measure the economic efficiency of energy-saving buildings throughout their lifecycle. Global cost considers the initial incremental investment costs brought by energy-saving technologies and the benefits from energy cost savings during the calculation period. This indicator calculates costs associated only with energy-saving technology-related components, including insulation layers and exterior windows, excluding the costs of building structural base components, as well as costs arising from material transportation and environmental impacts of construction. This allows for a preliminary assessment of the lifecycle economic efficiency of buildings during the retrofitting phase [91].  
The difference in global cost before and after retrofitting the baseline rural house, \(dC_{g}\), is the difference between the global cost after retrofitting, \(C_{g}(j)\), and the global cost before retrofitting, \(C_{g}(ref)\). This difference intuitively reflects the lifecycle benefits brought by the retrofit investment. The calculation formula is as follows:  
\[dC_{g}=C_{g}(j)-C_{g}(ref) \tag{15}\]  
\[C_{g}(j)=\frac{C_{1}+\sum_{i=1}^{25}[C_{e,j}\times R_{d}(i)]}{A_{floor}} \tag{16}\]  
\[R_{d}(i)=\frac{1+\left(1+R_{R}\right)^{-i}}{R_{R}} \tag{17}\]  
\[R_{R}=\frac{R_{i}-R_{e}}{1+R_{e}} \tag{18}\]  
In the formula, \(C_{1}\) represents the initial investment cost (in CNY); \(C_{e,i}\) is the energy cost in the year \(i\) (in CNY), with an annual energy cost increase rate of 3.5%; \(R_{d}(i)\) is the discount rate in the year \(i\); \(A_{floor}\) is the total building area in square m\({}^{2}\); \(R_{R}\) is the real interest rate; \(R_{e}\) is the energy price increase rate, set at 1.2% [92]; and \(R_{i}\) is the market interest rate, set at 4.25% [92]. The calculation period is set to 25 years, and the service life of active photovoltaic components is also considered to be 25 years, because the accuracy of economic calculation results beyond 30 years can be affected [91]. If \(dC_{g}>0\), it indicates that the retrofitting scheme is economically unfeasible; if \(dC_{g}<0\), it indicates that the retrofitting scheme is economically feasible, and the smaller the \(dC_{g}\) value, the better the lifecycle economic benefit of the retrofitting scheme.  
In this study, the direction of optimization is to adjust design parameters to minimize the values of \(CE_{CO_{2}}\) and \(dC_{g}\). The function can be expressed as follows:  
\[Min\big{\{}f_{1}(x)=CE_{CO_{2}},f_{2}(x)=dC_{g}\big{\}},x=[x_{1},x_{2},x_{3} \cdots x_{n}] \tag{19}\]  
In this case, the optimization goal is naturally to find the set of parameters \((x)\) that minimize the objective functions \(f_{1}(x)\) and \(f_{2}(x)\). In this study, there is no need to convert maximization problems into minimization problems as the values of the objective functions are already indicators of minimization.