SolverTier class
#include <gtopt/solver_tier.hpp>
Tier-2 LP-solve executor.
Owns a non-owning pointer to the solver work pool. A null pool means "no pool available" — solves run directly on the caller thread, matching the legacy fallback behaviour.
Constructors, destructors, conversion operators
- SolverTier() defaulted
- SolverTier(SDDPWorkPool* pool) explicit noexcept
Public functions
- auto pool() const -> SDDPWorkPool* noexcept
- auto resolve_clone_via_pool(LinearInterface& clone, const SolverOptions& opts, const BasicTaskRequirements<SDDPTaskKey>& task_req = {}) -> std::expected<int, Error>
- auto resolve_via_pool(LinearInterface& li, const SolverOptions& opts, const BasicTaskRequirements<SDDPTaskKey>& task_req = {}) -> std::expected<int, Error>
- void set_pool(SDDPWorkPool* pool) noexcept
Function documentation
std::expected<int, Error> gtopt:: SolverTier:: resolve_clone_via_pool(LinearInterface& clone,
const SolverOptions& opts,
const BasicTaskRequirements<SDDPTaskKey>& task_req = {})
Resolve a cloned LP via the work pool. The clone reference is safe because the future is awaited synchronously before this scope exits.
std::expected<int, Error> gtopt:: SolverTier:: resolve_via_pool(LinearInterface& li,
const SolverOptions& opts,
const BasicTaskRequirements<SDDPTaskKey>& task_req = {})
Resolve an LP via the work pool. Falls back to a direct resolve if the pool is unavailable or submission fails.
void gtopt:: SolverTier:: set_pool(SDDPWorkPool* pool) noexcept
Point the tier at a work pool (or nullptr to detach). Called wherever the SDDP method (re)binds its pool.