monee solver¶
monee solver¶
- class monee.solver.GEKKOSolver(solver=1)[source]¶
Bases:
SolverInterfaceNo docstring provided.
- 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_nodes_childs(m, network: monee.model.network.Network, nodes, ignored_nodes)[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_attr(target: monee.model.core.GenericModel)[source]¶
No docstring provided.
- class monee.solver.PyomoSolver[source]¶
Bases:
SolverInterface- 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_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_nodes_childs(pm, network: monee.model.network.Network, nodes, ignored_nodes)[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_attr(target: monee.model.core.GenericModel)[source]¶
Convert Pyomo Var values back into your Var objects. Constants stay constants.