sdom.initialize_model#

sdom.initialize_model(data, n_hours=8760, with_resilience_constraints=False, model_name='SDOM_Model')[source]#

Initializes and configures a Pyomo optimization model for the SDOM framework. This function sets up the model structure, including sets, parameters, variables, objective function, and constraints for power system optimization. It supports optional resilience constraints and allows customization of the model name and simulation horizon.

Profiling is always enabled: time and memory usage are measured for each initialization step and a summary table is printed at the end. The profiler is attached to the model as model.profiler for programmatic access.

Parameters:
  • data (dict) – Input data required for model initialization, including system parameters, time series, and technology characteristics.

  • n_hours (int, optional) – Number of hours to simulate (default is 8760, representing a full year).

  • with_resilience_constraints (bool, optional) – If True, adds resilience-related constraints to the model (default is False).

  • model_name (str, optional) – Name to assign to the Pyomo model instance (default is “SDOM_Model”).

Returns:

A fully initialized Pyomo ConcreteModel object ready for

optimization. The model includes a ‘profiler’ attribute containing the ModelInitProfiler instance with detailed timing and memory data.

Return type:

ConcreteModel