1 Introduction

Water is an essential element for sustaining life on the planet, and the accelerated growth of population, the misuse of water resources by consumers in all uses and the pollution of surface and underground sources increase its scarcity. For such reason, the optimal management of the resource becomes a matter of global attention.

The optimization of operating rules for dams has been applied in different parts of the World. Chang et al. (2005) used genetic algorithms considering upper, lower, critical, average reservoir levels to guide and manage their operation. The main objective of their study was to investigate the efficiency and effectiveness of two genetic algorithms (GA), one with binary coding and the other with floating point coding, to derive reservoir operating curve rules. Someya (2018) studied two adaptive cases for flood control in the Yodo River in 2009 and 2013. In his work, he described the systems applied to the Kizugawa Integrated Dam Operation and Management Office (KDIIMO) and Kizugawa Water Agency Japan (JWA) to implement a safer adaptive flood control operation. Pereira et al. (2018) presented a probabilistic model based on the geometric properties of dams to analyze the suitability of the water level inside the reservoir in adverse environmental, hydrological, and seismic conditions. This analysis is a low-cost alternative to full hydrological analysis and can be applied both, in the design and feasibility phases and in the regular evaluation of dams.

Álvarez and Medrano (2020) characterized the geomorphology of the Mezcalapa River sub-basin in the Grijalva-Usumacinta hydrological region in southeastern Mexico using Geographic Information Systems (GIS) and a series of morphometric parameters, to analyze the morphodynamical and hydrological behavior of this sub-basin, seeking to contribute and strengthen local knowledge for decision-making in the areas of land use planning, civil protection, infrastructure, and public policies.

Ampitiyawatta. (2020) applied particle cluster optimization to obtain optimized guide curves, defined as graphs of water level vs time of a reservoir cascade system, for the operation of such system and compared with the historical operation, he got higher energy production in the system and decreased spills as a result.

Schäffer et al. (2021) proposed medium-term policies that include maximum discharge restrictions based on reservoir volume and inflow volume thresholds, according to environmental scenarios; they used stochastic dynamic programming considering non-convex conditions in the problem and a simulation program of a reservoir system located in western Norway. The simulations carried out showed an improvement in a weekly basis for electricity generation in the system, giving different economic value to the water depending on the week of the year, when considering the thresholds with environmental scenarios.

Wu et al. (2021) obtained operating policies for a system of hydroelectric plants located in different rivers in southeastern China. In a first stage, they used dynamic programming with stochastic sampling to obtain operating policies that fed the initial population of a genetic algorithm, used to optimize the policy in a second stage, obtaining better results in the simulation of the reservoir system.

Mexico is not exempt from the problem of water scarcity in some areas and large quantities in another areas; within the framework of World Water Day, the National Water Commission (CONAGUA), the authority responsible for managing the resource, reported that, as of March 2022, 30.4% of the national territory suffered moderate and exceptional drought conditions. The most affected states are in the north and the west coast, namely: Baja California, Durango, Jalisco, Nayarit and Zacatecas (CONAGUA 2022); in contrast, the extreme weather events that occur with increasing frequency in the southern and southeastern parts of the country, attributed to climate change caused by anthropogenic actions, trigger flooding and put at risk the reservoir systems located mainly in the Grijalva River, one of the largest in the country. Given this scenario, it is especially important to have computational tools that help to find operating rules that prevent the occurrence of unwanted events in reservoirs such as spills or deficits.

González et al. (2009) analyzed the effects that the climate change will have on the Grijalva River basin, since the increases in temperature are larger in the lower basin and decrease towards the upper basin; the mean annual rainfall decrease is less significant in the upper basin and more significant in the lower basin. Sánchez et al. (2015) described the modifications that the flood cycles have experienced in the Grijalva-Usumacinta rivers due to the pressure generated by several factors such as the construction of infrastructure and the pressure on water resources in these regions of the country. Arreguín et al. (2016) listed the natural events that caused economical losses worldwide in 2015 (1060 cases), with information from the German reinsurer Münchener Rückversicherungs-Gesellschaft. The hydrological events (floods and landslides) and climatological (extreme temperatures, droughts and fires) stand out for the largest amount of damage caused.

Arganis and Domínguez (2008) analyzed operating policies for the Grijalva River dam system, using stochastic dynamic programming, considering minimum discharge restrictions to consider an ecological flow and without considering guide curves; (Alegria 2010, Arganis et al. 2013 and Mendoza et al. 2018) began studies to analyze the effects of using guide curves to obtain operating policies in the Grijalva River dam system.

De la Cruz et al. (2008) applied the Markov Control Model (MCM) to obtain optimized operating rules for the Grijalva River hydroelectric system to maximize its efficiency. In this study, an MCM with continuous state space (MCM-CSS) was utilized to analyze the climatological effects through stochastic integrals and considered continuous probability distribution functions of the inflow volumes to the reservoirs.

The objective of this study is to obtain improved operating policies for the Malpaso and La Angostura dams, the largest reservoirs of the Grijalva River system, considering the hydrological events that occurred in 2020, which set a turning point due to the floods that caused more damage were larger compared to the previous events of 1999, 2007 and 2010. The methodology of dynamic stochastic programming (SDP) was used, and an objective function (OF) that maximizes the generation of electrical power and minimizes the occurrence of undesired events, including the volume exceedance of the guide curves was proposed. Guide curves proposed by CONAGUA and the Federal Electricity Commission (CFE), agencies in charge of managing hydraulic systems in Mexico, and by the UNAM Institute of Engineering (II UNAM), were analyzed to study the sensitivity of the operation policy in the case of including or not coefficients of penalty associated with exceeding the guide curves. Unlike previous works, in this one, the guide curves are integrated into the operating policies, and these curves are not treated as fixed limits, but are interpreted as levels that act as a warning to avoid the unwanted spill and deficit events in the long term, a topic that is rarely addressed in the works described in the technical literature.

The study is organized into the following sections: the introduction described here, the background, the methodology, in which the study area is described, and highlights the SDP used in the case of the Grijalva River hydroelectric system; also, it is described the objective function, the concept of guide curves and the operation of the joint reservoirs and considerations to take into account; the autocorrelation of inflow volume during the simulation. Subsequently, the main results of the simulation with the optimized policies are highlighted, compared with those obtained without using guide curves. Finally, the discussion of the results is made, issuing the conclusions and recommendations derived from the investigation.

2 Methodology

2.1 General features and basic data of studied dams

The Grijalva River originates in Guatemala and crosses the border to Chiapas in Mexico; from there, the channel follows a southeast-northwest direction (Fig. 1). The Grijalva River has significant flow variations between the dry and the rainy seasons; for that reason before the commissioning of the dams the lowlands were exposed to recurrent floods. The reservoirs have played a fundamental role in the control of runoff in the Grijalva River, mainly with La Angostura (Belisario Domínguez) and Malpaso (Netzahualcóyotl), due to its large storage and regulation capacity. Besides, this system contributes to 67% of the generation of hydroelectricity in Mexico (Ramos and Montenegro 2012). Figure 1 shows the layout of the dams along the Grijalva River.

Fig. 1
figure 1

Source: own design

Study site.

The reservoir system operates in cascade, the upper reservoir is La Angostura (Belisario Domínguez), followed by the reservoir of Chicoasén (Manuel Moreno Torres), the next reservoir is Malpaso (Netzahualcóyotl), and the lower reservoir is Peñitas (Ángel Albino Corzo), all shown in Fig. 2. (The main objective of this reservoir system is electric power generation. La Angostura and Malpaso are the dams with the largest regulation capacity; they have a useful capacity of 13,169 and 9,317 hm3 respectively, very large compared to Chicoasén and Peñitas, whose useful capacities are 251 and 130 hm3, respectively. With such characteristics it is possible to work with an equivalent system constituted of two dams (La Angostura and Malpaso), considering the hydraulic heads of the remaining dams, as well as the volume of contribution from Chicoasén to Malpaso. The way Chicoasén and Peñitas operate consists of extracting what is discharged through La Angostura and Malpaso, trying to maintain adequate levels, depending on the time of year.

Fig. 2
figure 2

(Source: Adapted from Alegría, 2010)

Scheme of water management in the Grijalva System

The Grijalva River system is managed by the CFE, which considers the CONAGUA guidelines (Alegría 2010). In this study, the information of the historical runoff inflow data from the drainage basin of each dam was collected and analyzed. As a result of the review of the information, a fortnightly data record was created of the inflow volumes to the La Angostura and Malpaso dams (considering the contributions of the Chicoasén Dam), for the period from 1959 to 2020. The information from the curves Elevation-Capacity and Capacity-Area estimated in 2018 (the more recent) were also used in the analysis. The historical monthly net evaporation data used in the Alegría (2010) study, was used here. As a starting point, the information from the guide curves of the study by Mendoza et al. (2018), was used and the proposals by the CFE, CONAGUA and II UNAM were added.

2.2 Stochastic dynamic programming (SDP) in the management of a sequential-dam system

The SDP considers the random nature of the inflow volumes to the reservoirs, the theoretical aspects are described in the literature on the subject (Bellman 1957; Dreyfus and Law 1977; Larson and Casti 1982; Trezos and Yeh 1987; Merwade and McKinney 2001; Labadie 2004). The state variables of the problem, the control variables, the equation that relates the state and control variables (in this case it is the continuity equation) and the restrictions in the system (useful capacity of the reservoir, capacity of the intake works) must be established to define the maximum and minimum extraction requirements (for drinking water or ecological flow, for example Arganis and Domínguez 2008). The proposed objective function seeks to maximize the expected value of the benefit for energy generation, imposing penalties to undesired events in the dam system (Domínguez et al. 2001). The events to be avoided are spillage, deficit and exceeding or falling below the limits of the guide curves. The deficit in a dam occurs when the level of the reservoir is below the Minimum Water Level (mWL) and the committed demands cannot be satisfied. When the level of the reservoir is above the Maximum Ordinary Water Level (MOWL), there will be spills. Spills and deficits will be conditions to avoid during the operation of the dam, since they can cause damage such as floods downstream or non-compliance with demands (agricultural, water for human or industrial consumption). Penalties for exceeding or falling below the limits of the guide curves were also included in the objective function (OF). The OF to maximize is expressed as:

$$\mathrm{OF}=\mathrm{Ma }\mathrm{x E}\left\{\sum_{l=1}^{NP}{GE}_{l}-{C}_{l}{Der}_{l}-{C}_{l}{Def}_{l}-{C}_{l}{V}_{{cga}_{l}}-{C}_{l}{V}_{{cgb}_{l}}\right\}$$
(1)

where E () is the Expected Value Operator; NP is the number of reservoirs (2, in this case); GE is the Generated energy in GWh; Der, Def, Vcga, and Vcgb are spill, deficit, volume above the upper guide curve (UCG), and volume below the lower guide curve (LGC), in hm3, respectively; Cl are penalty coefficients for spillage, deficit, for exceeding the UGC and for falling below the LGC, respectively.

The recursive SDP Eqs. 2 and 3 are applied and solved (detailed in Arganis et al. 2013).

$${\mathrm{B}}_{\mathrm{n}}^{\mathrm{k}1,\mathrm{k}2}\left({\mathrm{i}}_{1},{\mathrm{i}}_{2}\right)={\mathrm{\varnothing }}_{\mathrm{n},\mathrm{ k}1,\mathrm{k}2 }+ \sum_{{\mathrm{j}}_{1}=1}^{{\mathrm{NS}}_{\mathrm{J}}}\sum_{{\mathrm{j}}_{2}=1}^{{\mathrm{NS}}_{\mathrm{J}}}{\mathrm{q}}_{\mathrm{n},\mathrm{k}1}({\mathrm{i}}_{1},{\mathrm{j}}_{1}){\mathrm{q}}_{\mathrm{n},\mathrm{k}2}({\mathrm{i}}_{2},{\mathrm{j}}_{2}){\mathrm{B}}_{\mathrm{n}+1}^{*}({\mathrm{j}}_{1},{\mathrm{j}}_{2})$$
(2)

where

$${\mathrm{\varnothing }}_{\mathrm{n},\mathrm{ k}1,\mathrm{k}2 }\left({\mathrm{i}}_{1},{\mathrm{i}}_{2}\right)= \sum_{{\mathrm{j}}_{1}=1}^{{\mathrm{NS}}_{1}}{\mathrm{q}}_{\mathrm{n},\mathrm{k}1}\left({\mathrm{i}}_{1},{\mathrm{j}}_{1}\right){\mathrm{b}}_{\mathrm{n},\mathrm{k}1}\left({\mathrm{i}}_{1},{\mathrm{j}}_{1}\right)+\sum_{{\mathrm{j}}_{2}=1}^{{\mathrm{NS}}_{2}}{\mathrm{q}}_{\mathrm{n},\mathrm{k}2}\left({\mathrm{i}}_{2},{\mathrm{j}}_{2}\right){\mathrm{b}}_{\mathrm{n},\mathrm{k}1,\mathrm{k}2}\left({\mathrm{i}}_{1},{\mathrm{j}}_{1,}{\mathrm{i}}_{2},{\mathrm{j}}_{2}\right)$$
(3)

With these equations, the optimization algorithm is divided into two parts to avoid repetitive calculations; in the first part, the expected value of the benefit \({\mathrm{\varnothing }}_{\mathrm{n},\mathrm{ k}1,\mathrm{k}2}\) , in stage n, given extractions k1, k2 of both dams is calculated for each stage, which is repeated from one year to the next. In the second part, a large value of N is assumed (which may correspond to the useful life of the system), the calculation starts backwards, assuming zero benefits \({\mathrm{B}}_{\mathrm{n}+1}^{*}({\mathrm{j}}_{1},{\mathrm{j}}_{2})\) after stage N, for the states j1 and j2 of both dams. The process is repeated until the difference between the sum of benefit \({\mathrm{B}}_{\mathrm{n}}^{\mathrm{k}1,\mathrm{k}2}\left({\mathrm{i}}_{1},{\mathrm{i}}_{2}\right),\) for stage n, extractions k1 and k2, in states i1 and i2 of the two dams, increases in two consecutive years meets a small tolerance (tolerance = 1 × 10–7 in this case) or the maximum number of iterations is reached (100 iterations was the limit considered in this analysis). Once the process converges, the optimal extraction k and the maximum total benefit B are saved for each reservoir and for each stage.

2.3 Guide curves

The guide curves are elevations and storage suggested by the operating agencies that have the purpose of maintaining the level of the dams within those limits to minimize spills and deficits, allowing a reserve capacity to handle extreme events, (Domínguez et al. 2001; Arganis et al. 2013; Mendoza et al. 2018; De la Cruz et al. 2008). They are reported as elevation-time or volume-time graphs. In the case of the Grijalva dams that have the larger regulation capacity (La Angostura and Malpaso), the current guide curves were designed taking into account the probability of occurrence of the cool phase of the El Niño Southern Oscillation (La Niña) related to an increase of the runoff, or the occurrence of El Niño or neutral, that is, they also consider possible conditions of low runoff with respect to the historical average values.

2.4 Joint reservoir operation

For the joint hydrological simulation of the hydroelectric reservoir system, the continuity equation was used, considering that the extractions of the upstream reservoir turn into additional inflow volume to those of the downstream reservoir's own basin (Padilla 2018). The fundamental equation for simulating reservoirs is the continuity equation, which for a given time interval ∆t is: (Aparicio 1992).

$$\Delta \mathrm{V}=\mathrm{x}-\mathrm{k}$$
(4)

where x is the inflow volume to the reservoir, in hm3, in the time interval ∆t; k is the volume extracted from the reservoir, in hm3 both for the time interval ∆t, and ∆V is the volume change in the reservoir during a time interval.

The inflows to a reservoir can be expressed with the equation:

$$\mathrm{x}={\mathrm{E}}_{\mathrm{cp}}+{\mathrm{E}}_{\mathrm{t}}$$
(5)

where Ecp are inflows generated by runoff from the catchment of the reservoir, Et are inflows by transfer from other basins, both in hm3.

The outflow volume of a reservoir is divided into volumes extracted by the normal operation of the reservoir and by the released thru spillways, and evaporated volumes.

For the simulation of the La Angostura and Malpaso reservoirs, fortnightly or monthly time periods can be used, however, the Chicoasén and Peñitas dams, have significantly shorter regulation times. Such condition allows modeling the system with only two reservoirs: La Angostura and Malpaso; Chicoasén and Peñitas do are not considered due to their limited capacity for regulation, since their input volumes are practically equal to their outputs. Thus, the volumes of Chicoasén are associated with those of the Malpaso Dam while those of Peñitas do not interfere at any time, since it is the last reservoir of the system.

In the equivalent system set up with two dams, the hydraulic head of Chicoasén is added to the head of La Angostura, while the head of Peñitas is added to the Malpaso basin, for the calculation of the generated energy. Table 1 summarizes the considerations taken for the simulation.

Table 1 Considerations when performing joint reservoir operation

2.5 Corrective equation of the optimal policy to consider the autocorrelation of inflow volumes in successive stages

The autocorrelation coefficient of the inflow volumes in a time interval, characterizes the dependence of the sequence of runoff in the historical series, here fortnights are considered as a time interval; therefore, the correlation is considered between fortnight j and fortnight j + 1.

In order to consider the autocorrelation between fortnightly inflow volumes in the final extraction volume \({Vext}_{l,j}\) it is proposed to add to the volume dictated by the optimal policy previously calculated with SDP \({{Vext}_{l,j }}^{*}\), a DELVOL volume, depending on whether the inflow volume in the previous fortnight (\({V}_{l,a,j-1}),\) was greater or lesser than the average historical inflow volume \({\stackrel{-}{(V}}_{l,j-1})\) of the fortnight in question, therefore the DELVOL volume is obtained as:

$${DELVOL}_{l,j}={m}_{l,j-1}*\left[{V}_{l,a,j-1}-{\overline{V} }_{l,j-1}\right]$$
(6)

where \({DELVOL}_{l,j}\) is the volume, in hm3, added to the scheduled extraction volume for reservoir l, in fortnight j; \({m}_{l,j-1}\) is the slope of the linear regression between the inflow volumes of fortnight j-1 and j for the reservoir l;\({V}_{l,a,j-1}\) is the actual inflow volume, in hm3, in the reservoir l, in the fortnight j-1, given the year a;\({\overline{V} }_{l,j-1}\) is the average historical inflow volume, in hm3, in the reservoir l, in the fortnight j-1.

The DELVOL volume is included only during the simulation process, to avoid the number of states growing considerably if it is introduced in the optimization process; in this way, the scheduled extraction volume for fortnight t is as follows:

$${Vext}_{l,j }= {{Vext}_{l,j }}^{*}+{DELVOL}_{l,j}$$
(7)

where \({Vext}_{l,j}\) is the extraction volume, in hm3, that takes into account the correlation between the inflow volumes \(; {{Vext}_{l,j }}^{*}\) is the extraction volume, in hm3, resulting from the optimal process obtained with SDP.

3 Results

A volume (ΔV) of 200 hm3 was considered in the application of the SDP to discretize the state variables; with this approach, the useful capacity was defined in 65 states for La Angostura and 46 states for Malpaso. The maximum (kmax) and minimum (kmin) extractions were defined based on the extraction capacities of the turbines and the drinking water supply needs in the region. The capacity of the turbines of La Angostura (1100 m3/s) and Malpaso (1400 m3/s) and a flowrate of 200 m3/s for drinking water supply in La Angostura and 300 m3/s for Malpaso were considered, the kmin and kmax values obtained are listed in Table 2, for the seven stages that were considered.

Table 2 Conditions for optimization

In the analysis, smoothed inflow volume probabilities were used, to attenuate abrupt variations in the behavior of inflow volume in each stage (Figs. 3 and 4). To obtain them, the historical record of the entering volumes to the reservoirs from 1959 to 2020 was considered, that is, a total of 62 years were analyzed, and when high runoff values occur that were separated into four or more class intervals, it was preferred to group them or distribute their probability in the last states, thereby simplifying (smoothing) the inflow volume probability curve.

Fig. 3
figure 3

Smoothed inflow volume probabilities of the seven stages considered. La Angostura, Dam

Fig. 4
figure 4

Smoothed inflow volume probabilities of the seven stages considered. Malpaso, Dam

The following tests were defined:

  1. 1.

    Test 1: Uses the guide curves presented by (Mendoza Ramírez et al. 2018).

  2. 2.

    Test 2. Considers the upper guide curve proposed by the CFE that seeks to optimize the electrical power generation and at the same time avoid floods downstream of the Peñitas Dam.

  3. 3.

    Test 3. Uses the upper guide curve proposed by CONAGUA, which seeks a more cautious management of the system, favoring maintaining storage levels that allow the system to handle extraordinary events without causing spills.

  4. 4.

    Test 4. Considers the high guide curve defined in the II UNAM, based on the statistics of the volumes recorded from the fortnight under analysis until the end of the rainy season.

  5. 5.

    In order to have a point of comparison, the operation policy of the trial called Test 0 was obtained, which does not consider guide curves.

In very general terms, both CONAGUA and CFE use as a criterion to establish the limits of the upper guide curves, defining a reserve volume (between the guide curve and the MOWL) that allows them to manage floods with a 100-year return period with maximum discharge rates lower than the capacity of the downstream river. The II UNAM, for its part, takes these guidelines as a starting point, but considers, for each fortnight of the year, the inflow volumes registered from that fortnight until the end of the rainy season and proposes to define an objective function that allows evaluating the four alternatives according to precisely defined objectives.

Figure 5 shows the upper guide curves (UGC) used in each test (1 state = 200 hm3) for each dam, the lower guide curves (LGC) were proposed equal to those of the study by Mendoza et al. (2018); the penalty coefficients used to obtain the operating policies are defined in Table 3.

Fig. 5
figure 5

Upper guide curves analyzed

Table 3 Penalty coefficients for the five tests

The results obtained by simulating the operation of the system using the inflow volumes of the historical record, for the policies obtained with the five tests, are shown in Table 4. The variables analyzed were spill and total deficit, minimum and maximum storage, and the average energy generated per fortnight.

Table 4 Simulation results with historical record 1959–2020

Analyzing Table 4 it can be seen that:

  1. a)

    For Tests 1 to 4, considering guide curves, the simulation with the historical record did not produce a deficit or spill in the system, while in Test 0, without the control of the upper guide curve, there is a spill close to the 2200 hm3 in the Malpaso Dam. This event is to be avoided since the Malpaso discharges must be managed by the Peñitas Dam, whose regulation capacity is very small, therefore, the volume released may cause floods downstream of the dam system.

  2. b)

    Considering the four tests that used guide curves, the maximum storage value is reached in Test 2 (10,473 hm3 in La Angostura, and 8,355 hm3 in Malpaso), setting aside a smaller room with respect to MOWL, of 2,696 hm3 in La Angostura and 962 hm3 in Malpaso. Test 3 leaves a larger room: 3,808 hm3 in La Angostura and 1,436 hm3 in Malpaso.

  3. c)

    Regarding the mWL, the opposite occurs: the minimum storage value in both dams is obtained in Test 3, which leaves only 1577 hm3 difference with the mWL in La Angostura and 1278 hm3 in Malpaso.

  4. d)

    Considering the tests with guide curves, Test 2 leads to a power generation 1.3% higher than test 3.

In summary, when guide curves are not considered in the optimal policy (Test 0), unwanted spill events occur in the simulation with the historical record of 62 years. In this Test, the optimal policy favors the hydroelectric generation, while by proposing a high guide curve and penalizing the separation with respect to this curve (tests 1 to 4), the power generated decreases by 3.8% (Test 3 vs Test 0), but it avoids spills even in the presence of extreme events.

To analyze the most contrasting results of the tests with guide curves (Tests 2 and 3), Fig. 6 shows the behavior of the average values of elevation and energy, for La Angostura and Malpaso dams.

Fig. 6
figure 6

Comparison in the behaviour of the elevations and average fortnightly energy in Tests 2 and 3

It can be seen from Fig. 6 that both tests maintain a similar behavior in the La Angostura dam, with a slight increase in the average level from fortnight 10 in Test 2. In Malpaso the difference is more notable in all fortnights.

The average value of the generated energy: in La Angostura, the peaks in fortnight 21 of Test 2 and the notable differences between fortnights 12 and 16 stand out. In Malpaso, in general, from fortnight 10 to 20, both tests show fluctuations from one fortnight to the next. The average of the energy generated in both dams is slightly higher (1.3%) with trial 2.

3.1 Discussion

In the search for improved operating policies in the main dams of the Grijalva River, considering 62 years of historical record (1959 to 2020), a program was developed and modified based on stochastic dynamic programming in the case of two dams that operate in cascade; it was possible to work with small volume intervals (∆V of 200 hm3), which allowed defining 65 states for the La Angostura Dam and 46 states for the Malpaso Dam.

The results clearly show the advantages of including guide curves and incorporating penalties in the objective function proportional to the magnitude of volumes that exceed such guide curves (see Eq. 1). In this way, although there is a difference between the values and criteria with which each dam operating institution defined the limits of their guide curves, by establishing them and penalizing in the OF, the possibility that the storage in the dams exceeds such curves, allows a safer management of the reservoirs, achieving better control of the events that are to be avoided.

The results obtained by using the optimization and simulation algorithms in combination, allow the agencies in charge of operating the dams to objectively compare the advantages and disadvantages of different combinations of guide curves. Thus, if the results obtained by simulating the 62 years of historical record for tests 2 and 3 are compared, although in neither of the two cases were there events of spillage or deficit, the simulations show slightly higher storage in Malpaso for policy 2, so that if an extraordinary event were to occur with inflow volumes greater than those in the historical record, the possibilities of spills in that dam (spills that would cause flooding in the Tabasco plain) would be greater. On the other hand, the application of policy 2 would lead to a greater generation of energy and a lower possibility of deficit events in the hypothetical case of inflows lower than the historical ones.

4 Conclusions

The SDP is a very useful tool for obtaining operating policies, by dividing the problem into sequential stages considering the probabilities associated with the inflow volumes in each stage. Regarding previous studies, here the number of states and stages of the problem were expanded; more detailed operating rules are obtained that can be applied at a fortnightly level; there was information updated to the year 2020 that considers extreme weather events that have recently occurred.

By separating the SDP algorithm into two parts, it is possible to reduce the demand for computational resources and time, which are two of the disadvantages in the application of SDP in general. The computer programs developed made it possible to work with 65 states for the La Angostura dam and 46 states for Malpaso; they are executed on a PC and the time it takes to obtain results is of the order of a couple of hours. This allows the flexibility to make changes and tests to increase the years of data recorded (including, for example, synthetic series) or make new arrangement of stages, to vary the penalties for each stage, to adjust the limits of the guide curves, among other parameters, to obtain new operating rules, depending on the needs of the operators and the system.

By combining the optimization algorithm using stochastic dynamic programming with an algorithm that allows detailed simulation of the behavior of the system for each operation policy alternative, an objective evaluation of the results obtained can be made, considering the needs of operators and decision-makers.

The developed algorithm allows expressing the optimal policies for each stage as a matrix, whose columns are the filling states of Malpaso and the rows the filling states of La Angostura. In this way, at the beginning of each fortnight, the operators only must observe the filling status of each reservoir to define the extractions scheduled for the fortnight.

In this study, it was possible to demonstrate the support that constitutes for obtaining an optimal functional operation policy, including the concept of guide curves and penalizing in the OF the surplus volume or deficit with respect to such curves, so that the operating policy is adapted considering a warning associated with the danger of a spill or deficit. The latter allowed obtaining operating rules that prevent spill events, even with the presence of extreme weather events such as those recorded in the years 1999, 2007, 2010 and 2020.

Since none of the guide curve alternatives evaluated produced a deficit or spill, the comparison of the results focuses on the maximum and minimum levels reached and on the average power generation. Such values must be evaluated by the operators to select the alternative that is best to them; however, it is recommended to generate synthetic records that are broader than the historical ones, preserving their statistical characteristics, to show the behavior of the system under more extreme conditions, for the different guide curve alternatives.

The Grijalva River dam system was operated correctly in 2020, since it attenuated the hydrograph that entered the La Angostura dam, which reached the Malpaso dam and what finally left the Peñitas dam; but the operation can be improved by applying operation policies and guide curves such as those obtained in this research. The cause of the floods of 2020 can be attributed to the presence of combined extreme two cold fronts and remnants of a tropical storm.