zosika commited on
Commit
b90cd9c
·
0 Parent(s):

without env

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .DS_Store +0 -0
  2. .gitattributes +59 -0
  3. LICENSE +21 -0
  4. README.md +102 -0
  5. croissant.json +29 -0
  6. morl4water/__init__.py +4 -0
  7. morl4water/core/.DS_Store +0 -0
  8. morl4water/core/__init__.py +2 -0
  9. morl4water/core/envs/__init__.py +0 -0
  10. morl4water/core/envs/water_management_system.py +247 -0
  11. morl4water/core/models/__init__.py +12 -0
  12. morl4water/core/models/catchment.py +22 -0
  13. morl4water/core/models/facility.py +339 -0
  14. morl4water/core/models/flow.py +138 -0
  15. morl4water/core/models/irrigation_district.py +130 -0
  16. morl4water/core/models/objective.py +37 -0
  17. morl4water/core/models/power_plant.py +217 -0
  18. morl4water/core/models/reservoir.py +233 -0
  19. morl4water/core/models/reservoir_with_pump.py +288 -0
  20. morl4water/core/models/weir.py +142 -0
  21. morl4water/core/settings/settings_file_Nile_with_icons.xlsm +0 -0
  22. morl4water/core/utils/__init__.py +26 -0
  23. morl4water/core/utils/utils.py +71 -0
  24. morl4water/core/wrappers/__init__.py +0 -0
  25. morl4water/core/wrappers/transform_action.py +34 -0
  26. morl4water/examples/.DS_Store +0 -0
  27. morl4water/examples/__init__.py +23 -0
  28. morl4water/examples/data/__init__.py +0 -0
  29. morl4water/examples/data/nile_river/__init__.py +0 -0
  30. morl4water/examples/data/nile_river/catchments/InflowAtbara.txt +240 -0
  31. morl4water/examples/data/nile_river/catchments/InflowBlueNile.txt +240 -0
  32. morl4water/examples/data/nile_river/catchments/InflowDinder.txt +240 -0
  33. morl4water/examples/data/nile_river/catchments/InflowGERDToRoseires.txt +240 -0
  34. morl4water/examples/data/nile_river/catchments/InflowRahad.txt +240 -0
  35. morl4water/examples/data/nile_river/catchments/InflowRoseiresToAbuNaama.txt +240 -0
  36. morl4water/examples/data/nile_river/catchments/InflowSukiToSennar.txt +240 -0
  37. morl4water/examples/data/nile_river/catchments/InflowWhiteNile.txt +240 -0
  38. morl4water/examples/data/nile_river/catchments/__init__.py +0 -0
  39. morl4water/examples/data/nile_river/irrigation/__init__.py +0 -0
  40. morl4water/examples/data/nile_river/irrigation/irr_demand_DSSennar.txt +240 -0
  41. morl4water/examples/data/nile_river/irrigation/irr_demand_Egypt.txt +240 -0
  42. morl4water/examples/data/nile_river/irrigation/irr_demand_Gezira.txt +240 -0
  43. morl4water/examples/data/nile_river/irrigation/irr_demand_Hassanab.txt +240 -0
  44. morl4water/examples/data/nile_river/irrigation/irr_demand_Tamaniat.txt +240 -0
  45. morl4water/examples/data/nile_river/irrigation/irr_demand_USSennar.txt +240 -0
  46. morl4water/examples/data/nile_river/reservoirs/__init__.py +0 -0
  47. morl4water/examples/data/nile_river/reservoirs/evap_GERD.txt +12 -0
  48. morl4water/examples/data/nile_river/reservoirs/evap_HAD.txt +12 -0
  49. morl4water/examples/data/nile_river/reservoirs/evap_Merowe.txt +12 -0
  50. morl4water/examples/data/nile_river/reservoirs/evap_Roseires.txt +12 -0
.DS_Store ADDED
Binary file (6.15 kB). View file
 
.gitattributes ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.lz4 filter=lfs diff=lfs merge=lfs -text
12
+ *.mds filter=lfs diff=lfs merge=lfs -text
13
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
14
+ *.model filter=lfs diff=lfs merge=lfs -text
15
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
16
+ *.npy filter=lfs diff=lfs merge=lfs -text
17
+ *.npz filter=lfs diff=lfs merge=lfs -text
18
+ *.onnx filter=lfs diff=lfs merge=lfs -text
19
+ *.ot filter=lfs diff=lfs merge=lfs -text
20
+ *.parquet filter=lfs diff=lfs merge=lfs -text
21
+ *.pb filter=lfs diff=lfs merge=lfs -text
22
+ *.pickle filter=lfs diff=lfs merge=lfs -text
23
+ *.pkl filter=lfs diff=lfs merge=lfs -text
24
+ *.pt filter=lfs diff=lfs merge=lfs -text
25
+ *.pth filter=lfs diff=lfs merge=lfs -text
26
+ *.rar filter=lfs diff=lfs merge=lfs -text
27
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
28
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
29
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
30
+ *.tar filter=lfs diff=lfs merge=lfs -text
31
+ *.tflite filter=lfs diff=lfs merge=lfs -text
32
+ *.tgz filter=lfs diff=lfs merge=lfs -text
33
+ *.wasm filter=lfs diff=lfs merge=lfs -text
34
+ *.xz filter=lfs diff=lfs merge=lfs -text
35
+ *.zip filter=lfs diff=lfs merge=lfs -text
36
+ *.zst filter=lfs diff=lfs merge=lfs -text
37
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
38
+ # Audio files - uncompressed
39
+ *.pcm filter=lfs diff=lfs merge=lfs -text
40
+ *.sam filter=lfs diff=lfs merge=lfs -text
41
+ *.raw filter=lfs diff=lfs merge=lfs -text
42
+ # Audio files - compressed
43
+ *.aac filter=lfs diff=lfs merge=lfs -text
44
+ *.flac filter=lfs diff=lfs merge=lfs -text
45
+ *.mp3 filter=lfs diff=lfs merge=lfs -text
46
+ *.ogg filter=lfs diff=lfs merge=lfs -text
47
+ *.wav filter=lfs diff=lfs merge=lfs -text
48
+ # Image files - uncompressed
49
+ *.bmp filter=lfs diff=lfs merge=lfs -text
50
+ *.gif filter=lfs diff=lfs merge=lfs -text
51
+ *.png filter=lfs diff=lfs merge=lfs -text
52
+ *.tiff filter=lfs diff=lfs merge=lfs -text
53
+ # Image files - compressed
54
+ *.jpg filter=lfs diff=lfs merge=lfs -text
55
+ *.jpeg filter=lfs diff=lfs merge=lfs -text
56
+ *.webp filter=lfs diff=lfs merge=lfs -text
57
+ # Video files - compressed
58
+ *.mp4 filter=lfs diff=lfs merge=lfs -text
59
+ *.webm filter=lfs diff=lfs merge=lfs -text
LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Zuzanna Osika
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
README.md ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # MORL4Water
2
+
3
+ <details>
4
+ <summary>🥐 Dataset Metadata</summary>
5
+
6
+ This repository includes a Croissant metadata file [`croissant.json`](./croissant.json), making MORL4Water compatible with Hugging Face standards for dataset discoverability and interoperability.
7
+ Learn more about [Croissant metadata](https://huggingface.co/docs/croissant/index).
8
+
9
+ </details>
10
+
11
+ ---
12
+
13
+ Welcome to **MORL4Water**, a flexible Gym environment designed for simulating **water management** in river systems.
14
+ With MORL4Water, you can build detailed water simulations and **train or test multi-objective reinforcement learning (MORL)** agents.
15
+
16
+ Currently, we have **three river basins** implemented as Gym environments:
17
+ - **Nile River Basin**
18
+ - **Susquehanna River Basin**
19
+ - **Omo River Basin**
20
+
21
+ The toolkit is **modular**, allowing users to extend or build their own water systems.
22
+ For an overview of available system components, please refer to the [System Elements](#).
23
+
24
+ ---
25
+
26
+ ## 🚀 Installation and Running
27
+
28
+ ### Installation
29
+
30
+ Ensure you are using **Python ≥ 3.11**. Install via pip:
31
+
32
+ ```bash
33
+ pip install morl4water
34
+ ```
35
+
36
+ ### Running an Example Simulation
37
+
38
+ ```python
39
+ import mo_gymnasium
40
+ import morl4water.examples
41
+
42
+ # Create the environment
43
+ water_management_system = mo_gymnasium.make('nile-v0')
44
+
45
+ def run_nile():
46
+ obs, info = water_management_system.reset()
47
+ print(f'Initial Obs: {obs}')
48
+ final_truncated = False
49
+ final_terminated = False
50
+ for t in range(10):
51
+ if not final_terminated and not final_truncated:
52
+ action = water_management_system.action_space.sample()
53
+ print(f'Action for month {t}: {action}')
54
+ (
55
+ final_observation,
56
+ final_reward,
57
+ final_terminated,
58
+ final_truncated,
59
+ final_info
60
+ ) = water_management_system.step(action)
61
+ print(f'Observation: {final_observation}')
62
+ print(f'Reward: {final_reward}')
63
+ else:
64
+ break
65
+ return final_observation
66
+
67
+ run_nile()
68
+ ```
69
+
70
+ ---
71
+
72
+ ## 📚 Documentation
73
+
74
+ For detailed documentation, visit the [MORL4Water Website](https://osikazuzanna.github.io/morl4water/).
75
+
76
+ ---
77
+
78
+ ## 📜 License
79
+
80
+ This project is licensed under the [MIT License](https://opensource.org/licenses/MIT).
81
+
82
+ ---
83
+
84
+ ## ✨ Citation
85
+
86
+ If you use MORL4Water in your work, please consider citing it (BibTeX coming soon).
87
+
88
+ ---
89
+
90
+
91
+
92
+ # 🛠️ Contributing
93
+
94
+ Contributions are welcome! Feel free to open an issue or pull request.
95
+
96
+ ---
97
+
98
+ # 🛡️ About
99
+
100
+ Developed by **Zuzanna Osika**, 2025.
101
+
102
+ ---
croissant.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "@context": "https://w3id.org/croissant/context.jsonld",
3
+ "@type": "Dataset",
4
+ "name": "MORL4Water",
5
+ "description": "MORL4Water is a flexible modular Gym environment for simulating water management in river systems, designed to train and test multi-objective reinforcement learning (MORL) agents. Includes Nile River Basin, Susquehanna River Basin, and Omo River Basin environments.",
6
+ "license": "https://opensource.org/licenses/MIT",
7
+ "distribution": [
8
+ {
9
+ "@type": "DataDownload",
10
+ "encodingFormat": "application/zip",
11
+ "contentUrl": "https://huggingface.co/osikazuzanna/morl4water/resolve/main/morl4water.zip"
12
+ }
13
+ ],
14
+ "creator": {
15
+ "@type": "Person",
16
+ "name": "Zuzanna Osika"
17
+ },
18
+ "keywords": [
19
+ "multi-objective reinforcement learning",
20
+ "MORL",
21
+ "Gymnasium",
22
+ "water management",
23
+ "simulation",
24
+ "river systems",
25
+ "environment modeling"
26
+ ],
27
+ "datePublished": "2025-04-26"
28
+ }
29
+
morl4water/__init__.py ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ from . import core
2
+ from . import examples
3
+
4
+ __all__ = ["core", "examples"]
morl4water/core/.DS_Store ADDED
Binary file (6.15 kB). View file
 
morl4water/core/__init__.py ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+
2
+
morl4water/core/envs/__init__.py ADDED
File without changes
morl4water/core/envs/water_management_system.py ADDED
@@ -0,0 +1,247 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gymnasium as gym
2
+ import numpy as np
3
+ from datetime import datetime
4
+ from dateutil.relativedelta import relativedelta
5
+ from gymnasium.spaces import Box, Dict, Space
6
+ from gymnasium.core import ObsType, RenderFrame
7
+ from typing import Any, Union, Optional
8
+ from morl4water.core.models.flow import Flow
9
+ from morl4water.core.models.facility import Facility, ControlledFacility
10
+ import time
11
+ from gymnasium.spaces import flatten_space
12
+
13
+ class WaterManagementSystem(gym.Env):
14
+ def __init__(
15
+ self,
16
+ water_systems: list[Union[Facility, ControlledFacility, Flow]],
17
+ rewards: dict,
18
+ start_date: datetime,
19
+ timestep_size: relativedelta,
20
+ seed: int = 42,
21
+ add_timestamp = None,
22
+ custom_obj = None
23
+ ) -> None:
24
+ self.water_systems: list[Union[Facility, ControlledFacility, Flow]] = water_systems
25
+ self.rewards: dict = rewards
26
+
27
+ self.start_date: datetime = start_date
28
+ self.current_date: datetime = start_date
29
+ self.timestep_size: relativedelta = timestep_size
30
+ self.timestep: int = 0
31
+
32
+ self.seed: int = seed
33
+ self.add_timestamp = add_timestamp
34
+ self.custom_obj = custom_obj
35
+
36
+ self.observation_space: Space = self._determine_observation_space()
37
+ self.observation_space = flatten_space(self.observation_space)
38
+ self.action_space: Space = self._determine_action_space()
39
+ self.action_space = flatten_space(self.action_space)
40
+
41
+ self.max_capacities = self._determine_capacities()
42
+
43
+ if self.custom_obj:
44
+ self.reward_space: Space = Box(-1.0, 1.0, shape=(len(self.custom_obj),))
45
+ else:
46
+ self.reward_space: Space = Box(-1.0, 1.0, shape=(len(rewards.keys()),))
47
+
48
+
49
+ self.observation: np.array = self._determine_observation()
50
+
51
+
52
+
53
+
54
+
55
+ for water_system in self.water_systems:
56
+ water_system.current_date = self.current_date
57
+ water_system.timestep_size = self.timestep_size
58
+
59
+ def _determine_observation(self) -> np.array:
60
+ result = []
61
+ for water_system in self.water_systems:
62
+ if isinstance(water_system, ControlledFacility):
63
+ result.append(water_system.determine_observation())
64
+ result_normalized = list(np.divide(result, self.max_capacities))
65
+ if self.add_timestamp:
66
+ result.append(0)
67
+ result_normalized.append(0)
68
+
69
+ return np.array(result), np.array(result_normalized)
70
+
71
+ def _determine_observation_space(self) -> Dict:
72
+ if self.add_timestamp is not None:
73
+ return Dict(
74
+ {
75
+ **{
76
+ water_system.name: Box(low=0, high=1)
77
+ for water_system in self.water_systems
78
+ if isinstance(water_system, ControlledFacility)
79
+ },
80
+ "timestamp": Box(low=0, high=1)
81
+ }
82
+ )
83
+
84
+ else:
85
+ return Dict(
86
+ {
87
+ water_system.name: Box(low=0, high=1)
88
+ for water_system in self.water_systems
89
+ if isinstance(water_system, ControlledFacility)
90
+ }
91
+ )
92
+
93
+
94
+ def _determine_action_space(self) -> Dict:
95
+ return Dict(
96
+ {
97
+ water_system.name: water_system.action_space
98
+ for water_system in self.water_systems
99
+ if isinstance(water_system, ControlledFacility)
100
+ }
101
+ )
102
+
103
+ def _determine_capacities(self):
104
+ capacities = [water_system.max_capacity for water_system in self.water_systems if isinstance(water_system, ControlledFacility)]
105
+ return capacities
106
+
107
+ def _is_truncated(self) -> bool:
108
+ return False
109
+
110
+ def _determine_info(self) -> dict[str, Any]:
111
+ # TODO: decide on what we wnat to output in the info.
112
+ return {"water_systems": self.water_systems}
113
+
114
+ def reset(self, seed: Optional[int] = None, options: Optional[dict] = None) -> tuple[ObsType, dict[str, Any]]:
115
+ # We need the following line to seed self.np_random.
116
+ super().reset(seed=seed)
117
+ self.current_date = self.start_date
118
+ self.timestep = 0
119
+
120
+ self.observation, observation_normalized = self._determine_observation()
121
+ # Reset rewards
122
+ for key in self.rewards.keys():
123
+ self.rewards[key] = 0
124
+
125
+ for water_system in self.water_systems:
126
+ water_system.current_date = self.start_date
127
+ water_system.reset()
128
+ return observation_normalized, self._determine_info()
129
+
130
+ def step(self, action: np.array) -> tuple[np.array, np.array, bool, bool, dict]:
131
+ """
132
+ Execute a single step in the water management simulation.
133
+
134
+ This method processes the provided action for each water system in the
135
+ environment, updating the states of each facility and returning the
136
+ observations, rewards, termination status, truncation status, and
137
+ additional information.
138
+
139
+ Args:
140
+ action (np.array): An array of actions to be taken for each
141
+ controlled facility in the simulation. The action should
142
+ correspond to the facilities' names.
143
+
144
+ Returns:
145
+ tuple[np.array, np.array, bool, bool, dict]:
146
+ A tuple containing:
147
+
148
+ - np.array: A flattened array of normalized observations for
149
+ each water system, representing their current states as
150
+ percentages of their maximum capacities.
151
+ - np.array: A flattened array of final rewards collected from
152
+ the facilities based on the executed actions.
153
+ - bool: A flag indicating whether the simulation has
154
+ terminated.
155
+ - bool: A flag indicating whether the simulation has been
156
+ truncated.
157
+ - dict: A dictionary containing additional information, such
158
+ as the current date and other relevant data from the
159
+ water systems.
160
+
161
+ Notes:
162
+ - The method resets rewards for each facility at the beginning
163
+ of the step.
164
+ - If `custom_obj` is specified, only the relevant rewards are
165
+ returned based on the keys in `custom_obj`.
166
+ - Observations are normalized by dividing by their maximum
167
+ capacities.
168
+ - The method increments the timestep and updates the current
169
+ date based on the `timestep_size` attribute.
170
+
171
+ """
172
+
173
+ final_reward = {}
174
+
175
+
176
+ # Reset rewards
177
+ for key in self.rewards.keys():
178
+ final_reward[key] = 0
179
+
180
+ final_observation = {}
181
+ final_terminated = False
182
+ final_truncated = False
183
+ final_info = {"date": self.current_date}
184
+
185
+ for water_system in self.water_systems:
186
+ water_system.current_date = self.current_date
187
+
188
+ if isinstance(water_system, ControlledFacility):
189
+ observation, reward, terminated, truncated, info = water_system.step(action[water_system.name])
190
+
191
+ elif isinstance(water_system, Facility) or isinstance(water_system, Flow):
192
+ observation, reward, terminated, truncated, info = water_system.step()
193
+ else:
194
+ raise ValueError()
195
+
196
+ # Set observation for a Controlled Facility.
197
+ if isinstance(water_system, ControlledFacility):
198
+ final_observation[water_system.name] = observation
199
+
200
+ # Add reward to the objective assigned to this Facility (unless it is a Flow or the facility has no objectives).
201
+ if isinstance(water_system, Facility) or isinstance(water_system, ControlledFacility):
202
+ if water_system.objective_name:
203
+ final_reward[water_system.objective_name] += reward
204
+
205
+ # Store additional information
206
+ final_info[water_system.name] = info
207
+
208
+
209
+ # Determine whether program should stop
210
+ final_terminated = final_terminated or terminated
211
+ final_truncated = final_truncated or truncated or self._is_truncated()
212
+
213
+
214
+ self.timestep += 1
215
+ self.current_date += self.timestep_size
216
+
217
+ #check if only a subset of rewards to return
218
+ if self.custom_obj is not None:
219
+ final_reward = [final_reward[key] for key in self.custom_obj]
220
+ else:
221
+ final_reward = list(final_reward.values())
222
+
223
+ final_observations = list(final_observation.values())
224
+ #normalize the observation to be percentage of max capacity
225
+ final_observations = list(np.divide(final_observations, self.max_capacities))
226
+ if self.add_timestamp=='m':
227
+ final_observations.append(final_info['date'].month/12)
228
+ elif self.add_timestamp=='h':
229
+ final_observations.append(final_info['date'].hour/24)
230
+
231
+
232
+
233
+ return (
234
+ np.array(final_observations).flatten(),
235
+ np.array(final_reward).flatten(),
236
+ final_terminated,
237
+ final_truncated,
238
+ final_info
239
+ )
240
+
241
+ def close(self) -> None:
242
+ # TODO: implement if needed, e.g. for closing opened rendering frames.
243
+ pass
244
+
245
+ def render(self) -> Union[RenderFrame, list[RenderFrame], None]:
246
+ # TODO: implement if needed, for rendering simulation.
247
+ pass
morl4water/core/models/__init__.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # models/__init__.py
2
+ from .catchment import Catchment
3
+ from .flow import Flow, Inflow, Outflow
4
+ from .irrigation_district import IrrigationDistrict
5
+ from .objective import Objective
6
+ from .power_plant import PowerPlant
7
+ from .reservoir_with_pump import ReservoirWithPump
8
+ from .reservoir import Reservoir
9
+ from .weir import Weir
10
+ from .facility import Facility, ControlledFacility
11
+
12
+ __all__ = ["Catchment", "Flow","Facility","ControlledFacility", "Inflow", "Outflow", "IrrigationDistrict", "Objective", "PowerPlant", "ReservoirWithPump", "Reservoir", "Weir"]
morl4water/core/models/catchment.py ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from morl4water.core.models.facility import Facility
2
+
3
+
4
+ class Catchment(Facility):
5
+ def __init__(self, name: str, all_water_accumulated: list[float]) -> None:
6
+ super().__init__(name)
7
+ self.all_water_accumulated: list[float] = all_water_accumulated
8
+
9
+ def determine_reward(self) -> float:
10
+ return 0
11
+
12
+ def get_inflow(self, timestep: int) -> float:
13
+ return self.all_water_accumulated[timestep % len(self.all_water_accumulated)]
14
+
15
+ def determine_consumption(self) -> float:
16
+ return 0
17
+
18
+ def is_truncated(self) -> bool:
19
+ return self.timestep >= len(self.all_water_accumulated)
20
+
21
+ def determine_info(self) -> dict:
22
+ return {"water_consumption": self.determine_consumption()}
morl4water/core/models/facility.py ADDED
@@ -0,0 +1,339 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import numpy as np
2
+ from abc import ABC, abstractmethod
3
+ from datetime import datetime
4
+ from dateutil.relativedelta import relativedelta
5
+ from gymnasium.spaces import Space, Box
6
+ from gymnasium.core import ObsType, ActType
7
+ from typing import SupportsFloat, Optional
8
+ from morl4water.core.models.objective import Objective
9
+
10
+
11
+ class Facility(ABC):
12
+ """
13
+ Abstract base class representing a facility with inflow and outflow management, along with reward determination.
14
+
15
+ Attributes
16
+ ----------
17
+ name : str
18
+ Identifier for the facility.
19
+ all_inflow : list[float]
20
+ Historical inflow values recorded over time.
21
+ all_outflow : list[float]
22
+ Historical outflow values recorded over time.
23
+ objective_function : Callable
24
+ Function to evaluate the facility’s performance based on defined objectives.
25
+ objective_name : str
26
+ Name of the objective function used.
27
+ current_date : Optional[datetime]
28
+ Date associated with the current timestep of the facility.
29
+ timestep_size : Optional[relativedelta]
30
+ Size of the timestep for simulation. Usually 1 month.
31
+ timestep : int
32
+ Current timestep index for the facility simulation.
33
+ split_release : Optional
34
+ Placeholder for managing release strategies (usage to be defined).
35
+ normalize_objective : float
36
+ Normalization factor for the objective reward.
37
+ """
38
+ def __init__(self, name: str, objective_function=Objective.no_objective, objective_name: str = "", normalize_objective=0.0) -> None:
39
+ """
40
+ Initializes a Facility instance.
41
+
42
+ Args:
43
+ name (str): Identifier for the facility.
44
+ objective_function (Callable): Function to evaluate the facility’s performance.
45
+ objective_name (str): Name of the objective function.
46
+ normalize_objective (float): Maximum value for normalizing the reward; defaults to 0.0.
47
+ """
48
+ self.name: str = name
49
+ self.all_inflow: list[float] = []
50
+ self.all_outflow: list[float] = []
51
+
52
+ self.objective_function = objective_function
53
+ self.objective_name = objective_name
54
+
55
+ self.current_date: Optional[datetime] = None
56
+ self.timestep_size: Optional[relativedelta] = None
57
+ self.timestep: int = 0
58
+
59
+ self.split_release = None
60
+ self.normalize_objective = normalize_objective
61
+
62
+ @abstractmethod
63
+ def determine_reward(self) -> float:
64
+ """
65
+ Abstract method to compute the reward based on the facility's performance.
66
+
67
+ Returns:
68
+ float: The computed reward for the current timestep.
69
+
70
+ Raises:
71
+ NotImplementedError: If this method is not implemented in a subclass.
72
+ """
73
+ raise NotImplementedError()
74
+
75
+ @abstractmethod
76
+ def determine_consumption(self) -> float:
77
+ """
78
+ Abstract method to calculate the facility's water consumption.
79
+
80
+ Returns:
81
+ float: The calculated water consumption for the current timestep.
82
+
83
+ Raises:
84
+ NotImplementedError: If this method is not implemented in a subclass.
85
+ """
86
+ raise NotImplementedError()
87
+
88
+ def is_terminated(self) -> bool:
89
+ """
90
+ Checks if the facility simulation has reached a terminating condition.
91
+
92
+ Returns:
93
+ bool: Always returns False for the base Facility class; override in subclasses as needed.
94
+ """
95
+ return False
96
+
97
+ def is_truncated(self) -> bool:
98
+ """
99
+ Checks if the facility simulation has been truncated.
100
+
101
+ Returns:
102
+ bool: Always returns False for the base Facility class; override in subclasses as needed.
103
+ """
104
+ return False
105
+
106
+ def get_inflow(self, timestep: int) -> float:
107
+ """
108
+ Retrieves the inflow value for a specific timestep.
109
+
110
+ Args:
111
+ timestep (int): The timestep index for which to retrieve the inflow.
112
+
113
+ Returns:
114
+ float: The inflow value for the specified timestep.
115
+
116
+ Raises:
117
+ IndexError: If the timestep is out of bounds.
118
+ """
119
+ return self.all_inflow[timestep]
120
+
121
+ def set_inflow(self, timestep: int, inflow: float) -> None:
122
+ """
123
+ Sets the inflow value for a specific timestep, adjusting if necessary.
124
+
125
+ Args:
126
+ timestep (int): The timestep index at which to set the inflow.
127
+ inflow (float): The inflow value to set.
128
+
129
+ Raises:
130
+ IndexError: If the timestep index is invalid.
131
+ """
132
+ if len(self.all_inflow) == timestep:
133
+ self.all_inflow.append(inflow)
134
+ elif len(self.all_inflow) > timestep:
135
+ self.all_inflow[timestep] += inflow
136
+ else:
137
+ raise IndexError
138
+
139
+ def determine_outflow(self) -> float:
140
+ """
141
+ Calculates the outflow based on the current inflow and consumption.
142
+
143
+ Returns:
144
+ float: The calculated outflow for the current timestep.
145
+ """
146
+ return self.get_inflow(self.timestep) - self.determine_consumption()
147
+
148
+ def get_outflow(self, timestep: int) -> float:
149
+ """
150
+ Retrieves the outflow value for a specific timestep.
151
+
152
+ Args:
153
+ timestep (int): The timestep index for which to retrieve the outflow.
154
+
155
+ Returns:
156
+ float: The outflow value for the specified timestep.
157
+
158
+ Raises:
159
+ IndexError: If the timestep is out of bounds.
160
+ """
161
+ return self.all_outflow[timestep]
162
+
163
+ def step(self) -> tuple[ObsType, float, bool, bool, dict]:
164
+ """
165
+ Advances the simulation by one timestep, calculating outflows and rewards.
166
+
167
+ Returns:
168
+ tuple[ObsType, float, bool, bool, dict]: A tuple containing:
169
+ - ObsType: Placeholder for observation type (to be defined).
170
+ - float: The reward for the current timestep.
171
+ - bool: Indicates if the simulation has terminated.
172
+ - bool: Indicates if the simulation has been truncated.
173
+ - dict: Additional information about the facility's state.
174
+ """
175
+ self.all_outflow.append(self.determine_outflow())
176
+ # TODO: Determine if we need to satisy any terminating codnitions for facility.
177
+ reward = self.determine_reward()
178
+ if self.normalize_objective>0.0:
179
+ reward = reward/self.normalize_objective
180
+ terminated = self.is_terminated()
181
+ truncated = self.is_truncated()
182
+ info = self.determine_info()
183
+
184
+ self.timestep += 1
185
+
186
+ return None, reward, terminated, truncated, info
187
+
188
+ def reset(self) -> None:
189
+ """
190
+ Resets the facility to its initial state for a new simulation run.
191
+
192
+ Returns:
193
+ None
194
+ """
195
+ self.timestep: int = 0
196
+ self.all_inflow: list[float] = []
197
+ self.all_outflow: list[float] = []
198
+
199
+ def determine_info(self) -> dict:
200
+ """
201
+ Method to gather information about the facility's state.
202
+
203
+ Returns:
204
+ dict: A dictionary containing information about the facility.
205
+
206
+ Raises:
207
+ NotImplementedError: If this method is not implemented in a subclass.
208
+ """
209
+ raise NotImplementedError()
210
+
211
+ def __eq__(self, other):
212
+ """
213
+ Checks equality between two Facility instances based on their names.
214
+
215
+ Args:
216
+ other (Facility): The other facility to compare against.
217
+
218
+ Returns:
219
+ bool: True if both facilities are of the same class and have the same name, False otherwise.
220
+ """
221
+ return isinstance(other, self.__class__) and self.name == other.name
222
+
223
+ def __hash__(self):
224
+ """
225
+ Returns a hash of the facility based on its name.
226
+
227
+ Returns:
228
+ int: The hash value of the facility.
229
+ """
230
+ return hash(self.name)
231
+
232
+
233
+ class ControlledFacility(ABC):
234
+ def __init__(
235
+ self,
236
+ name: str,
237
+ observation_space: Space,
238
+ action_space: ActType,
239
+ max_capacity: float,
240
+ max_action: float,
241
+
242
+ objective_function=Objective.no_objective,
243
+ objective_name: str = "",
244
+ ) -> None:
245
+ self.name: str = name
246
+ self.all_inflow: list[float] = []
247
+ self.all_outflow: list[float] = []
248
+ self.max_capacity: float = max_capacity
249
+ self.max_action: float = max_action
250
+
251
+
252
+ self.observation_space: Space = observation_space
253
+ #check if there is more than one outflow from a reservoir
254
+ if len(self.max_action)>1:
255
+ self.action_space: Space = Box(low=0, high=1, shape=(len(self.max_action),))
256
+ else:
257
+ self.action_space: Space = action_space
258
+
259
+ self.objective_function = objective_function
260
+ self.objective_name = objective_name
261
+
262
+
263
+ self.current_date: Optional[datetime] = None
264
+ self.timestep_size: Optional[relativedelta] = None
265
+ self.timestep: int = 0
266
+
267
+ self.should_split_release = np.prod(self.action_space.shape) > 1
268
+ self.split_release = None
269
+
270
+ @abstractmethod
271
+ def determine_reward(self) -> float:
272
+ raise NotImplementedError()
273
+
274
+ @abstractmethod
275
+ def determine_outflow(action: ActType) -> float:
276
+ raise NotImplementedError()
277
+
278
+ @abstractmethod
279
+ def determine_observation(self) -> ObsType:
280
+ raise NotImplementedError()
281
+
282
+ @abstractmethod
283
+ def is_terminated(self) -> bool:
284
+ raise NotImplementedError()
285
+
286
+ def is_truncated(self) -> bool:
287
+ return False
288
+
289
+ def get_inflow(self, timestep: int) -> float:
290
+ return self.all_inflow[timestep]
291
+
292
+ def set_inflow(self, timestep: int, inflow: float) -> None:
293
+ if len(self.all_inflow) == timestep:
294
+ self.all_inflow.append(inflow)
295
+ elif len(self.all_inflow) > timestep:
296
+ self.all_inflow[timestep] += inflow
297
+ else:
298
+ raise IndexError
299
+
300
+ def get_outflow(self, timestep: int) -> float:
301
+ return self.all_outflow[timestep]
302
+
303
+ def step(self, action: ActType) -> tuple[ObsType, SupportsFloat, bool, bool, dict]:
304
+ self.all_outflow.append(self.determine_outflow(action))
305
+ # TODO: Change stored_water to multiple outflows.
306
+
307
+ observation = self.determine_observation()
308
+ reward = self.determine_reward()
309
+ terminated = self.is_terminated()
310
+ truncated = self.is_truncated()
311
+ info = self.determine_info()
312
+
313
+ self.timestep += 1
314
+
315
+ return (
316
+ observation,
317
+ reward,
318
+ terminated,
319
+ truncated,
320
+ info,
321
+ )
322
+
323
+ def reset(self) -> None:
324
+ self.timestep: int = 0
325
+ self.all_inflow: list[float] = []
326
+ self.all_outflow: list[float] = []
327
+
328
+ def determine_info(self) -> dict:
329
+ """
330
+ Returns information about the reservoir.
331
+
332
+ """
333
+ raise {}
334
+
335
+ def __eq__(self, other):
336
+ return isinstance(other, self.__class__) and self.name == other.name
337
+
338
+ def __hash__(self):
339
+ return hash(self.name)
morl4water/core/models/flow.py ADDED
@@ -0,0 +1,138 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from datetime import datetime
2
+ from dateutil.relativedelta import relativedelta
3
+ from typing import Union, Optional
4
+ from morl4water.core.models.facility import Facility, ControlledFacility
5
+ from gymnasium.core import ObsType
6
+
7
+
8
+ class Flow:
9
+ def __init__(
10
+ self,
11
+ name: str,
12
+ sources: list[Union[Facility, ControlledFacility]],
13
+ destinations: Facility | ControlledFacility | dict[Facility | ControlledFacility, float],
14
+ max_capacity: float,
15
+ evaporation_rate: float = 0.0,
16
+ delay: int = 0,
17
+ default_outflow: Optional[float] = None,
18
+ ) -> None:
19
+ self.name: str = name
20
+ self.sources: list[Union[Facility, ControlledFacility]] = sources
21
+
22
+ if isinstance(destinations, Facility) or isinstance(destinations, ControlledFacility):
23
+ self.destinations = {destinations: 1.0}
24
+ else:
25
+ self.destinations: dict[Union[Facility, ControlledFacility], float] = destinations
26
+
27
+ self.max_capacity: float = max_capacity
28
+ self.evaporation_rate: float = evaporation_rate
29
+
30
+ self.delay: int = delay
31
+ self.default_outflow: Optional[float] = default_outflow
32
+
33
+ self.current_date: Optional[datetime] = None
34
+ self.timestep_size: Optional[relativedelta] = None
35
+ self.timestep: int = 0
36
+
37
+ def determine_source_outflow(self) -> float:
38
+ if self.timestep - self.delay < 0 and self.default_outflow:
39
+ return self.default_outflow
40
+ else:
41
+ timestep_after_delay_clipped = max(0, self.timestep - self.delay)
42
+
43
+ return sum(source.get_outflow(timestep_after_delay_clipped) for source in self.sources)
44
+
45
+ def determine_source_outflow_by_destination(self, destination_index: int, destination_inflow_ratio: float) -> float:
46
+ if self.timestep - self.delay < 0 and self.default_outflow:
47
+ return self.default_outflow
48
+ else:
49
+ timestep_after_delay_clipped = max(0, self.timestep - self.delay)
50
+ total_source_outflow = 0
51
+
52
+ # Calculate each source contribution to the destination
53
+ for source in self.sources:
54
+ source_outflow = source.get_outflow(timestep_after_delay_clipped)
55
+
56
+ # Determine if source has custom split policy
57
+ if source.split_release:
58
+ total_source_outflow += source_outflow * source.split_release[destination_index]
59
+ else:
60
+ total_source_outflow += source_outflow * destination_inflow_ratio
61
+
62
+ return total_source_outflow
63
+
64
+ def set_destination_inflow(self) -> None:
65
+ for destination_index, (destination, destination_inflow_ratio) in enumerate(self.destinations.items()):
66
+ destination_inflow = self.determine_source_outflow_by_destination(
67
+ destination_index, destination_inflow_ratio
68
+ )
69
+
70
+ destination.set_inflow(self.timestep, destination_inflow * (1.0 - self.evaporation_rate))
71
+
72
+ def is_truncated(self) -> bool:
73
+ return False
74
+
75
+ def determine_info(self) -> dict:
76
+ return {"name": self.name, "flow": self.determine_source_outflow()}
77
+
78
+ def step(self) -> tuple[Optional[ObsType], float, bool, bool, dict]:
79
+ self.set_destination_inflow()
80
+
81
+ terminated = self.determine_source_outflow() > self.max_capacity
82
+ truncated = self.is_truncated()
83
+ reward = float("-inf") if terminated else 0.0
84
+ info = self.determine_info()
85
+
86
+ self.timestep += 1
87
+
88
+ return None, reward, terminated, truncated, info
89
+
90
+ def reset(self) -> None:
91
+ self.timestep = 0
92
+
93
+
94
+ class Inflow(Flow):
95
+ def __init__(
96
+ self,
97
+ name: str,
98
+ destinations: Facility | ControlledFacility | dict[Facility | ControlledFacility, float],
99
+ max_capacity: float,
100
+ all_inflow: list[float],
101
+ evaporation_rate: float = 0.0,
102
+ delay: int = 0,
103
+ default_outflow: Optional[float] = None,
104
+ ) -> None:
105
+ super().__init__(name, None, destinations, max_capacity, evaporation_rate, delay, default_outflow)
106
+ self.all_inflow: list[float] = all_inflow
107
+
108
+ def determine_source_outflow(self) -> float:
109
+ if self.timestep - self.delay < 0 and self.default_outflow:
110
+ return self.default_outflow
111
+ else:
112
+ timestep_after_delay_clipped = max(0, self.timestep - self.delay) % len(self.all_inflow)
113
+
114
+ return self.all_inflow[timestep_after_delay_clipped]
115
+
116
+ def determine_source_outflow_by_destination(self, destination_index: int, destination_inflow_ratio: float) -> float:
117
+ if self.timestep - self.delay < 0 and self.default_outflow:
118
+ return self.default_outflow
119
+ else:
120
+ timestep_after_delay_clipped = max(0, self.timestep - self.delay) % len(self.all_inflow)
121
+
122
+ return self.all_inflow[timestep_after_delay_clipped] * destination_inflow_ratio
123
+
124
+ def is_truncated(self) -> bool:
125
+ return self.timestep >= len(self.all_inflow)
126
+
127
+
128
+ class Outflow(Flow):
129
+ def __init__(
130
+ self,
131
+ name: str,
132
+ sources: list[Union[Facility, ControlledFacility]],
133
+ max_capacity: float,
134
+ ) -> None:
135
+ super().__init__(name, sources, None, max_capacity)
136
+
137
+ def set_destination_inflow(self) -> None:
138
+ pass
morl4water/core/models/irrigation_district.py ADDED
@@ -0,0 +1,130 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from morl4water.core.models.facility import Facility
2
+
3
+
4
+ class IrrigationDistrict(Facility):
5
+ """
6
+ Represents an irrigation district with specific water demand, consumption, and deficit tracking.
7
+
8
+ Attributes
9
+ ----------
10
+ name : str
11
+ Identifier for the irrigation district.
12
+ all_demand : list[float]
13
+ Monthly water demand values for the irrigation district.
14
+ total_deficit : float
15
+ Cumulative water deficit experienced by the district over time.
16
+ all_deficit : list[float]
17
+ Monthly record of deficits, calculated as demand minus consumption.
18
+ normalize_objective : float
19
+ Normalization factor for the objective function reward. It should be the highest monthly value in a year. Default is 0.0
20
+
21
+ """
22
+ def __init__(self, name: str, all_demand: list[float], objective_function, objective_name: str, normalize_objective:float = 0.0) -> None:
23
+ """
24
+ Initializes an Irrigation District instance.
25
+
26
+ Parameters:
27
+ name : str
28
+ Identifier for the irrigation district.
29
+ all_demand : list[float]
30
+ Monthly water demand values for the irrigation district.
31
+ objective_function : callable
32
+ Function to evaluate the district’s performance.
33
+ objective_name : str
34
+ Name of the objective.
35
+ normalize_objective : float, optional
36
+ Maximum value for normalizing the objective, it should be the highest monthly demand in the whole year. By default 0.0.
37
+
38
+ """
39
+ super().__init__(name, objective_function, objective_name, normalize_objective)
40
+ self.all_demand: list[float] = all_demand
41
+ self.total_deficit: float = 0
42
+ self.all_deficit: list[float] = []
43
+
44
+ def get_current_demand(self) -> float:
45
+ """
46
+ Returns the demand value for the current timestep.
47
+
48
+ Returns
49
+ -------
50
+ float
51
+ Demand for the current timestep.
52
+
53
+ """
54
+ return self.all_demand[self.timestep % len(self.all_demand)]
55
+
56
+ def determine_deficit(self) -> float:
57
+ """
58
+ Calculates the reward (irrigation deficit) given the values of its attributes
59
+
60
+ Returns
61
+ -------
62
+ float
63
+ Water deficit of the irrigation district
64
+ """
65
+ consumption = self.determine_consumption()
66
+ deficit = self.get_current_demand() - consumption
67
+ self.total_deficit += deficit
68
+ self.all_deficit.append(deficit)
69
+ return deficit
70
+
71
+ def determine_reward(self) -> float:
72
+ """
73
+ Calculates the reward for the irrigation district based on the objective function.
74
+
75
+ Returns
76
+ -------
77
+ float
78
+ Reward as calculated by the objective function.
79
+ """
80
+ return self.objective_function(self.get_current_demand(), float(self.get_inflow(self.timestep)))
81
+
82
+ def determine_consumption(self) -> float:
83
+ """
84
+ Calculates the water consumption for the irrigation district based on current demand and inflow.
85
+
86
+ Returns
87
+ -------
88
+ float
89
+ Water consumption for the current timestep.
90
+ """
91
+ return min(self.get_current_demand(), self.get_inflow(self.timestep))
92
+
93
+ def is_truncated(self) -> bool:
94
+ """
95
+ Checks if the simulation has reached the end of the demand data.
96
+
97
+ Returns:
98
+ bool:
99
+ True if the simulation has no more demand data to process, False otherwise.
100
+ """
101
+ return self.timestep >= len(self.all_demand)
102
+
103
+ def determine_info(self) -> dict:
104
+ """
105
+ Returns information about the irrigation district.
106
+
107
+ Returns:
108
+ dict:
109
+ A dictionary containing key metrics for the district.
110
+ """
111
+ return {
112
+ "name": self.name,
113
+ "inflow": self.get_inflow(self.timestep),
114
+ "outflow": self.get_outflow(self.timestep),
115
+ "demand": self.get_current_demand(),
116
+ "total_deficit": self.total_deficit,
117
+ "list_deficits": self.all_deficit,
118
+ }
119
+
120
+ def reset(self) -> None:
121
+ """
122
+ Resets the irrigation district's deficit attributes and inherited attributes.
123
+
124
+ Returns:
125
+ None
126
+
127
+ """
128
+ super().reset()
129
+ self.total_deficit = 0
130
+ self.all_deficit = []
morl4water/core/models/objective.py ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class Objective:
2
+
3
+ @staticmethod
4
+ def no_objective(*args):
5
+ return 0.0
6
+
7
+ @staticmethod
8
+ def identity(value: float) -> float:
9
+ return value
10
+
11
+ @staticmethod
12
+ def is_greater_than_minimum(minimum_value: float) -> float:
13
+ return lambda value: 1.0 if value >= minimum_value else 0.0
14
+
15
+ @staticmethod
16
+ def is_greater_than_minimum_with_condition(minimum_value: float) -> float:
17
+ return lambda condition, value: 1.0 if condition and value >= minimum_value else 0.0
18
+
19
+ @staticmethod
20
+ def deficit_minimised(demand: float, received: float) -> float:
21
+ return -max(0.0, demand - received)
22
+
23
+ @staticmethod
24
+ def deficit_squared_ratio_minimised(demand: float, received: float) -> float:
25
+ return -((max(0.0, demand - received) / demand) ** 2)
26
+
27
+ @staticmethod
28
+ def supply_ratio_maximised(demand: float, received: float) -> float:
29
+ return received / demand if received / demand < 1.0 else 1.0
30
+
31
+ @staticmethod
32
+ def scalar_identity(scalar: float) -> float:
33
+ return lambda value: value * scalar
34
+
35
+ @staticmethod
36
+ def sequential_scalar(scalar: list[float]) -> float:
37
+ return lambda index, value: value * scalar[index]
morl4water/core/models/power_plant.py ADDED
@@ -0,0 +1,217 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from morl4water.core.models.facility import Facility
2
+ from morl4water.core.models.reservoir import Reservoir
3
+ from morl4water.core.utils import utils
4
+ from scipy.constants import g
5
+ import numpy as np
6
+
7
+
8
+ class PowerPlant(Facility):
9
+ """
10
+ Class to represent Hydro-energy Powerplant
11
+
12
+ Attributes:
13
+ -----------
14
+ name : str
15
+ identifier
16
+ efficiency : float
17
+ Efficiency coefficient (mu) used in hydropower formula
18
+ max_turbine_flow : float
19
+ Maximum possible flow that can be passed through the turbines for the
20
+ purpose of hydroenergy production
21
+ head_start_level : float
22
+ Minimum elevation of water level that is used to calculate hydraulic
23
+ head for hydropower production
24
+ max_capacity : float
25
+ Total design capacity (mW) of the plant
26
+ water_level_coeff : float
27
+ Coefficient that determines the water level based on the volume of outflow
28
+ Used to calculate at what level the head of the power plant operates
29
+ water_usage : float
30
+ Amount of water that is used by plant, decimal coefficient
31
+
32
+ Methods:
33
+ ----------
34
+ determine_reward():
35
+ Calculates the reward (power generation) given the values of its attributes
36
+ determine_consumption():
37
+ Determines how much water is consumed by the power plant
38
+ determine_info():
39
+ Returns info about the hydro-energy powerplant
40
+ """
41
+
42
+ def __init__(
43
+ self,
44
+ name: str,
45
+ objective_function,
46
+ objective_name: str,
47
+ efficiency: float,
48
+ min_turbine_flow: float = 0.0,
49
+ normalize_objective: float = 0.0,
50
+ max_turbine_flow: float = 0.0,
51
+ head_start_level: float = 0.0,
52
+ max_capacity: float = 0.0,
53
+ reservoir: Reservoir = None,
54
+ water_usage: float = 0.0,
55
+ tailwater: np.array = None,
56
+ turbines: np.array = None,
57
+ n_turbines: int = 0,
58
+ energy_prices: np.array = None
59
+ ) -> None:
60
+ super().__init__(name, objective_function, objective_name, normalize_objective)
61
+ self.efficiency: float = efficiency
62
+ self.max_turbine_flow: float = max_turbine_flow
63
+ self.head_start_level: float = head_start_level
64
+ self.min_turbine_flow: float = min_turbine_flow
65
+ self.max_capacity: float = max_capacity
66
+ self.reservoir: Reservoir = reservoir
67
+ self.water_usage: float = water_usage
68
+ self.production_vector: np.ndarray = np.empty(0, dtype=np.float64)
69
+ self.tailwater = tailwater
70
+ self.turbines = turbines
71
+ self.n_turbines = n_turbines
72
+ self.energy_prices = energy_prices
73
+
74
+ def determine_turbine_flow(self) -> float:
75
+ return max(self.min_turbine_flow, min(self.max_turbine_flow, self.get_inflow(self.timestep)))
76
+
77
+ # Constants are configured as parameters with default values
78
+ def determine_production(self) -> float:
79
+ """
80
+ Calculates power production in MWh , when tailwater and turbine data is not available
81
+
82
+ Returns:
83
+ ----------
84
+ float
85
+ Plant's power production in MWh
86
+ """
87
+ m3_to_kg_factor: int = 1000
88
+ w_Mw_conversion: float = 1e-6
89
+ # Turbine flow is equal to outflow, as long as it does not exceed maximum turbine flow
90
+ turbine_flow = self.determine_turbine_flow()
91
+
92
+ # Uses water level from reservoir to determine water level
93
+ water_level = self.reservoir.level_vector[-1] if self.reservoir.level_vector else 0
94
+ # Calculate at what level the head will generate power, using water_level of the outflow and head_start_level
95
+ head = max(0.0, water_level - self.head_start_level)
96
+
97
+ # Calculate power in mW, has to be lower than or equal to capacity
98
+ power_in_mw = min(
99
+ self.max_capacity,
100
+ turbine_flow * head * m3_to_kg_factor * g * self.efficiency * w_Mw_conversion,
101
+ )
102
+
103
+ # Calculate the numbe rof hours the power plant has been running.
104
+ final_date = self.current_date + self.timestep_size
105
+ timestep_hours = (final_date - self.current_date).total_seconds() / 3600
106
+
107
+ # Hydro-energy power production in mWh
108
+ production = power_in_mw * timestep_hours
109
+ self.production_vector = np.append(self.production_vector, production)
110
+
111
+ return production
112
+
113
+
114
+
115
+
116
+ def determine_production_detailed(self) -> float:
117
+ """Calculates power production when tailwater information and information regarding turbines is known.
118
+ Assumes metric system"""
119
+
120
+ cubicFeetToCubicMeters = 0.0283 # 1 cf = 0.0283 m3
121
+ feetToMeters = 0.3048 # 1 ft = 0.3048 m
122
+ m3_to_kg_factor = 1000
123
+ p = 0.0
124
+ water_level = self.reservoir.level_vector[-1] if self.reservoir.level_vector else 0
125
+ turbine_flow = self.determine_turbine_flow()
126
+
127
+ deltaH = water_level - utils.interpolate_tailwater_level(
128
+ self.tailwater[0], self.tailwater[1], turbine_flow
129
+ )
130
+
131
+ q_split = turbine_flow
132
+
133
+ for j in range(0, self.n_turbines):
134
+ if q_split < self.turbines[1][j]:
135
+ qturb = 0.0
136
+ elif q_split > self.turbines[0][j]:
137
+ qturb = self.turbines[0][j]
138
+ else:
139
+ qturb = q_split
140
+ q_split = q_split - qturb
141
+ p = p + (
142
+ self.efficiency
143
+ * g
144
+ * m3_to_kg_factor
145
+ * (cubicFeetToCubicMeters * qturb)
146
+ * (feetToMeters * deltaH)
147
+ * 3600
148
+ / (3600 * 1000)
149
+ )
150
+
151
+
152
+ # Calculate the numbe rof hours the power plant has been running.
153
+ final_date = self.current_date + self.timestep_size
154
+ timestep_hours = (final_date - self.current_date).total_seconds() / 3600
155
+
156
+ production = p * timestep_hours
157
+ self.production_vector = np.append(self.production_vector, production)
158
+
159
+ return production
160
+
161
+
162
+
163
+ def determine_reward(self) -> float:
164
+ """
165
+ Determines reward for the power plant using the power production.
166
+
167
+ Parameters:
168
+ -----------
169
+ objective_function : (float) -> float
170
+ Function calculating the objective given the power production.
171
+
172
+ Returns:
173
+ ----------
174
+ float
175
+ Reward.
176
+ """
177
+
178
+ if self.turbines is not None and self.tailwater is not None:
179
+ return self.objective_function(self.determine_production_detailed())
180
+ else:
181
+ return self.objective_function(self.determine_production())
182
+
183
+ def determine_consumption(self) -> float:
184
+ """
185
+ Determines water consumption.
186
+
187
+ Returns:
188
+ ----------
189
+ float
190
+ How much water is consumed
191
+ """
192
+ return self.determine_turbine_flow() * self.water_usage
193
+
194
+ def determine_info(self) -> dict:
195
+ """
196
+ Determines info of hydro-energy power plant
197
+
198
+ Returns:
199
+ ----------
200
+ dict
201
+ Info about power plant (name, inflow, outflow, water usage, timestep, total production)
202
+ """
203
+ return {
204
+ "name": self.name,
205
+ "inflow": self.get_inflow(self.timestep),
206
+ "outflow": self.get_outflow(self.timestep),
207
+ "monthly_production": self.production_vector[-1],
208
+ "water_usage": self.water_usage,
209
+ "total production (MWh)": sum(self.production_vector),
210
+ }
211
+
212
+ def determine_month(self) -> int:
213
+ return self.timestep % 12
214
+
215
+ def reset(self) -> None:
216
+ super().reset()
217
+ self.production_vector = np.empty(0, dtype=np.float64)
morl4water/core/models/reservoir.py ADDED
@@ -0,0 +1,233 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from morl4water.core.models.facility import ControlledFacility
2
+ from gymnasium.spaces import Box, Space
3
+ import numpy as np
4
+ from dateutil.relativedelta import relativedelta
5
+ from datetime import datetime
6
+ from numpy.core.multiarray import interp as compiled_interp
7
+
8
+
9
+ class Reservoir(ControlledFacility):
10
+ """
11
+ A class used to represent reservoirs of the problem
12
+
13
+ Attributes
14
+ ----------
15
+ name: str
16
+ Lowercase non-spaced name of the reservoir
17
+ storage_vector: np.array (1xH)
18
+ m3
19
+ A vector that holds the volume of the water in the reservoir
20
+ throughout the simulation horizon
21
+ level_vector: np.array (1xH)
22
+ m
23
+ A vector that holds the elevation of the water in the reservoir
24
+ throughout the simulation horizon
25
+ release_vector: np.array (1xH)
26
+ m3/s
27
+ A vector that holds the actual average release per month
28
+ from the reservoir throughout the simulation horizon
29
+ evap_rates: np.array (1x12)
30
+ cm
31
+ Monthly evaporation rates of the reservoir
32
+
33
+ Methods
34
+ -------
35
+ determine_info()
36
+ Return dictionary with parameters of the reservoir.
37
+ storage_to_level(h=float)
38
+ Returns the level(height) based on volume.
39
+ level_to_storage(s=float)
40
+ Returns the volume based on level(height).
41
+ level_to_surface(h=float)
42
+ Returns the surface area based on level.
43
+ determine_outflow(action: float)
44
+ Returns average monthly water release.
45
+ """
46
+
47
+ def __init__(
48
+ self,
49
+ name: str,
50
+ max_capacity: float,
51
+ max_action: list[float],
52
+ objective_function,
53
+ integration_timestep_size: relativedelta,
54
+ evap_rates: list[float],
55
+ evap_rates_timestep_size: relativedelta,
56
+ storage_to_minmax_rel: list[list[float]],
57
+ storage_to_level_rel: list[list[float]],
58
+ storage_to_surface_rel: list[list[float]],
59
+ objective_name: str = "",
60
+ stored_water: float = 0,
61
+ spillage: float = 0,
62
+ observation_space = Box(low=0, high=1),
63
+ action_space = Box(low=0, high=1),
64
+
65
+ ) -> None:
66
+ super().__init__(name, observation_space, action_space, max_capacity, max_action)
67
+ self.stored_water: float = stored_water
68
+
69
+ self.evap_rates = evap_rates
70
+ self.evap_rates_timestep = evap_rates_timestep_size
71
+ self.storage_to_minmax_rel = storage_to_minmax_rel
72
+ self.storage_to_level_rel = storage_to_level_rel
73
+ self.storage_to_surface_rel = storage_to_surface_rel
74
+
75
+ self.storage_vector = []
76
+ self.level_vector = []
77
+ self.release_vector = []
78
+
79
+ # Initialise storage vector
80
+ self.storage_vector.append(stored_water)
81
+
82
+ self.objective_function = objective_function
83
+ self.objective_name = objective_name
84
+
85
+ self.integration_timestep_size: relativedelta = integration_timestep_size
86
+ self.spillage = spillage
87
+ # self.water_level = self.storage_to_level(self.stored_water)
88
+
89
+ def determine_reward(self) -> float:
90
+ # Pass water level to reward function
91
+ return self.objective_function(self.storage_to_level(self.stored_water))
92
+
93
+ def determine_outflow(self, actions: np.array) -> list[float]:
94
+
95
+ current_storage = self.storage_vector[-1]
96
+ #check if we are releasing to one destination or more
97
+ if self.should_split_release == True:
98
+ #if it's more destinations, we have to create a list for sub-releases during the integration loop
99
+ sub_releases = []
100
+ actions = np.multiply(actions, self.max_action)
101
+ else:
102
+ sub_releases = np.empty(0, dtype=np.float64)
103
+ actions = actions*self.max_action
104
+
105
+ final_date = self.current_date + self.timestep_size
106
+ timestep_seconds = (final_date + self.evap_rates_timestep - final_date).total_seconds()
107
+ evaporatio_rate_per_second = self.evap_rates[self.determine_time_idx()] / (100 * timestep_seconds)
108
+
109
+ while self.current_date < final_date:
110
+ next_date = min(final_date, self.current_date + self.integration_timestep_size)
111
+ integration_time_seconds = (next_date - self.current_date).total_seconds()
112
+
113
+ #calculate the surface to get the evaporation
114
+ surface = self.storage_to_surface(current_storage)
115
+ #evaporation per integration timestep
116
+ evaporation = surface * (evaporatio_rate_per_second * integration_time_seconds)
117
+ #get min and max possible release based on the current storage
118
+ min_possible_release, max_possible_release = self.storage_to_minmax(current_storage)
119
+ #release per second is calculated based on the min-max releases which depend on the storage level and the predicted actions
120
+ release_per_second = min(max_possible_release, max(min_possible_release, np.sum(actions)))
121
+
122
+ sub_releases = np.append(sub_releases, release_per_second)
123
+
124
+ total_addition = self.get_inflow(self.timestep) * integration_time_seconds
125
+
126
+ current_storage += total_addition - evaporation - (np.sum(release_per_second) - self.spillage) * integration_time_seconds
127
+
128
+ self.current_date = next_date
129
+
130
+ # Update the amount of water in the Reservoir
131
+ self.storage_vector.append(current_storage)
132
+ self.stored_water = current_storage
133
+
134
+ # Record level based on storage for time t
135
+ self.level_vector.append(self.storage_to_level(current_storage))
136
+
137
+ # Calculate the ouflow of water
138
+ if self.should_split_release == True:
139
+ sub_releases = np.array(sub_releases)
140
+ average_release = np.mean(sub_releases, dtype=np.float64, axis = 0)
141
+ else:
142
+ average_release = np.mean(sub_releases, dtype=np.float64)
143
+
144
+ self.release_vector.append(average_release)
145
+
146
+ total_action = np.sum(average_release)
147
+
148
+ # Split release for different destinations
149
+ if self.should_split_release and total_action != 0:
150
+ self.split_release = [(action / total_action) for action in average_release]
151
+ average_release = total_action
152
+
153
+ return average_release
154
+
155
+ def determine_info(self) -> dict:
156
+ info = {
157
+ "name": self.name,
158
+ "stored_water": self.stored_water,
159
+ "current_level": self.level_vector[-1] if self.level_vector else None,
160
+ "current_release": self.release_vector[-1] if self.release_vector else None,
161
+ "evaporation_rates": self.evap_rates.tolist(),
162
+ }
163
+ return info
164
+
165
+ def determine_observation(self) -> float:
166
+ if self.stored_water > 0:
167
+ return self.stored_water
168
+ else:
169
+ return 0.0
170
+
171
+ def is_terminated(self) -> bool:
172
+ return self.stored_water > self.max_capacity or self.stored_water < 0
173
+
174
+
175
+
176
+ def determine_time_idx(self) -> int:
177
+ if self.evap_rates_timestep.months > 0:
178
+ return self.current_date.month - 1
179
+ elif self.evap_rates_timestep.days > 0:
180
+ return self.current_date.timetuple().tm_yday - 1
181
+ elif self.evap_rates_timestep.hours > 0:
182
+ return (self.current_date.timetuple().tm_yday - 1) * 24 + self.current_date.hour - 1
183
+ else:
184
+ raise ValueError('The timestep is not supported, only time series with intervals of months, days, hours are supported')
185
+
186
+
187
+ def storage_to_level(self, s: float) -> float:
188
+ return self.modified_interp(s, self.storage_to_level_rel[0], self.storage_to_level_rel[1])
189
+
190
+ def storage_to_surface(self, s: float) -> float:
191
+ return self.modified_interp(s, self.storage_to_surface_rel[0], self.storage_to_surface_rel[1])
192
+
193
+ def level_to_minmax(self, h) -> tuple[np.ndarray, np.ndarray]:
194
+ return (
195
+ np.interp(h, self.rating_curve[0], self.rating_curve[1]),
196
+ np.interp(h, self.rating_curve[0], self.rating_curve[2]),
197
+ )
198
+
199
+ def storage_to_minmax(self, s) -> tuple[np.ndarray, np.ndarray]:
200
+ return (
201
+ np.interp(s, self.storage_to_minmax_rel[0], self.storage_to_minmax_rel[1]),
202
+ np.interp(s, self.storage_to_minmax_rel[0], self.storage_to_minmax_rel[2]),
203
+ )
204
+
205
+ @staticmethod
206
+ def modified_interp(x: float, xp: float, fp: float, left=None, right=None) -> float:
207
+ fp = np.asarray(fp)
208
+
209
+ return compiled_interp(x, xp, fp, left, right)
210
+
211
+ # def modified_interp(x: float, xp: float, fp: float, left=None, right=None) -> float:
212
+ # fp = np.asarray(fp)
213
+ # dim = len(xp) - 1
214
+ # if x <= xp[0]:
215
+ # # if x is smaller than the smallest value on X, interpolate between the first two values
216
+ # y = (x - xp[0]) * (fp[1] - fp[0]) / (xp[1] - xp[0]) + fp[0]
217
+ # return y
218
+ # elif x >= xp[dim]:
219
+ # # if x is larger than the largest value, interpolate between the the last two values
220
+ # y = fp[dim] + (fp[dim] - fp[dim - 1]) / (xp[dim] - xp[dim - 1]) * (
221
+ # x - xp[dim]) # y = Y[dim]
222
+ # return y
223
+ # else:
224
+ # return compiled_interp(x, xp, fp, left, right)
225
+
226
+
227
+ def reset(self) -> None:
228
+ super().reset()
229
+ stored_water = self.storage_vector[0]
230
+ self.storage_vector = [stored_water]
231
+ self.stored_water = stored_water
232
+ self.level_vector = []
233
+ self.release_vector = []
morl4water/core/models/reservoir_with_pump.py ADDED
@@ -0,0 +1,288 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from morl4water.core.models.facility import ControlledFacility
2
+ from gymnasium.spaces import Box, Space
3
+ import numpy as np
4
+ from dateutil.relativedelta import relativedelta
5
+ from datetime import datetime
6
+ from numpy.core.multiarray import interp as compiled_interp
7
+ from typing import Callable
8
+ import inspect
9
+ from morl4water.core.utils import utils
10
+
11
+ class ReservoirWithPump(ControlledFacility):
12
+ """
13
+ A class used to represent reservoirs with a pump of the problem.
14
+ The pump can pump the water in and out of the reservoir as well as store the water
15
+
16
+ Attributes
17
+ ----------
18
+ name_reservoir: str
19
+ Lowercase non-spaced name of the reservoir
20
+ name_pump: str
21
+ Lowercase non-spaced name of the pumping station
22
+ storage_vector: np.array (1xH)
23
+ m3
24
+ A vector that holds the volume of the water in the reservoir
25
+ throughout the simulation horizon
26
+ level_vector: np.array (1xH)
27
+ m
28
+ A vector that holds the elevation of the water in the reservoir
29
+ throughout the simulation horizon
30
+ release_vector: np.array (1xH)
31
+ m3/s
32
+ A vector that holds the actual average release per month
33
+ from the reservoir throughout the simulation horizon
34
+ evap_rates: np.array (1x12)
35
+ cm
36
+ Monthly evaporation rates of the reservoir
37
+
38
+ Methods
39
+ -------
40
+ determine_info()
41
+ Return dictionary with parameters of the reservoir.
42
+ storage_to_level(h=float)
43
+ Returns the level(height) based on volume.
44
+ level_to_storage(s=float)
45
+ Returns the volume based on level(height).
46
+ level_to_surface(h=float)
47
+ Returns the surface area based on level.
48
+ determine_outflow(action: float)
49
+ Returns average monthly water release.
50
+ """
51
+ def __init__(
52
+ self,
53
+ name: str,
54
+ max_capacity: float,
55
+ max_action: float,
56
+ objective_function,
57
+ integration_timestep_size: relativedelta,
58
+ evap_rates: list[float],
59
+ evap_rates_pump: list[float],
60
+ evap_rates_timestep_size: relativedelta,
61
+ storage_to_minmax_rel: list[list[float]],
62
+ storage_to_level_rel: list[list[float]],
63
+ storage_to_surface_rel: list[list[float]],
64
+ storage_to_surface_rel_pump: list[list[float]],
65
+ storage_to_level_rel_pump: list[list[float]],
66
+ pumping_rules: Callable,
67
+ inflows_pump: list[float] = None,
68
+ objective_name: str = "",
69
+ stored_water_reservoir: float = 0,
70
+ stored_water_pump: float = 0,
71
+ observation_space = Box(low=0, high=1),
72
+ action_space = Box(low=0, high=1),
73
+ spillage: float = 0
74
+ ) -> None:
75
+ super().__init__(name, observation_space, action_space, max_capacity, max_action)
76
+ self.stored_water: float = stored_water_reservoir
77
+ self.stored_pump: float = stored_water_pump
78
+
79
+ self.evap_rates = evap_rates
80
+ self.evap_rates_pump = evap_rates_pump
81
+ self.evap_rates_timestep = evap_rates_timestep_size
82
+ self.storage_to_minmax_rel = storage_to_minmax_rel
83
+ self.storage_to_level_rel = storage_to_level_rel
84
+ self.storage_to_surface_rel = storage_to_surface_rel
85
+ self.storage_to_surface_rel_pump = storage_to_surface_rel_pump
86
+ self.storage_to_level_rel_pump = storage_to_level_rel_pump
87
+ self.spillage = spillage
88
+ self.required_params = ['day_of_the_week', 'hour', 'level_reservoir', 'level_pump', 'storage_reservoir', 'storage_pump']
89
+
90
+ self.inflows_pump = inflows_pump
91
+
92
+ self.storage_vector = []
93
+ self.storage_pump_vector = []
94
+ self.level_vector = []
95
+ self.release_vector = []
96
+
97
+ # Initialise storage vector
98
+ self.storage_vector.append(stored_water_reservoir)
99
+ self.storage_pump_vector.append(stored_water_pump)
100
+
101
+ self.objective_function = objective_function
102
+ self.objective_name = objective_name
103
+
104
+ self.integration_timestep_size: relativedelta = integration_timestep_size
105
+
106
+
107
+ if not callable(pumping_rules):
108
+ raise ValueError("The pumping rules should be defined as a function, which takes as argument storage_level of the reservoir and the pump.")
109
+
110
+ # Get the signature of the method
111
+ sig = inspect.signature(pumping_rules)
112
+
113
+ # Check if the method has the required parameters
114
+ for param in self.required_params:
115
+ if param not in sig.parameters:
116
+ raise ValueError(f"The method must have a parameter named '{param}'.")
117
+
118
+ # Assign the provided method to the instance
119
+ self.pumping_rules = pumping_rules
120
+
121
+
122
+ def determine_reward(self) -> float:
123
+ # Pass water level to reward function
124
+ return self.objective_function(self.storage_to_level(self.stored_water))
125
+
126
+ def determine_outflow(self, actions: np.array) -> list[float]:
127
+ #determine current storage for the reservoir
128
+ current_storage = self.storage_vector[-1]
129
+ #determine current storage for the pump
130
+ current_storage_pump = self.storage_pump_vector[-1]
131
+ #check if we are releasing to one destination or more
132
+ if self.should_split_release == True:
133
+ #if it's more destinations, we have to create a list for sub-releases during the integration loop
134
+ sub_releases = []
135
+ actions = np.multiply(actions, self.max_action)
136
+ else:
137
+ sub_releases = np.empty(0, dtype=np.float64)
138
+ actions = actions*self.max_action
139
+
140
+
141
+ final_date = self.current_date + self.timestep_size
142
+ timestep_seconds = (final_date + self.evap_rates_timestep - final_date).total_seconds()
143
+ evaporatio_rate_per_second = self.evap_rates[self.determine_time_idx()] / (100 * timestep_seconds)
144
+ evaporatio_rate_per_second_pump = self.evap_rates_pump[self.determine_time_idx()] / (100 * timestep_seconds)
145
+
146
+ while self.current_date < final_date:
147
+ next_date = min(final_date, self.current_date + self.integration_timestep_size)
148
+ integration_time_seconds = (next_date - self.current_date).total_seconds()
149
+
150
+ #pumping/release of the pump
151
+
152
+ pumping, release_pump = self.pumping_rules(day = self.current_date.weekday(),
153
+ hour = self.current_date.hour,
154
+ level_reservoir = self.storage_to_level(current_storage),
155
+ level_pump = self.storage_to_level_pump(self.stored_pump),
156
+ storage_reservoir = current_storage, storage_pump = self.stored_pump)
157
+
158
+
159
+ surface = self.storage_to_surface(current_storage)
160
+ surface_pump = self.storage_to_surface_pump(current_storage_pump)
161
+
162
+ evaporation = surface * (evaporatio_rate_per_second * integration_time_seconds)
163
+ evaporation_pump = surface_pump * (evaporatio_rate_per_second_pump * integration_time_seconds)
164
+
165
+ current_storage_pump += (self.inflows_pump[self.timestep] + pumping - release_pump) * integration_time_seconds - evaporation_pump
166
+
167
+
168
+ min_possible_release, max_possible_release = self.storage_to_minmax(current_storage)
169
+
170
+ release_per_second = min(max_possible_release, max(min_possible_release, np.sum(actions)))
171
+
172
+ #depending if there are multiple outflows, append release decisions for every integration step
173
+ if self.should_split_release == True:
174
+ sub_releases.append(release_per_second)
175
+ else:
176
+ sub_releases = np.append(sub_releases, release_per_second)
177
+
178
+ total_addition = (self.get_inflow(self.timestep) + release_pump) * integration_time_seconds
179
+
180
+ current_storage += total_addition - evaporation - np.sum(release_per_second) * integration_time_seconds
181
+
182
+ self.current_date = next_date
183
+
184
+ # Update the amount of water in the Reservoir
185
+ self.storage_vector.append(current_storage)
186
+ self.stored_water = current_storage
187
+
188
+ # Update water in the pump
189
+ self.storage_pump_vector.append(current_storage_pump)
190
+ self.stored_pump = current_storage_pump
191
+
192
+ # Record level based on storage for time t
193
+ self.level_vector.append(self.storage_to_level(current_storage))
194
+
195
+ # Calculate the ouflow of water
196
+ if self.should_split_release == True:
197
+ sub_releases = np.array(sub_releases)
198
+ average_release = np.mean(sub_releases, dtype=np.float64, axis = 0)
199
+ else:
200
+ average_release = np.mean(sub_releases, dtype=np.float64)
201
+
202
+ self.release_vector.append(average_release)
203
+
204
+ total_action = np.sum(average_release)
205
+ # Split release for different destinations
206
+ if self.should_split_release and total_action != 0:
207
+
208
+ self.split_release = [(action / total_action) for action in average_release]
209
+ average_release = total_action
210
+
211
+ return average_release
212
+
213
+ def determine_info(self) -> dict:
214
+ info = {
215
+ "name": self.name,
216
+ "stored_water": self.stored_water,
217
+ "current_level": self.level_vector[-1] if self.level_vector else None,
218
+ "current_release": self.release_vector[-1] if self.release_vector else None,
219
+ "evaporation_rates": self.evap_rates.tolist(),
220
+ "pump_level": self.stored_pump
221
+ }
222
+ return info
223
+
224
+ def determine_observation(self) -> float:
225
+ return self.stored_water
226
+
227
+ def is_terminated(self) -> bool:
228
+ return self.stored_water > self.max_capacity or self.stored_water < 0
229
+
230
+ def determine_time_idx(self) -> int:
231
+ if self.evap_rates_timestep.months > 0:
232
+ return self.current_date.month - 1
233
+ elif self.evap_rates_timestep.days > 0:
234
+ return self.current_date.timetuple().tm_yday - 1
235
+ elif self.evap_rates_timestep.hours > 0:
236
+ return (self.current_date.timetuple().tm_yday - 1) * 24 + self.current_date.hour - 1
237
+ else:
238
+ raise ValueError('The timestep is not supported, only time series with intervals of months, days, hours are supported')
239
+
240
+ def storage_to_level(self, s: float) -> float:
241
+ return self.modified_interp(s, self.storage_to_level_rel[0], self.storage_to_level_rel[1])
242
+
243
+ def storage_to_level_pump(self, s: float) -> float:
244
+ return self.modified_interp(s, self.storage_to_level_rel_pump[0], self.storage_to_level_rel_pump[1])
245
+
246
+
247
+ def storage_to_surface(self, s: float) -> float:
248
+ return self.modified_interp(s, self.storage_to_surface_rel[0], self.storage_to_surface_rel[1])
249
+
250
+ def storage_to_surface_pump(self, s: float) -> float:
251
+ return self.modified_interp(s, self.storage_to_surface_rel_pump[0], self.storage_to_surface_rel_pump[1])
252
+
253
+
254
+ def level_to_minmax(self, h) -> tuple[np.ndarray, np.ndarray]:
255
+ return (
256
+ np.interp(h, self.rating_curve[0], self.rating_curve[1]),
257
+ np.interp(h, self.rating_curve[0], self.rating_curve[2]),
258
+ )
259
+
260
+ def storage_to_minmax(self, s) -> tuple[np.ndarray, np.ndarray]:
261
+ return (
262
+ np.interp(s, self.storage_to_minmax_rel[0], self.storage_to_minmax_rel[1]),
263
+ np.interp(s, self.storage_to_minmax_rel[0], self.storage_to_minmax_rel[2]),
264
+ )
265
+
266
+ @staticmethod
267
+ def modified_interp(x: float, xp: float, fp: float, left=None, right=None) -> float:
268
+ fp = np.asarray(fp)
269
+ dim = len(xp) - 1
270
+ if x <= xp[0]:
271
+ # if x is smaller than the smallest value on X, interpolate between the first two values
272
+ y = (x - xp[0]) * (fp[1] - fp[0]) / (xp[1] - xp[0]) + fp[0]
273
+ return y
274
+ elif x >= xp[dim]:
275
+ # if x is larger than the largest value, interpolate between the the last two values
276
+ y = fp[dim] + (fp[dim] - fp[dim - 1]) / (xp[dim] - xp[dim - 1]) * (
277
+ x - xp[dim]) # y = Y[dim]
278
+ return y
279
+ else:
280
+ return compiled_interp(x, xp, fp, left, right)
281
+
282
+ def reset(self) -> None:
283
+ super().reset()
284
+ stored_water = self.storage_vector[0]
285
+ self.storage_vector = [stored_water]
286
+ self.stored_water = stored_water
287
+ self.level_vector = [self.storage_to_level(stored_water)]
288
+ self.release_vector = []
morl4water/core/models/weir.py ADDED
@@ -0,0 +1,142 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from morl4water.core.models.facility import ControlledFacility
2
+ from gymnasium.spaces import Box, Space
3
+ import numpy as np
4
+ from dateutil.relativedelta import relativedelta
5
+ from datetime import datetime
6
+ from numpy.core.multiarray import interp as compiled_interp
7
+
8
+
9
+ class Weir(ControlledFacility):
10
+ """
11
+ A class used to represent reservoirs of the problem
12
+
13
+ Attributes
14
+ ----------
15
+ name: str
16
+ Lowercase non-spaced name of the reservoir
17
+ storage_vector: np.array (1xH)
18
+ m3
19
+ A vector that holds the volume of the water in the reservoir
20
+ throughout the simulation horizon
21
+ level_vector: np.array (1xH)
22
+ m
23
+ A vector that holds the elevation of the water in the reservoir
24
+ throughout the simulation horizon
25
+ release_vector: np.array (1xH)
26
+ m3/s
27
+ A vector that holds the actual average release per month
28
+ from the reservoir throughout the simulation horizon
29
+ evap_rates: np.array (1x12)
30
+ cm
31
+ Monthly evaporation rates of the reservoir
32
+
33
+ Methods
34
+ -------
35
+ determine_info()
36
+ Return dictionary with parameters of the reservoir.
37
+ storage_to_level(h=float)
38
+ Returns the level(height) based on volume.
39
+ level_to_storage(s=float)
40
+ Returns the volume based on level(height).
41
+ level_to_surface(h=float)
42
+ Returns the surface area based on level.
43
+ determine_outflow(action: float)
44
+ Returns average monthly water release.
45
+ """
46
+
47
+ def __init__(
48
+ self,
49
+ name: str,
50
+ max_capacity: float,
51
+ max_action: list[float],
52
+ objective_function,
53
+ integration_timestep_size: relativedelta,
54
+ objective_name: str = "",
55
+ stored_water: float = 0,
56
+ spillage: float = 0,
57
+ observation_space = Box(low=0, high=1),
58
+ action_space = Box(low=0, high=1),
59
+
60
+ ) -> None:
61
+ super().__init__(name, observation_space, action_space, max_capacity, max_action)
62
+ self.stored_water: float = stored_water
63
+
64
+ self.should_split_release = True
65
+
66
+
67
+ self.storage_vector = []
68
+ self.level_vector = []
69
+ self.release_vector = []
70
+
71
+ # Initialise storage vector
72
+ self.storage_vector.append(stored_water)
73
+
74
+ self.objective_function = objective_function
75
+ self.objective_name = objective_name
76
+
77
+ self.integration_timestep_size: relativedelta = integration_timestep_size
78
+ self.spillage = spillage
79
+
80
+
81
+ def determine_reward(self) -> float:
82
+ #Pass average inflow (which is stored_water ) to reward function
83
+ return self.objective_function(self.stored_water)
84
+
85
+ def determine_outflow(self, actions: np.array) -> list[float]:
86
+
87
+ destination_1_release = np.empty(0, dtype=np.float64)
88
+ weir_observation_lst = []
89
+
90
+ final_date = self.current_date + self.timestep_size
91
+
92
+ while self.current_date < final_date:
93
+ next_date = min(final_date, self.current_date + self.integration_timestep_size)
94
+
95
+ #See what is the current inflow to weir and scale up the action to the first destination ( the action is a percentage of water going to destination 1)
96
+ weir_observation = self.get_inflow(self.timestep)
97
+ max_action = weir_observation
98
+ actions_scaled_up = actions*max_action
99
+
100
+ destination_1_release = np.append(destination_1_release, actions_scaled_up)
101
+
102
+ weir_observation_lst = np.append(weir_observation_lst, weir_observation)
103
+
104
+ self.current_date = next_date
105
+
106
+ #Averaging inflow to weir over last step (usually month) as a potential observation space to be used
107
+ average_release = np.mean(weir_observation_lst, dtype=np.float64)
108
+ self.storage_vector.append(average_release) #TODO does it make sense to keep it?
109
+ self.stored_water = average_release # TODO used in determine_observation
110
+
111
+ #potential storage (observation space understood as total inflow) is same as the total release
112
+ self.release_vector.append(average_release)
113
+
114
+ # Split release for different destinations, action is expected to be in range [0,1]
115
+ self.split_release = [actions, (1-actions)]
116
+
117
+
118
+ return average_release
119
+
120
+ def determine_info(self) -> dict:
121
+ info = {
122
+ "name": self.name,
123
+ "average_release": self.stored_water,
124
+ }
125
+ return info
126
+
127
+ def determine_observation(self) -> float:
128
+ if self.stored_water > 0:
129
+ return self.stored_water
130
+ else:
131
+ return 0.0
132
+
133
+ def is_terminated(self) -> bool:
134
+ return self.stored_water > self.max_capacity or self.stored_water < 0
135
+
136
+ def reset(self) -> None:
137
+ super().reset()
138
+ stored_water = self.storage_vector[0]
139
+ self.storage_vector = [stored_water]
140
+ self.stored_water = stored_water
141
+ self.level_vector = []
142
+ self.release_vector = []
morl4water/core/settings/settings_file_Nile_with_icons.xlsm ADDED
Binary file (84.1 kB). View file
 
morl4water/core/utils/__init__.py ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # morl4water/core/utils/__init__.py
2
+ from .utils import (
3
+ generate_random_actions,
4
+ convert_str_to_float_list,
5
+ gallonToCubicFeet,
6
+ inchesToFeet,
7
+ cubicFeetToCubicMeters,
8
+ feetToMeters,
9
+ acreToSquaredFeet,
10
+ acreFeetToCubicFeet,
11
+ cubicFeetToAcreFeet,
12
+ interpolate_tailwater_level,
13
+ )
14
+
15
+ __all__ = [
16
+ "generate_random_actions",
17
+ "convert_str_to_float_list",
18
+ "gallonToCubicFeet",
19
+ "inchesToFeet",
20
+ "cubicFeetToCubicMeters",
21
+ "feetToMeters",
22
+ "acreToSquaredFeet",
23
+ "acreFeetToCubicFeet",
24
+ "cubicFeetToAcreFeet",
25
+ "interpolate_tailwater_level",
26
+ ]
morl4water/core/utils/utils.py ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import numpy as np
2
+ from numba import njit
3
+
4
+ LIST_SPECIFIC_CHARACTERS = "[],"
5
+
6
+
7
+ def generate_random_actions(number_of_actions=4, seed=42) -> np.ndarray:
8
+ np.random.seed(seed)
9
+ return np.random.rand(4) * [10000, 10000, 10000, 4000]
10
+
11
+
12
+ def convert_str_to_float_list(string_list: str) -> list:
13
+ return list(map(float, string_list.translate(str.maketrans("", "", LIST_SPECIFIC_CHARACTERS)).split()))
14
+
15
+ @njit
16
+ def gallonToCubicFeet(x):
17
+ conv = 0.13368 # 1 gallon = 0.13368 cf
18
+ return x * conv
19
+
20
+
21
+ @njit
22
+ def inchesToFeet(x):
23
+ conv = 0.08333 # 1 inch = 0.08333 ft
24
+ return x * conv
25
+
26
+
27
+ @njit
28
+ def cubicFeetToCubicMeters(x):
29
+ conv = 0.0283 # 1 cf = 0.0283 m3
30
+ return x * conv
31
+
32
+
33
+ @njit
34
+ def feetToMeters(x):
35
+ conv = 0.3048 # 1 ft = 0.3048 m
36
+ return x * conv
37
+
38
+
39
+ @njit
40
+ def acreToSquaredFeet(x):
41
+ conv = 43560 # 1 acre = 43560 feet2
42
+ return x * conv
43
+
44
+
45
+ @njit
46
+ def acreFeetToCubicFeet(x):
47
+ conv = 43560 # 1 acre-feet = 43560 feet3
48
+ return x * conv
49
+
50
+
51
+ @njit
52
+ def cubicFeetToAcreFeet(x):
53
+ conv = 43560 # 1 acre = 43560 feet2
54
+ return x / conv
55
+
56
+
57
+ @njit
58
+ def interpolate_tailwater_level(X, Y, x):
59
+ dim = len(X) - 1
60
+ if x <= X[0]:
61
+ y = (x - X[0]) * (Y[1] - Y[0]) / (X[1] - X[0]) + Y[0]
62
+ return y
63
+ elif x >= X[dim]:
64
+ y = Y[dim] + (Y[dim] - Y[dim - 1]) / (X[dim] - X[dim - 1]) * (
65
+ x - X[dim]
66
+ )
67
+ return y
68
+ else:
69
+ y = np.interp(x, X, Y)
70
+ return y
71
+
morl4water/core/wrappers/__init__.py ADDED
File without changes
morl4water/core/wrappers/transform_action.py ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import numpy as np
2
+ import gymnasium as gym
3
+ from gymnasium.spaces.dict import Dict
4
+ from morl4water.core.envs.water_management_system import WaterManagementSystem
5
+ from morl4water.core.models.facility import ControlledFacility
6
+
7
+
8
+ class ReshapeArrayAction(gym.ActionWrapper, gym.utils.RecordConstructorArgs):
9
+ def __init__(self, env: WaterManagementSystem):
10
+ # assert isinstance(env.action_space, Dict)
11
+
12
+ self.ordered_shapes = {}
13
+ self.slices = {}
14
+ current_index = 0
15
+
16
+ for water_system in env.water_systems:
17
+ if isinstance(water_system, ControlledFacility):
18
+ number_of_actions = np.prod(water_system.action_space.shape)
19
+
20
+ self.slices[water_system.name] = slice(current_index, current_index + number_of_actions)
21
+ self.ordered_shapes[water_system.name] = water_system.action_space.shape
22
+
23
+ current_index += number_of_actions
24
+
25
+ gym.utils.RecordConstructorArgs.__init__(self)
26
+ gym.ActionWrapper.__init__(self, env)
27
+
28
+ def action(self, action):
29
+ reshaped_actions = {}
30
+
31
+ for name, sub_action_space_shape in self.ordered_shapes.items():
32
+ reshaped_actions[name] = np.reshape(action[self.slices[name]], sub_action_space_shape)
33
+
34
+ return reshaped_actions
morl4water/examples/.DS_Store ADDED
Binary file (6.15 kB). View file
 
morl4water/examples/__init__.py ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from .nile_river_simulation import create_nile_river_env
2
+ from .omo_river_simulation import create_omo_river_env
3
+ from .susquehanna_river_simulation import create_susquehanna_river_env
4
+ from gymnasium.envs.registration import register
5
+
6
+ __all__=['create_nile_river_env', 'create_omo_river_env', 'create_susquehanna_river_env']
7
+
8
+
9
+ register(
10
+ id='nile-v0',
11
+ entry_point='morl4water.examples.nile_river_simulation:create_nile_river_env',
12
+ )
13
+
14
+ register(
15
+ id='omo-v0',
16
+ entry_point='morl4water.examples.omo_river_simulation:create_omo_river_env',
17
+ )
18
+
19
+
20
+ register(
21
+ id='susquehanna-v0',
22
+ entry_point='morl4water.examples.susquehanna_river_simulation:create_susquehanna_river_env',
23
+ )
morl4water/examples/data/__init__.py ADDED
File without changes
morl4water/examples/data/nile_river/__init__.py ADDED
File without changes
morl4water/examples/data/nile_river/catchments/InflowAtbara.txt ADDED
@@ -0,0 +1,240 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 7.712786885245902
2
+ 3.004426229508197
3
+ 0.4216393442622951
4
+ 1.4672131147540983
5
+ 2.970983606557377
6
+ 28.256393442622947
7
+ 592.7859154929578
8
+ 1979.0281690140846
9
+ 1301.619718309859
10
+ 304.04647887323944
11
+ 63.12239436619718
12
+ 28.43633802816902
13
+ 7.712786885245902
14
+ 3.004426229508197
15
+ 0.4216393442622951
16
+ 1.4672131147540983
17
+ 2.970983606557377
18
+ 28.256393442622947
19
+ 592.7859154929578
20
+ 1979.0281690140846
21
+ 1301.619718309859
22
+ 304.04647887323944
23
+ 63.12239436619718
24
+ 28.43633802816902
25
+ 7.712786885245902
26
+ 3.004426229508197
27
+ 0.4216393442622951
28
+ 1.4672131147540983
29
+ 2.970983606557377
30
+ 28.256393442622947
31
+ 592.7859154929578
32
+ 1979.0281690140846
33
+ 1301.619718309859
34
+ 304.04647887323944
35
+ 63.12239436619718
36
+ 28.43633802816902
37
+ 7.712786885245902
38
+ 3.004426229508197
39
+ 0.4216393442622951
40
+ 1.4672131147540983
41
+ 2.970983606557377
42
+ 28.256393442622947
43
+ 592.7859154929578
44
+ 1979.0281690140846
45
+ 1301.619718309859
46
+ 304.04647887323944
47
+ 63.12239436619718
48
+ 28.43633802816902
49
+ 7.712786885245902
50
+ 3.004426229508197
51
+ 0.4216393442622951
52
+ 1.4672131147540983
53
+ 2.970983606557377
54
+ 28.256393442622947
55
+ 592.7859154929578
56
+ 1979.0281690140846
57
+ 1301.619718309859
58
+ 304.04647887323944
59
+ 63.12239436619718
60
+ 28.43633802816902
61
+ 7.712786885245902
62
+ 3.004426229508197
63
+ 0.4216393442622951
64
+ 1.4672131147540983
65
+ 2.970983606557377
66
+ 28.256393442622947
67
+ 592.7859154929578
68
+ 1979.0281690140846
69
+ 1301.619718309859
70
+ 304.04647887323944
71
+ 63.12239436619718
72
+ 28.43633802816902
73
+ 7.712786885245902
74
+ 3.004426229508197
75
+ 0.4216393442622951
76
+ 1.4672131147540983
77
+ 2.970983606557377
78
+ 28.256393442622947
79
+ 592.7859154929578
80
+ 1979.0281690140846
81
+ 1301.619718309859
82
+ 304.04647887323944
83
+ 63.12239436619718
84
+ 28.43633802816902
85
+ 7.712786885245902
86
+ 3.004426229508197
87
+ 0.4216393442622951
88
+ 1.4672131147540983
89
+ 2.970983606557377
90
+ 28.256393442622947
91
+ 592.7859154929578
92
+ 1979.0281690140846
93
+ 1301.619718309859
94
+ 304.04647887323944
95
+ 63.12239436619718
96
+ 28.43633802816902
97
+ 7.712786885245902
98
+ 3.004426229508197
99
+ 0.4216393442622951
100
+ 1.4672131147540983
101
+ 2.970983606557377
102
+ 28.256393442622947
103
+ 592.7859154929578
104
+ 1979.0281690140846
105
+ 1301.619718309859
106
+ 304.04647887323944
107
+ 63.12239436619718
108
+ 28.43633802816902
109
+ 7.712786885245902
110
+ 3.004426229508197
111
+ 0.4216393442622951
112
+ 1.4672131147540983
113
+ 2.970983606557377
114
+ 28.256393442622947
115
+ 592.7859154929578
116
+ 1979.0281690140846
117
+ 1301.619718309859
118
+ 304.04647887323944
119
+ 63.12239436619718
120
+ 28.43633802816902
121
+ 7.712786885245902
122
+ 3.004426229508197
123
+ 0.4216393442622951
124
+ 1.4672131147540983
125
+ 2.970983606557377
126
+ 28.256393442622947
127
+ 592.7859154929578
128
+ 1979.0281690140846
129
+ 1301.619718309859
130
+ 304.04647887323944
131
+ 63.12239436619718
132
+ 28.43633802816902
133
+ 7.712786885245902
134
+ 3.004426229508197
135
+ 0.4216393442622951
136
+ 1.4672131147540983
137
+ 2.970983606557377
138
+ 28.256393442622947
139
+ 592.7859154929578
140
+ 1979.0281690140846
141
+ 1301.619718309859
142
+ 304.04647887323944
143
+ 63.12239436619718
144
+ 28.43633802816902
145
+ 7.712786885245902
146
+ 3.004426229508197
147
+ 0.4216393442622951
148
+ 1.4672131147540983
149
+ 2.970983606557377
150
+ 28.256393442622947
151
+ 592.7859154929578
152
+ 1979.0281690140846
153
+ 1301.619718309859
154
+ 304.04647887323944
155
+ 63.12239436619718
156
+ 28.43633802816902
157
+ 7.712786885245902
158
+ 3.004426229508197
159
+ 0.4216393442622951
160
+ 1.4672131147540983
161
+ 2.970983606557377
162
+ 28.256393442622947
163
+ 592.7859154929578
164
+ 1979.0281690140846
165
+ 1301.619718309859
166
+ 304.04647887323944
167
+ 63.12239436619718
168
+ 28.43633802816902
169
+ 7.712786885245902
170
+ 3.004426229508197
171
+ 0.4216393442622951
172
+ 1.4672131147540983
173
+ 2.970983606557377
174
+ 28.256393442622947
175
+ 592.7859154929578
176
+ 1979.0281690140846
177
+ 1301.619718309859
178
+ 304.04647887323944
179
+ 63.12239436619718
180
+ 28.43633802816902
181
+ 7.712786885245902
182
+ 3.004426229508197
183
+ 0.4216393442622951
184
+ 1.4672131147540983
185
+ 2.970983606557377
186
+ 28.256393442622947
187
+ 592.7859154929578
188
+ 1979.0281690140846
189
+ 1301.619718309859
190
+ 304.04647887323944
191
+ 63.12239436619718
192
+ 28.43633802816902
193
+ 7.712786885245902
194
+ 3.004426229508197
195
+ 0.4216393442622951
196
+ 1.4672131147540983
197
+ 2.970983606557377
198
+ 28.256393442622947
199
+ 592.7859154929578
200
+ 1979.0281690140846
201
+ 1301.619718309859
202
+ 304.04647887323944
203
+ 63.12239436619718
204
+ 28.43633802816902
205
+ 7.712786885245902
206
+ 3.004426229508197
207
+ 0.4216393442622951
208
+ 1.4672131147540983
209
+ 2.970983606557377
210
+ 28.256393442622947
211
+ 592.7859154929578
212
+ 1979.0281690140846
213
+ 1301.619718309859
214
+ 304.04647887323944
215
+ 63.12239436619718
216
+ 28.43633802816902
217
+ 7.712786885245902
218
+ 3.004426229508197
219
+ 0.4216393442622951
220
+ 1.4672131147540983
221
+ 2.970983606557377
222
+ 28.256393442622947
223
+ 592.7859154929578
224
+ 1979.0281690140846
225
+ 1301.619718309859
226
+ 304.04647887323944
227
+ 63.12239436619718
228
+ 28.43633802816902
229
+ 7.712786885245902
230
+ 3.004426229508197
231
+ 0.4216393442622951
232
+ 1.4672131147540983
233
+ 2.970983606557377
234
+ 28.256393442622947
235
+ 592.7859154929578
236
+ 1979.0281690140846
237
+ 1301.619718309859
238
+ 304.04647887323944
239
+ 63.12239436619718
240
+ 28.43633802816902
morl4water/examples/data/nile_river/catchments/InflowBlueNile.txt ADDED
@@ -0,0 +1,240 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 111
2
+ 72
3
+ 56
4
+ 55
5
+ 86
6
+ 254
7
+ 1006
8
+ 2160
9
+ 1698
10
+ 932
11
+ 377
12
+ 195
13
+ 111
14
+ 72
15
+ 56
16
+ 55
17
+ 86
18
+ 254
19
+ 1006
20
+ 2160
21
+ 1698
22
+ 932
23
+ 377
24
+ 195
25
+ 111
26
+ 72
27
+ 56
28
+ 55
29
+ 86
30
+ 254
31
+ 1006
32
+ 2160
33
+ 1698
34
+ 932
35
+ 377
36
+ 195
37
+ 111
38
+ 72
39
+ 56
40
+ 55
41
+ 86
42
+ 254
43
+ 1006
44
+ 2160
45
+ 1698
46
+ 932
47
+ 377
48
+ 195
49
+ 111
50
+ 72
51
+ 56
52
+ 55
53
+ 86
54
+ 254
55
+ 1006
56
+ 2160
57
+ 1698
58
+ 932
59
+ 377
60
+ 195
61
+ 111
62
+ 72
63
+ 56
64
+ 55
65
+ 86
66
+ 254
67
+ 1006
68
+ 2160
69
+ 1698
70
+ 932
71
+ 377
72
+ 195
73
+ 111
74
+ 72
75
+ 56
76
+ 55
77
+ 86
78
+ 254
79
+ 1006
80
+ 2160
81
+ 1698
82
+ 932
83
+ 377
84
+ 195
85
+ 111
86
+ 72
87
+ 56
88
+ 55
89
+ 86
90
+ 254
91
+ 1006
92
+ 2160
93
+ 1698
94
+ 932
95
+ 377
96
+ 195
97
+ 111
98
+ 72
99
+ 56
100
+ 55
101
+ 86
102
+ 254
103
+ 1006
104
+ 2160
105
+ 1698
106
+ 932
107
+ 377
108
+ 195
109
+ 111
110
+ 72
111
+ 56
112
+ 55
113
+ 86
114
+ 254
115
+ 1006
116
+ 2160
117
+ 1698
118
+ 932
119
+ 377
120
+ 195
121
+ 111
122
+ 72
123
+ 56
124
+ 55
125
+ 86
126
+ 254
127
+ 1006
128
+ 2160
129
+ 1698
130
+ 932
131
+ 377
132
+ 195
133
+ 111
134
+ 72
135
+ 56
136
+ 55
137
+ 86
138
+ 254
139
+ 1006
140
+ 2160
141
+ 1698
142
+ 932
143
+ 377
144
+ 195
145
+ 111
146
+ 72
147
+ 56
148
+ 55
149
+ 86
150
+ 254
151
+ 1006
152
+ 2160
153
+ 1698
154
+ 932
155
+ 377
156
+ 195
157
+ 111
158
+ 72
159
+ 56
160
+ 55
161
+ 86
162
+ 254
163
+ 1006
164
+ 2160
165
+ 1698
166
+ 932
167
+ 377
168
+ 195
169
+ 111
170
+ 72
171
+ 56
172
+ 55
173
+ 86
174
+ 254
175
+ 1006
176
+ 2160
177
+ 1698
178
+ 932
179
+ 377
180
+ 195
181
+ 111
182
+ 72
183
+ 56
184
+ 55
185
+ 86
186
+ 254
187
+ 1006
188
+ 2160
189
+ 1698
190
+ 932
191
+ 377
192
+ 195
193
+ 111
194
+ 72
195
+ 56
196
+ 55
197
+ 86
198
+ 254
199
+ 1006
200
+ 2160
201
+ 1698
202
+ 932
203
+ 377
204
+ 195
205
+ 111
206
+ 72
207
+ 56
208
+ 55
209
+ 86
210
+ 254
211
+ 1006
212
+ 2160
213
+ 1698
214
+ 932
215
+ 377
216
+ 195
217
+ 111
218
+ 72
219
+ 56
220
+ 55
221
+ 86
222
+ 254
223
+ 1006
224
+ 2160
225
+ 1698
226
+ 932
227
+ 377
228
+ 195
229
+ 111
230
+ 72
231
+ 56
232
+ 55
233
+ 86
234
+ 254
235
+ 1006
236
+ 2160
237
+ 1698
238
+ 932
239
+ 377
240
+ 195
morl4water/examples/data/nile_river/catchments/InflowDinder.txt ADDED
@@ -0,0 +1,240 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 1.202e-11
2
+ 1.202e-11
3
+ 1.202e-11
4
+ 1.202e-11
5
+ 1.202e-11
6
+ 1.202e-11
7
+ 80.00040000000001
8
+ 773.0
9
+ 402.006
10
+ 154.001
11
+ 1.202e-11
12
+ 17.999699999999997
13
+ 1.202e-11
14
+ 1.202e-11
15
+ 1.202e-11
16
+ 1.202e-11
17
+ 1.202e-11
18
+ 1.202e-11
19
+ 437.0
20
+ 1533.01
21
+ 1089.999
22
+ 79.0
23
+ 38.0004
24
+ 61.0002
25
+ 1.202e-11
26
+ 1.202e-11
27
+ 1.202e-11
28
+ 1.202e-11
29
+ 1.202e-11
30
+ 1.202e-11
31
+ 437.995
32
+ 991.998
33
+ 423.99600000000004
34
+ 38.0004
35
+ 11.000029999999999
36
+ 1.202e-11
37
+ 7.0000100000000005
38
+ 1.202e-11
39
+ 1.202e-11
40
+ 1.202e-11
41
+ 1.202e-11
42
+ 1.202e-11
43
+ 125.00450000000001
44
+ 1090.994
45
+ 918.003
46
+ 40.999599999999994
47
+ 17.0004
48
+ 1.202e-11
49
+ 1.202e-11
50
+ 1.202e-11
51
+ 1.202e-11
52
+ 1.202e-11
53
+ 1.202e-11
54
+ 1.202e-11
55
+ 210.996
56
+ 930.0
57
+ 1134.998
58
+ 333.99699999999996
59
+ 40.999599999999994
60
+ 1.202e-11
61
+ 1.202e-11
62
+ 1.202e-11
63
+ 1.202e-11
64
+ 1.202e-11
65
+ 1.202e-11
66
+ 98.00019999999999
67
+ 112.0002
68
+ 921.999
69
+ 377.005
70
+ 56.0001
71
+ 1.202e-11
72
+ 1.202e-11
73
+ 1.202e-11
74
+ 1.202e-11
75
+ 1.202e-11
76
+ 1.202e-11
77
+ 1.202e-11
78
+ 1.202e-11
79
+ 70.00009999999999
80
+ 1342.0349999999999
81
+ 1090.994
82
+ 304.006
83
+ 7.0000100000000005
84
+ 17.999699999999997
85
+ 1.202e-11
86
+ 1.202e-11
87
+ 1.202e-11
88
+ 1.202e-11
89
+ 1.202e-11
90
+ 1.202e-11
91
+ 36.9999
92
+ 313.00300000000004
93
+ 398.99499999999995
94
+ 36.000600000000006
95
+ 38.9998
96
+ 1.202e-11
97
+ 1.202e-11
98
+ 1.202e-11
99
+ 1.202e-11
100
+ 1.202e-11
101
+ 1.202e-11
102
+ 1.202e-11
103
+ 372.998
104
+ 857.997
105
+ 677.004
106
+ 85.9999
107
+ 1.202e-11
108
+ 1.202e-11
109
+ 1.202e-11
110
+ 1.202e-11
111
+ 1.202e-11
112
+ 1.202e-11
113
+ 1.202e-11
114
+ 1.202e-11
115
+ 366.99999999999994
116
+ 607.004
117
+ 876.9989999999999
118
+ 209.005
119
+ 8.99997
120
+ 1.202e-11
121
+ 1.9999600000000002
122
+ 1.202e-11
123
+ 1.202e-11
124
+ 1.202e-11
125
+ 1.202e-11
126
+ 1.202e-11
127
+ 300.994
128
+ 1143.998
129
+ 1168.0
130
+ 568.002
131
+ 35.000099999999996
132
+ 21.0
133
+ 1.202e-11
134
+ 1.202e-11
135
+ 1.202e-11
136
+ 1.202e-11
137
+ 2.99999
138
+ 19.0002
139
+ 475.005
140
+ 1491.99
141
+ 1264.9829999999997
142
+ 857.997
143
+ 101.99980000000001
144
+ 1.202e-11
145
+ 1.202e-11
146
+ 1.202e-11
147
+ 1.202e-11
148
+ 1.202e-11
149
+ 1.0
150
+ 1.202e-11
151
+ 372.998
152
+ 1061.998
153
+ 1227.043
154
+ 541.995
155
+ 117.9995
156
+ 35.000099999999996
157
+ 1.202e-11
158
+ 1.202e-11
159
+ 1.202e-11
160
+ 1.202e-11
161
+ 1.202e-11
162
+ 1.202e-11
163
+ 142.0033
164
+ 910.998
165
+ 1000.995
166
+ 31.999699999999997
167
+ 1.202e-11
168
+ 17.999699999999997
169
+ 1.202e-11
170
+ 1.202e-11
171
+ 1.202e-11
172
+ 1.202e-11
173
+ 1.202e-11
174
+ 22.000600000000002
175
+ 422.004
176
+ 952.9979999999999
177
+ 1153.9969999999998
178
+ 377.005
179
+ 1.202e-11
180
+ 1.202e-11
181
+ 1.202e-11
182
+ 1.202e-11
183
+ 1.202e-11
184
+ 1.202e-11
185
+ 1.202e-11
186
+ 1.202e-11
187
+ 739.9979999999999
188
+ 865.998
189
+ 863.994
190
+ 310.004
191
+ 21.0
192
+ 17.999699999999997
193
+ 14.00004
194
+ 1.202e-11
195
+ 1.202e-11
196
+ 1.202e-11
197
+ 1.202e-11
198
+ 1.202e-11
199
+ 369.99899999999997
200
+ 702.005
201
+ 622.0
202
+ 361.997
203
+ 5.00006
204
+ 1.202e-11
205
+ 1.202e-11
206
+ 1.202e-11
207
+ 1.202e-11
208
+ 1.202e-11
209
+ 1.202e-11
210
+ 1.202e-11
211
+ 229.99800000000002
212
+ 867.006
213
+ 636.996
214
+ 249.99699999999999
215
+ 31.999699999999997
216
+ 1.202e-11
217
+ 1.202e-11
218
+ 2.99999
219
+ 1.202e-11
220
+ 1.202e-11
221
+ 1.202e-11
222
+ 1.202e-11
223
+ 355.00300000000004
224
+ 966.001
225
+ 1070.0
226
+ 377.005
227
+ 35.000099999999996
228
+ 19.0002
229
+ 1.202e-11
230
+ 1.202e-11
231
+ 1.202e-11
232
+ 1.202e-11
233
+ 1.202e-11
234
+ 1.202e-11
235
+ 504.00100000000003
236
+ 1262.0189999999998
237
+ 921.999
238
+ 515.9979999999999
239
+ 19.0002
240
+ 17.999699999999997
morl4water/examples/data/nile_river/catchments/InflowGERDToRoseires.txt ADDED
@@ -0,0 +1,240 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 24.510399999999997
2
+ 10.14448
3
+ 8.71016
4
+ 7.554919999999999
5
+ 14.221300000000001
6
+ 58.735200000000006
7
+ 193.126
8
+ 417.32899999999995
9
+ 410.52599999999995
10
+ 269.453
11
+ 96.1708
12
+ 69.6219
13
+ 35.5721
14
+ 14.696200000000001
15
+ 9.96167
16
+ 17.835900000000002
17
+ 20.4262
18
+ 122.398
19
+ 279.667
20
+ 598.063
21
+ 530.668
22
+ 307.454
23
+ 182.397
24
+ 79.891
25
+ 39.9974
26
+ 17.7757
27
+ 6.05139
28
+ 13.370800000000001
29
+ 43.0962
30
+ 58.449600000000004
31
+ 246.112
32
+ 432.117
33
+ 501.015
34
+ 198.24099999999999
35
+ 99.4537
36
+ 62.9961
37
+ 35.867
38
+ 40.1605
39
+ 9.13156
40
+ 13.13362
41
+ 13.598099999999999
42
+ 31.5665
43
+ 255.706
44
+ 633.6590000000001
45
+ 486.654
46
+ 206.027
47
+ 74.1328
48
+ 28.242
49
+ 23.779600000000002
50
+ 14.135
51
+ 8.895260000000002
52
+ 22.6782
53
+ 18.7205
54
+ 122.01599999999999
55
+ 214.969
56
+ 518.071
57
+ 558.811
58
+ 268.485
59
+ 101.7117
60
+ 36.6172
61
+ 35.489700000000006
62
+ 20.814500000000002
63
+ 6.6598999999999995
64
+ 5.53068
65
+ 25.4062
66
+ 112.2064
67
+ 192.988
68
+ 524.0509999999999
69
+ 241.576
70
+ 162.369
71
+ 102.3899
72
+ 34.911899999999996
73
+ 25.892699999999998
74
+ 20.3724
75
+ 30.021200000000004
76
+ 9.925229999999999
77
+ 22.128300000000003
78
+ 102.24940000000001
79
+ 274.343
80
+ 595.7230000000001
81
+ 725.294
82
+ 389.903
83
+ 129.1305
84
+ 59.9695
85
+ 24.6511
86
+ 8.06663
87
+ 8.13619
88
+ 3.75662
89
+ 16.5572
90
+ 44.304300000000005
91
+ 192.16099999999997
92
+ 372.31600000000003
93
+ 447.11199999999997
94
+ 259.383
95
+ 110.41019999999999
96
+ 62.8344
97
+ 28.959999999999997
98
+ 29.6231
99
+ 10.00312
100
+ 8.38143
101
+ 20.3354
102
+ 64.3023
103
+ 240.674
104
+ 648.009
105
+ 561.532
106
+ 320.808
107
+ 47.244200000000006
108
+ 59.32019999999999
109
+ 25.001700000000003
110
+ 9.85567
111
+ 6.998429999999999
112
+ 4.38608
113
+ 60.05799999999999
114
+ 81.18860000000001
115
+ 281.779
116
+ 520.742
117
+ 505.229
118
+ 354.35
119
+ 106.4364
120
+ 73.5479
121
+ 16.1203
122
+ 8.66252
123
+ 14.4661
124
+ 23.915899999999997
125
+ 23.7061
126
+ 116.759
127
+ 263.564
128
+ 718.5749999999999
129
+ 753.386
130
+ 491.466
131
+ 93.9054
132
+ 62.223600000000005
133
+ 14.0253
134
+ 7.91267
135
+ 8.05723
136
+ 14.3499
137
+ 32.1842
138
+ 81.44090000000001
139
+ 334.919
140
+ 797.835
141
+ 791.951
142
+ 629.006
143
+ 185.514
144
+ 95.1268
145
+ 41.6235
146
+ 16.9733
147
+ 12.328300000000002
148
+ 7.33685
149
+ 19.5104
150
+ 62.1079
151
+ 358.16700000000003
152
+ 588.102
153
+ 803.699
154
+ 525.316
155
+ 197.336
156
+ 87.8544
157
+ 15.1401
158
+ 18.7037
159
+ 18.3097
160
+ 4.50395
161
+ 27.69
162
+ 71.9136
163
+ 266.656
164
+ 511.51300000000003
165
+ 445.67499999999995
166
+ 366.543
167
+ 161.325
168
+ 74.56700000000001
169
+ 65.9456
170
+ 13.988100000000001
171
+ 8.70354
172
+ 8.02689
173
+ 20.936700000000002
174
+ 107.1924
175
+ 361.166
176
+ 689.689
177
+ 695.635
178
+ 517.685
179
+ 136.013
180
+ 65.94930000000001
181
+ 31.032200000000003
182
+ 9.6826
183
+ 9.08856
184
+ 16.362699999999997
185
+ 36.6221
186
+ 108.7614
187
+ 295.565
188
+ 580.763
189
+ 446.91700000000003
190
+ 131.28199999999998
191
+ 145.78799999999998
192
+ 26.445999999999998
193
+ 15.1924
194
+ 12.6207
195
+ 10.177039999999998
196
+ 9.158930000000002
197
+ 13.8982
198
+ 63.169
199
+ 256.911
200
+ 306.805
201
+ 552.306
202
+ 360.47800000000007
203
+ 59.9638
204
+ 31.2456
205
+ 21.708599999999997
206
+ 17.4805
207
+ 8.160219999999999
208
+ 14.72881
209
+ 14.6217
210
+ 78.41300000000001
211
+ 275.29499999999996
212
+ 452.121
213
+ 512.391
214
+ 426.49300000000005
215
+ 100.6218
216
+ 39.4196
217
+ 33.2491
218
+ 35.504999999999995
219
+ 5.75518
220
+ 17.6431
221
+ 19.2479
222
+ 77.84549999999999
223
+ 234.482
224
+ 656.286
225
+ 628.155
226
+ 352.798
227
+ 100.28580000000001
228
+ 58.2312
229
+ 20.8178
230
+ 3.6788000000000003
231
+ 12.9772
232
+ 11.3796
233
+ 34.9115
234
+ 105.75319999999999
235
+ 277.87
236
+ 630.071
237
+ 545.1129999999999
238
+ 376.781
239
+ 148.109
240
+ 43.601
morl4water/examples/data/nile_river/catchments/InflowRahad.txt ADDED
@@ -0,0 +1,240 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 3.9999610000000003
2
+ 0.0
3
+ 0.0
4
+ 0.0
5
+ 0.0
6
+ 3.0000489999999997
7
+ 37.00047
8
+ 294.0024
9
+ 379.9975
10
+ 350.996
11
+ 0.0
12
+ 7.0000100000000005
13
+ 0.999996
14
+ 0.0
15
+ 0.0
16
+ 0.0
17
+ 0.0
18
+ 0.0
19
+ 78.0005
20
+ 377.9973
21
+ 398.995
22
+ 96.0
23
+ 0.0
24
+ 22.999499999999998
25
+ 0.0
26
+ 0.0
27
+ 0.0
28
+ 0.0
29
+ 0.0
30
+ 0.0
31
+ 182.9961
32
+ 302.99600000000004
33
+ 338.00100000000003
34
+ 114.99749999999999
35
+ 32.99973000000001
36
+ 3.9999610000000003
37
+ 0.999996
38
+ 0.0
39
+ 0.0
40
+ 0.0
41
+ 0.0
42
+ 3.9999610000000003
43
+ 94.00009999999999
44
+ 273.0037
45
+ 338.00100000000003
46
+ 30.00049
47
+ 0.0
48
+ 0.0
49
+ 0.0
50
+ 0.0
51
+ 0.0
52
+ 0.0
53
+ 0.0
54
+ 0.0
55
+ 70.99948
56
+ 189.9987
57
+ 396.00489999999996
58
+ 243.0011
59
+ 15.99962
60
+ 0.0
61
+ 0.0
62
+ 0.0
63
+ 0.0
64
+ 0.0
65
+ 0.0
66
+ 0.0
67
+ 82.0001
68
+ 317.0023
69
+ 137.9974
70
+ 90.9998
71
+ 32.99973000000001
72
+ 0.0
73
+ 0.0
74
+ 0.0
75
+ 0.0
76
+ 0.0
77
+ 2.0000359999999997
78
+ 18.0006
79
+ 54.99986
80
+ 398.995
81
+ 353.99730000000005
82
+ 257.9973
83
+ 13.00048
84
+ 0.0
85
+ 0.0
86
+ 0.0
87
+ 0.0
88
+ 0.0
89
+ 0.0
90
+ 0.0
91
+ 18.0006
92
+ 227.0049
93
+ 187.9976
94
+ 78.0005
95
+ 29.0001
96
+ 0.999996
97
+ 0.0
98
+ 0.0
99
+ 0.0
100
+ 0.0
101
+ 3.0000489999999997
102
+ 0.0
103
+ 107.9999
104
+ 294.0024
105
+ 230.9961
106
+ 125.00240000000001
107
+ 2.0000359999999997
108
+ 0.999996
109
+ 0.0
110
+ 2.0000359999999997
111
+ 0.0
112
+ 0.0
113
+ 0.0
114
+ 0.0
115
+ 180.00599999999997
116
+ 248.0036
117
+ 509.0022
118
+ 66.00048000000001
119
+ 37.00047
120
+ 13.00048
121
+ 0.0
122
+ 0.0
123
+ 0.0
124
+ 0.0
125
+ 0.0
126
+ 0.0
127
+ 124.0013
128
+ 364.00120000000004
129
+ 404.9985
130
+ 298.00470000000007
131
+ 30.99987
132
+ 0.0
133
+ 2.0000359999999997
134
+ 0.0
135
+ 0.0
136
+ 0.0
137
+ 3.0000489999999997
138
+ 0.0
139
+ 127.0036
140
+ 349.99490000000003
141
+ 245.0023
142
+ 475.99739999999997
143
+ 58.00010999999999
144
+ 0.0
145
+ 0.0
146
+ 0.999996
147
+ 0.0
148
+ 0.0
149
+ 0.0
150
+ 0.0
151
+ 165.99869999999999
152
+ 285.9987
153
+ 479.99980000000005
154
+ 234.9974
155
+ 34.99949
156
+ 0.0
157
+ 0.0
158
+ 0.0
159
+ 0.0
160
+ 0.0
161
+ 0.0
162
+ 0.0
163
+ 27.99961
164
+ 274.0048
165
+ 310.99980000000005
166
+ 32.00036
167
+ 0.0
168
+ 0.0
169
+ 0.0
170
+ 0.0
171
+ 0.0
172
+ 0.0
173
+ 0.0
174
+ 0.0
175
+ 169.00000000000003
176
+ 373.9949
177
+ 412.0012
178
+ 349.99490000000003
179
+ 0.0
180
+ 3.0000489999999997
181
+ 0.0
182
+ 0.0
183
+ 0.0
184
+ 0.0
185
+ 0.0
186
+ 0.0
187
+ 185.99740000000003
188
+ 287.99989999999997
189
+ 424.9962
190
+ 165.99869999999999
191
+ 0.0
192
+ 0.0
193
+ 0.0
194
+ 0.0
195
+ 0.0
196
+ 0.0
197
+ 0.0
198
+ 0.0
199
+ 90.9998
200
+ 257.9973
201
+ 243.0011
202
+ 242.0011
203
+ 0.0
204
+ 0.0
205
+ 0.0
206
+ 0.0
207
+ 0.0
208
+ 0.0
209
+ 0.0
210
+ 0.0
211
+ 63.00021999999999
212
+ 249.00369999999998
213
+ 349.99490000000003
214
+ 160.9963
215
+ 3.0000489999999997
216
+ 0.0
217
+ 0.0
218
+ 4.999973999999999
219
+ 0.0
220
+ 0.0
221
+ 0.0
222
+ 0.0
223
+ 119.9999
224
+ 357.9986
225
+ 379.9975
226
+ 204.005
227
+ 13.00048
228
+ 3.0000489999999997
229
+ 0.0
230
+ 0.0
231
+ 0.999996
232
+ 0.0
233
+ 0.0
234
+ 0.0
235
+ 145.0
236
+ 281.9973
237
+ 349.99490000000003
238
+ 398.995
239
+ 54.000479999999996
240
+ 0.0
morl4water/examples/data/nile_river/catchments/InflowRoseiresToAbuNaama.txt ADDED
@@ -0,0 +1,240 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 19.707
2
+ 13.61
3
+ 14.761
4
+ 9.8333
5
+ 1.8998
6
+ 0.0
7
+ 0.0
8
+ 0.0
9
+ 54.866
10
+ 86.225
11
+ 36.155
12
+ 27.642
13
+ 19.707
14
+ 13.61
15
+ 14.761
16
+ 9.8333
17
+ 1.8998
18
+ 0.0
19
+ 0.0
20
+ 0.0
21
+ 54.866
22
+ 86.225
23
+ 36.155
24
+ 27.642
25
+ 19.707
26
+ 13.61
27
+ 14.761
28
+ 9.8333
29
+ 1.8998
30
+ 0.0
31
+ 0.0
32
+ 0.0
33
+ 54.866
34
+ 86.225
35
+ 36.155
36
+ 27.642
37
+ 19.707
38
+ 13.61
39
+ 14.761
40
+ 9.8333
41
+ 1.8998
42
+ 0.0
43
+ 0.0
44
+ 0.0
45
+ 54.866
46
+ 86.225
47
+ 36.155
48
+ 27.642
49
+ 19.707
50
+ 13.61
51
+ 14.761
52
+ 9.8333
53
+ 1.8998
54
+ 0.0
55
+ 0.0
56
+ 0.0
57
+ 54.866
58
+ 86.225
59
+ 36.155
60
+ 27.642
61
+ 19.707
62
+ 13.61
63
+ 14.761
64
+ 9.8333
65
+ 1.8998
66
+ 0.0
67
+ 0.0
68
+ 0.0
69
+ 54.866
70
+ 86.225
71
+ 36.155
72
+ 27.642
73
+ 19.707
74
+ 13.61
75
+ 14.761
76
+ 9.8333
77
+ 1.8998
78
+ 0.0
79
+ 0.0
80
+ 0.0
81
+ 54.866
82
+ 86.225
83
+ 36.155
84
+ 27.642
85
+ 19.707
86
+ 13.61
87
+ 14.761
88
+ 9.8333
89
+ 1.8998
90
+ 0.0
91
+ 0.0
92
+ 0.0
93
+ 54.866
94
+ 86.225
95
+ 36.155
96
+ 27.642
97
+ 19.707
98
+ 13.61
99
+ 14.761
100
+ 9.8333
101
+ 1.8998
102
+ 0.0
103
+ 0.0
104
+ 0.0
105
+ 54.866
106
+ 86.225
107
+ 36.155
108
+ 27.642
109
+ 19.707
110
+ 13.61
111
+ 14.761
112
+ 9.8333
113
+ 1.8998
114
+ 0.0
115
+ 0.0
116
+ 0.0
117
+ 54.866
118
+ 86.225
119
+ 36.155
120
+ 27.642
121
+ 19.707
122
+ 13.61
123
+ 14.761
124
+ 9.8333
125
+ 1.8998
126
+ 0.0
127
+ 0.0
128
+ 0.0
129
+ 54.866
130
+ 86.225
131
+ 36.155
132
+ 27.642
133
+ 19.707
134
+ 13.61
135
+ 14.761
136
+ 9.8333
137
+ 1.8998
138
+ 0.0
139
+ 0.0
140
+ 0.0
141
+ 54.866
142
+ 86.225
143
+ 36.155
144
+ 27.642
145
+ 19.707
146
+ 13.61
147
+ 14.761
148
+ 9.8333
149
+ 1.8998
150
+ 0.0
151
+ 0.0
152
+ 0.0
153
+ 54.866
154
+ 86.225
155
+ 36.155
156
+ 27.642
157
+ 19.707
158
+ 13.61
159
+ 14.761
160
+ 9.8333
161
+ 1.8998
162
+ 0.0
163
+ 0.0
164
+ 0.0
165
+ 54.866
166
+ 86.225
167
+ 36.155
168
+ 27.642
169
+ 19.707
170
+ 13.61
171
+ 14.761
172
+ 9.8333
173
+ 1.8998
174
+ 0.0
175
+ 0.0
176
+ 0.0
177
+ 54.866
178
+ 86.225
179
+ 36.155
180
+ 27.642
181
+ 19.707
182
+ 13.61
183
+ 14.761
184
+ 9.8333
185
+ 1.8998
186
+ 0.0
187
+ 0.0
188
+ 0.0
189
+ 54.866
190
+ 86.225
191
+ 36.155
192
+ 27.642
193
+ 19.707
194
+ 13.61
195
+ 14.761
196
+ 9.8333
197
+ 1.8998
198
+ 0.0
199
+ 0.0
200
+ 0.0
201
+ 54.866
202
+ 86.225
203
+ 36.155
204
+ 27.642
205
+ 19.707
206
+ 13.61
207
+ 14.761
208
+ 9.8333
209
+ 1.8998
210
+ 0.0
211
+ 0.0
212
+ 0.0
213
+ 54.866
214
+ 86.225
215
+ 36.155
216
+ 27.642
217
+ 19.707
218
+ 13.61
219
+ 14.761
220
+ 9.8333
221
+ 1.8998
222
+ 0.0
223
+ 0.0
224
+ 0.0
225
+ 54.866
226
+ 86.225
227
+ 36.155
228
+ 27.642
229
+ 19.707
230
+ 13.61
231
+ 14.761
232
+ 9.8333
233
+ 1.8998
234
+ 0.0
235
+ 0.0
236
+ 0.0
237
+ 54.866
238
+ 86.225
239
+ 36.155
240
+ 27.642
morl4water/examples/data/nile_river/catchments/InflowSukiToSennar.txt ADDED
@@ -0,0 +1,240 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 9.2637
2
+ 6.3979
3
+ 6.9387
4
+ 4.6224
5
+ 0.89304
6
+ 0.0
7
+ 0.0
8
+ 0.0
9
+ 25.791
10
+ 40.533
11
+ 16.996
12
+ 12.994
13
+ 9.2637
14
+ 6.3979
15
+ 6.9387
16
+ 4.6224
17
+ 0.89304
18
+ 0.0
19
+ 0.0
20
+ 0.0
21
+ 25.791
22
+ 40.533
23
+ 16.996
24
+ 12.994
25
+ 9.2637
26
+ 6.3979
27
+ 6.9387
28
+ 4.6224
29
+ 0.89304
30
+ 0.0
31
+ 0.0
32
+ 0.0
33
+ 25.791
34
+ 40.533
35
+ 16.996
36
+ 12.994
37
+ 9.2637
38
+ 6.3979
39
+ 6.9387
40
+ 4.6224
41
+ 0.89304
42
+ 0.0
43
+ 0.0
44
+ 0.0
45
+ 25.791
46
+ 40.533
47
+ 16.996
48
+ 12.994
49
+ 9.2637
50
+ 6.3979
51
+ 6.9387
52
+ 4.6224
53
+ 0.89304
54
+ 0.0
55
+ 0.0
56
+ 0.0
57
+ 25.791
58
+ 40.533
59
+ 16.996
60
+ 12.994
61
+ 9.2637
62
+ 6.3979
63
+ 6.9387
64
+ 4.6224
65
+ 0.89304
66
+ 0.0
67
+ 0.0
68
+ 0.0
69
+ 25.791
70
+ 40.533
71
+ 16.996
72
+ 12.994
73
+ 9.2637
74
+ 6.3979
75
+ 6.9387
76
+ 4.6224
77
+ 0.89304
78
+ 0.0
79
+ 0.0
80
+ 0.0
81
+ 25.791
82
+ 40.533
83
+ 16.996
84
+ 12.994
85
+ 9.2637
86
+ 6.3979
87
+ 6.9387
88
+ 4.6224
89
+ 0.89304
90
+ 0.0
91
+ 0.0
92
+ 0.0
93
+ 25.791
94
+ 40.533
95
+ 16.996
96
+ 12.994
97
+ 9.2637
98
+ 6.3979
99
+ 6.9387
100
+ 4.6224
101
+ 0.89304
102
+ 0.0
103
+ 0.0
104
+ 0.0
105
+ 25.791
106
+ 40.533
107
+ 16.996
108
+ 12.994
109
+ 9.2637
110
+ 6.3979
111
+ 6.9387
112
+ 4.6224
113
+ 0.89304
114
+ 0.0
115
+ 0.0
116
+ 0.0
117
+ 25.791
118
+ 40.533
119
+ 16.996
120
+ 12.994
121
+ 9.2637
122
+ 6.3979
123
+ 6.9387
124
+ 4.6224
125
+ 0.89304
126
+ 0.0
127
+ 0.0
128
+ 0.0
129
+ 25.791
130
+ 40.533
131
+ 16.996
132
+ 12.994
133
+ 9.2637
134
+ 6.3979
135
+ 6.9387
136
+ 4.6224
137
+ 0.89304
138
+ 0.0
139
+ 0.0
140
+ 0.0
141
+ 25.791
142
+ 40.533
143
+ 16.996
144
+ 12.994
145
+ 9.2637
146
+ 6.3979
147
+ 6.9387
148
+ 4.6224
149
+ 0.89304
150
+ 0.0
151
+ 0.0
152
+ 0.0
153
+ 25.791
154
+ 40.533
155
+ 16.996
156
+ 12.994
157
+ 9.2637
158
+ 6.3979
159
+ 6.9387
160
+ 4.6224
161
+ 0.89304
162
+ 0.0
163
+ 0.0
164
+ 0.0
165
+ 25.791
166
+ 40.533
167
+ 16.996
168
+ 12.994
169
+ 9.2637
170
+ 6.3979
171
+ 6.9387
172
+ 4.6224
173
+ 0.89304
174
+ 0.0
175
+ 0.0
176
+ 0.0
177
+ 25.791
178
+ 40.533
179
+ 16.996
180
+ 12.994
181
+ 9.2637
182
+ 6.3979
183
+ 6.9387
184
+ 4.6224
185
+ 0.89304
186
+ 0.0
187
+ 0.0
188
+ 0.0
189
+ 25.791
190
+ 40.533
191
+ 16.996
192
+ 12.994
193
+ 9.2637
194
+ 6.3979
195
+ 6.9387
196
+ 4.6224
197
+ 0.89304
198
+ 0.0
199
+ 0.0
200
+ 0.0
201
+ 25.791
202
+ 40.533
203
+ 16.996
204
+ 12.994
205
+ 9.2637
206
+ 6.3979
207
+ 6.9387
208
+ 4.6224
209
+ 0.89304
210
+ 0.0
211
+ 0.0
212
+ 0.0
213
+ 25.791
214
+ 40.533
215
+ 16.996
216
+ 12.994
217
+ 9.2637
218
+ 6.3979
219
+ 6.9387
220
+ 4.6224
221
+ 0.89304
222
+ 0.0
223
+ 0.0
224
+ 0.0
225
+ 25.791
226
+ 40.533
227
+ 16.996
228
+ 12.994
229
+ 9.2637
230
+ 6.3979
231
+ 6.9387
232
+ 4.6224
233
+ 0.89304
234
+ 0.0
235
+ 0.0
236
+ 0.0
237
+ 25.791
238
+ 40.533
239
+ 16.996
240
+ 12.994
morl4water/examples/data/nile_river/catchments/InflowWhiteNile.txt ADDED
@@ -0,0 +1,240 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 1010.799988
2
+ 776.299988
3
+ 793.299988
4
+ 1160.599976
5
+ 1045.699951
6
+ 763.400024
7
+ 569.099976
8
+ 535.0
9
+ 844.400024
10
+ 1120.099976
11
+ 1065.199951
12
+ 1083.300049
13
+ 1010.799988
14
+ 776.299988
15
+ 793.299988
16
+ 1160.599976
17
+ 1045.699951
18
+ 763.400024
19
+ 569.099976
20
+ 535.0
21
+ 844.400024
22
+ 1120.099976
23
+ 1065.199951
24
+ 1083.300049
25
+ 1010.799988
26
+ 776.299988
27
+ 793.299988
28
+ 1160.599976
29
+ 1045.699951
30
+ 763.400024
31
+ 569.099976
32
+ 535.0
33
+ 844.400024
34
+ 1120.099976
35
+ 1065.199951
36
+ 1083.300049
37
+ 1010.799988
38
+ 776.299988
39
+ 793.299988
40
+ 1160.599976
41
+ 1045.699951
42
+ 763.400024
43
+ 569.099976
44
+ 535.0
45
+ 844.400024
46
+ 1120.099976
47
+ 1065.199951
48
+ 1083.300049
49
+ 1010.799988
50
+ 776.299988
51
+ 793.299988
52
+ 1160.599976
53
+ 1045.699951
54
+ 763.400024
55
+ 569.099976
56
+ 535.0
57
+ 844.400024
58
+ 1120.099976
59
+ 1065.199951
60
+ 1083.300049
61
+ 1010.799988
62
+ 776.299988
63
+ 793.299988
64
+ 1160.599976
65
+ 1045.699951
66
+ 763.400024
67
+ 569.099976
68
+ 535.0
69
+ 844.400024
70
+ 1120.099976
71
+ 1065.199951
72
+ 1083.300049
73
+ 1010.799988
74
+ 776.299988
75
+ 793.299988
76
+ 1160.599976
77
+ 1045.699951
78
+ 763.400024
79
+ 569.099976
80
+ 535.0
81
+ 844.400024
82
+ 1120.099976
83
+ 1065.199951
84
+ 1083.300049
85
+ 1010.799988
86
+ 776.299988
87
+ 793.299988
88
+ 1160.599976
89
+ 1045.699951
90
+ 763.400024
91
+ 569.099976
92
+ 535.0
93
+ 844.400024
94
+ 1120.099976
95
+ 1065.199951
96
+ 1083.300049
97
+ 1010.799988
98
+ 776.299988
99
+ 793.299988
100
+ 1160.599976
101
+ 1045.699951
102
+ 763.400024
103
+ 569.099976
104
+ 535.0
105
+ 844.400024
106
+ 1120.099976
107
+ 1065.199951
108
+ 1083.300049
109
+ 1010.799988
110
+ 776.299988
111
+ 793.299988
112
+ 1160.599976
113
+ 1045.699951
114
+ 763.400024
115
+ 569.099976
116
+ 535.0
117
+ 844.400024
118
+ 1120.099976
119
+ 1065.199951
120
+ 1083.300049
121
+ 1010.799988
122
+ 776.299988
123
+ 793.299988
124
+ 1160.599976
125
+ 1045.699951
126
+ 763.400024
127
+ 569.099976
128
+ 535.0
129
+ 844.400024
130
+ 1120.099976
131
+ 1065.199951
132
+ 1083.300049
133
+ 1010.799988
134
+ 776.299988
135
+ 793.299988
136
+ 1160.599976
137
+ 1045.699951
138
+ 763.400024
139
+ 569.099976
140
+ 535.0
141
+ 844.400024
142
+ 1120.099976
143
+ 1065.199951
144
+ 1083.300049
145
+ 1010.799988
146
+ 776.299988
147
+ 793.299988
148
+ 1160.599976
149
+ 1045.699951
150
+ 763.400024
151
+ 569.099976
152
+ 535.0
153
+ 844.400024
154
+ 1120.099976
155
+ 1065.199951
156
+ 1083.300049
157
+ 1010.799988
158
+ 776.299988
159
+ 793.299988
160
+ 1160.599976
161
+ 1045.699951
162
+ 763.400024
163
+ 569.099976
164
+ 535.0
165
+ 844.400024
166
+ 1120.099976
167
+ 1065.199951
168
+ 1083.300049
169
+ 1010.799988
170
+ 776.299988
171
+ 793.299988
172
+ 1160.599976
173
+ 1045.699951
174
+ 763.400024
175
+ 569.099976
176
+ 535.0
177
+ 844.400024
178
+ 1120.099976
179
+ 1065.199951
180
+ 1083.300049
181
+ 1010.799988
182
+ 776.299988
183
+ 793.299988
184
+ 1160.599976
185
+ 1045.699951
186
+ 763.400024
187
+ 569.099976
188
+ 535.0
189
+ 844.400024
190
+ 1120.099976
191
+ 1065.199951
192
+ 1083.300049
193
+ 1010.799988
194
+ 776.299988
195
+ 793.299988
196
+ 1160.599976
197
+ 1045.699951
198
+ 763.400024
199
+ 569.099976
200
+ 535.0
201
+ 844.400024
202
+ 1120.099976
203
+ 1065.199951
204
+ 1083.300049
205
+ 1010.799988
206
+ 776.299988
207
+ 793.299988
208
+ 1160.599976
209
+ 1045.699951
210
+ 763.400024
211
+ 569.099976
212
+ 535.0
213
+ 844.400024
214
+ 1120.099976
215
+ 1065.199951
216
+ 1083.300049
217
+ 1010.799988
218
+ 776.299988
219
+ 793.299988
220
+ 1160.599976
221
+ 1045.699951
222
+ 763.400024
223
+ 569.099976
224
+ 535.0
225
+ 844.400024
226
+ 1120.099976
227
+ 1065.199951
228
+ 1083.300049
229
+ 1010.799988
230
+ 776.299988
231
+ 793.299988
232
+ 1160.599976
233
+ 1045.699951
234
+ 763.400024
235
+ 569.099976
236
+ 535.0
237
+ 844.400024
238
+ 1120.099976
239
+ 1065.199951
240
+ 1083.300049
morl4water/examples/data/nile_river/catchments/__init__.py ADDED
File without changes
morl4water/examples/data/nile_river/irrigation/__init__.py ADDED
File without changes
morl4water/examples/data/nile_river/irrigation/irr_demand_DSSennar.txt ADDED
@@ -0,0 +1,240 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 7.467144564
2
+ 8.267195767
3
+ 10.45400239
4
+ 11.57407407
5
+ 12.32078853
6
+ 12.73148148
7
+ 8.960573477
8
+ 7.093787336
9
+ 10.41666667
10
+ 11.20071685
11
+ 10.0308642
12
+ 7.093787336
13
+ 7.467144564
14
+ 8.267195767
15
+ 10.45400239
16
+ 11.57407407
17
+ 12.32078853
18
+ 12.73148148
19
+ 8.960573477
20
+ 7.093787336
21
+ 10.41666667
22
+ 11.20071685
23
+ 10.0308642
24
+ 7.093787336
25
+ 7.467144564
26
+ 8.267195767
27
+ 10.45400239
28
+ 11.57407407
29
+ 12.32078853
30
+ 12.73148148
31
+ 8.960573477
32
+ 7.093787336
33
+ 10.41666667
34
+ 11.20071685
35
+ 10.0308642
36
+ 7.093787336
37
+ 7.467144564
38
+ 8.267195767
39
+ 10.45400239
40
+ 11.57407407
41
+ 12.32078853
42
+ 12.73148148
43
+ 8.960573477
44
+ 7.093787336
45
+ 10.41666667
46
+ 11.20071685
47
+ 10.0308642
48
+ 7.093787336
49
+ 7.467144564
50
+ 8.267195767
51
+ 10.45400239
52
+ 11.57407407
53
+ 12.32078853
54
+ 12.73148148
55
+ 8.960573477
56
+ 7.093787336
57
+ 10.41666667
58
+ 11.20071685
59
+ 10.0308642
60
+ 7.093787336
61
+ 7.467144564
62
+ 8.267195767
63
+ 10.45400239
64
+ 11.57407407
65
+ 12.32078853
66
+ 12.73148148
67
+ 8.960573477
68
+ 7.093787336
69
+ 10.41666667
70
+ 11.20071685
71
+ 10.0308642
72
+ 7.093787336
73
+ 7.467144564
74
+ 8.267195767
75
+ 10.45400239
76
+ 11.57407407
77
+ 12.32078853
78
+ 12.73148148
79
+ 8.960573477
80
+ 7.093787336
81
+ 10.41666667
82
+ 11.20071685
83
+ 10.0308642
84
+ 7.093787336
85
+ 7.467144564
86
+ 8.267195767
87
+ 10.45400239
88
+ 11.57407407
89
+ 12.32078853
90
+ 12.73148148
91
+ 8.960573477
92
+ 7.093787336
93
+ 10.41666667
94
+ 11.20071685
95
+ 10.0308642
96
+ 7.093787336
97
+ 7.467144564
98
+ 8.267195767
99
+ 10.45400239
100
+ 11.57407407
101
+ 12.32078853
102
+ 12.73148148
103
+ 8.960573477
104
+ 7.093787336
105
+ 10.41666667
106
+ 11.20071685
107
+ 10.0308642
108
+ 7.093787336
109
+ 7.467144564
110
+ 8.267195767
111
+ 10.45400239
112
+ 11.57407407
113
+ 12.32078853
114
+ 12.73148148
115
+ 8.960573477
116
+ 7.093787336
117
+ 10.41666667
118
+ 11.20071685
119
+ 10.0308642
120
+ 7.093787336
121
+ 7.467144564
122
+ 8.267195767
123
+ 10.45400239
124
+ 11.57407407
125
+ 12.32078853
126
+ 12.73148148
127
+ 8.960573477
128
+ 7.093787336
129
+ 10.41666667
130
+ 11.20071685
131
+ 10.0308642
132
+ 7.093787336
133
+ 7.467144564
134
+ 8.267195767
135
+ 10.45400239
136
+ 11.57407407
137
+ 12.32078853
138
+ 12.73148148
139
+ 8.960573477
140
+ 7.093787336
141
+ 10.41666667
142
+ 11.20071685
143
+ 10.0308642
144
+ 7.093787336
145
+ 7.467144564
146
+ 8.267195767
147
+ 10.45400239
148
+ 11.57407407
149
+ 12.32078853
150
+ 12.73148148
151
+ 8.960573477
152
+ 7.093787336
153
+ 10.41666667
154
+ 11.20071685
155
+ 10.0308642
156
+ 7.093787336
157
+ 7.467144564
158
+ 8.267195767
159
+ 10.45400239
160
+ 11.57407407
161
+ 12.32078853
162
+ 12.73148148
163
+ 8.960573477
164
+ 7.093787336
165
+ 10.41666667
166
+ 11.20071685
167
+ 10.0308642
168
+ 7.093787336
169
+ 7.467144564
170
+ 8.267195767
171
+ 10.45400239
172
+ 11.57407407
173
+ 12.32078853
174
+ 12.73148148
175
+ 8.960573477
176
+ 7.093787336
177
+ 10.41666667
178
+ 11.20071685
179
+ 10.0308642
180
+ 7.093787336
181
+ 7.467144564
182
+ 8.267195767
183
+ 10.45400239
184
+ 11.57407407
185
+ 12.32078853
186
+ 12.73148148
187
+ 8.960573477
188
+ 7.093787336
189
+ 10.41666667
190
+ 11.20071685
191
+ 10.0308642
192
+ 7.093787336
193
+ 7.467144564
194
+ 8.267195767
195
+ 10.45400239
196
+ 11.57407407
197
+ 12.32078853
198
+ 12.73148148
199
+ 8.960573477
200
+ 7.093787336
201
+ 10.41666667
202
+ 11.20071685
203
+ 10.0308642
204
+ 7.093787336
205
+ 7.467144564
206
+ 8.267195767
207
+ 10.45400239
208
+ 11.57407407
209
+ 12.32078853
210
+ 12.73148148
211
+ 8.960573477
212
+ 7.093787336
213
+ 10.41666667
214
+ 11.20071685
215
+ 10.0308642
216
+ 7.093787336
217
+ 7.467144564
218
+ 8.267195767
219
+ 10.45400239
220
+ 11.57407407
221
+ 12.32078853
222
+ 12.73148148
223
+ 8.960573477
224
+ 7.093787336
225
+ 10.41666667
226
+ 11.20071685
227
+ 10.0308642
228
+ 7.093787336
229
+ 7.467144564
230
+ 8.267195767
231
+ 10.45400239
232
+ 11.57407407
233
+ 12.32078853
234
+ 12.73148148
235
+ 8.960573477
236
+ 7.093787336
237
+ 10.41666667
238
+ 11.20071685
239
+ 10.0308642
240
+ 7.093787336
morl4water/examples/data/nile_river/irrigation/irr_demand_Egypt.txt ADDED
@@ -0,0 +1,240 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 1310.483871
2
+ 1620.37037
3
+ 1635.304659
4
+ 1589.506173
5
+ 1896.654719
6
+ 2438.271605
7
+ 2523.894863
8
+ 2202.807646
9
+ 1601.080247
10
+ 1452.359618
11
+ 1481.481481
12
+ 1355.286738
13
+ 1310.483871
14
+ 1620.37037
15
+ 1635.304659
16
+ 1589.506173
17
+ 1896.654719
18
+ 2438.271605
19
+ 2523.894863
20
+ 2202.807646
21
+ 1601.080247
22
+ 1452.359618
23
+ 1481.481481
24
+ 1355.286738
25
+ 1310.483871
26
+ 1620.37037
27
+ 1635.304659
28
+ 1589.506173
29
+ 1896.654719
30
+ 2438.271605
31
+ 2523.894863
32
+ 2202.807646
33
+ 1601.080247
34
+ 1452.359618
35
+ 1481.481481
36
+ 1355.286738
37
+ 1310.483871
38
+ 1620.37037
39
+ 1635.304659
40
+ 1589.506173
41
+ 1896.654719
42
+ 2438.271605
43
+ 2523.894863
44
+ 2202.807646
45
+ 1601.080247
46
+ 1452.359618
47
+ 1481.481481
48
+ 1355.286738
49
+ 1310.483871
50
+ 1620.37037
51
+ 1635.304659
52
+ 1589.506173
53
+ 1896.654719
54
+ 2438.271605
55
+ 2523.894863
56
+ 2202.807646
57
+ 1601.080247
58
+ 1452.359618
59
+ 1481.481481
60
+ 1355.286738
61
+ 1310.483871
62
+ 1620.37037
63
+ 1635.304659
64
+ 1589.506173
65
+ 1896.654719
66
+ 2438.271605
67
+ 2523.894863
68
+ 2202.807646
69
+ 1601.080247
70
+ 1452.359618
71
+ 1481.481481
72
+ 1355.286738
73
+ 1310.483871
74
+ 1620.37037
75
+ 1635.304659
76
+ 1589.506173
77
+ 1896.654719
78
+ 2438.271605
79
+ 2523.894863
80
+ 2202.807646
81
+ 1601.080247
82
+ 1452.359618
83
+ 1481.481481
84
+ 1355.286738
85
+ 1310.483871
86
+ 1620.37037
87
+ 1635.304659
88
+ 1589.506173
89
+ 1896.654719
90
+ 2438.271605
91
+ 2523.894863
92
+ 2202.807646
93
+ 1601.080247
94
+ 1452.359618
95
+ 1481.481481
96
+ 1355.286738
97
+ 1310.483871
98
+ 1620.37037
99
+ 1635.304659
100
+ 1589.506173
101
+ 1896.654719
102
+ 2438.271605
103
+ 2523.894863
104
+ 2202.807646
105
+ 1601.080247
106
+ 1452.359618
107
+ 1481.481481
108
+ 1355.286738
109
+ 1310.483871
110
+ 1620.37037
111
+ 1635.304659
112
+ 1589.506173
113
+ 1896.654719
114
+ 2438.271605
115
+ 2523.894863
116
+ 2202.807646
117
+ 1601.080247
118
+ 1452.359618
119
+ 1481.481481
120
+ 1355.286738
121
+ 1310.483871
122
+ 1620.37037
123
+ 1635.304659
124
+ 1589.506173
125
+ 1896.654719
126
+ 2438.271605
127
+ 2523.894863
128
+ 2202.807646
129
+ 1601.080247
130
+ 1452.359618
131
+ 1481.481481
132
+ 1355.286738
133
+ 1310.483871
134
+ 1620.37037
135
+ 1635.304659
136
+ 1589.506173
137
+ 1896.654719
138
+ 2438.271605
139
+ 2523.894863
140
+ 2202.807646
141
+ 1601.080247
142
+ 1452.359618
143
+ 1481.481481
144
+ 1355.286738
145
+ 1310.483871
146
+ 1620.37037
147
+ 1635.304659
148
+ 1589.506173
149
+ 1896.654719
150
+ 2438.271605
151
+ 2523.894863
152
+ 2202.807646
153
+ 1601.080247
154
+ 1452.359618
155
+ 1481.481481
156
+ 1355.286738
157
+ 1310.483871
158
+ 1620.37037
159
+ 1635.304659
160
+ 1589.506173
161
+ 1896.654719
162
+ 2438.271605
163
+ 2523.894863
164
+ 2202.807646
165
+ 1601.080247
166
+ 1452.359618
167
+ 1481.481481
168
+ 1355.286738
169
+ 1310.483871
170
+ 1620.37037
171
+ 1635.304659
172
+ 1589.506173
173
+ 1896.654719
174
+ 2438.271605
175
+ 2523.894863
176
+ 2202.807646
177
+ 1601.080247
178
+ 1452.359618
179
+ 1481.481481
180
+ 1355.286738
181
+ 1310.483871
182
+ 1620.37037
183
+ 1635.304659
184
+ 1589.506173
185
+ 1896.654719
186
+ 2438.271605
187
+ 2523.894863
188
+ 2202.807646
189
+ 1601.080247
190
+ 1452.359618
191
+ 1481.481481
192
+ 1355.286738
193
+ 1310.483871
194
+ 1620.37037
195
+ 1635.304659
196
+ 1589.506173
197
+ 1896.654719
198
+ 2438.271605
199
+ 2523.894863
200
+ 2202.807646
201
+ 1601.080247
202
+ 1452.359618
203
+ 1481.481481
204
+ 1355.286738
205
+ 1310.483871
206
+ 1620.37037
207
+ 1635.304659
208
+ 1589.506173
209
+ 1896.654719
210
+ 2438.271605
211
+ 2523.894863
212
+ 2202.807646
213
+ 1601.080247
214
+ 1452.359618
215
+ 1481.481481
216
+ 1355.286738
217
+ 1310.483871
218
+ 1620.37037
219
+ 1635.304659
220
+ 1589.506173
221
+ 1896.654719
222
+ 2438.271605
223
+ 2523.894863
224
+ 2202.807646
225
+ 1601.080247
226
+ 1452.359618
227
+ 1481.481481
228
+ 1355.286738
229
+ 1310.483871
230
+ 1620.37037
231
+ 1635.304659
232
+ 1589.506173
233
+ 1896.654719
234
+ 2438.271605
235
+ 2523.894863
236
+ 2202.807646
237
+ 1601.080247
238
+ 1452.359618
239
+ 1481.481481
240
+ 1355.286738
morl4water/examples/data/nile_river/irrigation/irr_demand_Gezira.txt ADDED
@@ -0,0 +1,240 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 319.5937873
2
+ 328.207672
3
+ 155.3166069
4
+ 26.62037037
5
+ 51.52329749
6
+ 254.2438272
7
+ 349.8357228
8
+ 176.9713262
9
+ 361.882716
10
+ 388.2915173
11
+ 357.2530864
12
+ 344.2353644
13
+ 319.5937873
14
+ 328.207672
15
+ 155.3166069
16
+ 26.62037037
17
+ 51.52329749
18
+ 254.2438272
19
+ 349.8357228
20
+ 176.9713262
21
+ 361.882716
22
+ 388.2915173
23
+ 357.2530864
24
+ 344.2353644
25
+ 319.5937873
26
+ 328.207672
27
+ 155.3166069
28
+ 26.62037037
29
+ 51.52329749
30
+ 254.2438272
31
+ 349.8357228
32
+ 176.9713262
33
+ 361.882716
34
+ 388.2915173
35
+ 357.2530864
36
+ 344.2353644
37
+ 319.5937873
38
+ 328.207672
39
+ 155.3166069
40
+ 26.62037037
41
+ 51.52329749
42
+ 254.2438272
43
+ 349.8357228
44
+ 176.9713262
45
+ 361.882716
46
+ 388.2915173
47
+ 357.2530864
48
+ 344.2353644
49
+ 319.5937873
50
+ 328.207672
51
+ 155.3166069
52
+ 26.62037037
53
+ 51.52329749
54
+ 254.2438272
55
+ 349.8357228
56
+ 176.9713262
57
+ 361.882716
58
+ 388.2915173
59
+ 357.2530864
60
+ 344.2353644
61
+ 319.5937873
62
+ 328.207672
63
+ 155.3166069
64
+ 26.62037037
65
+ 51.52329749
66
+ 254.2438272
67
+ 349.8357228
68
+ 176.9713262
69
+ 361.882716
70
+ 388.2915173
71
+ 357.2530864
72
+ 344.2353644
73
+ 319.5937873
74
+ 328.207672
75
+ 155.3166069
76
+ 26.62037037
77
+ 51.52329749
78
+ 254.2438272
79
+ 349.8357228
80
+ 176.9713262
81
+ 361.882716
82
+ 388.2915173
83
+ 357.2530864
84
+ 344.2353644
85
+ 319.5937873
86
+ 328.207672
87
+ 155.3166069
88
+ 26.62037037
89
+ 51.52329749
90
+ 254.2438272
91
+ 349.8357228
92
+ 176.9713262
93
+ 361.882716
94
+ 388.2915173
95
+ 357.2530864
96
+ 344.2353644
97
+ 319.5937873
98
+ 328.207672
99
+ 155.3166069
100
+ 26.62037037
101
+ 51.52329749
102
+ 254.2438272
103
+ 349.8357228
104
+ 176.9713262
105
+ 361.882716
106
+ 388.2915173
107
+ 357.2530864
108
+ 344.2353644
109
+ 319.5937873
110
+ 328.207672
111
+ 155.3166069
112
+ 26.62037037
113
+ 51.52329749
114
+ 254.2438272
115
+ 349.8357228
116
+ 176.9713262
117
+ 361.882716
118
+ 388.2915173
119
+ 357.2530864
120
+ 344.2353644
121
+ 319.5937873
122
+ 328.207672
123
+ 155.3166069
124
+ 26.62037037
125
+ 51.52329749
126
+ 254.2438272
127
+ 349.8357228
128
+ 176.9713262
129
+ 361.882716
130
+ 388.2915173
131
+ 357.2530864
132
+ 344.2353644
133
+ 319.5937873
134
+ 328.207672
135
+ 155.3166069
136
+ 26.62037037
137
+ 51.52329749
138
+ 254.2438272
139
+ 349.8357228
140
+ 176.9713262
141
+ 361.882716
142
+ 388.2915173
143
+ 357.2530864
144
+ 344.2353644
145
+ 319.5937873
146
+ 328.207672
147
+ 155.3166069
148
+ 26.62037037
149
+ 51.52329749
150
+ 254.2438272
151
+ 349.8357228
152
+ 176.9713262
153
+ 361.882716
154
+ 388.2915173
155
+ 357.2530864
156
+ 344.2353644
157
+ 319.5937873
158
+ 328.207672
159
+ 155.3166069
160
+ 26.62037037
161
+ 51.52329749
162
+ 254.2438272
163
+ 349.8357228
164
+ 176.9713262
165
+ 361.882716
166
+ 388.2915173
167
+ 357.2530864
168
+ 344.2353644
169
+ 319.5937873
170
+ 328.207672
171
+ 155.3166069
172
+ 26.62037037
173
+ 51.52329749
174
+ 254.2438272
175
+ 349.8357228
176
+ 176.9713262
177
+ 361.882716
178
+ 388.2915173
179
+ 357.2530864
180
+ 344.2353644
181
+ 319.5937873
182
+ 328.207672
183
+ 155.3166069
184
+ 26.62037037
185
+ 51.52329749
186
+ 254.2438272
187
+ 349.8357228
188
+ 176.9713262
189
+ 361.882716
190
+ 388.2915173
191
+ 357.2530864
192
+ 344.2353644
193
+ 319.5937873
194
+ 328.207672
195
+ 155.3166069
196
+ 26.62037037
197
+ 51.52329749
198
+ 254.2438272
199
+ 349.8357228
200
+ 176.9713262
201
+ 361.882716
202
+ 388.2915173
203
+ 357.2530864
204
+ 344.2353644
205
+ 319.5937873
206
+ 328.207672
207
+ 155.3166069
208
+ 26.62037037
209
+ 51.52329749
210
+ 254.2438272
211
+ 349.8357228
212
+ 176.9713262
213
+ 361.882716
214
+ 388.2915173
215
+ 357.2530864
216
+ 344.2353644
217
+ 319.5937873
218
+ 328.207672
219
+ 155.3166069
220
+ 26.62037037
221
+ 51.52329749
222
+ 254.2438272
223
+ 349.8357228
224
+ 176.9713262
225
+ 361.882716
226
+ 388.2915173
227
+ 357.2530864
228
+ 344.2353644
229
+ 319.5937873
230
+ 328.207672
231
+ 155.3166069
232
+ 26.62037037
233
+ 51.52329749
234
+ 254.2438272
235
+ 349.8357228
236
+ 176.9713262
237
+ 361.882716
238
+ 388.2915173
239
+ 357.2530864
240
+ 344.2353644
morl4water/examples/data/nile_river/irrigation/irr_demand_Hassanab.txt ADDED
@@ -0,0 +1,240 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 28.37514934
2
+ 19.84126984
3
+ 8.21385902
4
+ 6.944444444
5
+ 10.82735962
6
+ 22.37654321
7
+ 20.16129032
8
+ 16.05436081
9
+ 30.47839506
10
+ 37.70908005
11
+ 38.96604938
12
+ 35.09557945
13
+ 28.37514934
14
+ 19.84126984
15
+ 8.21385902
16
+ 6.944444444
17
+ 10.82735962
18
+ 22.37654321
19
+ 20.16129032
20
+ 16.05436081
21
+ 30.47839506
22
+ 37.70908005
23
+ 38.96604938
24
+ 35.09557945
25
+ 28.37514934
26
+ 19.84126984
27
+ 8.21385902
28
+ 6.944444444
29
+ 10.82735962
30
+ 22.37654321
31
+ 20.16129032
32
+ 16.05436081
33
+ 30.47839506
34
+ 37.70908005
35
+ 38.96604938
36
+ 35.09557945
37
+ 28.37514934
38
+ 19.84126984
39
+ 8.21385902
40
+ 6.944444444
41
+ 10.82735962
42
+ 22.37654321
43
+ 20.16129032
44
+ 16.05436081
45
+ 30.47839506
46
+ 37.70908005
47
+ 38.96604938
48
+ 35.09557945
49
+ 28.37514934
50
+ 19.84126984
51
+ 8.21385902
52
+ 6.944444444
53
+ 10.82735962
54
+ 22.37654321
55
+ 20.16129032
56
+ 16.05436081
57
+ 30.47839506
58
+ 37.70908005
59
+ 38.96604938
60
+ 35.09557945
61
+ 28.37514934
62
+ 19.84126984
63
+ 8.21385902
64
+ 6.944444444
65
+ 10.82735962
66
+ 22.37654321
67
+ 20.16129032
68
+ 16.05436081
69
+ 30.47839506
70
+ 37.70908005
71
+ 38.96604938
72
+ 35.09557945
73
+ 28.37514934
74
+ 19.84126984
75
+ 8.21385902
76
+ 6.944444444
77
+ 10.82735962
78
+ 22.37654321
79
+ 20.16129032
80
+ 16.05436081
81
+ 30.47839506
82
+ 37.70908005
83
+ 38.96604938
84
+ 35.09557945
85
+ 28.37514934
86
+ 19.84126984
87
+ 8.21385902
88
+ 6.944444444
89
+ 10.82735962
90
+ 22.37654321
91
+ 20.16129032
92
+ 16.05436081
93
+ 30.47839506
94
+ 37.70908005
95
+ 38.96604938
96
+ 35.09557945
97
+ 28.37514934
98
+ 19.84126984
99
+ 8.21385902
100
+ 6.944444444
101
+ 10.82735962
102
+ 22.37654321
103
+ 20.16129032
104
+ 16.05436081
105
+ 30.47839506
106
+ 37.70908005
107
+ 38.96604938
108
+ 35.09557945
109
+ 28.37514934
110
+ 19.84126984
111
+ 8.21385902
112
+ 6.944444444
113
+ 10.82735962
114
+ 22.37654321
115
+ 20.16129032
116
+ 16.05436081
117
+ 30.47839506
118
+ 37.70908005
119
+ 38.96604938
120
+ 35.09557945
121
+ 28.37514934
122
+ 19.84126984
123
+ 8.21385902
124
+ 6.944444444
125
+ 10.82735962
126
+ 22.37654321
127
+ 20.16129032
128
+ 16.05436081
129
+ 30.47839506
130
+ 37.70908005
131
+ 38.96604938
132
+ 35.09557945
133
+ 28.37514934
134
+ 19.84126984
135
+ 8.21385902
136
+ 6.944444444
137
+ 10.82735962
138
+ 22.37654321
139
+ 20.16129032
140
+ 16.05436081
141
+ 30.47839506
142
+ 37.70908005
143
+ 38.96604938
144
+ 35.09557945
145
+ 28.37514934
146
+ 19.84126984
147
+ 8.21385902
148
+ 6.944444444
149
+ 10.82735962
150
+ 22.37654321
151
+ 20.16129032
152
+ 16.05436081
153
+ 30.47839506
154
+ 37.70908005
155
+ 38.96604938
156
+ 35.09557945
157
+ 28.37514934
158
+ 19.84126984
159
+ 8.21385902
160
+ 6.944444444
161
+ 10.82735962
162
+ 22.37654321
163
+ 20.16129032
164
+ 16.05436081
165
+ 30.47839506
166
+ 37.70908005
167
+ 38.96604938
168
+ 35.09557945
169
+ 28.37514934
170
+ 19.84126984
171
+ 8.21385902
172
+ 6.944444444
173
+ 10.82735962
174
+ 22.37654321
175
+ 20.16129032
176
+ 16.05436081
177
+ 30.47839506
178
+ 37.70908005
179
+ 38.96604938
180
+ 35.09557945
181
+ 28.37514934
182
+ 19.84126984
183
+ 8.21385902
184
+ 6.944444444
185
+ 10.82735962
186
+ 22.37654321
187
+ 20.16129032
188
+ 16.05436081
189
+ 30.47839506
190
+ 37.70908005
191
+ 38.96604938
192
+ 35.09557945
193
+ 28.37514934
194
+ 19.84126984
195
+ 8.21385902
196
+ 6.944444444
197
+ 10.82735962
198
+ 22.37654321
199
+ 20.16129032
200
+ 16.05436081
201
+ 30.47839506
202
+ 37.70908005
203
+ 38.96604938
204
+ 35.09557945
205
+ 28.37514934
206
+ 19.84126984
207
+ 8.21385902
208
+ 6.944444444
209
+ 10.82735962
210
+ 22.37654321
211
+ 20.16129032
212
+ 16.05436081
213
+ 30.47839506
214
+ 37.70908005
215
+ 38.96604938
216
+ 35.09557945
217
+ 28.37514934
218
+ 19.84126984
219
+ 8.21385902
220
+ 6.944444444
221
+ 10.82735962
222
+ 22.37654321
223
+ 20.16129032
224
+ 16.05436081
225
+ 30.47839506
226
+ 37.70908005
227
+ 38.96604938
228
+ 35.09557945
229
+ 28.37514934
230
+ 19.84126984
231
+ 8.21385902
232
+ 6.944444444
233
+ 10.82735962
234
+ 22.37654321
235
+ 20.16129032
236
+ 16.05436081
237
+ 30.47839506
238
+ 37.70908005
239
+ 38.96604938
240
+ 35.09557945
morl4water/examples/data/nile_river/irrigation/irr_demand_Tamaniat.txt ADDED
@@ -0,0 +1,240 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 18.66786141
2
+ 12.81415344
3
+ 5.227001195
4
+ 4.62962963
5
+ 7.093787336
6
+ 14.66049383
7
+ 13.44086022
8
+ 10.82735962
9
+ 20.44753086
10
+ 25.01493429
11
+ 25.84876543
12
+ 23.14814815
13
+ 18.66786141
14
+ 12.81415344
15
+ 5.227001195
16
+ 4.62962963
17
+ 7.093787336
18
+ 14.66049383
19
+ 13.44086022
20
+ 10.82735962
21
+ 20.44753086
22
+ 25.01493429
23
+ 25.84876543
24
+ 23.14814815
25
+ 18.66786141
26
+ 12.81415344
27
+ 5.227001195
28
+ 4.62962963
29
+ 7.093787336
30
+ 14.66049383
31
+ 13.44086022
32
+ 10.82735962
33
+ 20.44753086
34
+ 25.01493429
35
+ 25.84876543
36
+ 23.14814815
37
+ 18.66786141
38
+ 12.81415344
39
+ 5.227001195
40
+ 4.62962963
41
+ 7.093787336
42
+ 14.66049383
43
+ 13.44086022
44
+ 10.82735962
45
+ 20.44753086
46
+ 25.01493429
47
+ 25.84876543
48
+ 23.14814815
49
+ 18.66786141
50
+ 12.81415344
51
+ 5.227001195
52
+ 4.62962963
53
+ 7.093787336
54
+ 14.66049383
55
+ 13.44086022
56
+ 10.82735962
57
+ 20.44753086
58
+ 25.01493429
59
+ 25.84876543
60
+ 23.14814815
61
+ 18.66786141
62
+ 12.81415344
63
+ 5.227001195
64
+ 4.62962963
65
+ 7.093787336
66
+ 14.66049383
67
+ 13.44086022
68
+ 10.82735962
69
+ 20.44753086
70
+ 25.01493429
71
+ 25.84876543
72
+ 23.14814815
73
+ 18.66786141
74
+ 12.81415344
75
+ 5.227001195
76
+ 4.62962963
77
+ 7.093787336
78
+ 14.66049383
79
+ 13.44086022
80
+ 10.82735962
81
+ 20.44753086
82
+ 25.01493429
83
+ 25.84876543
84
+ 23.14814815
85
+ 18.66786141
86
+ 12.81415344
87
+ 5.227001195
88
+ 4.62962963
89
+ 7.093787336
90
+ 14.66049383
91
+ 13.44086022
92
+ 10.82735962
93
+ 20.44753086
94
+ 25.01493429
95
+ 25.84876543
96
+ 23.14814815
97
+ 18.66786141
98
+ 12.81415344
99
+ 5.227001195
100
+ 4.62962963
101
+ 7.093787336
102
+ 14.66049383
103
+ 13.44086022
104
+ 10.82735962
105
+ 20.44753086
106
+ 25.01493429
107
+ 25.84876543
108
+ 23.14814815
109
+ 18.66786141
110
+ 12.81415344
111
+ 5.227001195
112
+ 4.62962963
113
+ 7.093787336
114
+ 14.66049383
115
+ 13.44086022
116
+ 10.82735962
117
+ 20.44753086
118
+ 25.01493429
119
+ 25.84876543
120
+ 23.14814815
121
+ 18.66786141
122
+ 12.81415344
123
+ 5.227001195
124
+ 4.62962963
125
+ 7.093787336
126
+ 14.66049383
127
+ 13.44086022
128
+ 10.82735962
129
+ 20.44753086
130
+ 25.01493429
131
+ 25.84876543
132
+ 23.14814815
133
+ 18.66786141
134
+ 12.81415344
135
+ 5.227001195
136
+ 4.62962963
137
+ 7.093787336
138
+ 14.66049383
139
+ 13.44086022
140
+ 10.82735962
141
+ 20.44753086
142
+ 25.01493429
143
+ 25.84876543
144
+ 23.14814815
145
+ 18.66786141
146
+ 12.81415344
147
+ 5.227001195
148
+ 4.62962963
149
+ 7.093787336
150
+ 14.66049383
151
+ 13.44086022
152
+ 10.82735962
153
+ 20.44753086
154
+ 25.01493429
155
+ 25.84876543
156
+ 23.14814815
157
+ 18.66786141
158
+ 12.81415344
159
+ 5.227001195
160
+ 4.62962963
161
+ 7.093787336
162
+ 14.66049383
163
+ 13.44086022
164
+ 10.82735962
165
+ 20.44753086
166
+ 25.01493429
167
+ 25.84876543
168
+ 23.14814815
169
+ 18.66786141
170
+ 12.81415344
171
+ 5.227001195
172
+ 4.62962963
173
+ 7.093787336
174
+ 14.66049383
175
+ 13.44086022
176
+ 10.82735962
177
+ 20.44753086
178
+ 25.01493429
179
+ 25.84876543
180
+ 23.14814815
181
+ 18.66786141
182
+ 12.81415344
183
+ 5.227001195
184
+ 4.62962963
185
+ 7.093787336
186
+ 14.66049383
187
+ 13.44086022
188
+ 10.82735962
189
+ 20.44753086
190
+ 25.01493429
191
+ 25.84876543
192
+ 23.14814815
193
+ 18.66786141
194
+ 12.81415344
195
+ 5.227001195
196
+ 4.62962963
197
+ 7.093787336
198
+ 14.66049383
199
+ 13.44086022
200
+ 10.82735962
201
+ 20.44753086
202
+ 25.01493429
203
+ 25.84876543
204
+ 23.14814815
205
+ 18.66786141
206
+ 12.81415344
207
+ 5.227001195
208
+ 4.62962963
209
+ 7.093787336
210
+ 14.66049383
211
+ 13.44086022
212
+ 10.82735962
213
+ 20.44753086
214
+ 25.01493429
215
+ 25.84876543
216
+ 23.14814815
217
+ 18.66786141
218
+ 12.81415344
219
+ 5.227001195
220
+ 4.62962963
221
+ 7.093787336
222
+ 14.66049383
223
+ 13.44086022
224
+ 10.82735962
225
+ 20.44753086
226
+ 25.01493429
227
+ 25.84876543
228
+ 23.14814815
229
+ 18.66786141
230
+ 12.81415344
231
+ 5.227001195
232
+ 4.62962963
233
+ 7.093787336
234
+ 14.66049383
235
+ 13.44086022
236
+ 10.82735962
237
+ 20.44753086
238
+ 25.01493429
239
+ 25.84876543
240
+ 23.14814815
morl4water/examples/data/nile_river/irrigation/irr_demand_USSennar.txt ADDED
@@ -0,0 +1,240 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 67.5776583
2
+ 66.13756614
3
+ 44.80286738
4
+ 34.72222222
5
+ 35.09557945
6
+ 77.16049383
7
+ 97.44623656
8
+ 93.71266428
9
+ 132.3302469
10
+ 148.2228196
11
+ 141.9753086
12
+ 82.88530466
13
+ 67.5776583
14
+ 66.13756614
15
+ 44.80286738
16
+ 34.72222222
17
+ 35.09557945
18
+ 77.16049383
19
+ 97.44623656
20
+ 93.71266428
21
+ 132.3302469
22
+ 148.2228196
23
+ 141.9753086
24
+ 82.88530466
25
+ 67.5776583
26
+ 66.13756614
27
+ 44.80286738
28
+ 34.72222222
29
+ 35.09557945
30
+ 77.16049383
31
+ 97.44623656
32
+ 93.71266428
33
+ 132.3302469
34
+ 148.2228196
35
+ 141.9753086
36
+ 82.88530466
37
+ 67.5776583
38
+ 66.13756614
39
+ 44.80286738
40
+ 34.72222222
41
+ 35.09557945
42
+ 77.16049383
43
+ 97.44623656
44
+ 93.71266428
45
+ 132.3302469
46
+ 148.2228196
47
+ 141.9753086
48
+ 82.88530466
49
+ 67.5776583
50
+ 66.13756614
51
+ 44.80286738
52
+ 34.72222222
53
+ 35.09557945
54
+ 77.16049383
55
+ 97.44623656
56
+ 93.71266428
57
+ 132.3302469
58
+ 148.2228196
59
+ 141.9753086
60
+ 82.88530466
61
+ 67.5776583
62
+ 66.13756614
63
+ 44.80286738
64
+ 34.72222222
65
+ 35.09557945
66
+ 77.16049383
67
+ 97.44623656
68
+ 93.71266428
69
+ 132.3302469
70
+ 148.2228196
71
+ 141.9753086
72
+ 82.88530466
73
+ 67.5776583
74
+ 66.13756614
75
+ 44.80286738
76
+ 34.72222222
77
+ 35.09557945
78
+ 77.16049383
79
+ 97.44623656
80
+ 93.71266428
81
+ 132.3302469
82
+ 148.2228196
83
+ 141.9753086
84
+ 82.88530466
85
+ 67.5776583
86
+ 66.13756614
87
+ 44.80286738
88
+ 34.72222222
89
+ 35.09557945
90
+ 77.16049383
91
+ 97.44623656
92
+ 93.71266428
93
+ 132.3302469
94
+ 148.2228196
95
+ 141.9753086
96
+ 82.88530466
97
+ 67.5776583
98
+ 66.13756614
99
+ 44.80286738
100
+ 34.72222222
101
+ 35.09557945
102
+ 77.16049383
103
+ 97.44623656
104
+ 93.71266428
105
+ 132.3302469
106
+ 148.2228196
107
+ 141.9753086
108
+ 82.88530466
109
+ 67.5776583
110
+ 66.13756614
111
+ 44.80286738
112
+ 34.72222222
113
+ 35.09557945
114
+ 77.16049383
115
+ 97.44623656
116
+ 93.71266428
117
+ 132.3302469
118
+ 148.2228196
119
+ 141.9753086
120
+ 82.88530466
121
+ 67.5776583
122
+ 66.13756614
123
+ 44.80286738
124
+ 34.72222222
125
+ 35.09557945
126
+ 77.16049383
127
+ 97.44623656
128
+ 93.71266428
129
+ 132.3302469
130
+ 148.2228196
131
+ 141.9753086
132
+ 82.88530466
133
+ 67.5776583
134
+ 66.13756614
135
+ 44.80286738
136
+ 34.72222222
137
+ 35.09557945
138
+ 77.16049383
139
+ 97.44623656
140
+ 93.71266428
141
+ 132.3302469
142
+ 148.2228196
143
+ 141.9753086
144
+ 82.88530466
145
+ 67.5776583
146
+ 66.13756614
147
+ 44.80286738
148
+ 34.72222222
149
+ 35.09557945
150
+ 77.16049383
151
+ 97.44623656
152
+ 93.71266428
153
+ 132.3302469
154
+ 148.2228196
155
+ 141.9753086
156
+ 82.88530466
157
+ 67.5776583
158
+ 66.13756614
159
+ 44.80286738
160
+ 34.72222222
161
+ 35.09557945
162
+ 77.16049383
163
+ 97.44623656
164
+ 93.71266428
165
+ 132.3302469
166
+ 148.2228196
167
+ 141.9753086
168
+ 82.88530466
169
+ 67.5776583
170
+ 66.13756614
171
+ 44.80286738
172
+ 34.72222222
173
+ 35.09557945
174
+ 77.16049383
175
+ 97.44623656
176
+ 93.71266428
177
+ 132.3302469
178
+ 148.2228196
179
+ 141.9753086
180
+ 82.88530466
181
+ 67.5776583
182
+ 66.13756614
183
+ 44.80286738
184
+ 34.72222222
185
+ 35.09557945
186
+ 77.16049383
187
+ 97.44623656
188
+ 93.71266428
189
+ 132.3302469
190
+ 148.2228196
191
+ 141.9753086
192
+ 82.88530466
193
+ 67.5776583
194
+ 66.13756614
195
+ 44.80286738
196
+ 34.72222222
197
+ 35.09557945
198
+ 77.16049383
199
+ 97.44623656
200
+ 93.71266428
201
+ 132.3302469
202
+ 148.2228196
203
+ 141.9753086
204
+ 82.88530466
205
+ 67.5776583
206
+ 66.13756614
207
+ 44.80286738
208
+ 34.72222222
209
+ 35.09557945
210
+ 77.16049383
211
+ 97.44623656
212
+ 93.71266428
213
+ 132.3302469
214
+ 148.2228196
215
+ 141.9753086
216
+ 82.88530466
217
+ 67.5776583
218
+ 66.13756614
219
+ 44.80286738
220
+ 34.72222222
221
+ 35.09557945
222
+ 77.16049383
223
+ 97.44623656
224
+ 93.71266428
225
+ 132.3302469
226
+ 148.2228196
227
+ 141.9753086
228
+ 82.88530466
229
+ 67.5776583
230
+ 66.13756614
231
+ 44.80286738
232
+ 34.72222222
233
+ 35.09557945
234
+ 77.16049383
235
+ 97.44623656
236
+ 93.71266428
237
+ 132.3302469
238
+ 148.2228196
239
+ 141.9753086
240
+ 82.88530466
morl4water/examples/data/nile_river/reservoirs/__init__.py ADDED
File without changes
morl4water/examples/data/nile_river/reservoirs/evap_GERD.txt ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 13.5
2
+ 13.6
3
+ 17.1
4
+ 15.7
5
+ 10.6
6
+ 4.2
7
+ -0.4
8
+ 0.1
9
+ 1.4
10
+ 9.1
11
+ 11.4
12
+ 11.5
morl4water/examples/data/nile_river/reservoirs/evap_HAD.txt ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 10.38
2
+ 13
3
+ 20.3
4
+ 25.2
5
+ 31.71
6
+ 32.49
7
+ 32.4
8
+ 31.5
9
+ 27
10
+ 21.51
11
+ 14.01
12
+ 10.6
morl4water/examples/data/nile_river/reservoirs/evap_Merowe.txt ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 13.5
2
+ 13.6
3
+ 17.1
4
+ 15.7
5
+ 10.6
6
+ 4.2
7
+ -0.4
8
+ 0.1
9
+ 1.4
10
+ 9.1
11
+ 11.4
12
+ 11.5
morl4water/examples/data/nile_river/reservoirs/evap_Roseires.txt ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 17.98
2
+ 18.48
3
+ 22.66
4
+ 22.11
5
+ 18.91
6
+ 6.27
7
+ -2.79
8
+ -2.6
9
+ 1.95
10
+ 12.49
11
+ 15.69
12
+ 16.74