-
Notifications
You must be signed in to change notification settings - Fork 68
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
Example for working with dual variables #70
base: master
Are you sure you want to change the base?
Conversation
The results processing does not work properly after calling receive_duals
|
Before that fails, pyomo gives some warnings
|
The errors described above were no bug, but caused by me using it wrongly - Model.receive_duals must be called before Model.solve. |
However, I get a warning - not sure if this is ok or not, @oemof/oemof-solph ?
|
Addition: The warning is printed within these lines in |
oemof_examples/oemof.solph/v0.4.x/dual_variables/simple_dispatch_with_duals.py
Show resolved
Hide resolved
I have fixed the timeline. In the stacked plot, the merit order is now taken into account and the colors are assigned more intuitively. Can you review the changes @jnnr? |
This PR gives a draft of an example showing how to work with dual variables in oemof.solph. Final aim is to transparently show how to work with duals to e.g. get electricity or CO2 prices from a model.
At the moment, it also serves to check to see how
model.receive_duals()
fits in the rest of the common optimization workflow.This is how the plot looks like currently:
TODO: