Quick Start Guide

In python, for any net in pandapower or SimBench format, simply by calling pandapower.runpm function you are able to solve wide range of available OPF models, approximations and relaxations, from PowerModels.jl.

runpm(net, julia_file=None, pp_to_pm_callback=None, calculate_voltage_angles=True,
          trafo_model="t", delta=1e-8, trafo3w_losses="hv", check_connectivity=True,
          correct_pm_network_data=True, pm_model="ACPPowerModel", pm_solver="ipopt",
          pm_mip_solver="cbc", pm_nl_solver="ipopt", pm_time_limits=None, pm_log_level=0,
          delete_buffer_file=True, pm_file_path = None, opf_flow_lim="S", pm_tol=1e-8,
          pdm_dev_mode=False, **kwargs)

For example to run semi-definite relaxation of AC-OPF with :

import pandapower as pp
import pandapower.networks as nw

net = nw.example_simple()
pp.runpm(net, pm_model="SDPWRMPowerModel", pm_solver="ipopt", pm_nl_solver="juniper")
exact non-convex modellinear approximationsquadratic approximationsquadratic relaxationssdp relaxations
ACPPowerModelDCPPowerModelDCPLLPowerModelSOCWRPowerModelSDPWRMPowerModel
ACRPowerModelDCMPPowerModelLPACCPowerModelSOCWRConicPowerModelSparseSDPWRMPowerModel
ACTPowerModelBFAPowerModelSOCBFPowerModel
IVRPowerModelNFAPowerModelSOCBFConicPowerModel
QCRMPowerModel
QCLSPowerModel

Different solver options are available in PandaModels. For more information please check the supported solvers by JuMP.jl in here.

solverssupportlicense
Juniper(MI)SOCP, (MI)NLPMIT
IpoptLP, QP, NLPEPL
Cbc(MI)LPEPL
Gurobi(MI)LP, (MI)SOCPComm.

For DC and AC OPF, you can directly call pandapower.runpm_dc_opf and pandapower.runpm_ac_opf, respectively.

For example:

import pandapower as pp
import pandapower.networks as nw

net = nw.example_simple()
pp.runpm_ac_opf(net)

for more details about the settings please see here, also the detailed tutorial is available in Tutorials.