pypsa.optimization.optimize.OptimizationAccessor.solve_model#
- OptimizationAccessor.solve_model(extra_functionality=None, solver_name='highs', solver_options={}, assign_all_duals=False, **kwargs)#
Solve an already created model and assign its solution to the network.
- Parameters:
solver_name (str) – Name of the solver to use.
solver_options (dict) – Keyword arguments used by the solver. Can also be passed via **kwargs.
assign_all_duals (bool, default False) – Whether to assign all dual values or only those that already have a designated place in the network.
**kwargs – Keyword argument used by linopy.Model.solve, such as solver_name, problem_fn or solver options directly passed to the solver.
- Returns:
status (str) – The status of the optimization, either “ok” or one of the codes listed in https://linopy.readthedocs.io/en/latest/generated/linopy.constants.SolverStatus.html
condition (str) – The termination condition of the optimization, either “optimal” or one of the codes listed in https://linopy.readthedocs.io/en/latest/generated/linopy.constants.TerminationCondition.html