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)[源代码]¶
Validate that every line param needed by the constraints is actually present in the loaded CSVs.
Refuses to silently default a missing entry. Each (active line, year) combination MUST have a row in the CSV.
- 参数
model (object) --
- 返回类型
None
- prepshot.model.define_constraints(model)[源代码]¶
Define constraints for the model.
- 参数
model (object) -- Model to be solved.
- 返回类型
None