simopt.solvers.adam

First-order gradient-based optimization of stochastic objective functions.

An algorithm for first-order gradient-based optimization of stochastic objective functions, based on adaptive estimates of lower-order moments.

Module Contents

class simopt.solvers.adam.ADAMConfig

Bases: simopt.base.SolverConfig

Configuration for ADAM solver.

r: Annotated[int, Field(default=30, gt=0, description='number of replications taken at each solution')]
beta_1: Annotated[float, Field(default=0.9, gt=0, lt=1, description='exponential decay of the rate for the first moment estimates')]
beta_2: Annotated[float, Field(default=0.999, lt=1, description='exponential decay rate for the second-moment estimates')]
alpha: Annotated[float, Field(default=0.5, gt=0, description='step size')]
epsilon: Annotated[float, Field(default=1e-08, gt=0, description='a small value to prevent zero-division')]
sensitivity: Annotated[float, Field(default=1e-07, gt=0, description='shrinking scale for variable bounds')]
class simopt.solvers.adam.ADAM(name: str = '', fixed_factors: dict | None = None)

Bases: simopt.base.Solver

First-order gradient-based optimization of stochastic objective functions.

An algorithm for first-order gradient-based optimization of stochastic objective functions, based on adaptive estimates of lower-order moments.

Initialize a solver object.

Parameters:
  • name (str, optional) – Name of the solver. Defaults to an empty string.

  • fixed_factors (dict | None, optional) – Dictionary of user-specified solver factors. Defaults to None.

name: str = 'ADAM'
config_class: ClassVar[type[simopt.base.SolverConfig]]

Configuration class for the solver.

class_name_abbr: ClassVar[str] = 'ADAM'

Short name of the solver class.

class_name: ClassVar[str] = 'ADAM'

Long name of the solver class.

objective_type: ClassVar[simopt.base.ObjectiveType]

Description of objective types.

constraint_type: ClassVar[simopt.base.ConstraintType]

Description of constraint types.

variable_type: ClassVar[simopt.base.VariableType]

Description of variable types.

gradient_needed: ClassVar[bool] = False

True if gradient of objective function is needed, otherwise False.

solve(problem: simopt.base.Problem) None

Run a single macroreplication of a solver on a problem.

Parameters:

problem (Problem) – Simulation-optimization problem to solve.

Returns:

  • list [Solution]: List of solutions recommended throughout the budget.

  • list [int]: List of intermediate budgets when recommended solutions

    change.

Return type:

tuple