Skip to content

Conversation

@Yann-Temudjin
Copy link
Contributor

#15

Yann-Temudjin and others added 30 commits February 26, 2024 10:44
# 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
Copy link
Member

@flomnes flomnes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ?

Comment on lines +218 to +219
float_parameter("f_from_max", CONSTANT),
float_parameter("f_to_max", CONSTANT),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"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")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"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")

Comment on lines +260 to +265
constraints=[
Constraint(
name="Level",
expression=var("f_from") == (var("f_from+") - var("f_from-")),
),
],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This model is incomplete (missing shift operators at least). Was it superseded by the yml ? If so, I suggest removing standard_sc.py completely.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it seems to be superseeded by the model in the yml

Comment on lines +260 to +265
constraints=[
Constraint(
name="Level",
expression=var("f_from") == (var("f_from+") - var("f_from-")),
),
],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it seems to be superseeded by the model in the yml

field: flow
definition: f_to
constraints:
- name: max0_from
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More explicit name : positive_part_flow_from

constraints:
- name: max0_from
expression: f_from = f_from_p - f_from_m
- name: max0_to
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

expression: f_from = f_from_p - f_from_m
- name: max0_to
expression: f_to = f_to_p - f_to_m
- name: r_t1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

initial_level

- name: p_max
type: constant
value: 200
- id: GS
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Be more explicit in names for faster understanding (gas_storage)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

applies for all components and nodes

type: flow
binding-constraints:
- name: sum
expression: sum_connections(flow_k.flow) = 0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the syntax for sum(alpha) is not defined in lower level for now, we need to add parameters in the sum operator

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as previous line....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants