# Optimization of Electricity Generation Technologies to Reduce Carbon Dioxide Emissions in Egypt
## 2 Materials and Methods
### MESSAGE Modeling  
MESSAGE is a system-engineering optimization model used for medium- to long-term energy-system planning and energy-policy analysis. Professors [PERSON] and [PERSON] created MESSAGE for a global energy project that they were working on at the International Institute for Applied Systems Analysis (IIASA) in the 1970s. Subsequently, IAEA purchased the MESSAGE program from IIASA and introduced some improvements, including the addition of a user interface. The mathematical model of MESSAGE is based on linear optimization, which optimizes a linear objective function under certain constraints or linear equality and inequality according to the decision variables. Objective function is defined as the objective used for making decisions. In MESSAGE, the objective function can be the cost (to be minimized) or the profit (to be maximized). The method also allows the use of several optimization criteria in which case one looks for an efficient solution. The objective function is obtained from the system cost. For each period denoted as \(t\), the following are recorded:  
* Variable operating and maintenance costs;
* Fixed operating and maintenance costs;
* Investment costs: penalty costs/taxes imposed by regulation. \[\textit{Total system cost}=\sum_{t=1}^{T}\beta\times\sum_{i=1}^{n}C_{tt} \times X_{tt}\] (1) where \(\sum_{i=1}^{n}C_{tt}\times X_{tt}\) is the sum of the costs incurred in period \(t\) and \(\beta=\frac{1}{1+r}\), where \(r\) is the discount rate. The constraints are the restrictions or limitations on the decision variables. These constraints usually limit the value of the decision variables. In MESSAGE, the constraints reflect various limits on the expansion and use of technologies and resources, including emissions limits due to environmental regulations. An important constraint in the model of an energy-supply system is satisfaction of the demand. Depending on the model, the energy demand can be expressed at the level of the final energy forms (demands for gas and electricity) or at the useful energy level (demands for transportation by cars, residential heat, and industrial heat). The constraint is that the supply must be at least equal to the demand in each period \(t\). \[\sum_{i=1}^{i=n}S_{ij}\times X_{it}\ \geq D_{it} \tag{2}\]  
where \(D_{it}\) represents the demand for energy form \(j\) at period \(t\), \(X_{it}\) represents the activity of technology \(i\) in period \(t\), and \(S_{ij}\) is the rate in which technology \(i\) is generating energy form \(j\). Figure 1 shows the energy chain in Egypt, which consists of four levels. The first level comprises the resources where Egypt extracts NG and crude oil. In addition to its extracted resources, Egypt will import nuclear fuel to satisfy its energy demand for a nuclear power plant. The second energy level consists of the primary form of energy, which involves the preparation and treatment of the extracted energy form for conversion to another form before using it in various technologies. The third level refers to the secondary form of energy, which represents the pre-final form of energy before sending it to the recipients for consumption. The fourth and final level is the final demand energy. The energy chain in Figure 1 shows that gas, oil and, electricity represent the final electricity-form demand in Egypt. The first information introduced into MESSAGE is the time frame of the model. The first and last model years determine the study period (or planning horizon). The study period is divided into time steps. Table 1 summarizes the time frame input data to MESSAGE. The second type of information entered into MESSAGE defines the energy levels and the information at each level of the energy forms that is considered by the system which is illustrated in Figure 1.