OptimizationInputSpec

@Serializable
data class OptimizationInputSpec(val name: String, val lowerBound: Double, val upperBound: Double, val granularity: Double = 0.0)(source)

Serializable counterpart to ksl.simopt.problem.ProblemDefinition.inputVariable.

Declares one decision variable controlled by the optimizer. The optimizer is permitted to vary name inclusively between lowerBound and upperBound, respecting granularity (a granularity of 1.0 implies an integer-ordered input).

Bound finiteness, lowerBound < upperBound, and granularity >= 0 are enforced in init on construction. Name resolution against the built model is performed by ksl.app.validation.OptimizationConfigurationValidator.

Constructors

Link copied to clipboard
constructor(name: String, lowerBound: Double, upperBound: Double, granularity: Double = 0.0)

Properties

Link copied to clipboard

step granularity; 0.0 means full precision, 1.0 implies integer-ordered, in general the value will be rounded to the nearest multiple of granularity

Link copied to clipboard

lower bound (inclusive); must be finite and strictly less than upperBound

Link copied to clipboard

decision-variable name; must match a model input key

Link copied to clipboard

upper bound (inclusive); must be finite and strictly greater than lowerBound