Skip to content
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

Save line losses after solve. #3

Open
jetuk opened this issue Aug 29, 2019 · 0 comments
Open

Save line losses after solve. #3

jetuk opened this issue Aug 29, 2019 · 0 comments

Comments

@jetuk
Copy link
Member

jetuk commented Aug 29, 2019

However, If I wanted to save it in the future, do you use _save_basis to save these values??

Comment from #2

This would need to be done in a similar way to the other data return from the linear programme. For example: https://github.com/pywr/pywr-dcopf/blob/6f1a609e251c03ad6496b6b04674749e7b788f0e/pywr_dcopf/_glpk_dcopf_solver.pyx#L480

There are two issues to doing this in the current code:

  1. While there are 2 new columns created for Line node the solver utilises them when creating the bus balance constraints. When it does this there is no record of which loss column corresponds to which Line node. This could be saved with in dictionary during setup.
  2. The Pywr nodes only accept a flow to the commit() method. One would have to decide whether the commit() method on Line should be overloaded to also accept and store the loss ass well. Or some other method / attribute added to Line that can be used to save the loss value.
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

No branches or pull requests

1 participant