ResponseConstraintSpec

@Serializable
data class ResponseConstraintSpec(val name: String, val rhsValue: Double, val inequalityType: InequalityType = InequalityType.LESS_THAN, val target: Double = 0.0, val tolerance: Double = 0.0, val penaltyFunction: PenaltyFunctionSpec? = null)(source)

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

A constraint on a response: the expected value of the named response is compared, via inequalityType, to rhsValue, augmented with optional target and tolerance parameters used by some solvers as soft cut-offs.

Domain invariants are enforced in init. Cross-reference checks (response-name resolution against the built model) remain the responsibility of OptimizationConfigurationValidator.

Constructors

Link copied to clipboard
constructor(name: String, rhsValue: Double, inequalityType: InequalityType = InequalityType.LESS_THAN, target: Double = 0.0, tolerance: Double = 0.0, penaltyFunction: PenaltyFunctionSpec? = null)

Properties

Link copied to clipboard

direction of the inequality; defaults to InequalityType.LESS_THAN

Link copied to clipboard

name of the response being constrained; must be non-blank and must appear in OptimizationProblemSpec.responseNames and on the built model

Link copied to clipboard

optional per-constraint penalty function overriding the problem-level default; null (the default) inherits OptimizationProblemSpec.defaultResponsePenalty

Link copied to clipboard

right-hand-side value; must be finite

Link copied to clipboard

solver-specific cut-off parameter; must be finite; defaults to 0.0

Link copied to clipboard

solver-specific tolerance around target; must be >= 0 and finite; defaults to 0.0