Conversation
# Conflicts: # tests/unittests/test_quota_co2.py
# Conflicts: # src/andromede/libs/standard_sc.yml # tests/models/test_electrolyzer_n_inputs.py # tests/models/test_quota_co2.py # tests/unittests/model/test_electrolyzer_n_inputs.py # tests/unittests/model/test_quota_co2.py # tests/unittests/test_electrolyzer_n_inputs.py # tests/unittests/test_quota_co2.py
# Conflicts: # src/andromede/libs/standard_sc.yml
flomnes
left a comment
There was a problem hiding this comment.
Please add a description such as (if my understanding is correct)
A link with storage behaves like a short-term storage that can inject/withdraw to/from 2 areas.
What about N areas ? Is there any technical barrrier ?
| float_parameter("f_from_max", CONSTANT), | ||
| float_parameter("f_to_max", CONSTANT), |
There was a problem hiding this comment.
| float_parameter("f_from_max", CONSTANT), | |
| float_parameter("f_to_max", CONSTANT), | |
| float_parameter("f_from_min", CONSTANT), | |
| float_parameter("f_to_min", CONSTANT), | |
| float_parameter("f_from_max", CONSTANT), | |
| float_parameter("f_to_max", CONSTANT), |
| variables=[ | ||
| float_variable("r", lower_bound=literal(0), upper_bound=param("capacity")), | ||
| float_variable( | ||
| "f_from", lower_bound=-param("f_from_max"), upper_bound=param("f_from_max") |
There was a problem hiding this comment.
| "f_from", lower_bound=-param("f_from_max"), upper_bound=param("f_from_max") | |
| "f_from", lower_bound=param("f_from_min"), upper_bound=param("f_from_max") |
| "f_from", lower_bound=-param("f_from_max"), upper_bound=param("f_from_max") | ||
| ), | ||
| float_variable( | ||
| "f_to", lower_bound=-param("f_to_max"), upper_bound=param("f_to_max") |
There was a problem hiding this comment.
| "f_to", lower_bound=-param("f_to_max"), upper_bound=param("f_to_max") | |
| "f_to", lower_bound=param("f_to_min"), upper_bound=param("f_to_max") |
| constraints=[ | ||
| Constraint( | ||
| name="Level", | ||
| expression=var("f_from") == (var("f_from+") - var("f_from-")), | ||
| ), | ||
| ], |
There was a problem hiding this comment.
This model is incomplete (missing shift operators at least). Was it superseded by the yml ? If so, I suggest removing standard_sc.py completely.
There was a problem hiding this comment.
Yes it seems to be superseeded by the model in the yml
| constraints=[ | ||
| Constraint( | ||
| name="Level", | ||
| expression=var("f_from") == (var("f_from+") - var("f_from-")), | ||
| ), | ||
| ], |
There was a problem hiding this comment.
Yes it seems to be superseeded by the model in the yml
| field: flow | ||
| definition: f_to | ||
| constraints: | ||
| - name: max0_from |
There was a problem hiding this comment.
More explicit name : positive_part_flow_from
| constraints: | ||
| - name: max0_from | ||
| expression: f_from = f_from_p - f_from_m | ||
| - name: max0_to |
| expression: f_from = f_from_p - f_from_m | ||
| - name: max0_to | ||
| expression: f_to = f_to_p - f_to_m | ||
| - name: r_t1 |
There was a problem hiding this comment.
More explicit name : storage_dynamics
| expression: f_to = f_to_p - f_to_m | ||
| - name: r_t1 | ||
| expression: r[t+1] = r[t] + f_from - f_to | ||
| - name: r0 |
| - name: p_max | ||
| type: constant | ||
| value: 200 | ||
| - id: GS |
There was a problem hiding this comment.
Be more explicit in names for faster understanding (gas_storage)
There was a problem hiding this comment.
applies for all components and nodes
| type: flow | ||
| binding-constraints: | ||
| - name: sum | ||
| expression: sum_connections(flow_k.flow) = 0 |
There was a problem hiding this comment.
I think the syntax for sum(alpha) is not defined in lower level for now, we need to add parameters in the sum operator
There was a problem hiding this comment.
Some models are defined in local libraries for tests, delete the incomplete, unsed ones from here (storage_final_level, storage_final_level_input), maybe others ?
| expression: r[t+1] = r[t] - u1[t] - u2[t] | ||
| - name: r0 | ||
| expression: r[0] = initial_level | ||
| - name: rt |
There was a problem hiding this comment.
Final level probably not working for now
| PortRef(gaz_node_2, "injection_port"), PortRef(gaz_prod, "injection_port") | ||
| ) | ||
| network.connect(PortRef(gaz_node_2, "injection_port"), PortRef(pipeline, "flow_to")) | ||
| network.connect(PortRef(gaz_node_2, "injection_port"), PortRef(pipeline, "flow_to")) |
There was a problem hiding this comment.
Same as previous line....
#15