gtopt/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 concrete BasicWorkPool<SDDPTaskKey> subclass that can be forward-declared as class SDDPWorkPool; in other headers.
  • make_sddp_work_pool() – a factory that creates, configures, and starts an SDDPWorkPool with 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 pass
  • phase_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