Package jline.opt.objectives
Class Constraint
java.lang.Object
jline.opt.objectives.Constraint
- Direct Known Subclasses:
BudgetConstraint,ResponseTimeConstraint,SystemResponseTimeConstraint,ThroughputConstraint,UtilizationConstraint
Abstract base for line-opt constraints. Each constraint computes a
non-negative violation amount (0 if satisfied) given an
EvaluationResult and the current variable values. Mirrors
native-Python line_solver.opt.objectives.Constraint.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract doubleevaluate(EvaluationResult result, Map<String, Object> variableValues) Violation amount: 0 if satisfied, positive if violated.protected abstract StringgetName()booleanisSatisfied(EvaluationResult result, Map<String, Object> variableValues, double tolerance) protected static doublelowerBoundViolation(double actual, double bound) Violation for a lower-bound constraint (actual >= bound).protected static doubleupperBoundViolation(double actual, double bound) Violation for an upper-bound constraint (actual <= bound).
-
Field Details
-
name
-
-
Constructor Details
-
Constraint
-
-
Method Details
-
getName
-
generateName
-
evaluate
Violation amount: 0 if satisfied, positive if violated. -
isSatisfied
public boolean isSatisfied(EvaluationResult result, Map<String, Object> variableValues, double tolerance) -
upperBoundViolation
protected static double upperBoundViolation(double actual, double bound) Violation for an upper-bound constraint (actual <= bound). A non-finite metric signals divergence and is reported as strongly infeasible (+inf), mirroring the native guard that avoids NaN silently satisfying bounds. -
lowerBoundViolation
protected static double lowerBoundViolation(double actual, double bound) Violation for a lower-bound constraint (actual >= bound).
-