sdom.run_solver#

sdom.run_solver(model, solver_config_dict: dict, case_name: str = 'run') OptimizationResults[source]#

Solve the optimization model and return structured results.

Solves the given optimization model using the configured solver and collects all results into an OptimizationResults dataclass.

Parameters:
  • model (pyomo.core.base.PyomoModel.ConcreteModel) – The Pyomo optimization model to be solved. The model must have an attribute ‘GenMix_Target’ that can be set.

  • solver_config_dict (dict) – Solver configuration dictionary from get_default_solver_config_dict().

  • case_name (str, optional) – Case identifier for labeling results. Defaults to “run”.

Returns:

A dataclass containing all optimization results including: - termination_condition: Solver termination status - total_cost: Objective value - generation_df: Hourly generation dispatch DataFrame - storage_df: Hourly storage operation DataFrame - summary_df: Summary metrics DataFrame - capacity: Installed capacities by technology - storage_capacity: Storage capacities (charge, discharge, energy) - cost_breakdown: Detailed cost breakdown - problem_info: Solver problem information

Return type:

OptimizationResults

Raises:

RuntimeError – If the solver is not available on the system.

Notes

If the solver does not find an optimal solution, the returned OptimizationResults will have is_optimal=False and minimal data populated.