MonolithicMethod class final
#include <gtopt/monolithic_method.hpp>
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 atapi_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> 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.
- 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).
- bool lp_error
- SolveMode solve_mode
- Monolithic solve mode.
Function documentation
std::expected<int, Error> gtopt:: MonolithicMethod:: solve(PlanningLP& planning_lp,
const SolverOptions& opts) 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.
bool gtopt:: MonolithicMethod:: lp_error
When true, write an error LP file when a cell is infeasible (independent of lp_debug).