You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Additionally, if you need to manually install git hooks (e.g., if you skipped the `make install-*` targets initially or cloned to a new location without running them):
143
+
```python
143
144
144
-
```shell
145
-
uv run pre-commit install
146
-
```
145
+
classModel(DartsModel):
146
+
def__init__(self, configuration, ...):
147
147
148
-
---
148
+
self._configuration = configuration
149
+
super().__init__()
150
+
...
149
151
150
-
## Build and Test
152
+
```
151
153
152
-
### Running Tests
154
+
This allows having access to injected configuration in a whole DartsModel object.
153
155
154
-
Use `pytest` to run the project's test suite. The `make install-dev` target installs `pytest`. You can run tests using:
156
+
4. Well(s) connections will be taken from `configuration` using `OpenDartsConnector.get_well_connection_cells(...)`, thus user must import
157
+
`from connectors.open_darts import OpenDartsConnector`. Wells should be introduced in a simulation model in `def set_wells(self)` section:
155
158
156
-
```shell
157
-
make run-check
158
-
```
159
-
This will also run tests as part of the pre-commit hooks. To run tests directly:
160
-
```shell
161
-
uv run pytest
162
-
```
163
-
Or, if you have activated the environment using `uv shell`:
Then the heat value will be broadcasted back to toolbox with a proper flag from `SimulationResultType`.
187
+
188
+
> **Note:** Recently only "Heat" is supported in `SimulationResultType`
189
+
190
+
6. Simulation model implementation is read to run an optimization process using RiskManagementToolbox.
191
+
7. All simulation model files must be archived in `.zip` format. User should ensure that after unpacking all simulation model files are accessible in folder without any additional subfolders.
192
+
193
+
### 3. Toolbox configuration file
194
+
RiskManagementToolbox is designed to use JSON configuration file, where the user defines the optimization problem(s),
195
+
initial state, and variable constrains.
196
+
197
+
Recently the following optimization problem(s) are supported:
198
+
199
+
1.**Well placement** - toolbox will try to find the optimal configuration of well(s): trajectory and perforation.
200
+
201
+
Well placement problem definition if following by individual well(s) used in simulation.
202
+
203
+
```json
204
+
{
205
+
"well_placement": [
206
+
{
207
+
"well_name": str,
208
+
"initial_state": {
209
+
210
+
},
211
+
"optimization_constrains": {
212
+
213
+
}
214
+
},
215
+
]
216
+
}
217
+
```
218
+
219
+
The initial state of the well defines the proper well type and all the mandatory well parameters neccessery to build well trajectory and define the completion intervals
220
+
> **Note:** Recently only vertical well type `"well_type": "IWell"` is supported
221
+
222
+
The example vertical well configuration:
223
+
224
+
```json
225
+
{
226
+
"initial_state": {
227
+
"well_type": "IWell",
228
+
"md": 2500,
229
+
"md_step": 10,
230
+
"wellhead": {
231
+
"x": 400,
232
+
"y": 400,
233
+
"z": 0
234
+
}
235
+
}
236
+
}
237
+
```
238
+
> **Note:** If a user does not define a perforation interval, then by default the whole well md will be treated as perforated
239
+
240
+
If the user wants to define the perforation interval:
241
+
242
+
```json
243
+
{
244
+
"initial_state": {
245
+
"well_type": "IWell",
246
+
"md": 2500,
247
+
"md_step": 10,
248
+
"wellhead": {
249
+
"x": 400,
250
+
"y": 400,
251
+
"z": 0
252
+
},
253
+
"perforations": [
254
+
{
255
+
"start_md": 1000,
256
+
"end_md": 1200
257
+
}
258
+
]
259
+
}
260
+
}
261
+
```
262
+
> **Note:** Recently only one perforation range is supported
263
+
264
+
Each well initial state is followed by the optimization constrains part, where user can pick which parameters from
265
+
well template will be used in an optimization process:
266
+
267
+
As an example, if a user decides to optimize the x and y position of wellhead as well as well md, the optimization constrains will take the following form:
268
+
```json
269
+
{
270
+
"optimization_constrains": {
271
+
"wellhead": {
272
+
"x": {
273
+
"lb": 10,
274
+
"ub": 3190
275
+
},
276
+
"y": {
277
+
"lb": 10,
278
+
"ub": 3190
279
+
}
280
+
},
281
+
"md": {
282
+
"lb": 2000,
283
+
"ub": 2700
284
+
}
285
+
}
286
+
}
287
+
```
288
+
289
+
where each parameter is bounded in lower (lb) and upper (ub) limit.
290
+
291
+
> **Note:** Parameters which are not listed in optimization constraints will not take part of an optimization process and remains the same as defined in the initial state
292
+
293
+
The complete example of well placement problem for two wells:
294
+
```json
295
+
{
296
+
"well_placement": [
297
+
{
298
+
"well_name": "INJ",
299
+
"initial_state": {
300
+
"well_type": "IWell",
301
+
"md": 2500,
302
+
"md_step": 10,
303
+
"wellhead": {
304
+
"x": 400,
305
+
"y": 400,
306
+
"z": 0
307
+
}
308
+
},
309
+
"optimization_constrains": {
310
+
"wellhead": {
311
+
"x": {
312
+
"lb": 10,
313
+
"ub": 3190
314
+
},
315
+
"y": {
316
+
"lb": 10,
317
+
"ub": 3190
318
+
}
319
+
}
320
+
}
321
+
},
322
+
{
323
+
"well_name": "PRO",
324
+
"initial_state": {
325
+
"well_type": "IWell",
326
+
"md": 2500,
327
+
"md_step": 10,
328
+
"wellhead": {
329
+
"x": 700,
330
+
"y": 700,
331
+
"z": 0
332
+
}
333
+
},
334
+
"optimization_constrains": {
335
+
"wellhead": {
336
+
"x": {
337
+
"lb": 10,
338
+
"ub": 3190
339
+
},
340
+
"y": {
341
+
"lb": 10,
342
+
"ub": 3190
343
+
}
344
+
}
345
+
}
346
+
}
347
+
]
348
+
}
349
+
```
350
+
351
+
### 4. Toolbox running
352
+
353
+
To run the RiskManagementToolbox the virtual environment corresponded with the repository must be
0 commit comments