Initializing help system before first use

XPRMMPVar

  • All Implemented Interfaces:
    XPRMTyped


    public class XPRMMPVar
    extends XPRMReference
    A decision variable in Mosel. The functions provided here can be used to retrieve solution information related to the current problem after it has been solved.
    • Method Detail

      • getSolution

        public final double getSolution()
        Solution value.
        Returns:
        The solution value or 0 if no solution is available
      • getRedCost

        public final double getRedCost()
        Reduced cost.
        Returns:
        The reduced cost or 0 if no solution is available
      • getNumber

        public final int getNumber()
        Column number. This is the column representing the variable in the matrix - available only if the matrix has been generated.
        Returns:
        The column number (≥0) or a negative value if no matrix is available or the variable does not belong to the problem.
      • asMPVar

        public final XPRMMPVar asMPVar()
        Description copied from class: XPRMValue
        A decision variable. This function is defined if the actual object is a decision variable.
        Overrides:
        asMPVar in class  XPRMValue
        Returns:
        The decision variable as a XPRMMPVar
      • getTypeCode

        public final int getTypeCode()
        Description copied from interface: XPRMTyped
        Type code. The code is one of the TYP_* values.
        Returns:
        Encoded type
      • getTypeName

        public final java.lang.String getTypeName()
        Description copied from interface: XPRMTyped
        String representation of type.
        Returns:
        Type name
      • toString

        public final java.lang.String toString()
        Solution value as a string.
        Specified by:
        toString in class  XPRMReference
        Returns:
        Text representation of the solution value