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 frommodel.params(built once at file-read time byload_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 inload_dataand 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_efficiencyfor the active line set.A few constraint rules read
efficiency[z1, z2]for every line inactive_lines; if the input CSV omits a line that DOES appear intransmission_existing(rare but possible), default its efficiency to 0. We no longer pad the densezone x zoneproduct -- 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