PowerModels.jl icon indicating copy to clipboard operation
PowerModels.jl copied to clipboard

Issue with make_per_unit function on multi network data

Open kaarthiksundar opened this issue 6 years ago • 3 comments

The make_per_unit function is specific to the replicate function that is being used. In the test cases, the replicate function does deep copy of the single network data and hence, it works fine. If one decides to be memory efficient with the replicate function (by use of pointers), then the make_per_unit implementation would not give the desired effect; for instance, it would normalize pg values by pg/mvaBase^n. I do not know how to address this - but just bringing out the issue.

kaarthiksundar avatar Jan 30 '19 16:01 kaarthiksundar

Easy fix would be to make_per_unit and then replicate - but this just pushes to the issue to converting back to normal units.

kaarthiksundar avatar Jan 30 '19 16:01 kaarthiksundar

If make_per_unit works in the deep-copy case, then I don't think this is a bug. If one is going to use clever space saving methods, then that user needs to be careful with their data manipulation.

A feature we could add to help streamline this would be to have an optional per_unit field in each component. make_per_unit and make_mixed_units could then check this optional value before performing the requested conversion.

ccoffrin avatar Jan 30 '19 16:01 ccoffrin

I understand. The per_unit field in each component would be actually helpful.

kaarthiksundar avatar Jan 30 '19 17:01 kaarthiksundar

closing as a repeat of #682

ccoffrin avatar Aug 13 '23 21:08 ccoffrin