-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhanc/Potential in links #47
Conversation
- Relaxed lower bounds for flows - Manual fix of the lower bounds of variables
- It always creates both fixed and variable - Tested for both EMI and EMB, but to be extended in EMI tests later
- `constratins_capacity_installed` included for links - Function called from `create_link`, but not used - Requires the inclusion of a function `EMB.capacity(l, t)` for links
- Tested for OPEX with InvestmentModel - Not directly incorporated into the model
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, this is an important step towards more unified building of models from both nodes and links.
I have thought a bit about the naming, and I currently lean towards using the same function for creating variables and constraints for nodes and links, and dispatch to different methods. Then we could get a nice top level loop that clearly communicats that we do the same for nodes and links (or where they differ), something like:
for elements ∈ (𝒩, ℒ)
variables_opex(m, elements, 𝒯, 𝒫, modeltype)
variables_capex(m, elements, 𝒯, modeltype)
variables_capacity(m, elements, 𝒯, modeltype)
variables_nodes(m, elements, 𝒯, modeltype)
end
I suggest we follow that up in a separate PR.
] | ||
|
||
# Connect all nodes with the availability node for the overall energy/mass balance | ||
links = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this is ok, but it's hard to read/make sense of and a pattern some users seen to copy from tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. In that respect, I think the people should focus instead on the examples. Note, that the changes in test_nodes.jl
are mostly related to providing tests to existing functions (and the newly introduced unidirectional and bidirectional properties).
Co-authored-by: hellemo <[email protected]>
Generally speaking, I like the design of looping through everything. We could also split flow variables into two methods to be certain regarding the application. In theory, that should not be breaking as we do not export the functions. There are however two things I want to stress:
All of the changes should in my opinion be a separate PR, but with the same versions increase. That way, we do not introduce a version which we directly change again. |
This PR focuses on increasing the flexibility of
Link
s. It incorporates several different concepts for links to allow forAll introduced changes are only valid if the user specifies explicitly for their abstract or composite type that they should include them.
I did not update the documentation with additional information regarding the extension of
Link
s yet. In practice, it only includes the new variables and the docstrings, but not how one can create new links.