sddp_pool.hpp file
SDDP-specialised work pool: SDDPTaskKey, SDDPWorkPool, and factory.
This header provides the work-pool specialisation used by the SDDP solver:
SDDPTaskKey– a 4-tuple(iteration, is_backward, phase, is_nonlp)used as the secondary sort key so that forward LP solves in the earliest iteration are always scheduled before backward passes, later iterations, or non-LP tasks.SDDPPassDirection– enum class (forward / backward) for pass direction.SDDPTaskKind– enum class (lp / non_lp) for task kind.make_sddp_task_key()– factory from strong types to SDDPTaskKey tuple.SDDPWorkPool– a concreteBasicWorkPool<SDDPTaskKey>subclass that can be forward-declared asclass SDDPWorkPool;in other headers.make_sddp_work_pool()– a factory that creates, configures, and starts anSDDPWorkPoolwith sensible CPU-aware defaults.
SDDPTaskKey semantics
The tuple (iteration_index, is_backward, phase_index, is_nonlp):
iteration_index: SDDP iteration number (0, 1, …)is_backward: 0 = forward pass, 1 = backward passphase_index: phase within the iteration (0, 1, …)is_nonlp: 0 = LP solve/resolve, 1 = other (e.g. write_lp)
With the default std::less<SDDPTaskKey> lexicographic comparison:
- Lower iteration → higher priority
- Forward (0) → higher priority than backward (1)
- Lower phase → higher priority
- LP solve (0) → higher priority than non-LP (1)
Namespaces
- namespace gtopt
Classes
- class gtopt::SDDPWorkPool
- Work pool specialised for the SDDP solver with tuple priority key.
Defines
- #define SPDLOG_ACTIVE_LEVEL