Package org.ssclab.pl.milp
Class ListConstraints
- java.lang.Object
-
- org.ssclab.pl.milp.ListConstraints
-
public final class ListConstraints extends Object
The ListConstraints class represents a collection of constraints for a Mixed Integer Linear Programming (MILP) problem. This class provides functionality to store and manage the constraints in a list.Each constraint is represented by an instance of the
Constraintclass.This class is immutable and final to ensure that the structure of the constraint list is controlled.
-
-
Constructor Summary
Constructors Constructor Description ListConstraints()Constructs an empty ListConstraints object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(Constraint constraint)Adds a new constraint to the list of constraints.ArrayList<Constraint>getListConstraint()Returns the list of constraints.
-
-
-
Constructor Detail
-
ListConstraints
public ListConstraints()
Constructs an empty ListConstraints object. Initializes the list of constraints as an emptyArrayList.
-
-
Method Detail
-
add
public void add(Constraint constraint)
Adds a new constraint to the list of constraints.- Parameters:
constraint- theConstraintobject to be added
-
getListConstraint
public ArrayList<Constraint> getListConstraint()
Returns the list of constraints.- Returns:
- an
ArrayListcontaining the constraints
-
-