A Nomad plugin for ropt
The ropt-nomad package extends the
ropt module by providing a plugin that
integrates the MADS optimization algorithm from the
Nomad toolkit. ropt itself is a
robust optimization framework designed for both continuous and discrete
optimization workflows and is extensible through its plugin architecture.
Installing ropt-nomad makes MADS directly available within ropt.
Usage
An optimization by ropt using the plugin works mostly as any other
optimization run. However, there are a few things to consider:
- Gradients are not used, any specifications relating to gradient calculations
in
roptare ignored. - The
convergence_toleranceoptimization parameter, which can be specified in the optimization section is ignored. - Only inequality constraints are supported by
NOMAD. - Linear and non-linear constraints are both supported. Linear constraints are not supported directly, but are internally converted to non-linear constraints.
- Some additional
Nomadoptions can be passed as a list of strings via theoptionsfield in the optimizer configuration. Refer to the documentation of theNomadBackendclass for supported options.
Reference
ropt_nomad.nomad.NomadBackend
Bases: Backend
Nomad optimization backend for ropt.
This class provides an interface to the MADS optimization algorithm from
Nomad,
enabling their its within ropt.
This backend cannot run concurrently in-process
NOMAD keeps the state of a run inside the library rather than in
anything it hands back, so a second run started while the first is still
going corrupts it: NOMAD reports that a subproblem was not found, and
both runs then hang. One optimization after another in the same process
is fine; two at the same time are not. To use this backend alongside
anything else, prefix the method with external/ and it runs in a
process of its own, through the
external backend.
Optimizer output
NOMAD reports its progress from its C++ implementation. How much it says
follows the verbose setting of
BackendConfig, which is mapped onto
NOMAD's DISPLAY_DEGREE; supplying DISPLAY_DEGREE in options
overrides it.
To select the MADS optimizer, set the method field within the
optimizer section of the
EnOptContext configuration object to
mads. Most general options defined in the
EnOptContext object are supported. For
algorithm-specific options, use the options dictionary within the
optimizer section.
The table below lists the MADS-specific options that are supported. Click
on the method name to consult the
Nomad
keyword documentation:
Method-specific Options:
| Method | Options |
|---|---|
| mads | BB_INPUT_TYPE, BB_OUTPUT_TYPE, BB_MAX_BLOCK_SIZE, MAX_BB_EVAL, MAX_EVAL, SEED, LH_SEARCH, DISPLAY_ALL_EVAL, DISPLAY_DEGREE, DISPLAY_STATS |