pub struct Block {
pub index: usize,
pub name: String,
pub duration_hours: f64,
}Expand description
A load block within a stage, representing a sub-period with uniform demand and generation characteristics.
Blocks partition the stage duration into sub-periods (e.g., peak,
off-peak, shoulder). Block IDs are contiguous within each stage,
starting at 0. The block weight (fraction of stage duration) is
derived from duration_hours and is not stored — it is computed
on demand as duration_hours / sum(all block hours in stage).
Source: stages.json stages[].blocks[].
See Input Scenarios §1.5.
Fields§
§index: usize0-based index within the parent stage.
Matches the id field from stages.json, validated to be
contiguous (0, 1, 2, …, n-1) during loading.
name: StringHuman-readable block label (e.g., “LEVE”, “MEDIA”, “PESADA”).
duration_hours: f64Duration of this block in hours. Must be positive. Validation: the sum of all block hours within a stage must equal the total stage duration in hours. See Input Scenarios §1.10, rule 3.