gtopt::MonolithicMethod class final

Solves each (scene, phase) LP independently using a work pool.

This is the default solver. Each scene's phases are solved sequentially (propagating state variables), but different scenes are solved in parallel via the adaptive work pool.

Monitoring

When enable_api is true and api_status_file is non-empty, the solver writes a JSON status file at api_status_file on completion. The file contains the following indicators:

  • "total_scenes": total number of scenes to process.
  • "scenes_done": number of scenes solved (incremented per scene).
  • "scene_times": wall-clock time in seconds for each scene.
  • "elapsed_s": total wall time since solve() was called.
  • "status": "done" on completion.
  • "realtime": rolling CPU-load and active-worker history sampled by a background thread at api_update_interval.

Base classes

class PlanningMethod
Abstract interface for planning problem solvers.

Public functions

auto solve(PlanningLP& planning_lp, const SolverOptions& opts) -> std::expected< int, Error > -> auto override
Solve the planning problem.

Public variables

std::string api_status_file
Path for the JSON status file (empty = no file written).
std::chrono::milliseconds api_update_interval
Interval between background monitoring samples.
std::string boundary_cuts_file
CSV file with boundary (future-cost) cuts (empty = none).
BoundaryCutsMode boundary_cuts_mode
Boundary cuts load mode.
int boundary_max_iterations
Maximum iterations to load from boundary cuts file (0 = all).
bool enable_api
When true, write a JSON status file after solving completes.
bool lp_debug
When true, write LP debug files to lp_debug_directory before solving.
std::string lp_debug_compression
std::string lp_debug_directory
Directory for LP debug files (used when lp_debug is true).
OptInt lp_debug_phase_max
OptInt lp_debug_phase_min
OptInt lp_debug_scene_max
OptInt lp_debug_scene_min
Selective LP debug filters (same semantics as PlanningOptions).
SolveMode solve_mode
Monolithic solve mode.

Function documentation

auto gtopt::MonolithicMethod::solve(PlanningLP& planning_lp, const SolverOptions& opts) -> std::expected< int, Error > override

Solve the planning problem.

Parameters
planning_lp The LP model to solve (modified in place)
opts Solver options for individual LP subproblems
Returns Number of scenes processed, or an error

Variable documentation

std::string gtopt::MonolithicMethod::lp_debug_compression

Compression format for LP debug files ("gzip" / "uncompressed" / ""). Empty or "uncompressed" means no compression; any other value uses gzip.