Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Output Format Reference

This page is the exhaustive schema reference for every file produced by cobre run. It documents column names, Arrow data types, nullability, JSON field structures, and binary format layouts for all 10 Parquet schemas, the two manifest types, the training metadata file, the five dictionary files, and the policy checkpoint format.

If you are new to Cobre output, start with Understanding Results first. That page explains what each file means conceptually and shows how to read results programmatically. This page is for readers who need the precise schema definition — for writing parsers, building dashboards, or implementing compatibility checks.


Output Directory Tree

A complete cobre run produces the following directory structure. Not every entity directory appears in every run: cobre run only writes directories for entity types present in the case. For example, a case with no pumping stations will not produce simulation/pumping_stations/.

<output_dir>/
  training/
    _manifest.json
    metadata.json
    convergence.parquet
    dictionaries/
      codes.json
      entities.csv
      variables.csv
      bounds.parquet
      state_dictionary.json
    timing/
      iterations.parquet
      mpi_ranks.parquet
  policy/
    cuts/
      stage_000.bin
      stage_001.bin
      ...
      stage_NNN.bin
    basis/
      stage_000.bin
      stage_001.bin
      ...
      stage_NNN.bin
    metadata.json
  simulation/
    _manifest.json
    costs/
      scenario_id=0000/
        data.parquet
      scenario_id=0001/
        data.parquet
      ...
    hydros/
      scenario_id=0000/data.parquet
      ...
    thermals/
      scenario_id=0000/data.parquet
      ...
    exchanges/
      scenario_id=0000/data.parquet
      ...
    buses/
      scenario_id=0000/data.parquet
      ...
    pumping_stations/
      scenario_id=0000/data.parquet
      ...
    contracts/
      scenario_id=0000/data.parquet
      ...
    non_controllables/
      scenario_id=0000/data.parquet
      ...
    inflow_lags/
      scenario_id=0000/data.parquet
      ...
    violations/
      generic/
        scenario_id=0000/data.parquet
        ...

Training Output

training/_manifest.json

The training manifest is written atomically at the end of the training run (and updated on each checkpoint if checkpointing is enabled). Consumers should read status before interpreting any other field.

JSON structure:

{
  "version": "2.0.0",
  "status": "complete",
  "started_at": "2026-01-17T08:00:00Z",
  "completed_at": "2026-01-17T12:30:00Z",
  "iterations": {
    "max_iterations": 200,
    "completed": 128,
    "converged_at": null
  },
  "convergence": {
    "achieved": false,
    "final_gap_percent": 0.45,
    "termination_reason": "iteration_limit"
  },
  "cuts": {
    "total_generated": 1250000,
    "total_active": 980000,
    "peak_active": 1100000
  },
  "checksum": null,
  "mpi_info": {
    "world_size": 1,
    "ranks_participated": 1
  }
}

Field reference:

FieldTypeNullableDescription
versionstringNoManifest schema version. Current value: "2.0.0".
statusstringNoRun status: "running", "complete", "failed", or "converged".
started_atstringYesISO 8601 timestamp when training started. null in minimal viable version.
completed_atstringYesISO 8601 timestamp when training finished. null while running.
iterations.max_iterationsintegerYesMaximum iterations allowed by the iteration-limit stopping rule. null if no limit was configured.
iterations.completedintegerNoNumber of training iterations that finished.
iterations.converged_atintegerYesIteration number at which a convergence stopping rule triggered termination. null if training was terminated by a safety limit (e.g. iteration limit).
convergence.achievedbooleanNotrue if a convergence-oriented stopping rule terminated the run.
convergence.final_gap_percentnumberYesOptimality gap between lower and upper bounds at termination, expressed as a percentage. null when upper bound evaluation is disabled.
convergence.termination_reasonstringNoMachine-readable termination label. Common values: "iteration_limit", "bound_stalling".
cuts.total_generatedintegerNoTotal Benders cuts generated across all stages and iterations.
cuts.total_activeintegerNoCuts still active in the pool at termination.
cuts.peak_activeintegerNoMaximum number of simultaneously active cuts at any point during training.
checksumobjectYesIntegrity checksum over policy and convergence files. null in current release (deferred).
mpi_info.world_sizeintegerNoTotal number of MPI ranks. 1 for single-process runs.
mpi_info.ranks_participatedintegerNoNumber of MPI ranks that wrote data.

training/metadata.json

The metadata file captures the configuration snapshot, problem dimensions, performance summary, data integrity hashes, and runtime environment for reproducibility and audit purposes. Fields marked “deferred” are null in the current release and will be populated in a future minor version.

Top-level structure:

{
  "version": "2.0.0",
  "run_info": { ... },
  "configuration_snapshot": { ... },
  "problem_dimensions": { ... },
  "performance_summary": null,
  "data_integrity": null,
  "environment": { ... }
}

run_info fields:

FieldTypeNullableDescription
run_idstringNoUnique run identifier. Placeholder value in current release.
started_atstringYesISO 8601 start timestamp.
completed_atstringYesISO 8601 completion timestamp.
duration_secondsnumberYesTotal run duration in seconds.
cobre_versionstringNoVersion of the cobre binary that produced this output (from CARGO_PKG_VERSION).
solverstringYesLP solver backend identifier (e.g. "highs").
solver_versionstringYesLP solver library version string.
hostnamestringYesPrimary compute node hostname. null in current release.
userstringYesUsername that initiated the run. null in current release.

configuration_snapshot fields:

FieldTypeNullableDescription
seedintegerYesRandom seed used for scenario generation.
forward_passesintegerYesNumber of forward-pass scenario trajectories per iteration.
stopping_modestringNoHow multiple stopping rules combine: "any" or "all".
policy_modestringNoPolicy warm-start mode: "fresh" or "resume".

problem_dimensions fields:

FieldTypeNullableDescription
num_stagesintegerNoNumber of stages in the planning horizon.
num_hydrosintegerNoTotal number of hydro plants.
num_thermalsintegerNoTotal number of thermal plants.
num_busesintegerNoTotal number of buses.
num_linesintegerNoTotal number of transmission lines.

performance_summary: Deferred. Always null in the current release. Will contain total_lp_solves, avg_lp_time_us, median_lp_time_us, p99_lp_time_us, and peak_memory_mb when implemented.

data_integrity: Deferred. Always null in the current release. Will contain SHA-256 hashes of input files, config, policy, and convergence data when implemented.

environment fields:

FieldTypeNullableDescription
mpi_implementationstringYesMPI implementation name (e.g. "OpenMPI"). null in current release.
mpi_versionstringYesMPI library version. null in current release.
num_ranksintegerYesNumber of MPI ranks. null in current release.
cpus_per_rankintegerYesCPU cores per rank. null in current release.
memory_per_rank_gbnumberYesMemory per rank in gigabytes. null in current release.

training/convergence.parquet

Per-iteration convergence log. One row per training iteration. 13 columns.

ColumnTypeNullableDescription
iterationInt32NoTraining iteration number (1-based).
lower_boundFloat64NoBest proven lower bound on the minimum expected cost after this iteration.
upper_bound_meanFloat64NoMean upper bound estimate from the forward-pass scenarios in this iteration.
upper_bound_stdFloat64NoStandard deviation of the upper bound estimate across forward-pass scenarios.
gap_percentFloat64YesRelative gap between lower and upper bounds as a percentage. null when the lower bound is zero or negative.
cuts_addedInt32NoNumber of new cuts added to the pool during this iteration’s backward pass.
cuts_removedInt32NoNumber of cuts deactivated by the cut selection strategy in this iteration.
cuts_activeInt64NoTotal number of active cuts across all stages at the end of this iteration.
time_forward_msInt64NoWall-clock time spent in the forward pass, in milliseconds.
time_backward_msInt64NoWall-clock time spent in the backward pass, in milliseconds.
time_total_msInt64NoTotal wall-clock time for this iteration, in milliseconds.
forward_passesInt32NoNumber of forward-pass scenario trajectories evaluated in this iteration.
lp_solvesInt64NoTotal number of LP solves across all stages and forward passes in this iteration.

training/timing/iterations.parquet

Per-iteration wall-clock timing breakdown by phase. One row per training iteration. 10 columns. All columns are non-nullable.

ColumnTypeNullableDescription
iterationInt32NoTraining iteration number (1-based).
forward_solve_msInt64NoTime spent solving LPs during the forward pass.
forward_sample_msInt64NoTime spent sampling scenarios and computing inflows during the forward pass.
backward_solve_msInt64NoTime spent solving LPs during the backward pass.
backward_cut_msInt64NoTime spent constructing and adding Benders cuts during the backward pass.
cut_selection_msInt64NoTime spent running the cut selection strategy.
mpi_allreduce_msInt64NoTime spent in MPI allreduce operations (cut coefficient aggregation).
mpi_broadcast_msInt64NoTime spent in MPI broadcast operations (cut distribution).
io_write_msInt64NoTime spent writing Parquet and JSON files.
overhead_msInt64NoRemaining wall-clock time not attributed to the above phases.

training/timing/mpi_ranks.parquet

Per-iteration, per-rank timing statistics for distributed runs. One row per (iteration, rank) pair. 8 columns. All columns are non-nullable.

ColumnTypeNullableDescription
iterationInt32NoTraining iteration number (1-based).
rankInt32NoMPI rank index (0-based).
forward_time_msInt64NoWall-clock time this rank spent in the forward pass.
backward_time_msInt64NoWall-clock time this rank spent in the backward pass.
communication_time_msInt64NoWall-clock time this rank spent in MPI communication.
idle_time_msInt64NoWall-clock time this rank was idle (waiting for other ranks).
lp_solvesInt64NoNumber of LP solves performed by this rank in this iteration.
scenarios_processedInt32NoNumber of scenario trajectories processed by this rank.

training/dictionaries/

Five self-documenting files that allow output Parquet files to be interpreted without reference to the original input case. All files are written atomically.

codes.json

Static mapping from integer codes to human-readable labels for all categorical fields used in Parquet output. The same mapping applies for the lifetime of a release (the version field tracks breaking changes).

{
  "version": "1.0",
  "generated_at": "2026-01-17T08:00:00Z",
  "operative_state": {
    "0": "deactivated",
    "1": "maintenance",
    "2": "operating",
    "3": "saturated"
  },
  "storage_binding": {
    "0": "none",
    "1": "below_minimum",
    "2": "above_maximum",
    "3": "both"
  },
  "contract_type": {
    "0": "import",
    "1": "export"
  },
  "entity_type": {
    "0": "hydro",
    "1": "thermal",
    "2": "bus",
    "3": "line",
    "4": "pumping_station",
    "5": "contract",
    "7": "non_controllable"
  },
  "bound_type": {
    "0": "storage_min",
    "1": "storage_max",
    "2": "turbined_min",
    "3": "turbined_max",
    "4": "outflow_min",
    "5": "outflow_max",
    "6": "generation_min",
    "7": "generation_max",
    "8": "flow_min",
    "9": "flow_max"
  }
}

entities.csv

One row per entity across all entity types. Columns:

ColumnDescription
entity_type_codeInteger entity type code (see codes.json entity_type mapping).
entity_idInteger entity ID matching the *_id column in the corresponding simulation Parquet file.
nameHuman-readable entity name from the case input files.
bus_idInteger bus ID to which this entity is connected. For buses, equals entity_id.
system_idSystem partition index. Always 0 in the current release (single-system cases).

Rows are ordered by entity_type_code ascending, then by entity_id ascending within each type.

variables.csv

One row per output column across all Parquet schemas. Documents every column name, its parent schema, and its unit of measure. Useful for building generic result readers that do not hard-code column names.

ColumnDescription
schemaName of the Parquet schema this column belongs to (e.g. "hydros", "costs").
column_nameExact column name as it appears in the Parquet file.
arrow_typeArrow data type string (e.g. "Int32", "Float64", "Boolean").
nullable"true" or "false".
unitPhysical unit or "code" for categorical fields, "boolean" for flag fields, "id" for identifiers, "dimensionless" for pure ratios.
descriptionShort description of the column’s meaning.

bounds.parquet

Per-entity, per-stage resolved LP variable bounds. Documents the actual numerical bounds used in each LP solve, after applying the three-tier penalty resolution (global / entity / stage overrides).

ColumnTypeNullableDescription
entity_type_codeInt8NoEntity type code (see codes.json).
entity_idInt32NoEntity ID.
stage_idInt32NoStage index (0-based).
bound_type_codeInt8NoBound type code (see codes.json bound_type mapping).
lower_boundFloat64NoResolved lower bound value in the bound’s natural unit.
upper_boundFloat64NoResolved upper bound value in the bound’s natural unit.

state_dictionary.json

Describes the state space structure used by the algorithm: which entities have state variables, how many state dimensions they contribute, and what units apply. Useful for interpreting cut coefficient vectors in the policy checkpoint.

{
  "version": "1.0",
  "state_dimension": 164,
  "storage_states": [
    { "hydro_id": 0, "dimension_index": 0, "unit": "hm3" },
    { "hydro_id": 1, "dimension_index": 1, "unit": "hm3" }
  ],
  "inflow_lag_states": [
    { "hydro_id": 0, "lag_index": 1, "dimension_index": 2, "unit": "m3s" }
  ]
}
FieldDescription
state_dimensionTotal number of state variables. Equals the length of each cut’s coefficient vector in the policy checkpoint.
storage_statesOne entry per hydro plant that contributes a reservoir storage state variable.
storage_states[].hydro_idHydro plant ID.
storage_states[].dimension_index0-based index of this state variable in the coefficient vector.
storage_states[].unitPhysical unit: always "hm3" (hectare-metres cubed).
inflow_lag_statesOne entry per (hydro, lag) pair that contributes an inflow lag state variable.
inflow_lag_states[].hydro_idHydro plant ID.
inflow_lag_states[].lag_indexAutoregressive lag order (1-based).
inflow_lag_states[].dimension_index0-based index in the coefficient vector.
inflow_lag_states[].unitPhysical unit: always "m3s" (cubic metres per second).

Policy Checkpoint

policy/cuts/stage_NNN.bin

FlatBuffers binary file encoding all cuts for a single stage. One file per stage; file names are zero-padded to three digits (e.g. stage_000.bin, stage_012.bin).

The binary is not human-readable. The logical record structure for each cut contained in the file is:

FieldTypeDescription
cut_iduint64Unique identifier for this cut across all iterations. Assigned monotonically by the training loop.
slot_indexuint32LP row position. Required for checkpoint reproducibility and basis warm-starting.
iterationuint32Training iteration that generated this cut.
forward_pass_indexuint32Forward pass index within the generating iteration.
interceptfloat64Pre-computed cut intercept: alpha - beta' * x_hat, where x_hat is the state at the generating forward pass node.
coefficientsfloat64[]Gradient coefficient vector. Length equals state_dimension from state_dictionary.json.
is_activeboolWhether this cut is currently active in the LP. Inactive cuts are retained for potential reactivation by the cut selection strategy.
domination_countuint32Cut selection bookkeeping counter. Number of times this cut has been dominated without being selected.

The encoding uses the FlatBuffers runtime builder API (little-endian, no reflection, no generated code). Field order in the binary matches the declaration order above.

policy/basis/stage_NNN.bin

FlatBuffers binary file encoding the LP simplex basis checkpoint for a single stage. One file per stage. Used to warm-start LP solves when resuming a study.

The logical record structure is:

FieldTypeDescription
stage_iduint32Stage index (0-based).
iterationuint32Training iteration that produced this basis.
column_statusuint8[]One status code per LP column (variable). Encoding is HiGHS-specific.
row_statusuint8[]One status code per LP row (constraint). Encoding is HiGHS-specific.
num_cut_rowsuint32Number of trailing rows in row_status that correspond to cut rows (as opposed to structural constraints).

policy/metadata.json

Small JSON file describing the checkpoint at a high level. Human-readable and intended for compatibility checking on study resume.

FieldTypeNullableDescription
versionstringNoCheckpoint schema version.
cobre_versionstringNoVersion of the cobre binary that wrote this checkpoint.
created_atstringNoISO 8601 timestamp when the checkpoint was written.
completed_iterationsintegerNoNumber of training iterations completed at checkpoint time.
final_lower_boundnumberNoLower bound value after the final completed iteration.
best_upper_boundnumberYesBest upper bound observed during training. null when upper bound evaluation was disabled.
state_dimensionintegerNoLength of each cut’s coefficient vector. Must match state_dictionary.json.
num_stagesintegerNoNumber of stages. Must match the case configuration on resume.
config_hashstringNoHash of the algorithm configuration. Checked against the current config on resume.
system_hashstringNoHash of the system data. Checked against the current system on resume.
max_iterationsintegerNoMaximum iterations configured for the run.
forward_passesintegerNoNumber of forward passes per iteration configured for the run.
warm_start_cutsintegerNoNumber of cuts loaded from a previous policy at run start. 0 for fresh runs.
rng_seedintegerNoRNG seed used by the scenario sampler. Required for reproducibility.

Simulation Output

All simulation results use Hive partitioning: one data.parquet file per scenario stored in a scenario_id=NNNN/ subdirectory. See Hive Partitioning below for how to read these files.

simulation/costs/

Stage and block-level cost breakdown. One row per (stage, block) pair. 20 columns.

ColumnTypeNullableDescription
stage_idInt32NoStage index (0-based).
block_idInt32YesLoad block index within the stage. null for stage-level (non-block) records.
total_costFloat64NoTotal discounted cost for this stage/block (monetary units).
immediate_costFloat64NoImmediate (undiscounted) cost for this stage/block.
future_costFloat64NoFuture cost estimate (Benders cut value) at the end of this stage.
discount_factorFloat64NoDiscount factor applied to this stage’s costs.
thermal_costFloat64NoThermal generation cost component.
contract_costFloat64NoEnergy contract cost component (positive for imports, negative for exports).
deficit_costFloat64NoCost of unserved load (deficit penalty).
excess_costFloat64NoCost of excess generation (excess penalty).
storage_violation_costFloat64NoCost of reservoir storage bound violations.
filling_target_costFloat64NoCost of missing reservoir filling targets.
hydro_violation_costFloat64NoCost of hydro operational bound violations.
inflow_penalty_costFloat64NoCost of inflow non-negativity slack (numerical penalty).
generic_violation_costFloat64NoCost of generic constraint violations.
spillage_costFloat64NoCost of reservoir spillage.
fpha_turbined_costFloat64NoTurbined flow penalty from the future-production hydro approximation.
curtailment_costFloat64NoCost of non-controllable source curtailment.
exchange_costFloat64NoTransmission exchange cost component.
pumping_costFloat64NoPumping station energy cost component.

simulation/hydros/

Hydro plant dispatch results. One row per (stage, block, hydro) triplet. 28 columns.

ColumnTypeNullableDescription
stage_idInt32NoStage index (0-based).
block_idInt32YesLoad block index. null for stage-level records.
hydro_idInt32NoHydro plant ID.
turbined_m3sFloat64NoTurbined flow in cubic metres per second (m³/s).
spillage_m3sFloat64NoSpilled flow in m³/s.
outflow_m3sFloat64NoTotal outflow (turbined + spilled) in m³/s.
evaporation_m3sFloat64YesEvaporation loss in m³/s. null if evaporation is not modelled for this plant.
diverted_inflow_m3sFloat64YesDiverted inflow to this reservoir in m³/s. null if no diversion is configured.
diverted_outflow_m3sFloat64YesDiverted outflow from this reservoir in m³/s. null if no diversion is configured.
incremental_inflow_m3sFloat64NoNatural incremental inflow to this reservoir in m³/s (excluding upstream contributions).
inflow_m3sFloat64NoTotal inflow to this reservoir in m³/s (including upstream contributions).
storage_initial_hm3Float64NoReservoir storage at the start of the stage in hectare-metres cubed (hm³).
storage_final_hm3Float64NoReservoir storage at the end of the stage in hm³.
generation_mwFloat64NoAverage power generation over the block in megawatts (MW).
generation_mwhFloat64NoTotal energy generated over the block in megawatt-hours (MWh).
productivity_mw_per_m3sFloat64YesEffective productivity factor in MW/(m³/s). null for fixed-productivity plants when productivity is not stage-varying.
spillage_costFloat64NoMonetary cost attributed to spillage.
water_value_per_hm3Float64NoShadow price of the reservoir water balance constraint (monetary units per hm³).
storage_binding_codeInt8NoWhether the storage bounds were binding (see codes.json storage_binding mapping).
operative_state_codeInt8NoOperative state code (see codes.json operative_state mapping).
turbined_slack_m3sFloat64NoTurbined flow slack variable (non-negativity enforcement). Zero under normal operation.
outflow_slack_below_m3sFloat64NoOutflow lower-bound slack in m³/s.
outflow_slack_above_m3sFloat64NoOutflow upper-bound slack in m³/s.
generation_slack_mwFloat64NoGeneration bound slack in MW.
storage_violation_below_hm3Float64NoReservoir storage below-minimum violation in hm³. Zero under feasible operation.
filling_target_violation_hm3Float64NoFilling target miss in hm³. Zero when the target is met.
evaporation_violation_m3sFloat64NoEvaporation non-negativity violation in m³/s. Zero under normal operation.
inflow_nonnegativity_slack_m3sFloat64NoInflow non-negativity slack in m³/s. Zero under normal operation.

simulation/thermals/

Thermal unit dispatch results. One row per (stage, block, thermal) triplet. 10 columns.

ColumnTypeNullableDescription
stage_idInt32NoStage index (0-based).
block_idInt32YesLoad block index. null for stage-level records.
thermal_idInt32NoThermal unit ID.
generation_mwFloat64NoAverage power generation over the block in MW.
generation_mwhFloat64NoTotal energy generated over the block in MWh.
generation_costFloat64NoMonetary generation cost for this block.
is_gnlBooleanNotrue if this unit operates under GNL (gas natural liquefied) pricing rules.
gnl_committed_mwFloat64YesCommitted capacity under GNL mode in MW. null for non-GNL units.
gnl_decision_mwFloat64YesDispatch decision under GNL mode in MW. null for non-GNL units.
operative_state_codeInt8NoOperative state code (see codes.json operative_state mapping).

simulation/exchanges/

Transmission line flow results. One row per (stage, block, line) triplet. 11 columns.

ColumnTypeNullableDescription
stage_idInt32NoStage index (0-based).
block_idInt32YesLoad block index. null for stage-level records.
line_idInt32NoTransmission line ID.
direct_flow_mwFloat64NoFlow in the forward (direct) direction in MW.
reverse_flow_mwFloat64NoFlow in the reverse direction in MW.
net_flow_mwFloat64NoNet flow (direct minus reverse) in MW.
net_flow_mwhFloat64NoNet energy flow over the block in MWh.
losses_mwFloat64NoTransmission losses in MW.
losses_mwhFloat64NoTransmission losses in MWh over the block.
exchange_costFloat64NoMonetary cost attributed to this line’s exchange.
operative_state_codeInt8NoOperative state code (see codes.json operative_state mapping).

simulation/buses/

Bus load balance results. One row per (stage, block, bus) triplet. 10 columns.

ColumnTypeNullableDescription
stage_idInt32NoStage index (0-based).
block_idInt32YesLoad block index. null for stage-level records.
bus_idInt32NoBus ID.
load_mwFloat64NoTotal load demand at this bus in MW.
load_mwhFloat64NoTotal load energy demand over the block in MWh.
deficit_mwFloat64NoUnserved load (deficit) at this bus in MW. Zero under feasible dispatch.
deficit_mwhFloat64NoUnserved load energy over the block in MWh.
excess_mwFloat64NoExcess generation at this bus in MW. Zero under feasible dispatch.
excess_mwhFloat64NoExcess generation energy over the block in MWh.
spot_priceFloat64NoLocational marginal price (shadow price of the power balance constraint) in monetary units per MWh.

simulation/pumping_stations/

Pumping station results. One row per (stage, block, pumping station) triplet. 9 columns.

ColumnTypeNullableDescription
stage_idInt32NoStage index (0-based).
block_idInt32YesLoad block index. null for stage-level records.
pumping_station_idInt32NoPumping station ID.
pumped_flow_m3sFloat64NoPumped flow rate in m³/s.
pumped_volume_hm3Float64NoTotal pumped volume over the stage in hm³.
power_consumption_mwFloat64NoPower consumed by the pumping station in MW.
energy_consumption_mwhFloat64NoEnergy consumed over the block in MWh.
pumping_costFloat64NoMonetary cost of pumping energy.
operative_state_codeInt8NoOperative state code (see codes.json operative_state mapping).

simulation/contracts/

Energy contract results. One row per (stage, block, contract) triplet. 8 columns.

ColumnTypeNullableDescription
stage_idInt32NoStage index (0-based).
block_idInt32YesLoad block index. null for stage-level records.
contract_idInt32NoContract ID.
power_mwFloat64NoContracted power in MW. Positive for imports, negative for exports.
energy_mwhFloat64NoContracted energy over the block in MWh.
price_per_mwhFloat64NoContract price in monetary units per MWh.
total_costFloat64NoTotal contract cost for this block. Positive for imports.
operative_state_codeInt8NoOperative state code (see codes.json operative_state mapping).

simulation/non_controllables/

Non-controllable source results (wind, solar, run-of-river hydro without storage, etc.). One row per (stage, block, non-controllable) triplet. 10 columns.

ColumnTypeNullableDescription
stage_idInt32NoStage index (0-based).
block_idInt32YesLoad block index. null for stage-level records.
non_controllable_idInt32NoNon-controllable source ID.
generation_mwFloat64NoActual generation dispatched in MW.
generation_mwhFloat64NoActual energy generated over the block in MWh.
available_mwFloat64NoMaximum available generation in MW (before curtailment).
curtailment_mwFloat64NoGeneration curtailed in MW. Zero when all available generation is dispatched.
curtailment_mwhFloat64NoCurtailed energy over the block in MWh.
curtailment_costFloat64NoMonetary cost attributed to curtailment.
operative_state_codeInt8NoOperative state code (see codes.json operative_state mapping).

simulation/inflow_lags/

Autoregressive inflow lag state variables. One row per (stage, hydro, lag) triplet. No block dimension — inflow lags are stage-level state variables. 4 columns. All columns are non-nullable.

ColumnTypeNullableDescription
stage_idInt32NoStage index (0-based).
hydro_idInt32NoHydro plant ID.
lag_indexInt32NoAutoregressive lag order (1-based). Lag 1 is the previous stage’s inflow.
inflow_m3sFloat64NoInflow value for this lag in m³/s.

simulation/violations/generic/

Generic user-defined constraint violations. One row per (stage, block, constraint) triplet where a violation occurred. 5 columns.

ColumnTypeNullableDescription
stage_idInt32NoStage index (0-based).
block_idInt32YesLoad block index. null for stage-level constraints.
constraint_idInt32NoConstraint ID as defined in the case input files.
slack_valueFloat64NoViolation magnitude in the constraint’s natural unit. Zero means no violation.
slack_costFloat64NoMonetary cost attributed to this violation.

Hive Partitioning

All simulation Parquet output uses Hive partitioning: results for each scenario are stored in a directory named scenario_id=NNNN/ containing a single data.parquet file. The scenario_id column is encoded in the directory name, not as a column inside the Parquet file.

All major columnar data tools understand this layout and can read an entire simulation/<entity>/ directory as a single table with an automatically inferred scenario_id column:

# Polars — reads all scenarios at once, infers scenario_id from directory names
import polars as pl
df = pl.read_parquet("results/simulation/costs/")
print(df.head())
# Pandas with PyArrow backend
import pandas as pd
df = pd.read_parquet("results/simulation/costs/")
-- DuckDB — filter to a specific scenario at the storage layer
SELECT * FROM read_parquet('results/simulation/costs/**/*.parquet')
WHERE scenario_id = 0;
# R with the arrow package
library(arrow)
ds <- open_dataset("results/simulation/costs/")
dplyr::collect(dplyr::filter(ds, scenario_id == 0))

Scenario IDs are zero-based integers. The total number of scenarios is documented in simulation/_manifest.json under scenarios.total.


Manifest Files

Both training/_manifest.json and simulation/_manifest.json follow the same write protocol:

  1. Serialize JSON to a temporary .json.tmp sibling file.
  2. Atomically rename the .tmp file to the target path.

This ensures consumers never observe a partial manifest. If a manifest file exists, it contains a complete JSON document. If a run is interrupted before the final manifest write, the .tmp file may remain but the manifest itself will reflect the last successful checkpoint, not a partial write.

The status field is always the first indicator to check:

StatusMeaning
"running"The run is in progress or was interrupted without writing a final status.
"complete"The run finished normally. All output files are present.
"converged"Training terminated because a convergence stopping rule was satisfied. (Training manifest only.)
"failed"The run encountered a terminal error. Output files up to the failure point are present.
"partial"Not all scenarios completed. (Simulation manifest only.)

cobre report reads both manifests and training/metadata.json and prints a combined JSON summary to stdout. Use it in CI pipelines or shell scripts to inspect outcomes without parsing JSON directly:

# Extract the termination reason
cobre report results/ | jq '.training.convergence.termination_reason'

# Fail a CI job if the run did not complete
status=$(cobre report results/ | jq -r '.status')
[ "$status" = "complete" ] || exit 1