mp.mm_shared_opf_legacy
- class mp.mm_shared_opf_legacy
Bases:
handle
mp.mm_shared_opf_legacy
- Mixin class for legacy optimal power flow (OPF) math model objects.An abstract mixin class inherited by optimal power flow (OPF) math model objects that need to handle legacy user customization mechanisms.
- Method Summary
- def_set_types_legacy()
- init_set_types_legacy()
- get_mpc(om)
- build_legacy(nm, dm, mpopt)
- add_legacy_user_vars(nm, dm, mpopt)
- add_legacy_user_costs(nm, dm, dc)
- add_legacy_user_constraints(nm, dm, mpopt)
- add_legacy_user_constraints_ac(nm, dm, mpopt)
- add_legacy_cost(om, name, idx, varargin)
add_legacy_cost()
- Add a set of user costs to the modelmm.add_legacy_cost(name, cp) mm.add_legacy_cost(name, idx, varsets) mm.add_legacy_cost(name, idx_list, cp) mm.add_legacy_cost(name, idx_list, cp, varsets)
- eval_legacy_cost(om, x, name, idx)
eval_legacy_cost()
- Evaluate individual or full set of legacy user costs.f = mm.eval_legacy_cost(x ...) [f, df] = mm.eval_legacy_cost(x ...) [f, df, d2f] = mm.eval_legacy_cost(x ...) [f, df, d2f] = mm.eval_legacy_cost(x, name) [f, df, d2f] = mm.eval_legacy_cost(x, name, idx_list)
- params_legacy_cost(om, name, idx)
params_legacy_cost()
- Return cost parameters for legacy user-defined costs.cp = mm.params_legacy_cost() cp = mm.params_legacy_cost(name) cp = mm.params_legacy_cost(name, idx) [cp, vs] = mm.params_legacy_cost(...) [cp, vs, i1, iN] = mm.params_legacy_cost(...)