Add functionality to extract reactive power costs
Feature Checklist
-
[X] Searched the issues page for similar feature requests
-
[X] Read the relevant sections of the documentation
-
[X] Browse the repository, tutorials and tests for already existing functionalities
Feature Type
-
[X] Adding new functionality to pandapower
-
[ ] Changing existing functionality in pandapower
-
[ ] Removing existing functionality in pandapower
Problem Description
Hey,
I have an ieee 9-bus file with the following cost related data:
%% generator cost data
% 1 startup shutdown n x1 y1 ... xn yn
% 2 startup shutdown n c(n-1) ... c0
mpc.gencost = [
2 1500 0 3 0.11 5 150;
2 2000 0 3 0.085 1.2 600;
2 3000 0 3 0.1225 1 335;
2 0 0 3 0.2 0 0;
2 0 0 3 0.05 0 0;
2 0 0 3 0.3 0 0;
];
Now I get this error:
File "/Users/PaulKandora/opt/anaconda3/envs/copopf/lib/python3.12/site-packages/pandapower/converter/matpower/from_mpc.py", line 100, in _m2ppc
mpc_frames = CaseFrames(mpc_file)
^^^^^^^^^^^^^^^^^^^^
File "/Users/PaulKandora/opt/anaconda3/envs/copopf/lib/python3.12/site-packages/matpowercaseframes/core.py", line 65, in __init__
self._update_index()
File "/Users/PaulKandora/opt/anaconda3/envs/copopf/lib/python3.12/site-packages/matpowercaseframes/core.py", line 181, in _update_index
self.gencost.set_index(pd.RangeIndex(1, len(self.gen.index) + 1),
File "/Users/PaulKandora/opt/anaconda3/envs/copopf/lib/python3.12/site-packages/pandas/core/frame.py", line 6173, in set_index
raise ValueError(
ValueError: Length mismatch: Expected 6 rows, received array of length 3
I assume that pandapower is unable to detect reactive power costs. Probably, it is possible to detect reactive power costs but I am not sure how.
Grateful for support here and best regards
Paul
Feature Description
Pandapower will be able to detect reactive power costs
Additional Context
No response
Label
- [X] Relevant labels are selected
@Paulnkk, you are using the matpower sub components? Since we have a quite exhaustive cost approach using polynomial formulation: https://pandapower.readthedocs.io/en/latest/opf/formulation.html#cost-functions it should also support q.