Package org.opt4j.core
Class Constraint
- java.lang.Object
-
- org.opt4j.core.Criterion
-
- org.opt4j.core.Constraint
-
- All Implemented Interfaces:
Comparable<Constraint>
- Direct Known Subclasses:
InfeasibilityConstraint,SatisfactionConstraint
public abstract class Constraint extends Criterion implements Comparable<Constraint>
The
Constraintis the identifier for a single constraint in theConstraints. It is the superclass for concrete constraints. It is specified by the following properties:- Name
- Direction
- Limit
Each
Evaluatorsets a specific amount ofConstraint-Valuepairs.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classConstraint.DirectionDefines the possible directions a constraint can be defined.
-
Field Summary
Fields Modifier and Type Field Description protected Constraint.Directiondirectionprotected doublelimit
-
Constructor Summary
Constructors Constructor Description Constraint(String name, Constraint.Direction direction, double limit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Constraint other)Constraint.DirectiongetDirection()doublegetLimit()StringtoString()
-
-
-
Field Detail
-
direction
protected final Constraint.Direction direction
-
limit
protected final double limit
-
-
Constructor Detail
-
Constraint
public Constraint(String name, Constraint.Direction direction, double limit)
-
-
Method Detail
-
getDirection
public Constraint.Direction getDirection()
- Returns:
- the direction
-
getLimit
public double getLimit()
- Returns:
- the limit
-
compareTo
public int compareTo(Constraint other)
- Specified by:
compareToin interfaceComparable<Constraint>
-
-