Constants
Constants represent fixed inputs passed to the objective function that do not vary during optimization.
Each entry in VOCS.constants is a key–value pair where:
key — constant name (string)
value — a shorthand or longhand definition.
Examples
Shorthand forms:
from gest_api.vocs import VOCS
vocs = VOCS(constants={"alpha": 1.0, "beta": 2.0})
vocs = VOCS(constants={"alpha": {"type": "Constant", "value": 1.0}})
Longhand form:
from gest_api.vocs import Constant, VOCS
alpha_c = Constant(value=1.0)
vocs = VOCS(constants={"alpha": alpha_c})
Associated classes:
- class gest_api.vocs.Constant(*, dtype=None, value)
- Parameters:
dtype (str | Type | Tuple | None)
value (Any)
Note
The dtype (data type) field for any parameter can be set according to https://numpy.org/doc/stable/reference/arrays.dtypes.html. The type specified must be supported by the generator.
By default, the dtype value is None, which means the variable is a scalar
with a type determined by the generator.