Interface IDecisionVariableContainer

    • Method Detail

      • add

        void add​(AttributeAssignment assignment)
        Adds a nested assignment.
        Parameters:
        assignment - the assignment which should be added
      • add

        void add​(EvaluationBlock eval)
        adds a nested evaluation block.
        Parameters:
        eval - the eval block
      • getAssignmentCount

        int getAssignmentCount()
        Returns the number of assignments.
        Returns:
        the number of assignments
      • getAssignment

        AttributeAssignment getAssignment​(int index)
        Returns the assignment specified by index.
        Parameters:
        index - a 0-based index specifying the element to be returned
        Returns:
        the assignment
        Throws:
        java.lang.IndexOutOfBoundsException - if index<0 || index>=getAssignmentCount()
      • getModelElement

        ContainableModelElement getModelElement​(int index)
        Returns a contained model element specified by index. Please note that this method returns all contained model elements, i.e., decision variables and constraints and is intended to restore the input sequence correctly.
        Parameters:
        index - a 0-based index specifying the operation to be returned
        Returns:
        the contained element
        Throws:
        java.lang.IndexOutOfBoundsException - if index<0 || index>=getModelElementCount()
      • getModelElementCount

        int getModelElementCount()
        Returns the number of contained elements. Please note that this method refers to all contained model elements, i.e., decision variables and constraints and is intended to restore the input sequence correctly.
        Returns:
        the number of contained elements
      • getElement

        DecisionVariableDeclaration getElement​(java.lang.String name)
        Returns the element specified by name.
        Parameters:
        name - the name of the element
        Returns:
        the element, null if none was found
      • contains

        boolean contains​(DecisionVariableDeclaration var)
        Returns whether this element contains var.
        Parameters:
        var - the variable declaration to search for
        Returns:
        true if found, false else
      • add

        void add​(Comment comment)
        Adds a comment to the list of contained elements.
        Parameters:
        comment - the comment to be added
      • getElementCount

        int getElementCount()
        Returns the number of elements.
        Returns:
        the number of elements
      • getElement

        DecisionVariableDeclaration getElement​(int index)
        Returns the element specified by index.
        Parameters:
        index - a 0-based index specifying the element to be returned
        Returns:
        the element
        Throws:
        java.lang.IndexOutOfBoundsException - if index<0 || index>=getElementCount()
      • add

        boolean add​(DecisionVariableDeclaration elem)
        Method to add an object to the elements list of the project.
        Parameters:
        elem - which should be added
        Returns:
        true if the addition was successful, false else due to duplicated variable declaration
      • getConstraintsCount

        int getConstraintsCount()
        Returns the number of contained constraints.
        Returns:
        the number of constraints
      • getConstraint

        Constraint getConstraint​(int index)
        Returns the specified contained constraint.
        Parameters:
        index - the index of the constraint to be returned
        Returns:
        the specified constraint
        Throws:
        java.lang.IndexOutOfBoundsException - if index < 0 || index >= getConstraintsCount()
      • addConstraint

        void addConstraint​(Constraint constraint,
                           boolean internal)
        Adds a constraint.
        Parameters:
        constraint - the constraint to be added
        internal - whether the constraint is internally created while building up the model (ignored)
      • getRealizingCount

        int getRealizingCount()
        Returns the number of realizing constraints. Please note that these constraints are derived and not originally specified in the input IVML model.
        Returns:
        the number of constraints
      • getRealizing

        Constraint getRealizing​(int index)
        Returns the specified realizing constraint. Please note that these constraints are derived and not originally specified in the input IVML model.
        Parameters:
        index - the index of the constraint to be returned
        Returns:
        the specified constraint
        Throws:
        java.lang.IndexOutOfBoundsException - if index < 0 || index >= getRealizingCount()
      • containsByName

        boolean containsByName​(java.lang.String name)
        Returns whether this project contains an element and its name.
        Parameters:
        name - the name to search for
        Returns:
        true if this project contains the specified element, false else