Package org.ssclab.pl.milp
Class Constraint
- java.lang.Object
-
- org.ssclab.pl.milp.Constraint
-
public final class Constraint extends Object
This class allows you to build objects, each of which represents a constraint for a linear programming problem expressed in matrix notation- Version:
- 1.0
- Author:
- Stefano Scarioli
- See Also:
- SSC Software www.sscLab.org
-
-
Constructor Summary
Constructors Constructor Description Constraint(double[] Aj, ConsType rel, double rhs)
Constraint(double[] Aj, ConsType rel, double rhs, String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double[]
getAj()
String
getName()
ConsType
getRel()
double
getRhs()
void
setName(String name)
-
-
-
Constructor Detail
-
Constraint
public Constraint(double[] Aj, ConsType rel, double rhs) throws LPException
- Parameters:
Aj
- The LHS part of the j-th constraint of the problemrel
- The type of constraint/relation (EQ, LE, GE, UPPER, LOWER, INT, BIN, SEMICONT)rhs
- The RHS part of the constraint or coefficient bj- Throws:
LPException
- If the constraint is not congruent
-
Constraint
public Constraint(double[] Aj, ConsType rel, double rhs, String name) throws LPException
- Parameters:
Aj
- The LHS part of the j-th constraint of the problemrel
- The type of constraint/relation (EQ, LE, GE, UPPER, LOWER, INT, BIN, SEMICONT)rhs
- The RHS part of the constraint or coefficient bjname
- The name of the constraint- Throws:
LPException
- If the constraint is not congruent
-
-
Method Detail
-
getAj
public double[] getAj()
- Returns:
- The LHS part of the j-th constraint of the problem
-
getRel
public ConsType getRel()
- Returns:
- The type of constraint (relation) defined (EQ, LE, GE)
-
getRhs
public double getRhs()
- Returns:
- The RHS part of the constraint or coefficient bj
-
getName
public String getName()
-
setName
public void setName(String name)
-
-