Skip to main content

Crate cobre_sddp

Crate cobre_sddp 

Source
Expand description

SDDP solver for hydrothermal dispatch.

Implements the SDDP algorithm: forward/backward passes, Benders cuts, risk measures, convergence monitoring, and policy simulation. Parallelized via rayon (intra-rank) and ferrompi (inter-rank).

Re-exports§

pub use workspace::context;
pub use solve::solver_phase;
pub use convergence::risk_measure;
pub use convergence::stopping_rule;
pub use cut::basis_reconstruct;
pub use cut::cut_selection;
pub use cut::cut_sync;
pub use cut::dcs;
pub use lp::builder as lp_builder;
pub use lp::indexer;
pub use policy::orchestration;
pub use policy::policy_export;
pub use policy::resolved_parameters;
pub use policy::scaling_report;
pub use production::energy_conversion;
pub use production::hydro_models;
pub use stochastic::estimation;
pub use stochastic::inflow_method;
pub use stochastic::lag_transition;
pub use stochastic::noise_key_diag;
pub use training::forward;
pub use training::lower_bound;
pub use config::TrainingConfig;
pub use convergence::convergence::ConvergenceMonitor;
pub use cut::wire::CutWireHeader;
pub use cut::wire::cut_wire_size;
pub use cut::wire::deserialize_cut;
pub use cut::wire::serialize_cut;
pub use cut::CutPool;
pub use cut::FutureCostFunction;
pub use cut::cut_selection::CutSelectionStrategy;
pub use cut::cut_sync::CutSyncBuffers;
pub use cut::row::build_cut_row_batch_into;
pub use production::energy_conversion::EnergyConversionSet;
pub use production::energy_conversion::HydroEnergyProductivityOverride;
pub use error::SddpError;
pub use stochastic::estimation::EstimationPath;
pub use stochastic::estimation::estimate_from_history;
pub use training::forward::SyncResult;
pub use production::hydro_models::FphaFitDeviationEntry;
pub use production::hydro_models::FphaHydroDetail;
pub use production::hydro_models::HydroFitTimings;
pub use production::hydro_models::HydroModelSummary;
pub use production::hydro_models::PrepareHydroModelsResult;
pub use production::hydro_models::ProductionModelSource;
pub use production::hydro_models::build_deviation_summary;
pub use production::hydro_models::build_evaporation_model_rows;
pub use production::hydro_models::build_fpha_deviation_point_rows;
pub use production::hydro_models::build_hydro_model_summary;
pub use production::hydro_models::prepare_hydro_models;
pub use lp::indexer::EquipmentCounts;
pub use lp::indexer::FphaColumnLayout;
pub use lp::indexer::StageIndexer;
pub use stochastic::inflow_method::InflowNonNegativityMethod;
pub use lp::builder::StageTemplates;
pub use lp::builder::build_stage_templates;
pub use policy::policy_load::build_basis_cache_from_checkpoint;
pub use policy::policy_load::inject_boundary_cuts;
pub use policy::policy_load::load_boundary_cuts;
pub use policy::policy_load::validate_policy_compatibility;
pub use policy::provenance::HydroProductionProvenance;
pub use policy::provenance::InflowProvenance;
pub use policy::provenance::ModelProvenanceReport;
pub use policy::provenance::ProvenanceSource;
pub use policy::provenance::build_provenance_report;
pub use convergence::risk_measure::BackwardOutcome;
pub use convergence::risk_measure::RiskMeasure;
pub use setup::DEFAULT_MAX_ITERATIONS;
pub use setup::DEFAULT_SEED;
pub use setup::PrepareStochasticResult;
pub use setup::StudyParams;
pub use setup::StudySetup;
pub use setup::prepare_stochastic;
pub use simulation::ScenarioCategoryCosts;
pub use simulation::SimulationError;
pub use simulation::SimulationHydroResult;
pub use simulation::SimulationScenarioResult;
pub use simulation::SimulationStageResult;
pub use simulation::SimulationSummary;
pub use simulation::aggregate_simulation;
pub use simulation::simulate;
pub use solve::solver_phase::Phase;
pub use solve::solver_phase::BACKWARD_PROFILE;
pub use solve::solver_phase::FORWARD_PROFILE;
pub use solve::solver_phase::SIMULATION_PROFILE;
pub use solver_stats::SOLVER_STATS_DELTA_SCALAR_FIELDS;
pub use solver_stats::SolverStatsDelta;
pub use solver_stats::SolverStatsLogEntry;
pub use solver_stats::delta_to_stats_row;
pub use solver_stats::pack_delta_scalars;
pub use solver_stats::pack_scenario_stats;
pub use solver_stats::solver_stats_log_to_rows;
pub use solver_stats::unpack_delta_scalars;
pub use solver_stats::unpack_scenario_stats;
pub use convergence::stopping_rule::MonitorState;
pub use convergence::stopping_rule::StoppingMode;
pub use convergence::stopping_rule::StoppingRule;
pub use convergence::stopping_rule::StoppingRuleSet;
pub use training::training::TrainingOutcome;
pub use training::training::TrainingResult;
pub use training::training::train;
pub use policy::resolved_parameters::ResolvedParameters;
pub use policy::resolved_parameters::ResolvedParametersError;
pub use policy::resolved_parameters::build_resolved_parameters;
pub use policy::resolved_parameters::deserialize_resolved_parameters;
pub use policy::resolved_parameters::serialize_resolved_parameters;
pub use workspace::workspace::BASIS_BROADCAST_WIRE_VERSION;
pub use workspace::workspace::CapturedBasis;

Modules§

config
Configuration types for the SDDP training loop.
convergence
Convergence monitoring for the SDDP training loop.
cut
Cut management data structures for the SDDP Future Cost Function (FCF).
error
Error types for the cobre-sddp crate.
horizon_mode
Horizon mode abstraction for SDDP stage traversal.
lp
LP-construction cluster: the column/row index map, the generic-constraint lowering, and the stage-template builder that together turn a loaded System into the structural stage LPs every pass solves.
policy
Policy persistence, provenance, and orchestration for the SDDP solver.
production
Production-modeling cluster for the SDDP solver.
setup
Study setup struct that owns all precomputed state for a solve run.
simulation
Simulation types for the SDDP policy evaluation phase.
solve
Shared LP-solve seam used by the training passes (forward, backward) and by simulation.
solver_stats
Per-phase delta of solver counters for LP statistics collection.
stochastic
Inflow/stochastic-estimation cluster for the SDDP solver.
training
SDDP training-phase passes and the iterative training loop.
validate_phases
Metadata for the pre-solver preparation phases exercised by cobre validate.
workspace
Per-thread solver workspaces and the immutable hot-path context structs.

Structs§

ArOrderSummary
Summary of AR order selection across hydro plants.
EstimationReport
Computation-side summary of the AR estimation pipeline.
ExchangeBuffers
Pre-allocated buffers for gathering state vectors across all MPI ranks.
StochasticSummary
Summary of the stochastic preprocessing pipeline for display.
TrajectoryRecord
LP solution for one scenario at one stage, produced by the forward pass.

Enums§

StochasticSource
Source of stochastic data for a given component.

Functions§

build_stochastic_summary
Build a StochasticSummary from the system, stochastic context, and estimation report.
build_training_output
Convert a TrainingResult and collected event log into a TrainingOutput.
estimation_report_to_fitting_report
Convert EstimationReport to FittingReport with entity IDs as strings.
inflow_models_to_annual_component_rows
Convert a slice of cobre_core::scenario::InflowModels to InflowAnnualComponentRows for output to inflow_annual_component.parquet.
inflow_models_to_ar_rows
Convert inflow models to AR coefficient rows (one row per lag).
inflow_models_to_stats_rows
Convert inflow models to seasonal stats rows (one row per model).