1 Introduction

Rivers play a pivotal role in meeting various water demands, including drinking water and irrigation. Among the hydraulic structures present in rivers, large dams are of paramount importance for water supply, as well as for functions such as electricity generation and flood control (Di Baldassarre et al 2021). However, the burgeoning population poses environmental challenges to river ecosystems (Jones and Bull 2020). This leads to an increase in offstream flow to meet water demands while decreasing instream flow, thereby exacerbating environmental degradation in river ecosystems. The environmental impacts of dams have been extensively discussed in recent decades (e.g., Li et al. 2021), highlighting the need to address issues such as dam removal.

Dam removal has emerged as a challenging issue in recent years, with previous studies discussing its importance and feasibility (e.g., Foley et al. 2017; Major et al. 2017). It is evident that a comprehensive approach, possibly involving complex modeling, is necessary to assess the potential benefits of dam removal on the environment. An integrated framework proves invaluable in evaluating how dam removal could positively impact the environment, considering various aspects. Notably, the assessment of dam removal projects should include an evaluation of their effects on downstream aquatic habitats. Dams represent significant investments in hydraulic infrastructure. Therefore, optimizing reservoir operations post-construction becomes crucial (Ahmad et al. 2014). Optimal reservoir operation aims to maximize benefits, with methodologies like the loss function widely used for optimization. Moreover, incorporating storage loss into the optimization system remains pertinent (full review by Beiranvand and Ashofteh 2023). Despite the challenges posed by the non-linear nature of reservoir operation, various optimization techniques such as linear programming (LP), non-linear programming (NLP), and dynamic programming (DP) have been employed (e.g., Chen 2021). However, advanced computational methods like metaheuristic algorithms are increasingly recommended due to their efficiency (e.g., Yaseen et al. 2019).

Assessing environmental degradation in rivers requires effective tools, with mathematical models being instrumental in evaluating water quality and quantity. Abiotic factors play a crucial role in providing suitable habitats for aquatic life (Ahmadi‐Nedushan et al. 2006). Notably, physical parameters and water quality parameters are vital considerations for environmental assessments, including environmental flow assessment. While univariate methods offer simplicity, more efficient techniques like fuzzy multivariate methods have been developed to account for interactions between physical factors. Expert opinion plays a significant role in simulating physical habitats due to their complexity. Water quality is another critical aspect of river ecosystem management, as it directly impacts aquatic life. Biological activities of aquatic organisms are dependent on water quality parameters such as temperature and dissolved oxygen (Devi et al. 2017). Ensuring suitable water quality is essential for the reproductive success of various fish species, highlighting the importance of considering water quality in environmental management plans.

It is essential to emphasize the research gap and the novel contributions of the present study. The integration of environmental modeling within reservoir operation structures is crucial for assessing the downstream impacts of both dam construction and dam removal. While some previous studies have examined the downstream environmental impacts of dams, there remains a lack of integrated frameworks specifically designed to assess downstream environmental degradation resulting from dam construction or removal. Motivated by this research gap, the primary novelty of this study lies in proposing and evaluating an integrated framework for assessing dam removal, with a focus on downstream environmental degradation encompassing water quality and hydraulic parameters. By incorporating both physical and water quality simulations into reservoir operation optimization, the proposed method offers a comprehensive approach to evaluating the environmental benefits of dam removal. This framework addresses fundamental questions regarding how dam removal can alleviate environmental degradation in downstream river habitats and highlights the critical role of optimal operation in minimizing adverse impacts. Moreover, this study presents an opportunity to enhance simulation–optimization methods for assessing dam removal projects, providing a flexible and adaptable framework that can be upgraded as needed.

2 Application and Methodology

The proposed framework comprises two scenarios for measuring reservoir losses and downstream environmental degradation. Different measurement indices are employed to assess the environmental benefits of dam removal and its impacts within the river basin. The first scenario optimizes release and storage in the reservoir without considering downstream environmental flow, aiming to maximize reservoir benefits. In contrast, the second scenario introduces a novel optimization system that simultaneously minimizes environmental degradation and reservoir losses as well as assuming dam removal to restore natural river flow.

2.1 Physical Habitat Simulation

The previous studies have demonstrated the utility of such simulations in river ecosystem management (Sedighkia et al. 2021a). We utilized 1D fuzzy physical habitat simulation, recognized as one of the most efficient methods for habitat assessment. Notably, the applicability and efficiency of one-dimensional hydraulic modeling for physical habitat simulation have been validated in prior research (Jowett and Duncan 2012). The development of fuzzy habitat rules constitutes a critical step in physical habitat simulation. In our approach, we combined field studies with expert opinions to formulate these rules. Field studies comprised two main components: ecological studies or fish observations and surveying river cross-sections, essential for hydraulic simulation. In this study, electrofishing was employed due to its advantages and the research team's prior experience. Additionally, depth and velocity were concurrently measured in microhabitats using a propeller and metal rule (Harby et al. 2004). It is noteworthy that the Brown trout was selected as the target species in the case study. A representative reach of 1000 m in length was considered for the physical habitat simulation. More details on the fuzzy physical habitat simulation have been addressed in the literature (Noack et al. 2013).

2.2 Thermal Habitat Assessment

Thermal habitat assessment is a crucial component of the proposed framework for analyzing dam removal. A fundamental requirement for achieving this goal is the simulation of stream temperature. While hydrodynamic models like SSTEMP have been developed for this purpose (Ouellet et al. 2020), they lack flexibility when integrated into optimization models. Therefore, a more adaptable and applicable method is needed, and data-driven models present an efficient option.

Neural networks are widely recognized as effective tools for developing robust data-driven models in water quality simulation (Chatterjee et al. 2017; Dumitru and Maria 2013). We employed an adaptive neuro-fuzzy inference system (ANFIS) to simulate stream temperature within the proposed framework (developed by Jang 1993 and more details by Awan and Bae 2014). Table 1 presents the main characteristics of the developed ANFIS-based model for simulating stream temperature, demonstrating the potential complexity of data-driven temperature models.

Table 1 Main characteristics of ANFIS based data stream temperature model

Subsequently, it is necessary to convert stream temperature into thermal habitat tension. Here, we adopted a biological-based model used by Sedighkia et al. (2019) to assess the thermal habitat tension of the Brown trout within the present framework. However, it is important to note that using other target species may require its own thermal tension model. Figure 1B illustrates the thermal tension curve for the Brown trout utilized in the case study (more details by Sedighkia et al. 2019 and Sedighkia et al. 2021b).

Fig. 1
figure 1

A1) Dissolved oxygen tension curve for water temperature < 15oc A2) water temperature > 15oc B) Thermal tension curve

Furthermore, optimization was conducted on a monthly scale, necessitating the use of monthly data from various stations downstream. Additionally, employing an index is crucial for assessing the robustness of the data-driven model. The Nash–Sutcliffe model efficiency coefficient (NSE) was utilized for this purpose, initially developed for measuring the performance of hydrological models (Abbaspour et al. 2015), but applicable to any type of simulation for comparing results with recorded data or observations to validate the model. Equation 1 presents the basic form of this index. To estimate the wetted perimeter in the optimization model, a relationship between wetted perimeter and discharge was developed based on hydraulic modeling by HEC-RAS 1D. A downstream reach with a length of 9000 m was considered in the stream temperature modelling. The following equation shows the NSE mathematical definition.

$$NSE=1-\frac{\sum_{t=1}^{T}{({m}_{t}-{o}_{t})}^{2}}{\sum_{t=1}^{T}{({o}_{t}-{o}_{mean})}^{2}}$$
(1)

where mt represents the simulated or modelled parameter, Ot denotes observed or recorded data, Omean is the average of the observed data, and Ti indicates the number of samples.

2.3 Dissolved Oxygen Modelling

Dissolved oxygen (DO) is a critical water quality parameter for river habitats, serving as an indicator of water quality suitability for aquatic life. Other pollutants in the river can impact DO concentration, making it a representative parameter for overall water quality. In this study, we employed an ANFIS-based model to simulate DO concentration. The modeling was conducted on a monthly scale to capture temporal variations. Table 2 presents the main characteristics of the developed data-driven model for simulating dissolved oxygen.

Table 2 Main characteristics of ANFIS based data dissolved oxygen model

Given that DO levels are influenced by various water pollutants that may be discharged into the river, we included the month (January to December) as one of the inputs in the data-driven model. It is important to note that pollutant rates can vary across months due to agricultural activities in the downstream river basin. Additionally, a DO tension model for the Brown trout, developed by Sedighkia et al. (2019), was adopted within the proposed framework. The outputs of the DO model were converted to DO tension using the biological model. Figure 1A1 and 1A2 illustrate the DO tension curve developed by Sedighkia et al. (2019), which was utilized in the case study.

To assess the robustness of the dissolved oxygen data-driven model, we applied the Nash–Sutcliffe efficiency coefficient (NSE). This index provides a measure of how well the model predictions match the observed data, ensuring the reliability of the modeling approach.

2.4 Optimization Model

In both scenarios, optimization models are required to efficiently manage reservoir operation. In the first scenario, aimed at maximizing reservoir benefits, Eq. 2 was utilized as the objective function. This function minimizes the difference between the target (maximum requested water demand) and the release for demand. Constraints play a crucial role in structuring optimization models. For scenario 1, we incorporated several constraints into the proposed optimization model, including minimum operational storage, maximum storage, and maximum water demand. Specifically, operational storage in the reservoir should not fall below the minimum operational threshold or exceed the reservoir's capacity. Additionally, release for demand must not surpass the maximum requested water demand.

To handle constraints within the metaheuristic optimization framework, penalty functions were employed—a well-established approach utilized in numerous prior studies (developed by Agarwal and Gupta 2005). Three penalty functions were integrated into the optimization model for scenario 1. These penalty functions increase the penalty incurred by the model when constraints are violated in the optimal solution. Equation 6 illustrates the final form of the objective function for the optimization model in scenario 1. Here, C1 to C3 represent constant coefficients determined through initial sensitivity analysis of the optimization model.

$$OF=\sum\nolimits_{t=1}^{T}{(\frac{{D}_{t}-{R}_{t}}{{D}_{t}})}^{2}$$
(2)
$$if{S}_{i}>{S}_{max}\to P1=c1{(\frac{{S}_{t}-{S}_{max}}{{S}_{max}})}^{2}$$
(3)
$$if{S}_{i}<{S}_{min}\to P2=c2{\left(\frac{{S}_{min}-{S}_{t}}{{S}_{min}}\right)}^{2}$$
(4)
$$if {R}_{t}>{D}_{t}\to P3=c3{\left(\frac{{R}_{t}-{D}_{t}}{{D}_{t}}\right)}^{2}$$
(5)
$$Minimize(OF)=\sum\nolimits_{t=1}^{T}{(\frac{{D}_{t}-{R}_{t}}{{D}_{t}})}^{2}+{P1}_{t}+{P2}_{t}+{P3}_{t}$$
(6)

where Dt is maximum water demand, Rt is release for demand or total release for environment and demand in the scenario 2, St is storage, Smax is maximum storage or capacity of the reservoir and Smin is minimum operational storage in the reservoir. Moreover, it is necessary to update reservoir storage in each time step that was carried out by the Eq. 7. Overflow was calculated by the Eq. 8 where Et is evaporation from the reservoir, At is area of the reservoir, It is inflow of the reservoir and T is time horizon.

$${S}_{t+1}={S}_{t}+{I}_{t}-{R}_{t}-\left(\frac{{E}_{t}\times {A}_{t}}{1000}\right),t=\mathrm{1,2},\dots ,T$$
(7)
$$\left\{\begin{array}{c}if\left({S}_{t}+{I}_{t}-\left(\frac{{E}_{t}\times {A}_{t}}{1000}\right)\right)\ge {S}_{max}\to {F}_{t}={S}_{t}+{I}_{t}-\left(\frac{{E}_{t}\times {A}_{t}}{1000}\right)-{S}_{max}\\ if\left({S}_{t}+{I}_{t}-\left(\frac{{E}_{t}\times {A}_{t}}{1000}\right)\right)<{S}_{max}\to {F}_{t}=0\end{array}\right.$$
(8)

We developed a novel optimization model for scenario 2, aiming to minimize water demand loss, storage loss, and environmental degradation. Therefore, the loss function utilized in the previous optimization model serves as one of the terms in this updated optimization model. Specifically, four main terms were considered: water demand loss, physical habitat loss, thermal habitat loss, and dissolved oxygen loss.

In detail, PHN, THN, and DHN represent the normalized weighted usable area, thermal suitability, and dissolved oxygen suitability in the natural flow, respectively. On the other hand, PHM, THM, and DHM denote the normalized weighted usable area, thermal suitability, and dissolved oxygen suitability in the optimal release for the environment, respectively.

$$OF=\sum\nolimits_{t=1}^{T}{(\frac{{D}_{t}-{R}_{t}}{{D}_{t}})}^{2}{+(\frac{{PHN}_{t}-{PHM}_{t}}{{PHN}_{t}})}^{2}{+(\frac{{THN}_{t}-{THM}_{t}}{{THN}_{t}})}^{2}{+(\frac{{DHN}_{t}-{DHM}_{t}}{{DHN}_{t}})}^{2}$$
(9)

In this optimization model, we also employed the penalty function method. The same penalty functions as in the previous model were utilized. The final form of the objective function for the optimization model in scenario 2 is displayed in Eq. 10. Particle swarm optimization (PSO) stands as one of the classic and widely utilized metaheuristic algorithms in optimization models (Eberhart and Kennedy 1995). Further details regarding the methodology of this algorithm can be found in the literature (Eberhart and Kennedy 1995).

$$Minimize(OF)=\sum\nolimits_{t=1}^{T}{(\frac{{D}_{t}-{R}_{t}}{{D}_{t}})}^{2}{+(\frac{{PHN}_{t}-{PHM}_{t}}{{PHN}_{t}})}^{2}{+(\frac{{THN}_{t}-{THM}_{t}}{{THN}_{t}})}^{2}{+(\frac{{DHN}_{t}-{DHM}_{t}}{{DHN}_{t}})}^{2}+{P1}_{t}+{P2}_{t}+{P3}_{t}$$
(10)

2.5 Measurement Indices

The reliability index was employed to assess the performance of the optimization model in both the first and second scenarios concerning water supply. This index was originally developed by Sedighkia et al. 2021a and further improved by Ehteram et al. in 2018. Equation 11 defines this index. Storage loss is another critical aspect to be evaluated. The vulnerability index was also developed by Sedighkia et al. 2021a. Additionally, we utilized the root mean square error (RMSE) to measure the performance of the optimization models regarding storage loss. Equations 12 and 13 define these indices in terms of measuring storage loss compared to optimal storage in the reservoir.

Furthermore, several indices are necessary to gauge the performance of the optimization models in terms of physical habitat loss, thermal habitat loss, and dissolved oxygen suitability loss. The Nash–Sutcliffe model efficiency coefficient (NSE) and RMSE were employed for this purpose, as shown in the following equations. It is important to note that optimal suitability is compared with the natural condition at the downstream river reach.

$${RI}_{water\;demand}=\frac{\sum_{t=1}^{T}{R}_{t}}{\sum_{t=1}^{T}{D}_{t}}$$
(11)
$${VI}_{storage}={Max}_{t=1}^{T}(\frac{{S}_{optimum}-{S}_{t}}{{S}_{optimum}})$$
(12)
$${RMSE}_{Storage}=\sqrt{\frac{\sum_{t=1}^{T}({{S}_{t}-{S}_{Optimum})}^{2}}{T}}$$
(13)
$${NSE}_{Physical\;habitat\;loss}=1-\frac{\sum_{t=1}^{T}{({PHN}_{t}-{PHM}_{t})}^{2}}{\sum_{t=1}^{T}{({PHN}_{t}-PHNm)}^{2}}$$
(14)
$${NSE}_{Themral\;habitat\;loss}=1-\frac{\sum_{t=1}^{T}{({THN}_{t}-{THM}_{t})}^{2}}{\sum_{t=1}^{T}{({THN}_{t}-THNm)}^{2}}$$
(15)
$${NSE}_{Dissolved\;oxygen\;habitat\;loss}=1-\frac{\sum_{t=1}^{T}{({DHN}_{t}-{DHM}_{t})}^{2}}{\sum_{t=1}^{T}{({DHN}_{t}-DHNm)}^{2}}$$
(16)
$${RMSE}_{Physical\;habitat\;loss}=\sqrt{\frac{\sum_{t=1}^{T}({{PHN}_{t}-{PHM}_{t})}^{2}}{T}}$$
(17)
$${RMSE}_{Thermal\;habitat\;loss}=\sqrt{\frac{\sum_{t=1}^{T}({{THN}_{t}-{THM}_{t})}^{2}}{T}}$$
(18)
$${RMSE}_{Dissolved\;habitat\;loss}=\sqrt{\frac{\sum_{t=1}^{T}({{DHN}_{t}-{DHM}_{t})}^{2}}{T}}$$
(19)

2.6 Case Study

The Tajan River is one of the most significant rivers in the southern Caspian Sea basin in Iran, serving as a valuable habitat for numerous fish species. Recognizing the importance of irrigation demand, the Rajaei Dam was constructed upstream of this river. However, water demand is being met by extracting water from the reservoir, potentially impacting downstream river habitats. Currently, the release for environmental purposes is minimal, leading to challenges between regional water authorities and the regional department of environment.

This situation presents a dilemma: dam removal could alleviate severe environmental degradation downstream, but environmental optimization might also reduce such degradation. Given the complexities involved in managing the environmental aspects of this river basin, there was a clear need for an integrated framework to assess dam removal and address the environmental management challenges. Figure 2 illustrates the land use, river network, and the location of the Rajaei reservoir within this basin.

Fig. 2
figure 2

Land use, location of the Rajaei reservoir and river network map of Tajan basin

3 Results and Discussion

In the first step, it is necessary to present and discuss the results of the physical habitat simulation. Figure 3 illustrates a sample fuzzy membership function developed for the physical habitats, while Table 3 displays the developed fuzzy habitat rules for the target species, which in this case was the Brown trout. Additionally, Fig. 4 presents the weighted usable area (WUA) curve, which serves as the final output of the physical habitat simulation. This curve was subsequently utilized in the structure of the optimization model in scenario 2. The fuzzy rules indicate that the target species may be sensitive to flow velocity, which is logical considering that high flow velocity increases energy consumption for fish.

Fig. 3
figure 3

A sample of membership functions for the physical habitat model

Table 3 Physical habitat fuzzy rules (L, M and H mean low, medium and high respectively)
Fig. 4
figure 4

Normalized weighted useable area curve (NWUA)

In the second step, the validation results of the thermal data-driven model should be presented. Figure 5a displays the validation results of the thermal habitat tension model, with the Nash–Sutcliffe efficiency coefficient (NSE) computed. The NSE value is 0.95, indicating that the model is highly robust in simulating stream temperature. According to the literature, an NSE above 0.4 suggests strong predictive skills for the model (Knoben et al. 2019). However, even an NSE greater than zero can be considered acceptable.

Fig. 5
figure 5

Validation results of the data driven water temperature (a) and dissolved oxygen (b) model

Furthermore, Fig. 5b depicts the validation results of the dissolved oxygen model, with an NSE value of 0.04. While this indicates that the dissolved oxygen model may not be as robust as desired, it is still within an acceptable range. It is important to note that modeling dissolved oxygen can be complex due to the impact of water pollutants and other factors. Previous studies have highlighted that water quality models, such as those for nitrate or dissolved oxygen, may not achieve as high NSE values as runoff models due to the influence of unknown factors and simplifications in the models (Abbaspour et al. 2015).

The large variation in NSE values is justified by the influence of environmental factors on the simulated parameters. For example, changes in land use and point sources of pollution have less effect on water temperature, making its modeling generally easier. Conversely, dissolved oxygen can be highly affected by changes in land use or point sources of pollution, meaning that considering only limited and key inputs in the model may not be sufficient to generate an accurate model, as observed in the present study. Therefore, the performance of the developed model may be justified based on the complexities involved in simulating dissolved oxygen in the stream.

Our case study indicates that modeling dissolved oxygen should be considered a source of uncertainty in the present framework. However, the robustness of the proposed data-driven model may vary from case to case, with some cases exhibiting fewer complexities regarding water quality issues and therefore yielding more robust results.

It should be noted that the Department of Environment conducted undocumented studies, resulting in the development of two linear regression models upstream of the reservoir. Due to the absence of reservoir impact and other pollutants, water temperature and dissolved oxygen concentration were dependent on the air temperature and water temperature, respectively. These equations were utilized in the environmental assessment for the natural flow. Equations 20 and 21 display these regression models. It is worth mentioning that a high dissolved oxygen concentration is the main characteristic of the natural flow in this river basin.

$${T}_{water }=0.81*{T}_{air}+1.2$$
(20)
$${DO}_{(\frac{mg}{l}) }=-0.022*{T}_{water}+9.51$$
(21)

In the third step, the results of the optimization should be presented and discussed. We selected a 72-month period for the simulation in the present study, which posed challenges for both the reservoir and the river basin due to low inflows during certain months. Figure 6a and b illustrate the inflow of the reservoir, optimal release for water demand, and maximum water demand as well as storage time series. It is important to note that the performance of the penalty functions, including minimum operational storage and maximum storage, is robust. The storage time series indicates that the optimization model can maintain the storage between the minimum operational storage and maximum storage, thus indicating acceptable overall performance of the optimization model in scenario 1 regarding storage. However, a detailed analysis of storage loss requires relevant measurement indices, which will be discussed.

Fig. 6
figure 6

a) Reservoir inflow, release for demand in the scenario 1 and maximum water demand in the simulated period, b) Storage of the reservoir in the simulated period for the optimization model in the scenario 1

Figure 7a displays the release for demand, reservoir inflow, and maximum demand in scenario 2. It appears that considering environmental aspects, with a focus on environmental flow in the optimization model, leads to changes in supplied demand, especially in the first years of the simulated period due to low reservoir inflow. Consequently, low supplied flow in some time steps might pose a challenge for the practical application of the proposed optimization framework in scenario 2. It's worth noting that further analysis of this issue depends on the specific challenges and circumstances of each case study, meaning it may vary on a case-by-case basis. In our case study, the release for demand in each time step was not highly effective. However, the total release over the simulated period was significant. Therefore, using the reliability index seems logical in this case. Nevertheless, engineers may choose different indices in other case studies. More water is supplied in the third, fourth, and fifth years of the simulated period, and utilizing other water resources available in the study area is advisable to compensate for the water supply. Figure 7b presents the storage time series in scenario 2, indicating notable changes in reservoir storage compared to scenario 1. Reduced storage in some simulated time steps is evident, potentially leading to increased storage loss in the optimal release for environment and demand. However, an accurate analysis requires the use of measurement indices.

Fig. 7
figure 7

a) Reservoir inflow, release for demand in the scenario 2 and maximum water demand in the simulated period, b) Storage of the reservoir in the simulated period for the optimization model in the scenario 2

Furthermore, environmental results should be presented and discussed in scenario 2. Figure 8a illustrates the normalized weighted useable area (NWUA) time series during the simulated period. NWUA was normalized by the maximum WUA for better interpretation of the results in further applications. Significant changes compared to the natural flow are observed. Generally, it appears that using optimal reservoir operation considering environmental aspects may not increase the useable area as much as the natural flow, supporting the argument for dam removal to restore river habitats. However, reducing NWUA is a concern for certain time steps in the simulated period. It's important to note that while NWUA in scenario 2 exceeds that of the natural flow in some time steps, indicating that optimal operation may improve the suitability of physical habitats compared to the natural flow, this occurs only rarely in the case study.

Fig. 8
figure 8

NWUA (a), Thermal tension (b) and DO tension (c) time series in the simulated period for the optimization model in the scenario 2

Thermal tension is another aspect that should be discussed. Figure 8b displays the thermal tension time series during the simulated period, comparing thermal tension in the natural flow and the optimal release for the environment and demand by the reservoir. Results indicate that the output of the thermal tension model may be complex, as thermal tension is considerably reduced in some time steps while increased in others. Therefore, the reservoir may have both positive and negative effects within the simulated period. Reservoirs may serve as applicable tools to control thermal tension at downstream habitats in some cases. However, interpreting the results based solely on the thermal tension time series may not be straightforward.

Dissolved oxygen tension is another aspect in the environmental analysis of scenario 2, as displayed in Fig. 8c. Dissolved oxygen tension in the natural flow is close to zero in all time steps. However, the optimal release for the environment and demand indicates that the optimization model may not effectively minimize differences in dissolved oxygen tension in many time steps. Nevertheless, it is undeniable that the performance of the optimization model is adequate in some time steps. It should be noted that regarding the dissolved oxygen model, validation demonstrated that the model is not very reliable in the case study. However, the general trend of the results was acceptable. The high uncertainty of the model may reduce the reliability of the optimization model in terms of dissolved oxygen optimization. Therefore, considering this uncertainty is essential for the final application of the results. However, significant differences between simulated tension in scenario 2 and natural flow in some steps indicate that the results of the optimization model may still be reliable.

As previously mentioned, a thorough discussion of the results and deciding in the case study require the use of measurement indices. Figure 9a displays the reliability index of water demand in both scenarios. A notable decrease in the reliability of water supply is observed in the case study. Specifically, the reliability changes by approximately 15%, indicating a considerable reduction in the economic benefits from the reservoir due to the use of optimal operation considering environmental aspects. Additionally, Fig. 9b and c displays the measurement indices for storage loss, including RMSE and VI. Results demonstrate that the change in storage loss in scenario 2 compared with scenario 1 is not significant. Thus, using optimal reservoir operation considering environmental aspects in the optimization model may not weaken the storage benefits in the reservoir of the case study.

Fig. 9
figure 9

Measurement indices for water supply and storage loss a)RI, b)RMSE and c)VI

Table 4 presents NSE and RMSE for three environmental aspects in the proposed framework, including physical habitat loss, thermal habitat loss, and dissolved oxygen loss. It's important to note that only positive differences between simulation and optimization in scenario 2 and natural flow were considered to compute the indices. In other words, if physical habitat loss exceeds that of the natural flow in scenario 2, it will be considered equal to NWUA in the natural flow. This approach was applied regarding thermal tension and dissolved oxygen tension as well. NSE for physical habitat loss is -3.43, indicating that the optimization model is not able to provide physical habitat loss as suitable as the natural flow. Moreover, RMSE for physical habitat loss is 0.41, demonstrating a considerable difference between the suitability of physical habitats in the two scenarios. Furthermore, NSE for thermal tension shows that the performance of the optimization model is acceptable in terms of thermal tension. However, RMSE is considerable, indicating that 29% of the thermal tension may render the habitat unsuitable, especially for sensitive species such as the Brown trout. Furthermore, the performance of the optimization model is not defensible in terms of the DO tension based on the computed indices.

Table 4 Measurement indices for environmental losses

Finally, it is possible to assess the feasibility and advantages of the dam removal project in the case study based on all the results. It appears that optimal operation considering environmental flow may not be feasible in the case study. On one hand, the reliability of water supply is reduced, which poses a problem for the regional water authority. On the other hand, optimal operation in scenario 2 may not effectively provide environmental suitability downstream of the reservoir. Hence, it seems that using other options in the case study for water supply, such as storing water in the pools of farms, should be considered if protecting environmental values downstream is the goal. Indeed, dam removal seems necessary to improve the suitability of downstream habitats. However, implementing dam removal may require additional simulations and optimizations. The main advantage of the proposed method is to provide a practical simulation–optimization framework to assess the environmental aspects of dam removal. However, dissolved oxygen results indicate that reducing water pollutants downstream of the reservoirs should also be considered in habitat restoration projects.

Every novel method may have limitations that should be discussed. The main limitation of the proposed framework is its high computational complexity, defined as the required time and memory for using an algorithm in the optimization. Due to the use of an ANFIS-based model in the optimization model, computational complexity is significant. Therefore, using this framework for long-term periods or numerous simulations may require powerful computers and be time-consuming. Additionally, we considered water demand based on the case study in the proposed framework. It's necessary to consider other aspects such as hydropower in future studies. Furthermore, it's essential to consider the uncertainties of the ANFIS-based model for further applications of the results.

4 Conclusions

The present study proposes a novel framework to simulate the environmental aspects of dam removal to facilitate decision-making regarding the necessity and advantages of dam removal projects. Two scenarios were considered, including conventional reservoir operation optimization and optimal operation considering environmental aspects within the optimization model's structure. The first and second scenarios were compared in terms of water supply and storage losses. Additionally, the outputs of scenario 2 were compared with natural flow in terms of physical habitat loss, thermal habitat loss, and dissolved oxygen habitat loss using NSE and RMSE as measurement indices. Based on the results of the case study, the reliability of water supply was significantly reduced in scenario 2, indicating that optimal release considering environmental issues might pose challenges for water demand management in the river basin. Moreover, optimal release considering environmental aspects was not able to reduce tensions and losses as effectively as natural flow. Thus, dam removal is recommended in terms of environmental suitability for downstream aquatic habitats.