monee solver

monee solver

class monee.solver.GEKKOSolver(solver=1)[source]

Bases: SolverInterface

No docstring provided.

init_branches(branches)[source]
static inject_gekko_vars(gekko_model: gekko.gekko.GEKKO, nodes: list[monee.model.core.Node], branches: list[monee.model.core.Branch], compounds: list[monee.model.core.Compound], network: monee.model.network.Network, ignored_nodes: set)[source]

No docstring provided.

static inject_gekko_vars_attr(gekko: gekko.gekko.GEKKO, target: monee.model.core.GenericModel, id)[source]

No docstring provided.

static inject_nans(target: monee.model.core.GenericModel)[source]

No docstring provided.

process_equations_branches(m, network, branches, ignored_nodes, objs_exprs)[source]

No docstring provided.

process_equations_compounds(m, network, compounds, ignored_nodes)[source]

No docstring provided.

process_equations_nodes_childs(m, network: monee.model.network.Network, nodes, ignored_nodes)[source]

No docstring provided.

process_internal_oxf_components(m, network)[source]

No docstring provided.

process_oxf_components(m, network: monee.model.network.Network, optimization_problem: monee.problem.core.OptimizationProblem)[source]

No docstring provided.

solve(input_network: monee.model.network.Network, optimization_problem: monee.problem.core.OptimizationProblem = None, draw_debug=False, exclude_unconnected_nodes=False)[source]

No docstring provided.

static withdraw_gekko_vars(nodes, branches, compounds, network)[source]

No docstring provided.

static withdraw_gekko_vars_attr(target: monee.model.core.GenericModel)[source]

No docstring provided.

class monee.solver.PyomoSolver[source]

Bases: SolverInterface

init_branches(branches)[source]
static inject_nans(target: monee.model.core.GenericModel)[source]

If a component is ignored, replace its Vars/Consts with NaN placeholders (keeps downstream code from crashing when it tries to read attributes).

static inject_pyomo_vars(pm, nodes, branches, compounds, network, ignored_nodes)[source]
static inject_pyomo_vars_attr(pm: pyomo.core.base.PyomoModel.ConcreteModel, target: monee.model.core.GenericModel, prefix: str)[source]

Replace Var/Const fields on target with Pyomo Var / numeric constants.

process_equations_branches(pm, network, branches, ignored_nodes)[source]
process_equations_compounds(pm, network, compounds, ignored_nodes)[source]
process_equations_nodes_childs(pm, network: monee.model.network.Network, nodes, ignored_nodes)[source]
process_internal_oxf_components(pm, network)[source]
process_oxf_components(pm, network, optimization_problem: monee.problem.core.OptimizationProblem)[source]
solve(input_network: monee.model.network.Network, optimization_problem: monee.problem.core.OptimizationProblem = None, draw_debug: bool = False, exclude_unconnected_nodes: bool = False, solver_name: str = 'gurobi')[source]
static withdraw_pyomo_vars(nodes, branches, compounds, network)[source]
static withdraw_pyomo_vars_attr(target: monee.model.core.GenericModel)[source]

Convert Pyomo Var values back into your Var objects. Constants stay constants.