Class 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 Constraint class.

    This class is immutable and final to ensure that the structure of the constraint list is controlled.

    • Constructor Detail

      • ListConstraints

        public ListConstraints()
        Constructs an empty ListConstraints object. Initializes the list of constraints as an empty ArrayList.
    • Method Detail

      • add

        public void add​(Constraint constraint)
        Adds a new constraint to the list of constraints.
        Parameters:
        constraint - the Constraint object to be added
      • getListConstraint

        public ArrayList<Constraint> getListConstraint()
        Returns the list of constraints.
        Returns:
        an ArrayList containing the constraints