DC OPF Setup
The E4ST.jl DC OPF is set up as a cost minimization problem. Costs are added to the objective function and benefits are subtracted. setupdcopf!() adds VOM, Fuel Cost, FOM, Capex, and Curtialment Cost to the objective function. Other terms can be added to the objective in Modifications before the model is optimized. A dictionary of the terms added to the objective function can be found in data[:objvars].
Constraints and expressions can also be defined outside of setup_dcopf!() before the model is optimized. This will also be done in Modifications.
E4ST.setup_dcopf!
— Functionsetup_dcopf!(config, data, model)
Set up a DC OPF problem
Model Mutation Functions
These functions are used to modify the model, specifically creating and adding terms to the objective expression. The Term
abstract type is used to determine how the term (cost or benefit) should be added to the objective function.
E4ST.Term
— Typeabstract type Term
Abstract type Term is used to add variables (terms) to the objective function or other functions. Subtypes include PerMWhGen, PerMWCap, and PerMWhCurtailed.
E4ST.add_obj_term!
— Functionadd_obj_term!(data, model, ::Term, s::Symbol; oper)
Adds or subtracts cost/revenue s
to the objective function of the model
based on the operator oper
. Adds the cost/revenue to the objective variables list in data.
E4ST.add_obj_exp!
— Functionfunction add_obj_exp!(data, model, term::Term, s::Symbol; oper)
Adds expression s (already defined in model) to the objective expression model[:obj]. Adds the name, oper, and type of the term to data[:obj_vars]. The function accepts accepts 1D, 2D, and 3D arrays and sparse arrays where * 1d is assumed to be Y * 2d is assumed to be NxY * 3D is assumed to be NxYxH