Adding Flexibility/Storage to Matpower case files in PowerModel

Hello, I’m attempting to add flexibility/battery to several nodes in the Matpower IEEE9 bus case file. With this method “% hours
mpc.time_elapsed = 1.0
%% storage data
% storage_bus ps qs energy energy_rating charge_rating discharge_rating charge_efficiency discharge_efficiency thermal_rating qmin qmax r x p_loss p_loss status
mpc.storage = [
5 0.0 0.0 20.0 100.0 50.0 70.0 0.8 0.9 100.0 -50.0 70.0 0.1 0.0 0.0 0.0 1;
7 0.0 0.0 30.0 100.0 50.0 70.0 0.9 0.8 100.0 -50.0 70.0 0.1 0.0 0.0 0.0 1;
];”, I introduced storage.

As a result, whenever I attempted to execute the OPF of the case file, the error "


" appeared. This is my code:
using PowerModel, Ipopt
network_data = PowerModels.parse_file(“case9bb.m”)
result=solve_opf(network_data, ACPPowerModel, Ipopt.Optimizer)
PowerModels.print_summary(result[“solution”])

Have a look at this paper, [2004.14768] A Flexible Storage Model for Power Network Optimization

and this example repo, GitHub - lanl-ansi/energy-storage-example: An example of energy storage optimization using PowerModels

The short answer to the error you are seeing here is that solve_opf does not support storage components. Most likely you want to use solve_mn_opf_strg that solves a multi-period OPF with storage components. There is not great documentation for this but the example repo should be a reasonable guide.

2 Likes

Thank you very much for your answer and suggestion. I attempted to replicate the example in the linked link, but I kept receiving the error "


"

Focus your attention on comp-model.jl (not comp-phase.jl) unless you would like to model distribution systems. This example requires Guorbi to run, but even if you cannot run it, should provide a guide for how to use this feature.

1 Like