The package has the following features implemented and ready to use.
OPT
: The nonlinear programming optimization component implements sequential linear programming method for continuous nonlinear optimization. The package currently implements a line search algorithm.OPF
: The AC optimal power flow (AC-OPF) component implements 7 different AC-OPF formulations. These formulations have different sparsities and are a combination of varieties of different approaches of modeling voltages, admittance matrix, and branch flows. The formulations can be solved using theOPT
feature of thePowersense.jl
or using an external NLP solver.
import Pkg
Pkg.add("Powersense")
Consider the following quadratic optimization problem
min x^2 + x
s.t. x^2 - x = 2
This problem can be solved by the following code snippet:
# Load packages
using Powersense, JuMP
using GLPK # can be any LP solver
# Number of variables
n = 1
# Build nonlinear problem model via JuMP
model = Model(optimizer_with_attributes(Powersense.Optimizer, "external_optimizer" => GLPK.Optimizer))
@variable(model, x)
@objective(model, Min, x^2 + x)
@NLconstraint(model, x^2 - x == 2)
# Solve optimization problem with Nlopt
JuMP.optimize!(model)
# Retrieve solution
Xsol = JuMP.value.(X)
Consider solving PNPAPVmodel ACOPF formulations. This can be solved using the following code snippet:
# Load packages
using Powersense, Ipopt
# Build Powersense Data model. Path is the address where PSSE or MATPOWER files are located.
Data = create_PowersenseData(path)
run_opf!(Data, solver = Ipopt.Optimizer, obj_type = :linear, formulation = PNPAPVmodel);
The package is part of the PowerSense Lab which is owned and maintained by Sayed Abdullah Sadat.