Skip to content

Save line losses after solve. #3

Description

@jetuk

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions