Extension points#
Registries#
- class DMDO.Registry(kind, entry_point_group=None)#
Bases:
Generic[T]A case-insensitive name -> component registry with aliases and plugin discovery.
- Parameters:
kind (str)
entry_point_group (Optional[str])
- register(name, component=None, *, aliases=(), override=False)#
Register
componentundername; usable as a decorator whencomponentis omitted.- Parameters:
name (str)
component (T | None)
aliases (Iterable[str])
override (bool)
- canonical_name(name)#
The registered name
nameresolves to (following aliases), or None.- Parameters:
name (str)
- Return type:
str | None
- DMDO.solvers#
Subproblem solver strategies (entry-point group
dmdo.solvers):mads(aliasOMADS),poll,search,scipy.
- DMDO.executors#
Executor factories (entry-point group
dmdo.executors):inprocess(aliasserial),process(aliasparallel).
- DMDO.blackboxes#
Analyses and objectives referenced by name from problem definitions (entry-point group
dmdo.blackboxes).
- DMDO.policies#
Coordination policies (entry-point group
dmdo.policies):none.
- DMDO.register_blackbox(name, component=None, *, override=True)#
Register a callable or discipline so problem definitions can refer to it by
name.- Parameters:
name (str)
component (Callable | None)
override (bool)
Subproblem solvers#
- class DMDO.BaseSolver#
Bases:
objectDefault behaviour shared by solver strategies (see
DMDO.ports.SubproblemSolver).Strategies are stateless: per-subproblem state travels in
SolverRequest.warm_start/SolverOutcome.warm_start, so a strategy instance can be shared, re-created on every solve, or run in another process.- prepare_settings(settings, sp_index, warn)#
Validate / complete the solver-specific settings given in the subproblem definition.
- Parameters:
settings (Dict[str, Any] | None)
sp_index (int)
warn (Callable[[str], None])
- Return type:
Dict[str, Any] | None
- select_config(conf, settings)#
Pick
SolverRequest.configfrom the subproblem’sCONFIGblock and its prepared solver settings.- Parameters:
conf (Dict[str, Any] | None)
settings (Dict[str, Any] | None)
- Return type:
Dict[str, Any] | None
Coordination policies#
- class DMDO.CoordinationPolicy#
Base class of the coordination policies: decides how each multiplier update of the coordinator is scaled. Policies hold no state of their own; they read and write the coordinator they are given.
- compute_scales(coord, iteration)#
Return
(beta_scale, gamma_scale, budget_scale, event)for this outer iteration: the factor applied to the exponent of the penalty growth \(\beta\), the factor applied to the stall threshold \(\gamma\), the factor applied to the inner evaluation budget of the next outer iteration, and a flag that custom policies return asFalse. All factors are1in the base class.
- multiplier_scales(coord, iteration)#
Called by the coordinator before each update: evaluates
compute_scales()and records the applied factors. Returns(beta_scale, gamma_scale, event).
- class DMDO.NeutralPolicy#
The
nonepolicy: the update of Background, unchanged.
- DMDO.policy_for(coord)#
The policy of a coordinator: the one named by its
adaptation_policyoption,noneby default.
Built-in observers#
- class DMDO.CheckpointWriter#
Bases:
RunObserverPickles the run to
<post_dir>/coord_chk.pklat the start of every outer iteration after the first.
- class DMDO.ConsoleReporter#
Bases:
RunObserverPrints and logs one progress line per outer iteration (when the run’s
displayoption is on).