Package jline.opt.objectives
Class BudgetConstraint
java.lang.Object
jline.opt.objectives.Constraint
jline.opt.objectives.BudgetConstraint
Budget constraint: total cost <= budget, cost from variable values.
-
Field Summary
Fields inherited from class jline.opt.objectives.Constraint
name -
Constructor Summary
ConstructorsConstructorDescriptionBudgetConstraint(double budget, Map<String, Double> costCoefficients) BudgetConstraint(double budget, Map<String, Double> costCoefficients, String name) -
Method Summary
Modifier and TypeMethodDescriptiondoublecomputeCost(Map<String, Object> variableValues) doubleevaluate(EvaluationResult result, Map<String, Object> variableValues) Violation amount: 0 if satisfied, positive if violated.protected StringdoubleMethods inherited from class jline.opt.objectives.Constraint
getName, isSatisfied, lowerBoundViolation, upperBoundViolation
-
Constructor Details
-
BudgetConstraint
-
BudgetConstraint
-
-
Method Details
-
generateName
- Specified by:
generateNamein classConstraint
-
getBudget
public double getBudget() -
getCostCoefficients
-
computeCost
-
evaluate
Description copied from class:ConstraintViolation amount: 0 if satisfied, positive if violated.- Specified by:
evaluatein classConstraint
-