model

This module defines the PREP-SHOT model. The model is created using the pyoptinterface library.

prepshot.model.create_model(params)[源代码]

Create the PREP-SHOT model.

参数

params (dict) -- Dictionary of parameters for the model.

返回

Model object.

返回类型

object

prepshot.model.define_active_zone_tech(model)[源代码]

Pull the sparse (zone, tech) set from model.params (built once at file-read time by load_data.compute_active_zone_tech) and derive the time-indexed key lists used by the constraint builders.

The (zone, tech) set itself is data-property (depends only on existing_fleet + expansion_candidates), so we compute it in load_data and reuse it unchanged across every PCM window. The (h, m, y, z, te) lists DO depend on the per-window time index sets, so they're materialised here.

参数

model (object) --

返回类型

None

prepshot.model.define_basic_sets(model)[源代码]

Define sets for the model.

参数

model (object) -- Model object to be solved.

返回类型

None

prepshot.model.define_complex_sets(model)[源代码]

Pad transmission_line_efficiency for the active line set.

A few constraint rules read efficiency[z1, z2] for every line in active_lines; if the input CSV omits a line that DOES appear in transmission_existing (rare but possible), default its efficiency to 0. We no longer pad the dense zone x zone product -- the active-line set is sparse, so padding only touches the real lines.

参数

model (object) --

返回类型

None

prepshot.model.define_constraints(model)[源代码]

Define constraints for the model.

参数

model (object) -- Model to be solved.

返回类型

None

prepshot.model.define_model(params)[源代码]

This function creates the model class depending on predefined solver.

参数

params (dict) -- parameters for the model

返回

A pyoptinterface Model object depending on the solver

返回类型

object

抛出

ValueError -- Unsupported or undefined solver

prepshot.model.define_variables(model)[源代码]

Define variables for the model.

参数

model (object) -- Model to be solved.

返回类型

None