Initializing help system before first use

XPRSprob

  • All Implemented Interfaces:
    java.lang.AutoCloseable


    public class XPRSprob
    extends XPRSobject
    Represents a problem and an optimizer instance.
    • Constructor Detail

      • XPRSprob

        public XPRSprob()
                 throws XPRSprobException
        Creates a new, empty problem. The functions calls XPRS.init("") so you don't have to do that explicitly. You may still call XPRS.init("") explicitly in case you want non-standard initialization. Note that instances of this class should be explicitly cleaned up by calling close() so that native resources can be released and licenses can be released. A good practice is to use instances of this class with try-with-resources.
        Throws:
        XPRSprobException
    • Method Detail

      • close

        public void close()
        Destroy the problem, deallocating all memory used. Release any resources allocated for this problem instance. Also calls XPRS.free() to match the call to XPRS.init("") performed by the constructor.
        Specified by:
        close in interface  java.lang.AutoCloseable
        Specified by:
        close in class  XPRSobject
        Since:
        38
      • iISStatus

        public void iISStatus(IntHolder iiscount,
                              int[] rowsizes,
                              int[] colsizes,
                              double[] suminfeas,
                              int[] numinfeas)
                       throws XPRSprobException
        Deprecated.  use IISStatus instead
        Throws:
        XPRSprobException
      • getNames

        public void getNames(int type,
                             java.lang.String[] names,
                             int first,
                             int last)
                      throws XPRSprobException
        Get names. Retrieves names for a certain type of objects.
        Parameters:
        type - The type of object for which names should be retrieved: 1 for row names, 2 for column names, 3 for SOS names, 4 for PWL names, 5 for general constraint names.
        names - Buffer in which the names are stored. Must have length at least 1 + list - first.
        first - Index of first name to be retrieved.
        last - Index of last name to be retrieved.
        Throws:
        XPRSprobException
      • getNames

        public java.lang.String[] getNames(int type,
                                           int first,
                                           int last)
                                    throws XPRSprobException
        Get names. Retrieves names for a certain type of objects.
        Parameters:
        type - The type of object for which names should be retrieved: 1 for row names, 2 for column names, 3 for SOS names, 4 for PWL names, 5 for general constraint names.
        first - Index of first name to be retrieved.
        last - Index of last name to be retrieved.
        Returns:
        The requested names.
        Throws:
        XPRSprobException
      • getRowNames

        public java.lang.String[] getRowNames(int first,
                                              int last)
                                       throws XPRSprobException
        Get names of rows.
        Parameters:
        first - First row index (inclusive).
        last - Last row index (inclusive).
        Returns:
        The names for the specified rows.
        Throws:
        XPRSprobException - in case of error.
      • getColumnNames

        public java.lang.String[] getColumnNames(int first,
                                                 int last)
                                          throws XPRSprobException
        Get names of columns.
        Parameters:
        first - First column index (inclusive).
        last - Last column index (inclusive).
        Returns:
        The names for the specified columns.
        Throws:
        XPRSprobException - in case of error.
      • getSetNames

        public java.lang.String[] getSetNames(int first,
                                              int last)
                                       throws XPRSprobException
        Get names of sets (SOS).
        Parameters:
        first - First set index (inclusive).
        last - Last set index (inclusive).
        Returns:
        The names for the specified sets.
        Throws:
        XPRSprobException - in case of error.
      • getPWLNames

        public java.lang.String[] getPWLNames(int first,
                                              int last)
                                       throws XPRSprobException
        Get names of PWL constraints.
        Parameters:
        first - First PWL index (inclusive).
        last - Last PWL index (inclusive).
        Returns:
        The names for the specified PWL constraints.
        Throws:
        XPRSprobException - in case of error.
      • getGenConsNames

        public java.lang.String[] getGenConsNames(int first,
                                                  int last)
                                           throws XPRSprobException
        Get names of general constraints.
        Parameters:
        first - First general constraint index (inclusive).
        last - Last general constraint index (inclusive).
        Returns:
        The names for the specified general constraints.
        Throws:
        XPRSprobException - in case of error.
      • chgMCoef

        public void chgMCoef(int[] _mrow,
                             int[] _mcol,
                             double[] _dval,
                             int ncoeffs)
                      throws XPRSprobException
        Deprecated. 
        Version of chgMCoef function with parameters in a different order, to maintain compatibility with pre-2008A API
        Throws:
        XPRSprobException
      • chgMQObj

        public void chgMQObj(int[] _mcol1,
                             int[] _mcol2,
                             double[] _dval,
                             int ncols)
                      throws XPRSprobException
        Deprecated. 
        Version of chgMQObj function with parameters in a different order, to maintain compatibility with pre-2008A API.
        Throws:
        XPRSprobException
      • chgObjSense

        public void chgObjSense(int objsense)
                         throws XPRSprobException
        Deprecated.  use chgObjSense(com.dashoptimization.XPRSenumerations.ObjSense) instead
        Retained to maintain compatibility with Xpress 7.0.
        Throws:
        XPRSprobException
      • getGenCons

        public XPRSprob.GeneralConstraintInfo getGenCons(int first,
                                                         int last)
                                                  throws XPRSprobException
        Query a range of general constraints.
        Parameters:
        first - First constraint index to query (inclusive).
        last - Last constraint index to query (inclusive).
        Returns:
        the specification of the queried constraints.
        Throws:
        XPRSprobException - in case of error.
      • crossoverLpSol

        public int crossoverLpSol()
                           throws XPRSprobException
        Get the crossover LP solution status.
        Returns:
        the crossover LP solution status.
        Throws:
        XPRSprobException - in case of error.
      • getLastBarSol

        public int getLastBarSol(double[] x,
                                 double[] slack,
                                 double[] duals,
                                 double[] djs)
                          throws XPRSprobException
        Get the last barrier solution.
        Parameters:
        x - Array to store the primal column values (may be null).
        slack - Array to store the primal slack values (may be null).
        duals - Array to store dual row values (may be null).
        djs - Array to store reduced costs (may be null).
        Returns:
        the status of the last barrier solution.
        Throws:
        XPRSprobException - in case of error.
      • getIISData

        public XPRSprob.IISData getIISData(int number)
        Get information about an IIS.
        Parameters:
        number - The index of the IIS to query.
        Returns:
        information about the queried IIS.
        Throws:
        XPRSprobException - in case of error.
      • loadLPSol

        public boolean loadLPSol(double[] x,
                                 double[] slack,
                                 double[] duals,
                                 double[] djs)
                          throws XPRSprobException
        Load an LP solution for the original (not the presolved) problem.
        Parameters:
        x - Variable values (can be null).
        slack - Slack values (can be null).
        duals - Dual values (can be null).
        djs - Reduced costs (can be null).
        Returns:
        true if the solution was loaded and false false if solution was not loaded because problem is in presolved state.
        Throws:
        XPRSprobException - in case of error.
      • repairWeightedInfeas

        public int repairWeightedInfeas(double[] lepref,
                                        double[] gepref,
                                        double[] lbpref,
                                        double[] ubpref,
                                        char phase2,
                                        double delta,
                                        java.lang.String flags)
                                 throws XPRSprobException
        Repair weighted infeasibilites.
        Parameters:
        lepref - Preferences for relaxing the less or equal side of row.
        gepref - Preferences for relaxing the greater or equal side of a row.
        lbpref - Preferences for relaxing lower bounds.
        ubpref - Preferences for relaxing upper bounds.
        phase2 - Controls the second phase of optimization.
        delta - The relaxation multiplier in the second phase -1.
        flags - Flags to be passed to the Optimizer.
        Returns:
        status after the relaxation.
        Throws:
        XPRSprobException - on error.
      • repairWeightedInfeasBounds

        public int repairWeightedInfeasBounds(double[] lepref,
                                              double[] gepref,
                                              double[] lbpref,
                                              double[] ubpref,
                                              double[] lerelax,
                                              double[] gerelax,
                                              double[] lbrelax,
                                              double[] ubrelax,
                                              char phase2,
                                              double delta,
                                              java.lang.String flags)
                                       throws XPRSprobException
        Repair weighted infeasibility bounds.
        Parameters:
        lepref - Preferences for relaxing the less or equal side of row.
        gepref - Preferences for relaxing the greater or equal side of a row.
        lbpref - Preferences for relaxing lower bounds.
        ubpref - Preferences for relaxing upper bounds.
        lerelax - Upper bounds on the amount the less or equal side of a row can be relaxed.
        gerelax - Upper bounds on the amount the greater or equal side of a row can be relaxed.
        lbrelax - Upper bounds on the amount the lower bounds can be relaxed.
        ubrelax - Upper bounds on the amount the upper bounds can be relaxed.
        phase2 - Controls the second phase of optimization.
        delta - Relaxation multiplier in the second phase -1.
        flags - Flags to be passed to the Optimizer.
        Returns:
        status after the relaxation
        Throws:
        XPRSprobException - in case of error.
      • repairInfeas

        public int repairInfeas(char ptype,
                                char phase2,
                                char flags,
                                double lepref,
                                double gepref,
                                double lbpref,
                                double ubpref,
                                double delta)
                         throws XPRSprobException
        Repair infeasiblities.
        Parameters:
        ptype - Type of penalties created from the preferences.
        phase2 - Controls the second phase of optimization.
        flags - Specifies if the global search should be done.
        lepref - Preference for relaxing the less or equal side of row.
        gepref - Preference for relaxing the greater or equal side of a row.
        lbpref - Preferences for relaxing lower bounds.
        ubpref - Preferences for relaxing upper bounds.
        delta - Relaxation multiplier in the second phase -1.
        Returns:
        status after the relaxation.
        Throws:
        XPRSprobException - in case of error.
      • basisStability

        public double basisStability(int type,
                                     int norm,
                                     boolean ifscaled)
                              throws XPRSprobException
        Compute basis stability.
        Returns:
        basis stability value.
        Throws:
        XPRSprobException - in case of error.
      • getControlInfo

        public XPRSprob.ControlInfo getControlInfo(java.lang.String name)
                                            throws XPRSprobException
        Get info about a control.
        Parameters:
        name - Name of control to query.
        Returns:
        descriptor for the queried control.
        Throws:
        XPRSprobException - in case of error.
      • getCols

        public XPRSprob.MatrixInfo getCols(int first,
                                           int last)
                                    throws XPRSprobException
        Get range of columns.
        Parameters:
        first - First column index (inclusive).
        last - Last column index (inclusive).
        Returns:
        data for the queried columns.
        Throws:
        XPRSprobException - in case of error.
      • getRows

        public XPRSprob.MatrixInfo getRows(int first,
                                           int last)
                                    throws XPRSprobException
        Get range of rows.
        Parameters:
        first - First row index (inclusive).
        last - Last row index (inclusive).
        Returns:
        data for the queried rows.
        Throws:
        XPRSprobException - in case of error.
      • getMQObj

        public XPRSprob.MatrixInfo getMQObj(int first,
                                            int last)
                                     throws XPRSprobException
        Get quadratic objective matrix for range of columns.
        Parameters:
        first - First column index (inclusive).
        last - Last column index (inclusive).
        Returns:
        data for the queried columns.
        Throws:
        XPRSprobException - in case of error.
      • getPrimalRay

        public boolean getPrimalRay(double[] ray)
                             throws XPRSprobException
        Get primal ray.
        Parameters:
        ray - where to store the ray's coefficients.
        Returns:
        true if a ray is available, false otherwise.
        Throws:
        XPRSprobException - in case of error.
      • getDualRay

        public boolean getDualRay(double[] ray)
                           throws XPRSprobException
        Get dual ray.
        Parameters:
        ray - where to store the ray's coefficients.
        Returns:
        true if a ray is available, false otherwise.
        Throws:
        XPRSprobException - in case of error.
      • getRowBasisVal

        public int getRowBasisVal(int row)
                           throws XPRSprobException
        Get basis status for a row.
        Parameters:
        row - Row index.
        Returns:
        basis status for row.
        Throws:
        XPRSprobException
      • getColBasisVal

        public int getColBasisVal(int col)
                           throws XPRSprobException
        Get basis status for a column.
        Parameters:
        col - Column index.
        Returns:
        basis status for col.
        Throws:
        XPRSprobException
      • getCutList

        public XPRScut[] getCutList(int cuttype,
                                    int interp)
                             throws XPRSprobException
        Retrieves a list of cut pointers for the cuts active at the current node.
        Parameters:
        cuttype - User defined type of the cuts to be returned.
        interp - Way in which the cut type is interpreted
        Returns:
        the queried cuts.
        Throws:
        XPRSprobException - in case of error.
      • calcObjective

        public double calcObjective(double[] solution)
                             throws XPRSprobException
        Calculate objective value for a given solution.
        Parameters:
        solution - The solution for which to calculate the objective value.
        Returns:
        The objective value for solution.
        Throws:
        XPRSprobException - in case of error.
      • calcSolInfo

        public double calcSolInfo(double[] solution,
                                  double[] dual,
                                  int property)
                           throws XPRSprobException
        Calculate solution information.
        Parameters:
        solution - Primal solution.
        dual - Dual solution.
        property - What to compute.
        Returns:
        the computed value.
        Throws:
        XPRSprobException - in case of error.
      • getQRowIndices

        public int[] getQRowIndices()
                             throws XPRSprobException
        Get quadratic rows.
        Returns:
        indices of rows with quadratic terms.
        Throws:
        XPRSprobException - in case of error.
      • refineMipSol

        public int refineMipSol(int options,
                                java.lang.String flags,
                                double[] solution,
                                double[] refined)
                         throws XPRSprobException
        Refine a MIP solution.
        Parameters:
        options - Refinement options.
        flags - Flags passed to any optimization calls during refinement.
        solution - The solution to refine.
        refined - Where to store the refined solution (if found).
        Returns:
        the refinement status.
        Throws:
        XPRSprobException - in case of error.
      • getLpSolVal

        public XPRSprob.SolVal getLpSolVal(int col,
                                           int row)
                                    throws XPRSprobException
        Get LP solution value.
        Parameters:
        col - Column to query.
        row - Row to query.
        Returns:
        solution value for the queried row/column.
        Throws:
        XPRSprobException - in case of error.
      • getMipSolVal

        public XPRSprob.SolVal getMipSolVal(int col,
                                            int row)
                                     throws XPRSprobException
        Get MIP solution value.
        Parameters:
        col - Column to query.
        row - Row to query.
        Returns:
        solution value for the queried row/column.
        Throws:
        XPRSprobException - in case of error.
      • chgBounds

        public void chgBounds(int j,
                              double lb,
                              double ub)
                       throws XPRSprobException
        Change bounds of a single variable.
        Parameters:
        j - Variable to change.
        lb - New lower bound.
        ub - New upper bound.
        Throws:
        XPRSprobException
      • getRowName

        public java.lang.String getRowName(int idx)
                                    throws XPRSprobException
        Get the name of a row.
        Parameters:
        idx - Row idx.
        Returns:
        The name of the specified row.
        Throws:
        XPRSprobException - in case of error.
      • getColumnName

        public java.lang.String getColumnName(int idx)
                                       throws XPRSprobException
        Get the name of a column.
        Parameters:
        idx - Column idx.
        Returns:
        The name of the specified column.
        Throws:
        XPRSprobException - in case of error.
      • getSetName

        public java.lang.String getSetName(int idx)
                                    throws XPRSprobException
        Get the name of a set (SOS).
        Parameters:
        idx - Set idx.
        Returns:
        The name of the specified set.
        Throws:
        XPRSprobException - in case of error.
      • getPWLName

        public java.lang.String getPWLName(int idx)
                                    throws XPRSprobException
        Get the name of a PWL constrant.
        Parameters:
        idx - PWL constraint idx.
        Returns:
        The name of the specified PWL constraint.
        Throws:
        XPRSprobException - in case of error.
      • getGenConsName

        public java.lang.String getGenConsName(int idx)
                                        throws XPRSprobException
        Get the name of a general constraint.
        Parameters:
        idx - General constraint idx.
        Returns:
        The name of the specified general constraint.
        Throws:
        XPRSprobException - in case of error.
      • addCol

        public int addCol(double obj,
                          double lb,
                          double ub,
                          char type,
                          int[] rowind,
                          double[] rowval,
                          java.lang.String name)
                   throws XPRSprobException
        Add a single column to the model.
        Parameters:
        obj - The objective coefficient for the new column.
        lb - The lower bound for the new column.
        ub - The upper bound for the new column.
        type - The type for the new column.
        rowind - Array of row indices for the non-zeros for the new column. This can be null. If not null then it must have the same length as rowval and rowval[k] must be the non-zero coefficient of the new column in row rowind[k].
        rowval - Array of row values for the non-zeros for the new column. This can be null. If not null then it must have the same length as rowind and rowval[k] must be the non-zero coefficient of the new column in row rowind[k].
        name - The name of the new column. This can be null.
        Returns:
        The index of the newly created column.
        Throws:
        java.lang.IllegalArgumentException - if rowind and rowval have different lengths.
        XPRSprobException - if column cannot be added.
        See Also:
        addCols(int, int, double[], int[], int[], double[], double[], double[])
      • addCol

        public int addCol(double obj,
                          double lb,
                          double ub,
                          char type,
                          int[] rowind,
                          double[] rowval)
                   throws XPRSprobException
        Add a single column to this problem. This is a shortcut for addCol(obj, lb, ub, type, rowind, rowval, null);.
        Parameters:
        obj - The objective coefficient for the new column.
        lb - The lower bound for the new column.
        ub - The upper bound for the new column.
        type - The type for the new column.
        rowind - Array of row indices for the non-zeros for the new column. This can be null. If not null then it must have the same length as rowval and rowval[k] must be the non-zero coefficient of the new column in row rowind[k].
        rowval - Array of row values for the non-zeros for the new column. This can be null. If not null then it must have the same length as rowind and rowval[k] must be the non-zero coefficient of the new column in row rowind[k].
        Returns:
        The index of the newly created column.
        Throws:
        java.lang.IllegalArgumentException - if rowind and rowval have different lengths.
        XPRSprobException - if column cannot be added.
        See Also:
        addCol(double, double, double, char, int[], double[], String)
      • addCol

        public int addCol(double obj,
                          double lb,
                          double ub)
                   throws XPRSprobException
        Add a single column to this problem. This is a shortcut for addCol(obj, lb, ub, 'C', null, null, null);.
        Parameters:
        obj - The objective coefficient for the new column.
        lb - The lower bound for the new column.
        ub - The upper bound for the new column.
        Returns:
        The index of the newly created column.
        Throws:
        java.lang.IllegalArgumentException - if rowind and rowval have different lengths.
        XPRSprobException - if column cannot be added.
        See Also:
        addCol(double, double, double, char, int[], double[], String)
      • addCol

        public int addCol(double obj,
                          double lb,
                          double ub,
                          char type)
                   throws XPRSprobException
        Add a single column to this problem. This is a shortcut for addCol(obj, lb, ub, type, null, null, null);.
        Parameters:
        obj - The objective coefficient for the new column.
        lb - The lower bound for the new column.
        ub - The upper bound for the new column.
        type - The type for the new column.
        Returns:
        The index of the newly created column.
        Throws:
        java.lang.IllegalArgumentException - if rowind and rowval have different lengths.
        XPRSprobException - if column cannot be added.
        See Also:
        addCol(double, double, double, char, int[], double[], String)
      • addCol

        public int addCol(double obj,
                          double lb,
                          double ub,
                          java.lang.String name)
                   throws XPRSprobException
        Add a single column to this problem. This is a shortcut for addCol(obj, lb, ub, 'C', null, null, name);.
        Parameters:
        obj - The objective coefficient for the new column.
        lb - The lower bound for the new column.
        ub - The upper bound for the new column.
        name - The name of the new column. This can be null.
        Returns:
        The index of the newly created column.
        Throws:
        java.lang.IllegalArgumentException - if rowind and rowval have different lengths.
        XPRSprobException - if column cannot be added.
        See Also:
        addCol(double, double, double, char, int[], double[], String)
      • addCol

        public int addCol(double obj,
                          double lb,
                          double ub,
                          char type,
                          java.lang.String name)
                   throws XPRSprobException
        Add a single column to this problem. This is a shortcut for addCol(obj, lb, ub, type, null, null, name);.
        Parameters:
        obj - The objective coefficient for the new column.
        lb - The lower bound for the new column.
        ub - The upper bound for the new column.
        type - The type for the new column.
        name - The name of the new column. This can be null.
        Returns:
        The index of the newly created column.
        Throws:
        java.lang.IllegalArgumentException - if rowind and rowval have different lengths.
        XPRSprobException - if column cannot be added.
        See Also:
        addCol(double, double, double, char, int[], double[], String)
      • addRow

        public int addRow(int[] colind,
                          double[] colval,
                          char rowtype,
                          java.lang.Double rhs,
                          java.lang.Double rng,
                          java.lang.String name)
                   throws XPRSprobException
        Add a single row to the problem.
        Parameters:
        colind - Array of column indices for the non-zeros for the new row. This can be null. If not null then it must have the same length as colval and colval[k] must be the non-zero coefficient in the new row for column colind[k].
        colval - Array of column values for the non-zeros for the new row. This can be null. If not null then it must have the same length as colind and colval[k] must be the non-zero coefficient in the new row for column colind[k].
        rowtype - The type of the new row.
        rhs - The right-hand side for the new row. If this is null then 0 (zero) is used.
        rng - The range value for the new row. This is ignored if it is null.
        name - The name of the new row. This can be null.
        Returns:
        The index of the newly created row.
        Throws:
        java.lang.IllegalArgumentException - if colind and colval have different lengths.
        XPRSprobException - if row cannot be added.
        See Also:
        addRows(int, int, byte[], double[], double[], int[], int[], double[])
      • addRow

        public int addRow(int[] colind,
                          double[] colval,
                          char rowtype,
                          double rhs,
                          java.lang.String name)
                   throws XPRSprobException
        Add a single row to the problem. This is a short cut for addRow(colind, colval, rowtype, rhs, null, name).
        Parameters:
        colind - Array of column indices for the non-zeros for the new row. This can be null. If not null then it must have the same length as colval and colval[k] must be the non-zero coefficient in the new row for column colind[k].
        colval - Array of column values for the non-zeros for the new row. This can be null. If not null then it must have the same length as colind and colval[k] must be the non-zero coefficient in the new row for column colind[k].
        rowtype - The type of the new row.
        rhs - The right-hand side for the new row. If this is null then 0 (zero) is used.
        name - The name of the new row. This can be null.
        Returns:
        The index of the newly created row.
        Throws:
        java.lang.IllegalArgumentException - if colind and colval have different lengths.
        XPRSprobException - if row cannot be added.
        See Also:
        addRow(int[], double[], char, Double, Double, String)
      • addRow

        public int addRow(int[] colind,
                          double[] colval,
                          char rowtype,
                          double rhs)
                   throws XPRSprobException
        Add a single row to the problem. This is a short cut for addRow(colind, colval, rowtype, rhs, null, null).
        Parameters:
        colind - Array of column indices for the non-zeros for the new row. This can be null. If not null then it must have the same length as colval and colval[k] must be the non-zero coefficient in the new row for column colind[k].
        colval - Array of column values for the non-zeros for the new row. This can be null. If not null then it must have the same length as colind and colval[k] must be the non-zero coefficient in the new row for column colind[k].
        rowtype - The type of the new row.
        rhs - The right-hand side for the new row. If this is null then 0 (zero) is used.
        Returns:
        The index of the newly created row.
        Throws:
        java.lang.IllegalArgumentException - if colind and colval have different lengths.
        XPRSprobException - if row cannot be added.
        See Also:
        addRow(int[], double[], char, Double, Double, String)
      • addCut

        public void addCut(int cuttype,
                           int[] colind,
                           double[] colval,
                           char rowtype,
                           double rhs)
                    throws XPRSprobException
        Add a single cut to the problem.
        Parameters:
        cuttype - The type of the cut. This can be any number chosen by the user to identify their cuts.
        colind - Array of column indices for the non-zeros for the new cut. This can be null. If not null then it must have the same length as colval and colval[k] must be the non-zero coefficient in the new cut for column colind[k].
        colval - Array of column values for the non-zeros for the new cut. This can be null. If not null then it must have the same length as colind and colval[k] must be the non-zero coefficient in the new cut for column colind[k].
        rowtype - The row type of the new cut (less-or-equal, equal, greater-or-equal). The type is specified as 'L', 'E', or 'G'.
        rhs - The right-hand side for the new cut.
        Throws:
        java.lang.NullPointerException - if colind or colval are null.
        java.lang.IllegalArgumentException - if colind and colval have different lengths.
        XPRSprobException - if cut cannot be added.
        See Also:
        addCuts(int, int[], byte[], double[], int[], int[], double[])
      • setProbname

        public void setProbname(java.lang.String probname)
                         throws XPRSprobException
        Sets the current default problem name. This command is rarely used.
        Parameters:
        probname - A string of up to MAXPROBNAMELENGTH characters containing the problem name.
        Throws:
        XPRSprobException
      • setLogFile

        public void setLogFile(java.lang.String filename)
                        throws XPRSprobException
        This directs all Optimizer output to a log file.
        Parameters:
        filename - A string of up to MAXPROBNAMELENGTH characters containing the file name to which all logging output should be written. If set to null, redirection of the output will stop and all screen output will be turned back on (except for library users where screen output is always turned off).
        Throws:
        XPRSprobException
      • setDefaultControl

        public void setDefaultControl(int control)
                               throws XPRSprobException
        Sets a single control to its default value.
        Parameters:
        control - Integer, double or string control parameter whose default value is to be set.
        Throws:
        XPRSprobException
      • setDefaults

        public void setDefaults()
                         throws XPRSprobException
        Sets all controls to their default values. Must be called before the problem is read or loaded by readProb, loadGlobal, loadLP, loadQGlobal, loadQP.
        Throws:
        XPRSprobException
      • readProb

        public void readProb(java.lang.String filename,
                             java.lang.String flags)
                      throws XPRSprobException
        Reads an (X)MPS or LP format matrix from file.
        Parameters:
        filename - The path and file name from which the problem is to be read. Limited to MAXPROBNAMELENGTH characters. If omitted (console users only), the default problem_name is used with various extensions - see below.
        flags - Flags to be passed:
        • l: only filename.lp is searched for;
        • v: use the provided filename verbatim, without appending the .mps, .mat or .lp extension;
        • z: read a compressed input file.
        Throws:
        XPRSprobException
      • loadLp

        public void loadLp(java.lang.String probname,
                           int ncols,
                           int nrows,
                           byte[] rowtype,
                           double[] rhs,
                           double[] rng,
                           double[] objcoef,
                           int[] start,
                           int[] collen,
                           int[] rowind,
                           double[] rowcoef,
                           double[] lb,
                           double[] ub)
                    throws XPRSprobException
        Enables the user to pass a matrix directly to the Optimizer, rather than reading the matrix from a file.
        Parameters:
        probname - A string of up to MAXPROBNAMELENGTH characters containing a names for the problem.
        ncols - Number of structural columns in the matrix.
        nrows - Number of rows in the matrix (not including the objective). Objective coefficients must be supplied in the objcoef array, and the objective function should not be included in any of the other arrays.
        rowtype - Character array of length nrows containing the row types:
        • L: indicates a <= constraint;
        • E: indicates an = constraint;
        • G: indicates a >= constraint;
        • R: indicates a range constraint;
        • N: indicates a nonbinding constraint.
        rhs - Double array of length nrows containing the right hand side coefficients of the rows. The right hand side value for a range row gives the upper bound on the row.
        rng - Double array of length nrows containing the range values for range rows. Values for all other rows will be ignored. May be null if not required. The lower bound on a range row is the right hand side value minus the range value. The sign of the range value is ignored - the absolute value is used in all cases.
        objcoef - Double array of length ncols containing the objective function coefficients.
        start - Integer array containing the offsets in the rowind and rowcoef arrays of the start of the elements for each column. This array is of length ncols or, if collen is null, length ncols+1. If collen is null, the extra entry of start, start[ncols], contains the position in the rowind and rowcoef arrays at which an extra column would start, if it were present. In C, this value is also the length of the rowind and rowcoef arrays.
        collen - Integer array of length ncols containing the number of nonzero elements in each column. May be null if not required. This array is not required if the non-zero coefficients in the rowind and rowcoef arrays are continuous, and the start array has ncols+1 entries as described above.
        rowind - Integer array containing the row indices for the nonzero elements in each column. If the indices are input contiguously, with the columns in ascending order, the length of the rowind is start[ncols-1]+collen[ncols-1] or, if collen is null, start[ncols].
        rowcoef - Double array containing the nonzero element values; length as for rowind.
        lb - Double array of length ncols containing the lower bounds on the columns. Use XPRS_MINUSINFINITY to represent a lower bound of minus infinity.
        ub - Double array of length ncols containing the upper bounds on the columns. Use XPRS_PLUSINFINITY to represent an upper bound of plus infinity.
        Throws:
        XPRSprobException
      • loadLp

        public void loadLp(java.lang.String probname,
                           int ncols,
                           int nrows,
                           byte[] rowtype,
                           double[] rhs,
                           double[] rng,
                           double[] objcoef,
                           long[] start,
                           int[] collen,
                           int[] rowind,
                           double[] rowcoef,
                           double[] lb,
                           double[] ub)
                    throws XPRSprobException
        Enables the user to pass a matrix directly to the Optimizer, rather than reading the matrix from a file.
        Parameters:
        probname - A string of up to MAXPROBNAMELENGTH characters containing a names for the problem.
        ncols - Number of structural columns in the matrix.
        nrows - Number of rows in the matrix (not including the objective). Objective coefficients must be supplied in the objcoef array, and the objective function should not be included in any of the other arrays.
        rowtype - Character array of length nrows containing the row types:
        • L: indicates a <= constraint;
        • E: indicates an = constraint;
        • G: indicates a >= constraint;
        • R: indicates a range constraint;
        • N: indicates a nonbinding constraint.
        rhs - Double array of length nrows containing the right hand side coefficients of the rows. The right hand side value for a range row gives the upper bound on the row.
        rng - Double array of length nrows containing the range values for range rows. Values for all other rows will be ignored. May be null if not required. The lower bound on a range row is the right hand side value minus the range value. The sign of the range value is ignored - the absolute value is used in all cases.
        objcoef - Double array of length ncols containing the objective function coefficients.
        start - Integer array containing the offsets in the rowind and rowcoef arrays of the start of the elements for each column. This array is of length ncols or, if collen is null, length ncols+1. If collen is null, the extra entry of start, start[ncols], contains the position in the rowind and rowcoef arrays at which an extra column would start, if it were present. In C, this value is also the length of the rowind and rowcoef arrays.
        collen - Integer array of length ncols containing the number of nonzero elements in each column. May be null if not required. This array is not required if the non-zero coefficients in the rowind and rowcoef arrays are continuous, and the start array has ncols+1 entries as described above.
        rowind - Integer array containing the row indices for the nonzero elements in each column. If the indices are input contiguously, with the columns in ascending order, the length of the rowind is start[ncols-1]+collen[ncols-1] or, if collen is null, start[ncols].
        rowcoef - Double array containing the nonzero element values; length as for rowind.
        lb - Double array of length ncols containing the lower bounds on the columns. Use XPRS_MINUSINFINITY to represent a lower bound of minus infinity.
        ub - Double array of length ncols containing the upper bounds on the columns. Use XPRS_PLUSINFINITY to represent an upper bound of plus infinity.
        Throws:
        XPRSprobException
      • loadQP

        public void loadQP(java.lang.String probname,
                           int ncols,
                           int nrows,
                           byte[] rowtype,
                           double[] rhs,
                           double[] rng,
                           double[] objcoef,
                           int[] start,
                           int[] collen,
                           int[] rowind,
                           double[] rowcoef,
                           double[] lb,
                           double[] ub,
                           int nobjqcoefs,
                           int[] objqcol1,
                           int[] objqcol2,
                           double[] objqcoef)
                    throws XPRSprobException
        Used to load a quadratic problem into the Optimizer data structure. Such a problem may have quadratic terms in its objective function, although not in its constraints.
        Parameters:
        probname - A string of up to MAXPROBNAMELENGTH characters containing a names for the problem.
        ncols - Number of structural columns in the matrix.
        nrows - Number of rows in the matrix (not including the objective row). Objective coefficients must be supplied in the objcoef array, and the objective function should not be included in any of the other arrays.
        rowtype - Character array of length nrows containing the row types:
        • L: indicates a <= constraint;
        • E: indicates an = constraint;
        • G: indicates a >= constraint;
        • R: indicates a range constraint;
        • N: indicates a nonbinding constraint.
        rhs - Double array of length nrows containing the right hand side coefficients of the rows. The right hand side value for a range row gives the upper bound on the row.
        rng - Double array of length nrows containing the range values for range rows. Values for all other rows will be ignored. May be null if there are no ranged constraints. The lower bound on a range row is the right hand side value minus the range value. The sign of the range value is ignored - the absolute value is used in all cases.
        objcoef - Double array of length ncols containing the objective function coefficients.
        start - Integer array containing the offsets in the rowind and rowcoef arrays of the start of the elements for each column. This array is of length ncols or, if collen is null, length ncols+1. If collen is null the extra entry of start, start[ncols], contains the position in the rowind and rowcoef arrays at which an extra column would start, if it were present. In C, this value is also the length of the rowind and rowcoef arrays.
        collen - Integer array of length ncols containing the number of nonzero elements in each column. May be null if all elements are contiguous and start[ncols] contains the offset where the elements for column ncols+1 would start. This array is not required if the non-zero coefficients in the rowind and rowcoef arrays are continuous, and the start array has ncols+1 entries as described above. It may be null if not required.
        rowind - Integer array containing the row indices for the nonzero elements in each column. If the indices are input contiguously, with the columns in ascending order, the length of the rowind is start[ncols-1]+collen[ncols-1] or, if collen is null, start[ncols].
        rowcoef - Double array containing the nonzero element values; length as for rowind.
        lb - Double array of length ncols containing the lower bounds on the columns. Use XPRS_MINUSINFINITY to represent a lower bound of minus infinity.
        ub - Double array of length ncols containing the upper bounds on the columns. Use XPRS_PLUSINFINITY to represent an upper bound of plus infinity.
        nobjqcoefs - Number of quadratic terms.
        objqcol1 - Integer array of size nobjqcoefs containing the column index of the first variable in each quadratic term.
        objqcol2 - Integer array of size nobjqcoefs containing the column index of the second variable in each quadratic term.
        objqcoef - Double array of size nobjqcoefs containing the quadratic coefficients.
        Throws:
        XPRSprobException
      • loadQP

        public void loadQP(java.lang.String probname,
                           int ncols,
                           int nrows,
                           byte[] rowtype,
                           double[] rhs,
                           double[] rng,
                           double[] objcoef,
                           long[] start,
                           int[] collen,
                           int[] rowind,
                           double[] rowcoef,
                           double[] lb,
                           double[] ub,
                           long nobjqcoefs,
                           int[] objqcol1,
                           int[] objqcol2,
                           double[] objqcoef)
                    throws XPRSprobException
        Used to load a quadratic problem into the Optimizer data structure. Such a problem may have quadratic terms in its objective function, although not in its constraints.
        Parameters:
        probname - A string of up to MAXPROBNAMELENGTH characters containing a names for the problem.
        ncols - Number of structural columns in the matrix.
        nrows - Number of rows in the matrix (not including the objective row). Objective coefficients must be supplied in the objcoef array, and the objective function should not be included in any of the other arrays.
        rowtype - Character array of length nrows containing the row types:
        • L: indicates a <= constraint;
        • E: indicates an = constraint;
        • G: indicates a >= constraint;
        • R: indicates a range constraint;
        • N: indicates a nonbinding constraint.
        rhs - Double array of length nrows containing the right hand side coefficients of the rows. The right hand side value for a range row gives the upper bound on the row.
        rng - Double array of length nrows containing the range values for range rows. Values for all other rows will be ignored. May be null if there are no ranged constraints. The lower bound on a range row is the right hand side value minus the range value. The sign of the range value is ignored - the absolute value is used in all cases.
        objcoef - Double array of length ncols containing the objective function coefficients.
        start - Integer array containing the offsets in the rowind and rowcoef arrays of the start of the elements for each column. This array is of length ncols or, if collen is null, length ncols+1. If collen is null the extra entry of start, start[ncols], contains the position in the rowind and rowcoef arrays at which an extra column would start, if it were present. In C, this value is also the length of the rowind and rowcoef arrays.
        collen - Integer array of length ncols containing the number of nonzero elements in each column. May be null if all elements are contiguous and start[ncols] contains the offset where the elements for column ncols+1 would start. This array is not required if the non-zero coefficients in the rowind and rowcoef arrays are continuous, and the start array has ncols+1 entries as described above. It may be null if not required.
        rowind - Integer array containing the row indices for the nonzero elements in each column. If the indices are input contiguously, with the columns in ascending order, the length of the rowind is start[ncols-1]+collen[ncols-1] or, if collen is null, start[ncols].
        rowcoef - Double array containing the nonzero element values; length as for rowind.
        lb - Double array of length ncols containing the lower bounds on the columns. Use XPRS_MINUSINFINITY to represent a lower bound of minus infinity.
        ub - Double array of length ncols containing the upper bounds on the columns. Use XPRS_PLUSINFINITY to represent an upper bound of plus infinity.
        nobjqcoefs - Number of quadratic terms.
        objqcol1 - Integer array of size nobjqcoefs containing the column index of the first variable in each quadratic term.
        objqcol2 - Integer array of size nobjqcoefs containing the column index of the second variable in each quadratic term.
        objqcoef - Double array of size nobjqcoefs containing the quadratic coefficients.
        Throws:
        XPRSprobException
      • loadQGlobal

        public void loadQGlobal(java.lang.String probname,
                                int ncols,
                                int nrows,
                                byte[] rowtype,
                                double[] rhs,
                                double[] rng,
                                double[] objcoef,
                                int[] start,
                                int[] collen,
                                int[] rowind,
                                double[] rowcoef,
                                double[] lb,
                                double[] ub,
                                int nobjqcoefs,
                                int[] objqcol1,
                                int[] objqcol2,
                                double[] objqcoef,
                                int nentities,
                                int nsets,
                                byte[] coltype,
                                int[] entind,
                                double[] limit,
                                byte[] settype,
                                int[] setstart,
                                int[] setind,
                                double[] refval)
                         throws XPRSprobException
        Used to load a global problem with quadratic objective coefficients in to the Optimizer data structures. Integer, binary, partial integer, semi-continuous and semi-continuous integer variables can be defined, together with sets of type 1 and 2. The reference row values for the set members are passed as an array rather than specifying a reference row.
        Parameters:
        probname - A string of up to MAXPROBNAMELENGTH characters containing a name for the problem.
        ncols - Number of structural columns in the matrix.
        nrows - Number of rows in the matrix (not including the objective). Objective coefficients must be supplied in the objcoef array, and the objective function should not be included in any of the other arrays.
        rowtype - Character array of length nrows containing the row type:
        • L: indicates a <= constraint;
        • E: indicates an = constraint;
        • G: indicates a >= constraint;
        • R: indicates a range constraint;
        • N: indicates a nonbinding constraint.
        rhs - Double array of length nrows containing the right hand side coefficients. The right hand side value for a range row gives the upper bound on the row.
        rng - Double array of length nrows containing the range values for range rows. The values in the range array will only be read for R type rows. The entries for other type rows will be ignored. May be null if not required. The lower bound on a range row is the right hand side value minus the range value. The sign of the range value is ignored - the absolute value is used in all cases.
        objcoef - Double array of length ncols containing the objective function coefficients.
        start - Integer array containing the offsets in the rowind and rowcoef arrays of the start of the elements for each column. This array is of length ncols or, if collen is null, length ncols+1.
        collen - Integer array of length ncols containing the number of nonzero elements in each column. May be null if not required. This array is not required if the non-zero coefficients in the rowind and rowcoef arrays are continuous, and the start array has ncols+1 entries as described above. It may be null if not required.
        rowind - Integer arrays containing the row indices for the nonzero elements in each column. If the indices are input contiguously, with the columns in ascending order, then the length of rowind is start[ncols-1]+collen[ncols-1] or, if collen is null, start[ncols].
        rowcoef - Double array containing the nonzero element values length as for rowind.
        lb - Double array of length ncols containing the lower bounds on the columns. Use XPRS_MINUSINFINITY to represent a lower bound of minus infinity.
        ub - Double array of length ncols containing the upper bounds on the columns. Use XPRS_PLUSINFINITY to represent an upper bound of plus infinity.
        nobjqcoefs - Number of quadratic terms.
        objqcol1 - Integer array of size nobjqcoefs containing the column index of the first variable in each quadratic term.
        objqcol2 - Integer array of size nobjqcoefs containing the column index of the second variable in each quadratic term.
        objqcoef - Double array of size nobjqcoefs containing the quadratic coefficients.
        nentities - Number of binary, integer, semi-continuous, semi-continuous integer and partial integer entities.
        nsets - Number of SOS1 and SOS2 sets.
        coltype - Character array of length nentities containing the entity types:
        • B: binary variables;
        • I: integer variables;
        • P: partial integer variables;
        • S: semi-continuous variables;
        • R: semi-continuous integers.
        entind - Integer array of length nentities containing the column indices of the global entities.
        limit - Double array of length nentities containing the integer limits for the partial integer variables and lower bounds for semi-continuous and semi-continuous integer variables (any entries in the positions corresponding to binary and integer variables will be ignored). May be null if not required.
        settype - Character array of length nsets containing:
        • 1: SOS1 type sets;
        • 2: SOS2 type sets.
        May be null if not required.
        setstart - Integer array containing the offsets in the setind and refval arrays indicating the start of the sets. This array is of length nsets+1, the last member containing the offset where set nsets+1 would start. May be null if not required.
        setind - Integer array of length setstart[nsets]-1 containing the columns in each set. May be null if not required.
        refval - Double array of length setstart[nsets]-1 containing the reference row entries for each member of the sets. May be null if not required.
        Throws:
        XPRSprobException
      • loadQGlobal

        public void loadQGlobal(java.lang.String probname,
                                int ncols,
                                int nrows,
                                byte[] rowtype,
                                double[] rhs,
                                double[] rng,
                                double[] objcoef,
                                long[] start,
                                int[] collen,
                                int[] rowind,
                                double[] rowcoef,
                                double[] lb,
                                double[] ub,
                                long nobjqcoefs,
                                int[] objqcol1,
                                int[] objqcol2,
                                double[] objqcoef,
                                int nentities,
                                int nsets,
                                byte[] coltype,
                                int[] entind,
                                double[] limit,
                                byte[] settype,
                                long[] setstart,
                                int[] setind,
                                double[] refval)
                         throws XPRSprobException
        Used to load a global problem with quadratic objective coefficients in to the Optimizer data structures. Integer, binary, partial integer, semi-continuous and semi-continuous integer variables can be defined, together with sets of type 1 and 2. The reference row values for the set members are passed as an array rather than specifying a reference row.
        Parameters:
        probname - A string of up to MAXPROBNAMELENGTH characters containing a name for the problem.
        ncols - Number of structural columns in the matrix.
        nrows - Number of rows in the matrix (not including the objective). Objective coefficients must be supplied in the objcoef array, and the objective function should not be included in any of the other arrays.
        rowtype - Character array of length nrows containing the row type:
        • L: indicates a <= constraint;
        • E: indicates an = constraint;
        • G: indicates a >= constraint;
        • R: indicates a range constraint;
        • N: indicates a nonbinding constraint.
        rhs - Double array of length nrows containing the right hand side coefficients. The right hand side value for a range row gives the upper bound on the row.
        rng - Double array of length nrows containing the range values for range rows. The values in the range array will only be read for R type rows. The entries for other type rows will be ignored. May be null if not required. The lower bound on a range row is the right hand side value minus the range value. The sign of the range value is ignored - the absolute value is used in all cases.
        objcoef - Double array of length ncols containing the objective function coefficients.
        start - Integer array containing the offsets in the rowind and rowcoef arrays of the start of the elements for each column. This array is of length ncols or, if collen is null, length ncols+1.
        collen - Integer array of length ncols containing the number of nonzero elements in each column. May be null if not required. This array is not required if the non-zero coefficients in the rowind and rowcoef arrays are continuous, and the start array has ncols+1 entries as described above. It may be null if not required.
        rowind - Integer arrays containing the row indices for the nonzero elements in each column. If the indices are input contiguously, with the columns in ascending order, then the length of rowind is start[ncols-1]+collen[ncols-1] or, if collen is null, start[ncols].
        rowcoef - Double array containing the nonzero element values length as for rowind.
        lb - Double array of length ncols containing the lower bounds on the columns. Use XPRS_MINUSINFINITY to represent a lower bound of minus infinity.
        ub - Double array of length ncols containing the upper bounds on the columns. Use XPRS_PLUSINFINITY to represent an upper bound of plus infinity.
        nobjqcoefs - Number of quadratic terms.
        objqcol1 - Integer array of size nobjqcoefs containing the column index of the first variable in each quadratic term.
        objqcol2 - Integer array of size nobjqcoefs containing the column index of the second variable in each quadratic term.
        objqcoef - Double array of size nobjqcoefs containing the quadratic coefficients.
        nentities - Number of binary, integer, semi-continuous, semi-continuous integer and partial integer entities.
        nsets - Number of SOS1 and SOS2 sets.
        coltype - Character array of length nentities containing the entity types:
        • B: binary variables;
        • I: integer variables;
        • P: partial integer variables;
        • S: semi-continuous variables;
        • R: semi-continuous integers.
        entind - Integer array of length nentities containing the column indices of the global entities.
        limit - Double array of length nentities containing the integer limits for the partial integer variables and lower bounds for semi-continuous and semi-continuous integer variables (any entries in the positions corresponding to binary and integer variables will be ignored). May be null if not required.
        settype - Character array of length nsets containing:
        • 1: SOS1 type sets;
        • 2: SOS2 type sets.
        May be null if not required.
        setstart - Integer array containing the offsets in the setind and refval arrays indicating the start of the sets. This array is of length nsets+1, the last member containing the offset where set nsets+1 would start. May be null if not required.
        setind - Integer array of length setstart[nsets]-1 containing the columns in each set. May be null if not required.
        refval - Double array of length setstart[nsets]-1 containing the reference row entries for each member of the sets. May be null if not required.
        Throws:
        XPRSprobException
      • fixGlobals

        public void fixGlobals(int options)
                        throws XPRSprobException
        Fixes all the global entities to the values of the last found MIP solution. This is useful for finding the reduced costs for the continuous variables after the global variables have been fixed to their optimal values.
        Parameters:
        options - Options how to fix the globals.
        • 0: If all global entities should be rounded to the nearest discrete value in the solution before being fixed.
        • 1: If piecewise linear and general constraints should be kept in the problem with only the non-convex decisions (i.e. which part of a non-convex piecewise linear function or which variable attains a maximum) fixed. Otherwise all variables appearing in piecewise linear or general constraints will be fixed.
        Throws:
        XPRSprobException
      • loadModelCuts

        public void loadModelCuts(int nrows,
                                  int[] rowind)
                           throws XPRSprobException
        Specifies that a set of rows in the matrix will be treated as model cuts.
        Parameters:
        nrows - The number of model cuts.
        rowind - An array of row indices to be treated as cuts.
        Throws:
        XPRSprobException
      • loadDelayedRows

        public void loadDelayedRows(int nrows,
                                    int[] rowind)
                             throws XPRSprobException
        Specifies that a set of rows in the matrix will be treated as delayed rows during a global search. These are rows that must be satisfied for any integer solution, but will not be loaded into the active set of constraints until required.
        Parameters:
        nrows - The number of delayed rows.
        rowind - An array of row indices to treat as delayed rows.
        Throws:
        XPRSprobException
      • loadDirs

        public void loadDirs(int ndirs,
                             int[] colind,
                             int[] priority,
                             byte[] dir,
                             double[] uppseudo,
                             double[] downpseudo)
                      throws XPRSprobException
        Loads directives into the matrix.
        Parameters:
        ndirs - Number of directives.
        colind - Integer array of length ndirs containing the column numbers. A negative value indicates a set number (the first set being -1, the second -2, and so on).
        priority - Integer array of length ndirs containing the priorities for the columns or sets. Priorities must be between 0 and 1000, where columns/sets with smallest priority will be branched on first. May be null if not required.
        dir - Character array of length ndirs specifying the branching direction for each column or set:
        • U: the entity is to be forced up;
        • D: the entity is to be forced down;
        • N: not specified.
        May be null if not required.
        uppseudo - Double array of length ndirs containing the up pseudo costs for the columns or sets. May be null if not required.
        downpseudo - Double array of length ndirs containing the down pseudo costs for the columns or sets. May be null if not required.
        Throws:
        XPRSprobException
      • loadBranchDirs

        public void loadBranchDirs(int ncols,
                                   int[] colind,
                                   int[] dir)
                            throws XPRSprobException
        Loads directives into the current problem to specify which global entities the Optimizer should continue to branch on when a node solution is global feasible.
        Parameters:
        ncols - Number of directives.
        colind - Integer array of length ncols containing the column numbers. A negative value indicates a set number (the first set being -1, the second -2, and so on).
        dir - Integer array of length ncols containing either 0 or 1 for the entities given in colind. Entities for which dir is set to 1 will be branched on until fixed before a global feasible solution is returned. If dir is null, the branching directive will be set for all entities in colind.
        Throws:
        XPRSprobException
      • loadPresolveDirs

        public void loadPresolveDirs(int ndirs,
                                     int[] colind,
                                     int[] priority,
                                     byte[] dir,
                                     double[] uppseudo,
                                     double[] downpseudo)
                              throws XPRSprobException
        Loads directives into the presolved matrix.
        Parameters:
        ndirs - Number of directives.
        colind - Integer array of length ndirs containing the column numbers. A negative value indicates a set number ( -1 being the first set, -2 the second, and so on).
        priority - Integer array of length ndirs containing the priorities for the columns or sets. May be null if not required.
        dir - Character array of length ndirs specifying the branching direction for each column or set:
        • U: the entity is to be forced up;
        • D: the entity is to be forced down;
        • N: not specified.
        May be null if not required.
        uppseudo - Double array of length ndirs containing the up pseudo costs for the columns or sets. May be null if not required.
        downpseudo - Double array of length ndirs containing the down pseudo costs for the columns or sets. May be null if not required.
        Throws:
        XPRSprobException
      • loadGlobal

        public void loadGlobal(java.lang.String probname,
                               int ncols,
                               int nrows,
                               byte[] rowtype,
                               double[] rhs,
                               double[] rng,
                               double[] objcoef,
                               int[] start,
                               int[] collen,
                               int[] rowind,
                               double[] rowcoef,
                               double[] lb,
                               double[] ub,
                               int nentities,
                               int nsets,
                               byte[] coltype,
                               int[] entind,
                               double[] limit,
                               byte[] settype,
                               int[] setstart,
                               int[] setind,
                               double[] refval)
                        throws XPRSprobException
        Used to load a global problem in to the Optimizer data structures. Integer, binary, partial integer, semi-continuous and semi-continuous integer variables can be defined, together with sets of type 1 and 2. The reference row values for the set members are passed as an array rather than specifying a reference row.
        Parameters:
        probname - A string of up to MAXPROBNAMELENGTH characters containing a name for the problem.
        ncols - Number of structural columns in the matrix.
        nrows - Number of rows in the matrix not (including the objective row). Objective coefficients must be supplied in the objcoef array, and the objective function should not be included in any of the other arrays.
        rowtype - Character array of length nrows containing the row types:
        • L: indicates a <= constraint;
        • E: indicates an = constraint;
        • G: indicates a >= constraint;
        • R: indicates a range constraint;
        • N: indicates a nonbinding constraint.
        rhs - Double array of length nrows containing the right hand side coefficients. The right hand side value for a range row gives the upper bound on the row.
        rng - Double array of length nrows containing the range values for range rows. Values for all other rows will be ignored. May be null if not required. The lower bound on a range row is the right hand side value minus the range value. The sign of the range value is ignored - the absolute value is used in all cases.
        objcoef - Double array of length ncols containing the objective function coefficients.
        start - Integer array containing the offsets in the rowind and rowcoef arrays of the start of the elements for each column. This array is of length ncols or, if collen is null, length ncols+1. If collen is null, the extra entry of start, start[ncols], contains the position in the rowind and rowcoef arrays at which an extra column would start, if it were present. In C, this value is also the length of the rowind and rowcoef arrays.
        collen - Integer array of length ncols containing the number of nonzero elements in each column. May be null if not required. This array is not required if the non-zero coefficients in the rowind and rowcoef arrays are continuous, and the start array has ncols+1 entries as described above. It may be null if not required.
        rowind - Integer arrays containing the row indices for the nonzero elements in each column. If the indices are input contiguously, with the columns in ascending order, then the length of rowind is start[ncols-1]+collen[ncols-1] or, if collen is null, start[ncols].
        rowcoef - Double array containing the nonzero element values length as for rowind.
        lb - Double array of length ncols containing the lower bounds on the columns. Use XPRS_MINUSINFINITY to represent a lower bound of minus infinity.
        ub - Double array of length ncols containing the upper bounds on the columns. Use XPRS_PLUSINFINITY to represent an upper bound of plus infinity.
        nentities - Number of binary, integer, semi-continuous, semi-continuous integer and partial integer entities.
        nsets - Number of SOS1 and SOS2 sets.
        coltype - Character array of length nentities containing the entity types:
        • B: binary variables;
        • I: integer variables;
        • P: partial integer variables;
        • S: semi-continuous variables;
        • R: semi-continuous integer variables.
        entind - Integer array of length nentities containing the column indices of the global entities.
        limit - Double array of length nentities containing the integer limits for the partial integer variables and lower bounds for semi-continuous and semi-continuous integer variables (any entries in the positions corresponding to binary and integer variables will be ignored). May be null if not required.
        settype - Character array of length nsets containing the set types:
        • 1: SOS1 type sets;
        • 2: SOS2 type sets.
        May be null if not required.
        setstart - Integer array containing the offsets in the setind and refval arrays indicating the start of the sets. This array is of length nsets+1, the last member containing the offset where set nsets+1 would start. May be null if not required.
        setind - Integer array of length setstart[nsets]-1 containing the columns in each set. May be null if not required.
        refval - Double array of length setstart[nsets]-1 containing the reference row entries for each member of the sets. May be null if not required.
        Throws:
        XPRSprobException
      • loadGlobal

        public void loadGlobal(java.lang.String probname,
                               int ncols,
                               int nrows,
                               byte[] rowtype,
                               double[] rhs,
                               double[] rng,
                               double[] objcoef,
                               long[] start,
                               int[] collen,
                               int[] rowind,
                               double[] rowcoef,
                               double[] lb,
                               double[] ub,
                               int nentities,
                               int nsets,
                               byte[] coltype,
                               int[] entind,
                               double[] limit,
                               byte[] settype,
                               long[] setstart,
                               int[] setind,
                               double[] refval)
                        throws XPRSprobException
        Used to load a global problem in to the Optimizer data structures. Integer, binary, partial integer, semi-continuous and semi-continuous integer variables can be defined, together with sets of type 1 and 2. The reference row values for the set members are passed as an array rather than specifying a reference row.
        Parameters:
        probname - A string of up to MAXPROBNAMELENGTH characters containing a name for the problem.
        ncols - Number of structural columns in the matrix.
        nrows - Number of rows in the matrix not (including the objective row). Objective coefficients must be supplied in the objcoef array, and the objective function should not be included in any of the other arrays.
        rowtype - Character array of length nrows containing the row types:
        • L: indicates a <= constraint;
        • E: indicates an = constraint;
        • G: indicates a >= constraint;
        • R: indicates a range constraint;
        • N: indicates a nonbinding constraint.
        rhs - Double array of length nrows containing the right hand side coefficients. The right hand side value for a range row gives the upper bound on the row.
        rng - Double array of length nrows containing the range values for range rows. Values for all other rows will be ignored. May be null if not required. The lower bound on a range row is the right hand side value minus the range value. The sign of the range value is ignored - the absolute value is used in all cases.
        objcoef - Double array of length ncols containing the objective function coefficients.
        start - Integer array containing the offsets in the rowind and rowcoef arrays of the start of the elements for each column. This array is of length ncols or, if collen is null, length ncols+1. If collen is null, the extra entry of start, start[ncols], contains the position in the rowind and rowcoef arrays at which an extra column would start, if it were present. In C, this value is also the length of the rowind and rowcoef arrays.
        collen - Integer array of length ncols containing the number of nonzero elements in each column. May be null if not required. This array is not required if the non-zero coefficients in the rowind and rowcoef arrays are continuous, and the start array has ncols+1 entries as described above. It may be null if not required.
        rowind - Integer arrays containing the row indices for the nonzero elements in each column. If the indices are input contiguously, with the columns in ascending order, then the length of rowind is start[ncols-1]+collen[ncols-1] or, if collen is null, start[ncols].
        rowcoef - Double array containing the nonzero element values length as for rowind.
        lb - Double array of length ncols containing the lower bounds on the columns. Use XPRS_MINUSINFINITY to represent a lower bound of minus infinity.
        ub - Double array of length ncols containing the upper bounds on the columns. Use XPRS_PLUSINFINITY to represent an upper bound of plus infinity.
        nentities - Number of binary, integer, semi-continuous, semi-continuous integer and partial integer entities.
        nsets - Number of SOS1 and SOS2 sets.
        coltype - Character array of length nentities containing the entity types:
        • B: binary variables;
        • I: integer variables;
        • P: partial integer variables;
        • S: semi-continuous variables;
        • R: semi-continuous integer variables.
        entind - Integer array of length nentities containing the column indices of the global entities.
        limit - Double array of length nentities containing the integer limits for the partial integer variables and lower bounds for semi-continuous and semi-continuous integer variables (any entries in the positions corresponding to binary and integer variables will be ignored). May be null if not required.
        settype - Character array of length nsets containing the set types:
        • 1: SOS1 type sets;
        • 2: SOS2 type sets.
        May be null if not required.
        setstart - Integer array containing the offsets in the setind and refval arrays indicating the start of the sets. This array is of length nsets+1, the last member containing the offset where set nsets+1 would start. May be null if not required.
        setind - Integer array of length setstart[nsets]-1 containing the columns in each set. May be null if not required.
        refval - Double array of length setstart[nsets]-1 containing the reference row entries for each member of the sets. May be null if not required.
        Throws:
        XPRSprobException
      • scale

        public void scale(int[] rowscale,
                          int[] colscale)
                   throws XPRSprobException
        Re-scales the current matrix.
        Parameters:
        rowscale - Integer array of size ROWS containing the powers of 2 with which to scale the rows, or null if not required.
        colscale - Integer array of size COLS containing the powers of 2 with which to scale the columns, or null if not required.
        Throws:
        XPRSprobException
      • readDirs

        public void readDirs(java.lang.String filename)
                      throws XPRSprobException
        Reads a directives file to help direct the global search.
        Parameters:
        filename - A string of up to MAXPROBNAMELENGTH characters containing the file name from which the directives are to be read. If omitted (or null), the default problem_name is used with a .dir extension.
        Throws:
        XPRSprobException
      • writeDirs

        public void writeDirs(java.lang.String filename)
                       throws XPRSprobException
        Writes the global search directives from the current problem to a directives file.
        Parameters:
        filename - A string of up to MAXPROBNAMELENGTH characters containing the file name to which the directives should be written. If omitted (or null), the default problem_name is used with a .dir extension.
        Throws:
        XPRSprobException
      • setIndicators

        public void setIndicators(int nrows,
                                  int[] rowind,
                                  int[] colind,
                                  int[] complement)
                           throws XPRSprobException
        Specifies that a set of rows in the matrix will be treated as indicator constraints, during a global search. An indicator constraint is made of a condition and a linear constraint. The condition is of the type " bin = value", where bin is a binary variable and value is either 0 or 1. The linear constraint is any linear row. During global search, a row configured as an indicator constraint is enforced only when condition holds, that is only if the indicator variable bin has the specified value.
        Parameters:
        nrows - The number of indicator constraints.
        rowind - Integer array of length nrows containing the indices of the rows that define the linear constraint part for the indicator constraints.
        colind - Integer array of length nrows containing the column indices of the indicator variables.
        complement - Integer array of length nrows with the complement flags:
        • 0: not an indicator constraint (in this case the corresponding entry in the colind array is ignored);
        • 1: for indicator constraints with condition "bin = 1";
        • -1: for indicator constraints with condition "bin = 0";
        Throws:
        XPRSprobException
      • addPwlCons

        public void addPwlCons(int npwls,
                               int npoints,
                               int[] colind,
                               int[] resultant,
                               int[] start,
                               double[] xval,
                               double[] yval)
                        throws XPRSprobException
        Adds one or more piecewise linear constraints to the problem. Each piecewise linear constraint y = f(x) consists of an (input) column x, a (different) resultant (output column) y and a piecewise linear function f. The piecewise linear function f is described by at least two breakpoints, which are given as combinations of x- and y-values. Discontinuous piecewise linear functions are supported, in this case both the left and right limit at a given point need to be entered as breakpoints. To differentiate between left and right limit, the breakpoints need to be given as a list with non-decreasing x-values.
        Parameters:
        npwls - The number of piecewise linear constraints to add.
        npoints - The total number of breakpoints of all piecewise linear constraints that should be added.
        colind - Integer array of length npwls containing the indices of the input variables x of the piecewise linear functions.
        resultant - Integer array of length npwls containing the indices of the output variables y of the piecewise linear functions.
        start - Integer array of length npwls containing the start index of each piecewise linear constraint in the xval and yval arrays.
        xval - Double array of length npoints containing the x-values of the breakpoints.
        yval - Double array of length npoints containing the y-values of the breakpoints.
        Throws:
        XPRSprobException
      • addPwlCons

        public void addPwlCons(int npwls,
                               long npoints,
                               int[] colind,
                               int[] resultant,
                               long[] start,
                               double[] xval,
                               double[] yval)
                        throws XPRSprobException
        Adds one or more piecewise linear constraints to the problem. Each piecewise linear constraint y = f(x) consists of an (input) column x, a (different) resultant (output column) y and a piecewise linear function f. The piecewise linear function f is described by at least two breakpoints, which are given as combinations of x- and y-values. Discontinuous piecewise linear functions are supported, in this case both the left and right limit at a given point need to be entered as breakpoints. To differentiate between left and right limit, the breakpoints need to be given as a list with non-decreasing x-values.
        Parameters:
        npwls - The number of piecewise linear constraints to add.
        npoints - The total number of breakpoints of all piecewise linear constraints that should be added.
        colind - Integer array of length npwls containing the indices of the input variables x of the piecewise linear functions.
        resultant - Integer array of length npwls containing the indices of the output variables y of the piecewise linear functions.
        start - Integer array of length npwls containing the start index of each piecewise linear constraint in the xval and yval arrays.
        xval - Double array of length npoints containing the x-values of the breakpoints.
        yval - Double array of length npoints containing the y-values of the breakpoints.
        Throws:
        XPRSprobException
      • getPwlCons

        public void getPwlCons(int[] colind,
                               int[] resultant,
                               int[] start,
                               double[] xval,
                               double[] yval,
                               int maxpoints,
                               IntHolder p_npoints,
                               int first,
                               int last)
                        throws XPRSprobException
        Returns the piecewise linear constraints y = f(x) in a given range.
        Parameters:
        colind - Integer array which will be filled with the indices of the input variables x. It must be of length at least last-first+1. May be null if not required.
        resultant - Integer array which will be filled with the indices of the output variables y. It must be of length at least last-first+1. May be null if not required.
        start - Integer array which will be filled with the start indices of the different constraints in the breakpoint arrays. It must be of length at least last-first+2. The x-values of the breakpoints of piecewise linear constraint i < last will be given in xval[start[i]] to xval[start[i+1]]. May be null if not required.
        xval - Double array of length maxpoints which will be filled with the x-values of the breakpoints. May be null if not required.
        yval - Double array of length maxpoints which will be filled with the y-values of the breakpoints. May be null if not required.
        maxpoints - Maximum number of breakpoints to be retrieved.
        p_npoints - Pointer to return the number of breakpoints in the selected constraints. If the number of breakpoints is greater than maxpoints, then only maxpoints elements will be returned in the xval and yval arrays. May be null if not required.
        first - First piecewise linear constraint in the range.
        last - Last piecewise linear constraint in the range.
        Throws:
        XPRSprobException
      • getPwlCons

        public void getPwlCons(int[] colind,
                               int[] resultant,
                               long[] start,
                               double[] xval,
                               double[] yval,
                               long maxpoints,
                               LongHolder p_npoints,
                               int first,
                               int last)
                        throws XPRSprobException
        Returns the piecewise linear constraints y = f(x) in a given range.
        Parameters:
        colind - Integer array which will be filled with the indices of the input variables x. It must be of length at least last-first+1. May be null if not required.
        resultant - Integer array which will be filled with the indices of the output variables y. It must be of length at least last-first+1. May be null if not required.
        start - Integer array which will be filled with the start indices of the different constraints in the breakpoint arrays. It must be of length at least last-first+2. The x-values of the breakpoints of piecewise linear constraint i < last will be given in xval[start[i]] to xval[start[i+1]]. May be null if not required.
        xval - Double array of length maxpoints which will be filled with the x-values of the breakpoints. May be null if not required.
        yval - Double array of length maxpoints which will be filled with the y-values of the breakpoints. May be null if not required.
        maxpoints - Maximum number of breakpoints to be retrieved.
        p_npoints - Pointer to return the number of breakpoints in the selected constraints. If the number of breakpoints is greater than maxpoints, then only maxpoints elements will be returned in the xval and yval arrays. May be null if not required.
        first - First piecewise linear constraint in the range.
        last - Last piecewise linear constraint in the range.
        Throws:
        XPRSprobException
      • addGenCons

        public void addGenCons(int ncons,
                               int ncols,
                               int nvals,
                               XPRSenumerations.GenConsType[] contype,
                               int[] resultant,
                               int[] colstart,
                               int[] colind,
                               int[] valstart,
                               double[] val)
                        throws XPRSprobException
        Adds one or more general constraints to the problem. Each general constraint y = f(x1, ..., xn, c1, ..., cn) consists of one or more (input) columns xi, zero or more constant values ci and a resultant (output column) y, different from all xi. General constraints include maximum and minimum (arbitrary number of input columns of any type and arbitrary number of input values, at least one total), and and or (at least one binary input column, no constant values, binary resultant) and absolute value (exactly one input column of arbitrary type, no constant values).
        Parameters:
        ncons - The number of general constraints to add.
        ncols - The total number of input variables in general constraints that should be added.
        nvals - The total number of constant values in general constraints that should be added.
        contype - Integer array of length ncons containing the types of the general constraints:
        • XPRS_GENCONS_MAX (0): indicates a maximum constraint;
        • XPRS_GENCONS_MIN (1): indicates a minimum constraint;
        • XPRS_GENCONS_AND (2): indicates an and constraint.
        • XPRS_GENCONS_OR (3): indicates an or constraint;
        • XPRS_GENCONS_ABS (4): indicates an absolute value constraint.
        resultant - Integer array of length ncons containing the indices of the output variables of the general constraints.
        colstart - Integer array of length ncons containing the start index of each general constraint in the colind array.
        colind - Integer array of length ncols containing the input variables in all general constraints.
        valstart - Integer array of length ncons containing the start index of each general constraint in the val array (may be null if ncoefs = 0).
        val - Double array of length nvals containing the constant values in all general constraints (may be null if ncoefs = 0).
        Throws:
        XPRSprobException
      • addGenCons

        public void addGenCons(int ncons,
                               long ncols,
                               long nvals,
                               XPRSenumerations.GenConsType[] contype,
                               int[] resultant,
                               long[] colstart,
                               int[] colind,
                               long[] valstart,
                               double[] val)
                        throws XPRSprobException
        Adds one or more general constraints to the problem. Each general constraint y = f(x1, ..., xn, c1, ..., cn) consists of one or more (input) columns xi, zero or more constant values ci and a resultant (output column) y, different from all xi. General constraints include maximum and minimum (arbitrary number of input columns of any type and arbitrary number of input values, at least one total), and and or (at least one binary input column, no constant values, binary resultant) and absolute value (exactly one input column of arbitrary type, no constant values).
        Parameters:
        ncons - The number of general constraints to add.
        ncols - The total number of input variables in general constraints that should be added.
        nvals - The total number of constant values in general constraints that should be added.
        contype - Integer array of length ncons containing the types of the general constraints:
        • XPRS_GENCONS_MAX (0): indicates a maximum constraint;
        • XPRS_GENCONS_MIN (1): indicates a minimum constraint;
        • XPRS_GENCONS_AND (2): indicates an and constraint.
        • XPRS_GENCONS_OR (3): indicates an or constraint;
        • XPRS_GENCONS_ABS (4): indicates an absolute value constraint.
        resultant - Integer array of length ncons containing the indices of the output variables of the general constraints.
        colstart - Integer array of length ncons containing the start index of each general constraint in the colind array.
        colind - Integer array of length ncols containing the input variables in all general constraints.
        valstart - Integer array of length ncons containing the start index of each general constraint in the val array (may be null if ncoefs = 0).
        val - Double array of length nvals containing the constant values in all general constraints (may be null if ncoefs = 0).
        Throws:
        XPRSprobException
      • getGenCons

        public void getGenCons(XPRSenumerations.GenConsType[] contype,
                               int[] resultant,
                               int[] colstart,
                               int[] colind,
                               int maxcols,
                               IntHolder p_ncols,
                               int[] valstart,
                               double[] val,
                               int maxvals,
                               IntHolder p_nvals,
                               int first,
                               int last)
                        throws XPRSprobException
        Returns the general constraints y = f(x1, ..., xn, c1, ..., cm) in a given range.
        Parameters:
        contype - null if not required or an integer array of length at least last-first+1 which will be filled with the types of the general constraints:
        • XPRS_GENCONS_MAX (0): indicates a maximum constraint;
        • XPRS_GENCONS_MIN (1): indicates a minimum constraint;
        • XPRS_GENCONS_AND (2): indicates an and constraint.
        • XPRS_GENCONS_OR (3): indicates an or constraint;
        • XPRS_GENCONS_ABS (4): indicates an absolute value constraint.
        resultant - Integer array which will be filled with the indices of the output variables y. It must be of length at least last-first+1. May be null if not required.
        colstart - Integer array of length at least last-first+2 which will be filled with the start index of each general constraint in the colind array. May be null if not required.
        colind - Integer array which will be filled with the indices of the input variables xi. May be null if not required.
        maxcols - Maximum number of input columns to be retrieved.
        p_ncols - Pointer to return the number of input columns in the colind array. If the number of input columns is greater than maxcols, then only maxcols elements will be returned. May be null if not required.
        valstart - Integer array of length at least last-first+2 which will be filled with the start index of each general constraint in the val array. May be null if not required.
        val - Integer array which will be filled with the constant values ci. May be null if not required.
        maxvals - Maximum number of constant values to be retrieved.
        p_nvals - Pointer to return the number of constant values in the val array. If the number of constant values is greater than maxvals, then only maxvals elements will be returned.May be null if not required.
        first - First general constraint in the range.
        last - Last general constraint in the range.
        Throws:
        XPRSprobException
      • getGenCons

        public void getGenCons(XPRSenumerations.GenConsType[] contype,
                               int[] resultant,
                               long[] colstart,
                               int[] colind,
                               long maxcols,
                               LongHolder p_ncols,
                               long[] valstart,
                               double[] val,
                               long maxvals,
                               LongHolder p_nvals,
                               int first,
                               int last)
                        throws XPRSprobException
        Returns the general constraints y = f(x1, ..., xn, c1, ..., cm) in a given range.
        Parameters:
        contype - null if not required or an integer array of length at least last-first+1 which will be filled with the types of the general constraints:
        • XPRS_GENCONS_MAX (0): indicates a maximum constraint;
        • XPRS_GENCONS_MIN (1): indicates a minimum constraint;
        • XPRS_GENCONS_AND (2): indicates an and constraint.
        • XPRS_GENCONS_OR (3): indicates an or constraint;
        • XPRS_GENCONS_ABS (4): indicates an absolute value constraint.
        resultant - Integer array which will be filled with the indices of the output variables y. It must be of length at least last-first+1. May be null if not required.
        colstart - Integer array of length at least last-first+2 which will be filled with the start index of each general constraint in the colind array. May be null if not required.
        colind - Integer array which will be filled with the indices of the input variables xi. May be null if not required.
        maxcols - Maximum number of input columns to be retrieved.
        p_ncols - Pointer to return the number of input columns in the colind array. If the number of input columns is greater than maxcols, then only maxcols elements will be returned. May be null if not required.
        valstart - Integer array of length at least last-first+2 which will be filled with the start index of each general constraint in the val array. May be null if not required.
        val - Integer array which will be filled with the constant values ci. May be null if not required.
        maxvals - Maximum number of constant values to be retrieved.
        p_nvals - Pointer to return the number of constant values in the val array. If the number of constant values is greater than maxvals, then only maxvals elements will be returned.May be null if not required.
        first - First general constraint in the range.
        last - Last general constraint in the range.
        Throws:
        XPRSprobException
      • delPwlCons

        public void delPwlCons(int npwls,
                               int[] pwlind)
                        throws XPRSprobException
        Delete piecewise linear constraints from a problem.
        Parameters:
        npwls - Number of piecewise linear constraints to delete.
        pwlind - An integer array of length npwls containing the piecewise linear constraints to delete.
        Throws:
        XPRSprobException
      • delGenCons

        public void delGenCons(int ncons,
                               int[] conind)
                        throws XPRSprobException
        Delete general constraints from a problem.
        Parameters:
        ncons - Number of general constraints to delete.
        conind - An integer array of length ncons containing the general constraints to delete.
        Throws:
        XPRSprobException
      • dumpControls

        public void dumpControls()
                          throws XPRSprobException
        Displays the list of controls and their current value for those controls that have been set to a non default value.
        Throws:
        XPRSprobException
      • getIndicators

        public void getIndicators(int[] colind,
                                  int[] complement,
                                  int first,
                                  int last)
                           throws XPRSprobException
        Returns the indicator constraint condition (indicator variable and complement flag) associated to the rows in a given range.
        Parameters:
        colind - Integer array of length last-first+1 where the column indices of the indicator variables are to be placed.
        complement - Integer array of length last-first+1 where the indicator complement flags will be returned:
        • 0: not an indicator constraint (in this case the corresponding entry in the colind array is ignored);
        • 1: for indicator constraints with condition "bin = 1";
        • -1: for indicator constraints with condition "bin = 0";
        first - First row in the range.
        last - Last row in the range (inclusive).
        Throws:
        XPRSprobException
      • delIndicators

        public void delIndicators(int first,
                                  int last)
                           throws XPRSprobException
        Delete indicator constraints. This turns the specified rows into normal rows (not controlled by indicator variables).
        Parameters:
        first - First row in the range.
        last - Last row in the range (inclusive).
        Throws:
        XPRSprobException
      • lpOptimize

        public void lpOptimize(java.lang.String flags)
                        throws XPRSprobException
        This function begins a search for the optimal continuous (LP) solution. The direction of optimization is given by OBJSENSE. The status of the problem when the function completes can be checked using LPSTATUS. Any global entities in the problem will be ignored.
        Parameters:
        flags - Flags to pass to lpOptimize ( LPOPTIMIZE). The default is "" or null, in which case the algorithm used is determined by the DEFAULTALG control. If the argument includes:
        • b: the model will be solved using the Newton barrier method;
        • p: the model will be solved using the primal simplex algorithm;
        • d: the model will be solved using the dual simplex algorithm;
        • n: (lower case N), the network part of the model will be identified and solved using the network simplex algorithm;
        Throws:
        XPRSprobException
      • mipOptimize

        public void mipOptimize(java.lang.String flags)
                         throws XPRSprobException
        This function begins a global search for the optimal MIP solution. The direction of optimization is given by OBJSENSE. The status of the problem when the function completes can be checked using MIPSTATUS.
        Parameters:
        flags - Flags to pass to mipOptimize ( MIPOPTIMIZE), which specifies how to solve the initial continuous problem where the global entities are relaxed. If the argument includes:
        • b: the initial continuous relaxation will be solved using the Newton barrier method;
        • p: the initial continuous relaxation will be solved using the primal simplex algorithm;
        • d: the initial continuous relaxation will be solved using the dual simplex algorithm;
        • n: the network part of the initial continuous relaxation will be identified and solved using the network simplex algorithm;
        • l: stop after having solved the initial continous relaxation.
        Throws:
        XPRSprobException
      • readSlxSol

        public void readSlxSol(java.lang.String filename,
                               java.lang.String flags)
                        throws XPRSprobException
        Reads an ASCII solution file [ .slx] created by the writeSlxSol function.
        Parameters:
        filename - A string of up to MAXPROBNAMELENGTH characters containing the file name to which the solution is to be read. If omitted, the default problem_name is used with a .slx extension.
        flags - Flags to pass to writeSlxSol ( WRITESLXSOL):
        • l: read the solution as an LP solution in case of a MIP problem;
        • m: read the solution as a solution for the MIP problem;
        • a: read multiple MIP solutions from the .slx file and add them to the MIP problem;
        • v: use the provided filename verbatim, without appending the .slx extension;
        • z: read a compressed input file.
        Throws:
        XPRSprobException
      • initGlobal

        public void initGlobal()
                        throws XPRSprobException
        Deprecated. 
        Reinitializes the global tree search. By default if a global search is interrupted and called again the global search will continue from where it left off. If initGlobal is called after the first call to mipOptimize, the global search will start from the top node when mipOptimize is called again.
        Throws:
        XPRSprobException
      • alter

        public void alter(java.lang.String filename)
                   throws XPRSprobException
        Alters or changes matrix elements, right hand sides and constraint senses in the current problem.
        Parameters:
        filename - A string of up to MAXPROBNAMELENGTH characters specifying the file to be read. If omitted, the default problem_name is used with a .alt extension.
        Throws:
        XPRSprobException
      • readBasis

        public void readBasis(java.lang.String filename,
                              java.lang.String flags)
                       throws XPRSprobException
        Instructs the Optimizer to read in a previously saved basis from a file.
        Parameters:
        filename - A string of up to MAXPROBNAMELENGTH characters containing the file name from which the basis is to be read. If omitted, the default problem_name is used with a .bss extension.
        flags - Flags to pass to readBasis ( READBASIS):
        • t: input a compact advanced form of the basis;
        • v: use the provided filename verbatim, without appending the .bss extension;
        • z: read a compressed input file.
        Throws:
        XPRSprobException
      • readBinSol

        public void readBinSol(java.lang.String filename,
                               java.lang.String flags)
                        throws XPRSprobException
        Reads a solution from a binary solution file.
        Parameters:
        filename - A string of up to MAXPROBNAMELENGTH characters containing the file name from which the solution is to be read. If omitted, the default problem_name is used with a .sol extension.
        flags - Flags to pass to readBinSol ( READBINSOL):
        • m: load the solution as a solution for the MIP;
        • x: load the solution as a solution for the LP;
        • v: use the provided filename verbatim, without appending the .sol extension;
        • z: read a compressed input file.
        Throws:
        XPRSprobException
      • getInfeas

        public void getInfeas(IntHolder p_nprimalcols,
                              IntHolder p_nprimalrows,
                              IntHolder p_ndualrows,
                              IntHolder p_ndualcols,
                              int[] x,
                              int[] slack,
                              int[] duals,
                              int[] djs)
                       throws XPRSprobException
        Returns a list of infeasible primal and dual variables.
        Parameters:
        p_nprimalcols - Pointer to an integer where the number of primal infeasible variables is returned.
        p_nprimalrows - Pointer to an integer where the number of primal infeasible rows is returned.
        p_ndualrows - Pointer to an integer where the number of dual infeasible rows is returned.
        p_ndualcols - Pointer to an integer where the number of dual infeasible variables is returned.
        x - Integer array of length p_nprimalcols where the primal infeasible variables will be returned. May be null if not required.
        slack - Integer array of length p_nprimalrows where the primal infeasible rows will be returned. May be null if not required.
        duals - Integer array of length p_ndualrows where the dual infeasible rows will be returned. May be null if not required.
        djs - Integer array of length p_ndualcols where the dual infeasible variables will be returned. May be null if not required.
        Throws:
        XPRSprobException
      • getScaledInfeas

        public void getScaledInfeas(IntHolder p_nprimalcols,
                                    IntHolder p_nprimalrows,
                                    IntHolder p_ndualrows,
                                    IntHolder p_ndualcols,
                                    int[] x,
                                    int[] slack,
                                    int[] duals,
                                    int[] djs)
                             throws XPRSprobException
        Returns a list of scaled infeasible primal and dual variables for the original problem. If the problem is currently presolved, it is postsolved before the function returns.
        Parameters:
        p_nprimalcols - Number of primal infeasible variables.
        p_nprimalrows - Number of primal infeasible rows.
        p_ndualrows - Number of dual infeasible rows.
        p_ndualcols - Number of dual infeasible variables.
        x - Integer array of length p_nprimalcols where the primal infeasible variables will be returned. May be null if not required.
        slack - Integer array of length p_nprimalrows where the primal infeasible rows will be returned. May be null if not required.
        duals - Integer array of length p_ndualrows where the dual infeasible rows will be returned. May be null if not required.
        djs - Integer array of length p_ndualcols where the dual infeasible variables will be returned. May be null if not required.
        Throws:
        XPRSprobException
      • getUnbVec

        public void getUnbVec(IntHolder p_seq)
                       throws XPRSprobException
        Returns the index vector which causes the primal simplex or dual simplex algorithm to determine that a matrix is primal or dual unbounded respectively.
        Parameters:
        p_seq - Pointer to an integer where the vector causing the problem to be detected as being primal or dual unbounded will be returned. In the dual simplex case, the vector is the leaving row for which the dual simplex detected dual unboundedness. In the primal simplex case, the vector is the entering row p_seq (if p_seq is in the range 0 to ROWS -1) or column (variable) p_seq-ROWS- SPAREROWS (if p_seq is between ROWS+SPAREROWS and ROWS+SPAREROWS+ COLS -1) for which the primal simplex detected primal unboundedness.
        Throws:
        XPRSprobException
      • crossoverLpSol

        public void crossoverLpSol(IntHolder p_status)
                            throws XPRSprobException
        Provides a basic optimal solution for a given solution of an LP problem. This function behaves like the crossover after the barrier algorithm.
        Parameters:
        p_status - Pointer to an int where the status will be returned. The status is one of:
        • 0: The crossover is successful.
        • 1: The crossover is not performed because the problem has no solution.
        Throws:
        XPRSprobException
      • tune

        public void tune(java.lang.String flags)
                  throws XPRSprobException
        This function begins a tuner session for the current problem. The tuner will solve the problem multiple times while evaluating a list of control settings and promising combinations of them. When finished, the tuner will select and set the best control setting on the problem. Note that the direction of optimization is given by OBJSENSE.
        Parameters:
        flags - Flags to pass to tune, which specify whether to tune the current problem as an LP or a MIP problem, and the algorithm for solving the LP problem or the initial LP relaxation of the MIP. The flags are optional. If the argument includes:
        • l: will tune the problem as an LP (mutually exclusive with flag g);
        • g: will tune the problem as a MIP (mutually exclusive with flag l);
        • d: will use the dual simplex method;
        • p: will use the primal simplex method;
        • b: will use the barrier method;
        • n: will use the network simplex method.
        Throws:
        XPRSprobException
      • tunerWriteMethod

        public void tunerWriteMethod(java.lang.String methodfile)
                              throws XPRSprobException
        This function writes the current tuner method to a given file or prints it to the console.
        Parameters:
        methodfile - The method file name, to which the tuner will write the current tuner method. If the input is stdout or STDOUT, then the tuner will print the method to the console instead.
        Throws:
        XPRSprobException
      • tunerReadMethod

        public void tunerReadMethod(java.lang.String methodfile)
                             throws XPRSprobException
        This function loads a user defined tuner method from the given file.
        Parameters:
        methodfile - The method file name, from which the tuner can load a user-defined tuner method.
        Throws:
        XPRSprobException
      • getLastBarSol

        public void getLastBarSol(double[] x,
                                  double[] slack,
                                  double[] duals,
                                  double[] djs,
                                  IntHolder p_status)
                           throws XPRSprobException
        Used to obtain the last barrier solution values following optimization that used the barrier solver.
        Parameters:
        x - Double array of length ORIGINALCOLS where the values of the primal variables will be returned. May be null if not required.
        slack - Double array of length ORIGINALROWS where the values of the slack variables will be returned. May be null if not required.
        duals - Double array of length ORIGINALROWS where the values of the dual variables ( cBTB-1) will be returned. May be null if not required.
        djs - Double array of length ORIGINALCOLS where the reduced cost for each variable ( cT-cBTB-1A) will be returned. May be null if not required.
        p_status - Status of the last barrier solve. Value matches that of XPRS_LPSTATUS should the solve have been stopped immediately after the barrier.
        Throws:
        XPRSprobException
      • firstIIS

        public void firstIIS(int mode,
                             IntHolder p_status)
                      throws XPRSprobException
        Initiates a search for an Irreducible Infeasible Set (IIS) in an infeasible problem.
        Parameters:
        mode - The IIS search mode:
        • 0: stops after finding the initial infeasible subproblem;
        • 1: find an IIS, emphasizing simplicity of the IIS;
        • 2: find an IIS, emphasizing a quick result.
        p_status - The status after the search:
        • 0: success;
        • 1: if problem is feasible;
        • 2: error;
        • 3: timeout.
        Throws:
        XPRSprobException
      • nextIIS

        public void nextIIS(IntHolder p_status)
                     throws XPRSprobException
        Continues the search for further Irreducible Infeasible Sets (IIS), or calls firstIIS ( IIS) if no IIS has been identified yet.
        Parameters:
        p_status - The status after the search:
        • 0: success;
        • 1: no more IIS could be found, or problem is feasible if no firstIIS call preceded;
        • 2: on error (when the function returns nonzero).
        Throws:
        XPRSprobException
      • IISStatus

        public void IISStatus(IntHolder p_niis,
                              int[] nrows,
                              int[] ncols,
                              double[] suminfeas,
                              int[] numinfeas)
                       throws XPRSprobException
        Returns statistics on the Irreducible Infeasible Sets (IIS) found so far by firstIIS ( IIS), nextIIS ( IIS -n) or iISAll ( IIS -a).
        Parameters:
        p_niis - The number of IISs found so far.
        nrows - Number of rows in the IISs.
        ncols - Number of bounds in the IISs.
        suminfeas - The sum of infeasibilities in the IISs after the first phase simplex.
        numinfeas - The number of infeasible variables in the IISs after the first phase simplex.
        Throws:
        XPRSprobException
      • IISAll

        public void IISAll()
                    throws XPRSprobException
        Performs an automated search for independent Irreducible Infeasible Sets (IIS) in an infeasible problem.
        Throws:
        XPRSprobException
      • writeIIS

        public void writeIIS(int iis,
                             java.lang.String filename,
                             int filetype,
                             java.lang.String flags)
                      throws XPRSprobException
        Writes an LP/MPS/CSV file containing a given Irreducible Infeasible Set (IIS). If 0 is passed as the IIS number parameter, the initial infeasible subproblem is written.
        Parameters:
        iis - The ordinal number of the IIS to be written.
        filename - The name of the file to be created.
        filetype - Type of file to be created:
        • 0: creates an lp/mps file containing the IIS as a linear programming problem;
        • 1: creates a comma separated (csv) file containing the description and supplementary information on the given IIS.
        flags - Flags passed to the writeProb function.
        Throws:
        XPRSprobException
      • IISIsolations

        public void IISIsolations(int iis)
                           throws XPRSprobException
        Performs the isolation identification procedure for an Irreducible Infeasible Set (IIS).
        Parameters:
        iis - The number of the IIS identified by either firstIIS ( IIS), nextIIS ( IIS -n) or iISAll ( IIS -a) in which the isolations should be identified.
        Throws:
        XPRSprobException
      • getIISData

        public void getIISData(int iis,
                               IntHolder p_nrows,
                               IntHolder p_ncols,
                               int[] rowind,
                               int[] colind,
                               byte[] contype,
                               byte[] bndtype,
                               double[] duals,
                               double[] djs,
                               byte[] isolationrows,
                               byte[] isolationcols)
                        throws XPRSprobException
        Returns information for an Irreducible Infeasible Set: size, variables (row and column vectors) and conflicting sides of the variables, duals and reduced costs.
        Parameters:
        iis - The ordinal number of the IIS to get data for.
        p_nrows - Pointer to an integer where the number of rows in the IIS will be returned.
        p_ncols - Pointer to an integer where the number of bounds in the IIS will be returned.
        rowind - Indices of rows in the IIS. Can be null if not required.
        colind - Indices of bounds (columns) in the IIS. Can be null if not required.
        contype - Sense of rows in the IIS:
        • L: for less or equal row;
        • G: for greater or equal row.
        • E: for an equality row (for a non LP IIS);
        • 1: for a SOS1 row;
        • 2: for a SOS2 row;
        • W: for a piecewise linear constraint;
        • X: for a general constraint;
        • I: for an indicator row.
        Can be null if not required.
        bndtype - Sense of bound in the IIS:
        • U: for upper bound;
        • L: for lower bound.
        • F: for fixed columns (for a non LP IIS);
        • B: for a binary column;
        • I: for an integer column;
        • P: for a partial integer columns;
        • S: for a semi-continuous column;
        • R: for a semi-continuous integer column.
        Can be null if not required.
        duals - The dual multipliers associated with the rows. Can be null if not required.
        djs - The dual multipliers (reduced costs) associated with the bounds. Can be null if not required.
        isolationrows - The isolation status of the rows:
        • -1: if isolation information is not available for row (run iis isolations);
        • 0: if row is not in isolation;
        • 1: if row is in isolation.
        Can be null if not required.
        isolationcols - The isolation status of the bounds:
        • -1: if isolation information is not available for column (run iis isolations);
        • 0: if column is not in isolation;
        • 1: if column is in isolation.
        Can be null if not required.
        Throws:
        XPRSprobException
      • loadPresolveBasis

        public void loadPresolveBasis(int[] rowstat,
                                      int[] colstat)
                               throws XPRSprobException
        Loads a presolved basis from the user's areas.
        Parameters:
        rowstat - Integer array of length ROWS containing the basis status of the slack, surplus or artificial variable associated with each row. The status must be one of:
        • 0: slack, surplus or artificial is non-basic at lower bound;
        • 1: slack, surplus or artificial is basic;
        • 2: slack or surplus is non-basic at upper bound.
        colstat - Integer array of length COLS containing the basis status of each of the columns in the matrix. The status must be one of:
        • 0: variable is non-basic at lower bound or superbasic at zero if the variable has no lower bound;
        • 1: variable is basic;
        • 2: variable is at upper bound;
        • 3: variable is super-basic.
        Throws:
        XPRSprobException
      • getGlobal

        public void getGlobal(IntHolder p_nentities,
                              IntHolder p_nsets,
                              byte[] coltype,
                              int[] colind,
                              double[] limit,
                              byte[] settype,
                              int[] start,
                              int[] setcols,
                              double[] refval)
                       throws XPRSprobException
        Retrieves global information about a problem. It must be called before mipOptimize if the presolve option is used.
        Parameters:
        p_nentities - Pointer to the integer where the number of binary, integer, semi-continuous, semi-continuous integer and partial integer entities will be returned. This is equal to the problem attribute MIPENTS.
        p_nsets - Pointer to the integer where the number of SOS1 and SOS2 sets will be returned. It can be retrieved from the problem attribute SETS.
        coltype - Character array of length p_nentities where the entity types will be returned. The types will be one of:
        • B: binary variables;
        • I: integer variables;
        • P: partial integer variables;
        • S: semi-continuous variables;
        • R: semi-continuous integer variables.
        colind - Integer array of length p_nentities where the column indices of the global entities will be returned.
        limit - Double array of length p_nentities where the limits for the partial integer variables and lower bounds for the semi-continuous and semi-continuous integer variables will be returned (any entries in the positions corresponding to binary and integer variables will be meaningless).
        settype - Character array of length p_nsets where the set types will be returned. The set types will be one of:
        • 1: SOS1 type sets;
        • 2: SOS2 type sets.
        start - Integer array where the offsets into the setcols and refval arrays indicating the start of the sets will be returned. This array must be of length p_nsets+1, the final element will contain the offset where set p_nsets+1 would start and equals the length of the setcols and refval arrays, SETMEMBERS.
        setcols - Integer array of length SETMEMBERS where the columns in each set will be returned.
        refval - Double array of length SETMEMBERS where the reference row entries for each member of the sets will be returned.
        Throws:
        XPRSprobException
      • getGlobal

        public void getGlobal(IntHolder p_nentities,
                              IntHolder p_nsets,
                              byte[] coltype,
                              int[] colind,
                              double[] limit,
                              byte[] settype,
                              long[] start,
                              int[] setcols,
                              double[] refval)
                       throws XPRSprobException
        Retrieves global information about a problem. It must be called before mipOptimize if the presolve option is used.
        Parameters:
        p_nentities - Pointer to the integer where the number of binary, integer, semi-continuous, semi-continuous integer and partial integer entities will be returned. This is equal to the problem attribute MIPENTS.
        p_nsets - Pointer to the integer where the number of SOS1 and SOS2 sets will be returned. It can be retrieved from the problem attribute SETS.
        coltype - Character array of length p_nentities where the entity types will be returned. The types will be one of:
        • B: binary variables;
        • I: integer variables;
        • P: partial integer variables;
        • S: semi-continuous variables;
        • R: semi-continuous integer variables.
        colind - Integer array of length p_nentities where the column indices of the global entities will be returned.
        limit - Double array of length p_nentities where the limits for the partial integer variables and lower bounds for the semi-continuous and semi-continuous integer variables will be returned (any entries in the positions corresponding to binary and integer variables will be meaningless).
        settype - Character array of length p_nsets where the set types will be returned. The set types will be one of:
        • 1: SOS1 type sets;
        • 2: SOS2 type sets.
        start - Integer array where the offsets into the setcols and refval arrays indicating the start of the sets will be returned. This array must be of length p_nsets+1, the final element will contain the offset where set p_nsets+1 would start and equals the length of the setcols and refval arrays, SETMEMBERS.
        setcols - Integer array of length SETMEMBERS where the columns in each set will be returned.
        refval - Double array of length SETMEMBERS where the reference row entries for each member of the sets will be returned.
        Throws:
        XPRSprobException
      • loadSecureVecs

        public void loadSecureVecs(int nrows,
                                   int ncols,
                                   int[] rowind,
                                   int[] colind)
                            throws XPRSprobException
        Allows the user to mark rows and columns in order to prevent the presolve removing these rows and columns from the matrix.
        Parameters:
        nrows - Number of rows to be marked.
        ncols - Number of columns to be marked.
        rowind - Integer array of length nrows containing the rows to be marked. May be null if not required.
        colind - Integer array of length ncols containing the columns to be marked. May be null if not required.
        Throws:
        XPRSprobException
      • addRows

        public void addRows(int nrows,
                            int ncoefs,
                            byte[] rowtype,
                            double[] rhs,
                            double[] rng,
                            int[] start,
                            int[] colind,
                            double[] rowcoef)
                     throws XPRSprobException
        Allows rows to be added to the matrix after passing it to the Optimizer using the input routines.
        Parameters:
        nrows - Number of new rows.
        ncoefs - Number of new nonzeros in the added rows.
        rowtype - Character array of length nrows containing the row types:
        • L: indicates a <= row;
        • G: indicates >= row;
        • E: indicates an = row.
        • R: indicates a range constraint;
        • N: indicates a nonbinding constraint.
        rhs - Double array of length nrows containing the right hand side elements.
        rng - Double array of length nrows containing the row range elements. This may be null if there are no ranged constraints. The values in the rng array will only be read for R type rows. The entries for other type rows will be ignored.
        start - Integer array of length nrows containing the offsets in the colind and rowcoef arrays of the start of the elements for each row.
        colind - Integer array of length ncoefs containing the (contiguous) column indices for the elements in each row.
        rowcoef - Double array of length ncoefs containing the (contiguous) element values.
        Throws:
        XPRSprobException
      • addRows

        public void addRows(int nrows,
                            long ncoefs,
                            byte[] rowtype,
                            double[] rhs,
                            double[] rng,
                            long[] start,
                            int[] colind,
                            double[] rowcoef)
                     throws XPRSprobException
        Allows rows to be added to the matrix after passing it to the Optimizer using the input routines.
        Parameters:
        nrows - Number of new rows.
        ncoefs - Number of new nonzeros in the added rows.
        rowtype - Character array of length nrows containing the row types:
        • L: indicates a <= row;
        • G: indicates >= row;
        • E: indicates an = row.
        • R: indicates a range constraint;
        • N: indicates a nonbinding constraint.
        rhs - Double array of length nrows containing the right hand side elements.
        rng - Double array of length nrows containing the row range elements. This may be null if there are no ranged constraints. The values in the rng array will only be read for R type rows. The entries for other type rows will be ignored.
        start - Integer array of length nrows containing the offsets in the colind and rowcoef arrays of the start of the elements for each row.
        colind - Integer array of length ncoefs containing the (contiguous) column indices for the elements in each row.
        rowcoef - Double array of length ncoefs containing the (contiguous) element values.
        Throws:
        XPRSprobException
      • delRows

        public void delRows(int nrows,
                            int[] rowind)
                     throws XPRSprobException
        Delete rows from a matrix.
        Parameters:
        nrows - Number of rows to delete.
        rowind - An integer array of length nrows containing the rows to delete.
        Throws:
        XPRSprobException
      • addCols

        public void addCols(int ncols,
                            int ncoefs,
                            double[] objcoef,
                            int[] start,
                            int[] rowind,
                            double[] rowcoef,
                            double[] lb,
                            double[] ub)
                     throws XPRSprobException
        Allows columns to be added to the matrix after passing it to the Optimizer using the input routines.
        Parameters:
        ncols - Number of new columns.
        ncoefs - Number of new nonzeros in the added columns.
        objcoef - Double array of length ncols containing the objective function coefficients of the new columns.
        start - Integer array of length ncols containing the offsets in the rowind and rowcoef arrays of the start of the elements for each column.
        rowind - Integer array of length ncoefs containing the row indices for the elements in each column.
        rowcoef - Double array of length ncoefs containing the element values.
        lb - Double array of length ncols containing the lower bounds on the added columns.
        ub - Double array of length ncols containing the upper bounds on the added columns.
        Throws:
        XPRSprobException
      • addCols

        public void addCols(int ncols,
                            long ncoefs,
                            double[] objcoef,
                            long[] start,
                            int[] rowind,
                            double[] rowcoef,
                            double[] lb,
                            double[] ub)
                     throws XPRSprobException
        Allows columns to be added to the matrix after passing it to the Optimizer using the input routines.
        Parameters:
        ncols - Number of new columns.
        ncoefs - Number of new nonzeros in the added columns.
        objcoef - Double array of length ncols containing the objective function coefficients of the new columns.
        start - Integer array of length ncols containing the offsets in the rowind and rowcoef arrays of the start of the elements for each column.
        rowind - Integer array of length ncoefs containing the row indices for the elements in each column.
        rowcoef - Double array of length ncoefs containing the element values.
        lb - Double array of length ncols containing the lower bounds on the added columns.
        ub - Double array of length ncols containing the upper bounds on the added columns.
        Throws:
        XPRSprobException
      • delCols

        public void delCols(int ncols,
                            int[] colind)
                     throws XPRSprobException
        Delete columns from a matrix.
        Parameters:
        ncols - Number of columns to delete.
        colind - Integer array of length ncols containing the columns to delete.
        Throws:
        XPRSprobException
      • chgColType

        public void chgColType(int ncols,
                               int[] colind,
                               byte[] coltype)
                        throws XPRSprobException
        Used to change the type of a column in the matrix.
        Parameters:
        ncols - Number of columns to change.
        colind - Integer array of length ncols containing the indices of the columns.
        coltype - Character array of length ncols giving the new column types:
        • C: indicates a continuous column;
        • B: indicates a binary column;
        • I: indicates an integer column.
        • S: indicates a semi—continuous column. The semi—continuous lower bound will be set to 1.0.
        • R: indicates a semi—integer column. The semi—integer lower bound will be set to 1.0.
        • P: indicates a partial integer column. The partial integer bound will be set to 1.0.
        Throws:
        XPRSprobException
      • loadBasis

        public void loadBasis(int[] rowstat,
                              int[] colstat)
                       throws XPRSprobException
        Loads a basis from the user's areas.
        Parameters:
        rowstat - Integer array of length ROWS containing the basis status of the slack, surplus or artificial variable associated with each row. The status must be one of:
        • 0: slack, surplus or artificial is non-basic at lower bound;
        • 1: slack, surplus or artificial is basic;
        • 2: slack or surplus is non-basic at upper bound.
        • 3: slack or surplus is super-basic.
        colstat - Integer array of length COLS containing the basis status of each of the columns in the constraint matrix. The status must be one of:
        • 0: variable is non-basic at lower bound or superbasic at zero if the variable has no lower bound;
        • 1: variable is basic;
        • 2: variable is at upper bound;
        • 3: variable is super-basic.
        Throws:
        XPRSprobException
      • delSets

        public void delSets(int nsets,
                            int[] setind)
                     throws XPRSprobException
        Delete sets from a problem.
        Parameters:
        nsets - Number of sets to delete.
        setind - An integer array of length nsets containing the sets to delete.
        Throws:
        XPRSprobException
      • addSets

        public void addSets(int nsets,
                            int nelems,
                            byte[] settype,
                            int[] start,
                            int[] colind,
                            double[] refval)
                     throws XPRSprobException
        Allows sets to be added to the problem after passing it to the Optimizer using the input routines.
        Parameters:
        nsets - Number of new sets.
        nelems - Number of new nonzeros in the added sets.
        settype - Character array of length nsets containing the set types:
        • 1: indicates a SOS1;
        • 2: indicates a SOS2;
        start - Integer array of length nsets containing the offsets in the colind and refval arrays of the start of the elements for each set.
        colind - Integer array of length nelems containing the (contiguous) column indices for the elements in each set.
        refval - Double array of length nelems containing the (contiguous) reference values.
        Throws:
        XPRSprobException
      • addSets

        public void addSets(int nsets,
                            long nelems,
                            byte[] settype,
                            long[] start,
                            int[] colind,
                            double[] refval)
                     throws XPRSprobException
        Allows sets to be added to the problem after passing it to the Optimizer using the input routines.
        Parameters:
        nsets - Number of new sets.
        nelems - Number of new nonzeros in the added sets.
        settype - Character array of length nsets containing the set types:
        • 1: indicates a SOS1;
        • 2: indicates a SOS2;
        start - Integer array of length nsets containing the offsets in the colind and refval arrays of the start of the elements for each set.
        colind - Integer array of length nelems containing the (contiguous) column indices for the elements in each set.
        refval - Double array of length nelems containing the (contiguous) reference values.
        Throws:
        XPRSprobException
      • strongBranch

        public void strongBranch(int nbounds,
                                 int[] colind,
                                 byte[] bndtype,
                                 double[] bndval,
                                 int iterlim,
                                 double[] objval,
                                 int[] status)
                          throws XPRSprobException
        Performs strong branching iterations on all specified bound changes. For each candidate bound change, strongBranch performs dual simplex iterations starting from the current optimal solution of the base LP, and returns both the status and objective value reached after these iterations.
        Parameters:
        nbounds - Number of bound changes to try.
        colind - Integer array of size nbounds containing the indices of the columns on which the bounds will change.
        bndtype - Character array of length nbounds indicating the type of bound to change:
        • U: indicates change the upper bound;
        • L: indicates change the lower bound;
        • B: indicates change both bounds, i.e. fix the column.
        bndval - Double array of length nbounds giving the new bound values.
        iterlim - Maximum number of LP iterations to perform for each bound change.
        objval - Objective value of each LP after performing the strong branching iterations.
        status - Status of each LP after performing the strong branching iterations, as detailed for the LPSTATUS attribute.
        Throws:
        XPRSprobException
      • estimateRowDualRanges

        public void estimateRowDualRanges(int nrows,
                                          int[] rowind,
                                          int iterlim,
                                          double[] mindual,
                                          double[] maxdual)
                                   throws XPRSprobException
        Performs a dual side range sensitivity analysis, i.e. calculates estimates for the possible ranges for dual values.
        Parameters:
        nrows - The number of rows to analyze.
        rowind - Row indices to analyze.
        iterlim - Effort limit expressed as simplex iterations per row.
        mindual - Estimated lower bounds on the possible dual ranges.
        maxdual - Estimated upper bounds on the possible dual ranges.
        Throws:
        XPRSprobException
      • setMessageStatus

        public void setMessageStatus(int msgcode,
                                     int status)
                              throws XPRSprobException
        Manages suppression of messages.
        Parameters:
        msgcode - The id number of the message. Refer to the section for a list of possible message numbers.
        status - Non-zero if the message is not suppressed; 0 otherwise. If a value for status is not supplied in the command-line call then the console Optimizer prints the value of the suppression status to screen i.e., non-zero if the message is not suppressed; 0 otherwise.
        Throws:
        XPRSprobException
      • getMessageStatus

        public void getMessageStatus(int msgcode,
                                     IntHolder p_status)
                              throws XPRSprobException
        Retrieves the current suppression status of a message.
        Parameters:
        msgcode - The id number of the message. Refer to Chapter for a list of possible message numbers.
        p_status - Non-zero if the message is not suppressed; 0 otherwise.
        Throws:
        XPRSprobException
      • chgObjSense

        public void chgObjSense(XPRSenumerations.ObjSense objsense)
                         throws XPRSprobException
        Changes the problem's objective function sense to minimize or maximize.
        Parameters:
        objsense - XPRS_OBJ_MINIMIZE to change into a minimization, or XPRS_OBJ_MAXIMIZE to change into maximization problem.
        Throws:
        XPRSprobException
      • chgGlbLimit

        public void chgGlbLimit(int ncols,
                                int[] colind,
                                double[] limit)
                         throws XPRSprobException
        Used to change semi-continuous or semi-integer lower bounds, or upper limits on partial integers.
        Parameters:
        ncols - Number of column limits to change.
        colind - Integer array of size ncols containing the indices of the semi-continuous, semi-integer or partial integer columns that should have their limits changed.
        limit - Double array of length ncols giving the new limit values.
        Throws:
        XPRSprobException
      • restore

        public void restore(java.lang.String probname,
                            java.lang.String flags)
                     throws XPRSprobException
        Restores the Optimizer's data structures from a file created by save ( SAVE). Optimization may then recommence from the point at which the file was created.
        Parameters:
        probname - A string of up to MAXPROBNAMELENGTH characters containing the problem name.
        flags - Additional flags
        • h: Do not restore hardware information from the file;
        • v: use the provided filename verbatim, without appending the .svf extension.
        Throws:
        XPRSprobException
      • pivot

        public void pivot(int enter,
                          int leave)
                   throws XPRSprobException
        Performs a simplex pivot by bringing variable enter into the basis and removing leave.
        Parameters:
        enter - Index of row or column to enter basis.
        leave - Index of row or column to leave basis.
        Throws:
        XPRSprobException
      • loadLPSol

        public void loadLPSol(double[] x,
                              double[] slack,
                              double[] duals,
                              double[] djs,
                              IntHolder p_status)
                       throws XPRSprobException
        Loads an LP solution for the problem into the Optimizer.
        Parameters:
        x - Optional: Double array of length COLS (for the original problem and not the presolve problem) containing the values of the variables.
        slack - Optional: double array of length ROWS containing the values of slack variables.
        duals - Optional: double array of length ROWS containing the values of dual variables.
        djs - Optional: double array of length COLS containing the values of reduced costs.
        p_status - Pointer to an int where the status will be returned. The status is one of:
        • 0: Solution is loaded.
        • 1: Solution is not loaded because the problem is in presolved status.
        Throws:
        XPRSprobException
      • basisCondition

        public void basisCondition(DoubleHolder p_cond,
                                   DoubleHolder p_scaledcond)
                            throws XPRSprobException
        Deprecated. 
        Calculates the condition number of the current basis after solving the LP relaxation.
        Parameters:
        p_cond - The returned condition number of the current basis.
        p_scaledcond - The returned condition number of the current basis for the scaled problem.
        Throws:
        XPRSprobException
      • repairWeightedInfeas

        public void repairWeightedInfeas(IntHolder p_status,
                                         double[] lepref,
                                         double[] gepref,
                                         double[] lbpref,
                                         double[] ubpref,
                                         char phase2,
                                         double delta,
                                         java.lang.String flags)
                                  throws XPRSprobException
        By relaxing a set of selected constraints and bounds of an infeasible problem, it attempts to identify a 'solution' that violates the selected set of constraints and bounds minimally, while satisfying all other constraints and bounds. Among such solution candidates, it selects one that is optimal regarding to the original objective function. For the console version, see REPAIRINFEAS.
        Parameters:
        p_status - The status after the relaxation:
        • 1: relaxed problem is infeasible;
        • 2: relaxed problem is unbounded;
        • 3: solution of the relaxed problem regarding the original objective is nonoptimal;
        • 4: error (when return code is nonzero);
        • 5: numerical instability;
        • 6: analysis of an infeasible relaxation was performed, but the relaxation is feasible.
        lepref - Array of size ROWS containing the preferences for relaxing the less or equal side of row.
        gepref - Array of size ROWS containing the preferences for relaxing the greater or equal side of a row.
        lbpref - Array of size COLS containing the preferences for relaxing lower bounds.
        ubpref - Array of size COLS containing preferences for relaxing upper bounds.
        phase2 - Controls the second phase of optimization:
        • o: use the objective sense of the original problem (default);
        • x: maximize the relaxed problem using the original objective;
        • f: skip optimization regarding the original objective;
        • n: minimize the relaxed problem using the original objective;
        • i: if the relaxation is infeasible, generate an irreducible infeasible subset for the analys of the problem;
        • a: if the relaxation is infeasible, generate all irreducible infeasible subsets for the analys of the problem.
        delta - The relaxation multiplier in the second phase -1.
        flags - Specifies flags to be passed to the Optimizer.
        Throws:
        XPRSprobException
      • repairWeightedInfeasBounds

        public void repairWeightedInfeasBounds(IntHolder p_status,
                                               double[] lepref,
                                               double[] gepref,
                                               double[] lbpref,
                                               double[] ubpref,
                                               double[] lerelax,
                                               double[] gerelax,
                                               double[] lbrelax,
                                               double[] ubrelax,
                                               char phase2,
                                               double delta,
                                               java.lang.String flags)
                                        throws XPRSprobException
        An extended version of repairWeightedInfeas that allows for bounding the level of relaxation allowed.
        Parameters:
        p_status - The status after the relaxation:
        • 1: relaxed problem is infeasible;
        • 2: relaxed problem is unbounded;
        • 3: solution of the relaxed problem regarding the original objective is nonoptimal;
        • 4: error (when return code is nonzero);
        • 5: numerical instability;
        • 6: analysis of an infeasible relaxation was performed, but the relaxation is feasible.
        lepref - Array of size ROWS containing the preferences for relaxing the less or equal side of row. For the console use -lrp value.
        gepref - Array of size ROWS containing the preferences for relaxing the greater or equal side of a row. For the console use -grp value.
        lbpref - Array of size COLS containing the preferences for relaxing lower bounds. For the console use -lbp value.
        ubpref - Array of size COLS containing preferences for relaxing upper bounds. For the console use -ubp value.
        lerelax - Array of size ROWS containing the upper bounds on the amount the less or equal side of a row can be relaxed. For the console use -lrb value.
        gerelax - Array of size ROWS containing the upper bounds on the amount the greater or equal side of a row can be relaxed. For the console use -grb value.
        lbrelax - Array of size COLS containing the upper bounds on the amount the lower bounds can be relaxed. For the console use -lbb value.
        ubrelax - Array of size COLS containing the upper bounds on the amount the upper bounds can be relaxed. For the console use -ubb value.
        phase2 - Controls the second phase of optimization:
        • o: use the objective sense of the original problem (default);
        • x: maximize the relaxed problem using the original objective;
        • f: skip optimization regarding the original objective;
        • n: minimize the relaxed problem using the original objective;
        • i: if the relaxation is infeasible, generate an irreducible infeasible subset for the analys of the problem;
        • a: if the relaxation is infeasible, generate all irreducible infeasible subsets for the analys of the problem.
        delta - The relaxation multiplier in the second phase -1.
        flags - Specifies flags to be passed to the Optimizer.
        Throws:
        XPRSprobException
      • repairInfeas

        public void repairInfeas(IntHolder p_status,
                                 char penalty,
                                 char phase2,
                                 char flags,
                                 double lepref,
                                 double gepref,
                                 double lbpref,
                                 double ubpref,
                                 double delta)
                          throws XPRSprobException
        Provides a simplified interface for repairWeightedInfeas.
        Parameters:
        p_status - The status after the relaxation:
        • 0: relaxed optimum found;
        • 1: relaxed problem is infeasible;
        • 2: relaxed problem is unbounded;
        • 3: solution of the relaxed problem regarding the original objective is nonoptimal;
        • 4: error (when return code is nonzero);
        • 5: numerical instability;
        • 6: analysis of an infeasible relaxation was performed, but the relaxation is feasible.
        penalty - The type of penalties created from the preferences:
        • c: each penalty is the reciprocal of the preference (default);
        • s: the penalties are placed in the scaled problem.
        phase2 - Controls the second phase of optimization:
        • o: use the objective sense of the original problem (default);
        • x: maximize the relaxed problem using the original objective;
        • f: skip optimization regarding the original objective;
        • n: minimize the relaxed problem using the original objective;
        • i: if the relaxation is infeasible, generate an irreducible infeasible subset for the analys of the problem;
        • a: if the relaxation is infeasible, generate all irreducible infeasible subsets for the analys of the problem.
        flags - Specifies if the global search should be done:
        • g: do the global search (default);
        • l: solve as a linear model ignoring the discreteness of variables.
        lepref - Preference for relaxing the less or equal side of row.
        gepref - Preference for relaxing the greater or equal side of a row.
        lbpref - Preferences for relaxing lower bounds.
        ubpref - Preferences for relaxing upper bounds.
        delta - The relaxation multiplier in the second phase -1. For console use -d value. A positive value means a relative relaxation by multiplying the first phase objective with ( delta-1), while a negative value means an absolute relaxation, by adding abs(delta) to the first phase objective.
        Throws:
        XPRSprobException
      • basisStability

        public void basisStability(int type,
                                   int norm,
                                   int scaled,
                                   DoubleHolder p_value)
                            throws XPRSprobException
        Calculates various measures for the stability of the current basis, including the basis condition number.
        Parameters:
        type -
        • 0: Condition number of the basis.
        • 1: Stability measure for the solution relative to the current basis.
        • 2: Stability measure for the duals relative to the current basis.
        • 3: Stability measure for the right hand side relative to the current basis.
        • 4: Stability measure for the basic part of the objective relative to the current basis.
        norm -
        • 0: Use the infinity norm.
        • 1: Use the 1 norm.
        • 2: Use the Euclidian norm for vectors, and the Frobenius norm for matrices.
        scaled - If the stability values are to be calculated in the scaled, or the unscaled matrix.
        p_value - Pointer to a double, where the calculated value is to be returned.
        Throws:
        XPRSprobException
      • objSA

        public void objSA(int ncols,
                          int[] colind,
                          double[] lower,
                          double[] upper)
                   throws XPRSprobException
        Returns upper and lower sensitivity ranges for specified objective function coefficients. If the objective coefficients are varied within these ranges the current basis remains optimal and the reduced costs remain valid.
        Parameters:
        ncols - Number of objective function coefficients whose sensitivity is sought.
        colind - Integer array of length ncols containing the indices of the columns whose objective function coefficients sensitivity ranges are required.
        lower - Double array of length ncols where the objective function lower range values are to be returned.
        upper - Double array of length ncols where the objective function upper range values are to be returned.
        Throws:
        XPRSprobException
      • bndsa

        public void bndsa(int ncols,
                          int[] colind,
                          double[] lblower,
                          double[] lbupper,
                          double[] ublower,
                          double[] ubupper)
                   throws XPRSprobException
        Returns upper and lower sensitivity ranges for specified variables' lower and upper bounds. If the bounds are varied within these ranges the current basis remains optimal and feasible.
        Parameters:
        ncols - Number of variables whose sensitivity is sought.
        colind - Integer array of length ncols containing the indices of the columns whose bounds' ranges are required.
        lblower - Double array of length ncols where the variable lower bound lower range values are to be returned.
        lbupper - Double array of length ncols where the variable lower bound upper range values are to be returned.
        ublower - Double array of length ncols where the variable upper bound lower range values are to be returned.
        ubupper - Double array of length ncols where the variable upper bound upper range values are to be returned.
        Throws:
        XPRSprobException
      • rhsSA

        public void rhsSA(int nrows,
                          int[] rowind,
                          double[] lower,
                          double[] upper)
                   throws XPRSprobException
        Returns upper and lower sensitivity ranges for specified right hand side (RHS) function coefficients. If the RHS coefficients are varied within these ranges the current basis remains optimal and the reduced costs remain valid.
        Parameters:
        nrows - The number of RHS coefficients for which sensitivity ranges are required.
        rowind - Integer array of length nrows containing the indices of the rows whose RHS coefficients sensitivity ranges are required.
        lower - Double array of length nrows where the RHS lower range values are to be returned.
        upper - Double array of length nrows where the RHS upper range values are to be returned.
        Throws:
        XPRSprobException
      • addQMatrix

        public void addQMatrix(int row,
                               int ncoefs,
                               int[] rowqcol1,
                               int[] rowqcol2,
                               double[] rowqcoef)
                        throws XPRSprobException
        Adds a new quadratic matrix into a row defined by triplets.
        Parameters:
        row - Index of the row where the quadratic matrix is to be added.
        ncoefs - Number of triplets used to define the quadratic matrix. This may be less than the number of coefficients in the quadratic matrix, since off diagonals and their transposed pairs are defined by one triplet.
        rowqcol1 - First index in the triplets.
        rowqcol2 - Second index in the triplets.
        rowqcoef - Coefficients in the triplets.
        Throws:
        XPRSprobException
      • addQMatrix

        public void addQMatrix(int row,
                               long ncoefs,
                               int[] rowqcol1,
                               int[] rowqcol2,
                               double[] rowqcoef)
                        throws XPRSprobException
        Adds a new quadratic matrix into a row defined by triplets.
        Parameters:
        row - Index of the row where the quadratic matrix is to be added.
        ncoefs - Number of triplets used to define the quadratic matrix. This may be less than the number of coefficients in the quadratic matrix, since off diagonals and their transposed pairs are defined by one triplet.
        rowqcol1 - First index in the triplets.
        rowqcol2 - Second index in the triplets.
        rowqcoef - Coefficients in the triplets.
        Throws:
        XPRSprobException
      • delQMatrix

        public void delQMatrix(int row)
                        throws XPRSprobException
        Deletes the quadratic part of a row or of the objective function.
        Parameters:
        row - Index of row from which the quadratic part is to be deleted.
        Throws:
        XPRSprobException
      • loadQCQP

        public void loadQCQP(java.lang.String probname,
                             int ncols,
                             int nrows,
                             byte[] rowtype,
                             double[] rhs,
                             double[] rng,
                             double[] objcoef,
                             int[] start,
                             int[] collen,
                             int[] rowind,
                             double[] rowcoef,
                             double[] lb,
                             double[] ub,
                             int nobjqcoefs,
                             int[] objqcol1,
                             int[] objqcol2,
                             double[] objqcoef,
                             int nqrows,
                             int[] qrowind,
                             int[] nrowqcoef,
                             int[] rowqcol1,
                             int[] rowqcol2,
                             double[] rowqcoef)
                      throws XPRSprobException
        Used to load a quadratic problem with quadratic side constraints into the Optimizer data structure. Such a problem may have quadratic terms in its objective function as well as in its constraints.
        Parameters:
        probname - A string of up to MAXPROBNAMELENGTH characters containing a name for the problem.
        ncols - Number of structural columns in the matrix.
        nrows - Number of rows in the matrix (not including the objective row). Objective coefficients must be supplied in the objcoef array, and the objective function should not be included in any of the other arrays.
        rowtype - Character array of length nrows containing the row types:
        • L: indicates a <= constraint (use this one for quadratic constraints as well);
        • E: indicates an = constraint;
        • G: indicates a >= constraint;
        • R: indicates a range constraint;
        • N: indicates a nonbinding constraint.
        rhs - Double array of length nrows containing the right hand side coefficients of the rows. The right hand side value for a range row gives the upper bound on the row.
        rng - Double array of length nrows containing the range values for range rows. Values for all other rows will be ignored. May be null if there are no ranged constraints. The lower bound on a range row is the right hand side value minus the range value. The sign of the range value is ignored - the absolute value is used in all cases.
        objcoef - Double array of length ncols containing the objective function coefficients.
        start - Integer array containing the offsets in the rowind and rowcoef arrays of the start of the elements for each column. This array is of length ncols or, if collen is null, length ncols+1. If collen is null the extra entry of start, start[ncols], contains the position in the rowind and rowcoef arrays at which an extra column would start, if it were present. In C, this value is also the length of the rowind and rowcoef arrays.
        collen - Integer array of length ncols containing the number of nonzero elements in each column. May be null if all elements are contiguous and start[ncols] contains the offset where the elements for column ncols+1 would start. This array is not required if the non-zero coefficients in the rowind and rowcoef arrays are continuous, and the start array has ncols+1 entries as described above. It may be null if not required.
        rowind - Integer array containing the row indices for the nonzero elements in each column. If the indices are input contiguously, with the columns in ascending order, the length of the rowind is start[ncols-1]+collen[ncols-1] or, if collen is null, start[ncols].
        rowcoef - Double array containing the nonzero element values; length as for rowind.
        lb - Double array of length ncols containing the lower bounds on the columns. Use XPRS_MINUSINFINITY to represent a lower bound of minus infinity.
        ub - Double array of length ncols containing the upper bounds on the columns. Use XPRS_PLUSINFINITY to represent an upper bound of plus infinity.
        nobjqcoefs - Number of quadratic terms.
        objqcol1 - Integer array of size nobjqcoefs containing the column index of the first variable in each quadratic term.
        objqcol2 - Integer array of size nobjqcoefs containing the column index of the second variable in each quadratic term.
        objqcoef - Double array of size nobjqcoefs containing the quadratic coefficients.
        nqrows - Number of rows containing quadratic matrices.
        qrowind - Integer array of size nqrows, containing the indices of rows with quadratic matrices in them. Note that the rows are expected to be defined in rowtype as type L.
        nrowqcoef - Integer array of size nqrows, containing the number of nonzeros in each quadratic constraint matrix.
        rowqcol1 - Integer array of size nqcelem, where nqcelem equals the sum of the elements in nrowqcoef (i.e. the total number of quadratic matrix elements in all the constraints). It contains the first column indices of the quadratic matrices. Indices for the first matrix are listed from 0 to nrowqcoef[0]-1, for the second matrix from nrowqcoef[0] to nrowqcoef[0]+ nrowqcoef[1]-1, etc.
        rowqcol2 - Integer array of size nqcelem, containing the second index for the quadratic constraint matrices.
        rowqcoef - Integer array of size nqcelem, containing the coefficients for the quadratic constraint matrices.
        Throws:
        XPRSprobException
      • loadQCQP

        public void loadQCQP(java.lang.String probname,
                             int ncols,
                             int nrows,
                             byte[] rowtype,
                             double[] rhs,
                             double[] rng,
                             double[] objcoef,
                             long[] start,
                             int[] collen,
                             int[] rowind,
                             double[] rowcoef,
                             double[] lb,
                             double[] ub,
                             long nobjqcoefs,
                             int[] objqcol1,
                             int[] objqcol2,
                             double[] objqcoef,
                             int nqrows,
                             int[] qrowind,
                             long[] nrowqcoef,
                             int[] rowqcol1,
                             int[] rowqcol2,
                             double[] rowqcoef)
                      throws XPRSprobException
        Used to load a quadratic problem with quadratic side constraints into the Optimizer data structure. Such a problem may have quadratic terms in its objective function as well as in its constraints.
        Parameters:
        probname - A string of up to MAXPROBNAMELENGTH characters containing a name for the problem.
        ncols - Number of structural columns in the matrix.
        nrows - Number of rows in the matrix (not including the objective row). Objective coefficients must be supplied in the objcoef array, and the objective function should not be included in any of the other arrays.
        rowtype - Character array of length nrows containing the row types:
        • L: indicates a <= constraint (use this one for quadratic constraints as well);
        • E: indicates an = constraint;
        • G: indicates a >= constraint;
        • R: indicates a range constraint;
        • N: indicates a nonbinding constraint.
        rhs - Double array of length nrows containing the right hand side coefficients of the rows. The right hand side value for a range row gives the upper bound on the row.
        rng - Double array of length nrows containing the range values for range rows. Values for all other rows will be ignored. May be null if there are no ranged constraints. The lower bound on a range row is the right hand side value minus the range value. The sign of the range value is ignored - the absolute value is used in all cases.
        objcoef - Double array of length ncols containing the objective function coefficients.
        start - Integer array containing the offsets in the rowind and rowcoef arrays of the start of the elements for each column. This array is of length ncols or, if collen is null, length ncols+1. If collen is null the extra entry of start, start[ncols], contains the position in the rowind and rowcoef arrays at which an extra column would start, if it were present. In C, this value is also the length of the rowind and rowcoef arrays.
        collen - Integer array of length ncols containing the number of nonzero elements in each column. May be null if all elements are contiguous and start[ncols] contains the offset where the elements for column ncols+1 would start. This array is not required if the non-zero coefficients in the rowind and rowcoef arrays are continuous, and the start array has ncols+1 entries as described above. It may be null if not required.
        rowind - Integer array containing the row indices for the nonzero elements in each column. If the indices are input contiguously, with the columns in ascending order, the length of the rowind is start[ncols-1]+collen[ncols-1] or, if collen is null, start[ncols].
        rowcoef - Double array containing the nonzero element values; length as for rowind.
        lb - Double array of length ncols containing the lower bounds on the columns. Use XPRS_MINUSINFINITY to represent a lower bound of minus infinity.
        ub - Double array of length ncols containing the upper bounds on the columns. Use XPRS_PLUSINFINITY to represent an upper bound of plus infinity.
        nobjqcoefs - Number of quadratic terms.
        objqcol1 - Integer array of size nobjqcoefs containing the column index of the first variable in each quadratic term.
        objqcol2 - Integer array of size nobjqcoefs containing the column index of the second variable in each quadratic term.
        objqcoef - Double array of size nobjqcoefs containing the quadratic coefficients.
        nqrows - Number of rows containing quadratic matrices.
        qrowind - Integer array of size nqrows, containing the indices of rows with quadratic matrices in them. Note that the rows are expected to be defined in rowtype as type L.
        nrowqcoef - Integer array of size nqrows, containing the number of nonzeros in each quadratic constraint matrix.
        rowqcol1 - Integer array of size nqcelem, where nqcelem equals the sum of the elements in nrowqcoef (i.e. the total number of quadratic matrix elements in all the constraints). It contains the first column indices of the quadratic matrices. Indices for the first matrix are listed from 0 to nrowqcoef[0]-1, for the second matrix from nrowqcoef[0] to nrowqcoef[0]+ nrowqcoef[1]-1, etc.
        rowqcol2 - Integer array of size nqcelem, containing the second index for the quadratic constraint matrices.
        rowqcoef - Integer array of size nqcelem, containing the coefficients for the quadratic constraint matrices.
        Throws:
        XPRSprobException
      • loadQCQPGlobal

        public void loadQCQPGlobal(java.lang.String probname,
                                   int ncols,
                                   int nrows,
                                   byte[] rowtype,
                                   double[] rhs,
                                   double[] rng,
                                   double[] objcoef,
                                   int[] start,
                                   int[] collen,
                                   int[] rowind,
                                   double[] rowcoef,
                                   double[] lb,
                                   double[] ub,
                                   int nobjqcoefs,
                                   int[] objqcol1,
                                   int[] objqcol2,
                                   double[] objqcoef,
                                   int nqrows,
                                   int[] qrowind,
                                   int[] nrowqcoefs,
                                   int[] rowqcol1,
                                   int[] rowqcol2,
                                   double[] rowqcoef,
                                   int nentities,
                                   int nsets,
                                   byte[] coltype,
                                   int[] entind,
                                   double[] limit,
                                   byte[] settype,
                                   int[] setstart,
                                   int[] setind,
                                   double[] refval)
                            throws XPRSprobException
        Used to load a global, quadratic problem with quadratic side constraints into the Optimizer data structure. Such a problem may have quadratic terms in its objective function as well as in its constraints. Integer, binary, partial integer, semi-continuous and semi-continuous integer variables can be defined, together with sets of type 1 and 2. The reference row values for the set members are passed as an array rather than specifying a reference row.
        Parameters:
        probname - A string of up to MAXPROBNAMELENGTH characters containing a name for the problem.
        ncols - Number of structural columns in the matrix.
        nrows - Number of rows in the matrix (not including the objective row). Objective coefficients must be supplied in the objcoef array, and the objective function should not be included in any of the other arrays.
        rowtype - Character array of length nrows containing the row types:
        • L: indicates a <= constraint (use this one for quadratic constraints as well);
        • E: indicates an = constraint;
        • G: indicates a >= constraint;
        • R: indicates a range constraint;
        • N: indicates a nonbinding constraint.
        rhs - Double array of length nrows containing the right hand side coefficients of the rows. The right hand side value for a range row gives the upper bound on the row.
        rng - Double array of length nrows containing the range values for range rows. Values for all other rows will be ignored. May be null if there are no ranged constraints. The lower bound on a range row is the right hand side value minus the range value. The sign of the range value is ignored - the absolute value is used in all cases.
        objcoef - Double array of length ncols containing the objective function coefficients.
        start - Integer array containing the offsets in the rowind and rowcoef arrays of the start of the elements for each column. This array is of length ncols or, if collen is null, length ncols+1. If collen is null the extra entry of start, start[ncols], contains the position in the rowind and rowcoef arrays at which an extra column would start, if it were present. In C, this value is also the length of the rowind and rowcoef arrays.
        collen - Integer array of length ncols containing the number of nonzero elements in each column. May be null if all elements are contiguous and start[ncols] contains the offset where the elements for column ncols+1 would start. This array is not required if the non-zero coefficients in the rowind and rowcoef arrays are continuous, and the start array has ncols+1 entries as described above. It may be null if not required.
        rowind - Integer array containing the row indices for the nonzero elements in each column. If the indices are input contiguously, with the columns in ascending order, the length of the rowind is start[ncols-1]+collen[ncols-1] or, if collen is null, start[ncols].
        rowcoef - Double array containing the nonzero element values; length as for rowind.
        lb - Double array of length ncols containing the lower bounds on the columns. Use XPRS_MINUSINFINITY to represent a lower bound of minus infinity.
        ub - Double array of length ncols containing the upper bounds on the columns. Use XPRS_PLUSINFINITY to represent an upper bound of plus infinity.
        nobjqcoefs - Number of quadratic terms.
        objqcol1 - Integer array of size nobjqcoefs containing the column index of the first variable in each quadratic term.
        objqcol2 - Integer array of size nobjqcoefs containing the column index of the second variable in each quadratic term.
        objqcoef - Double array of size nobjqcoefs containing the quadratic coefficients.
        nqrows - Number of rows containing quadratic matrices.
        qrowind - Integer array of size nqrows, containing the indices of rows with quadratic matrices in them. Note that the rows are expected to be defined in rowtype as type L.
        nrowqcoefs - Integer array of size nqrows, containing the number of nonzeros in each quadratic constraint matrix.
        rowqcol1 - Integer array of size nqcelem, where nqcelem equals the sum of the elements in nrowqcoefs (i.e. the total number of quadratic matrix elements in all the constraints). It contains the first column indices of the quadratic matrices. Indices for the first matrix are listed from 0 to nrowqcoefs[0]-1, for the second matrix from nrowqcoefs[0] to nrowqcoefs[0]+ nrowqcoefs[1]-1, etc.
        rowqcol2 - Integer array of size nqcelem, containing the second index for the quadratic constraint matrices.
        rowqcoef - Integer array of size nqcelem, containing the coefficients for the quadratic constraint matrices.
        nentities - Number of binary, integer, semi-continuous, semi-continuous integer and partial integer entities.
        nsets - Number of SOS1 and SOS2 sets.
        coltype - Character array of length nentities containing the entity types:
        • B: binary variables;
        • I: integer variables;
        • P: partial integer variables;
        • S: semi-continuous variables;
        • R: semi-continuous integer variables.
        entind - Integer array of length nentities containing the column indices of the global entities.
        limit - Double array of length nentities containing the integer limits for the partial integer variables and lower bounds for semi-continuous and semi-continuous integer variables (any entries in the positions corresponding to binary and integer variables will be ignored). May be null if not required.
        settype - Character array of length nsets containing the set types:
        • 1: SOS1 type sets;
        • 2: SOS2 type sets.
        May be null if not required.
        setstart - Integer array containing the offsets in the setind and refval arrays indicating the start of the sets. This array is of length nsets+1, the last member containing the offset where set nsets+1 would start. May be null if not required.
        setind - Integer array of length setstart[nsets]-1 containing the columns in each set. May be null if not required.
        refval - Double array of length setstart[nsets]-1 containing the reference row entries for each member of the sets. May be null if not required.
        Throws:
        XPRSprobException
      • loadQCQPGlobal

        public void loadQCQPGlobal(java.lang.String probname,
                                   int ncols,
                                   int nrows,
                                   byte[] rowtype,
                                   double[] rhs,
                                   double[] rng,
                                   double[] objcoef,
                                   long[] start,
                                   int[] collen,
                                   int[] rowind,
                                   double[] rowcoef,
                                   double[] lb,
                                   double[] ub,
                                   long nobjqcoefs,
                                   int[] objqcol1,
                                   int[] objqcol2,
                                   double[] objqcoef,
                                   int nqrows,
                                   int[] qrowind,
                                   long[] nrowqcoefs,
                                   int[] rowqcol1,
                                   int[] rowqcol2,
                                   double[] rowqcoef,
                                   int nentities,
                                   int nsets,
                                   byte[] coltype,
                                   int[] entind,
                                   double[] limit,
                                   byte[] settype,
                                   long[] setstart,
                                   int[] setind,
                                   double[] refval)
                            throws XPRSprobException
        Used to load a global, quadratic problem with quadratic side constraints into the Optimizer data structure. Such a problem may have quadratic terms in its objective function as well as in its constraints. Integer, binary, partial integer, semi-continuous and semi-continuous integer variables can be defined, together with sets of type 1 and 2. The reference row values for the set members are passed as an array rather than specifying a reference row.
        Parameters:
        probname - A string of up to MAXPROBNAMELENGTH characters containing a name for the problem.
        ncols - Number of structural columns in the matrix.
        nrows - Number of rows in the matrix (not including the objective row). Objective coefficients must be supplied in the objcoef array, and the objective function should not be included in any of the other arrays.
        rowtype - Character array of length nrows containing the row types:
        • L: indicates a <= constraint (use this one for quadratic constraints as well);
        • E: indicates an = constraint;
        • G: indicates a >= constraint;
        • R: indicates a range constraint;
        • N: indicates a nonbinding constraint.
        rhs - Double array of length nrows containing the right hand side coefficients of the rows. The right hand side value for a range row gives the upper bound on the row.
        rng - Double array of length nrows containing the range values for range rows. Values for all other rows will be ignored. May be null if there are no ranged constraints. The lower bound on a range row is the right hand side value minus the range value. The sign of the range value is ignored - the absolute value is used in all cases.
        objcoef - Double array of length ncols containing the objective function coefficients.
        start - Integer array containing the offsets in the rowind and rowcoef arrays of the start of the elements for each column. This array is of length ncols or, if collen is null, length ncols+1. If collen is null the extra entry of start, start[ncols], contains the position in the rowind and rowcoef arrays at which an extra column would start, if it were present. In C, this value is also the length of the rowind and rowcoef arrays.
        collen - Integer array of length ncols containing the number of nonzero elements in each column. May be null if all elements are contiguous and start[ncols] contains the offset where the elements for column ncols+1 would start. This array is not required if the non-zero coefficients in the rowind and rowcoef arrays are continuous, and the start array has ncols+1 entries as described above. It may be null if not required.
        rowind - Integer array containing the row indices for the nonzero elements in each column. If the indices are input contiguously, with the columns in ascending order, the length of the rowind is start[ncols-1]+collen[ncols-1] or, if collen is null, start[ncols].
        rowcoef - Double array containing the nonzero element values; length as for rowind.
        lb - Double array of length ncols containing the lower bounds on the columns. Use XPRS_MINUSINFINITY to represent a lower bound of minus infinity.
        ub - Double array of length ncols containing the upper bounds on the columns. Use XPRS_PLUSINFINITY to represent an upper bound of plus infinity.
        nobjqcoefs - Number of quadratic terms.
        objqcol1 - Integer array of size nobjqcoefs containing the column index of the first variable in each quadratic term.
        objqcol2 - Integer array of size nobjqcoefs containing the column index of the second variable in each quadratic term.
        objqcoef - Double array of size nobjqcoefs containing the quadratic coefficients.
        nqrows - Number of rows containing quadratic matrices.
        qrowind - Integer array of size nqrows, containing the indices of rows with quadratic matrices in them. Note that the rows are expected to be defined in rowtype as type L.
        nrowqcoefs - Integer array of size nqrows, containing the number of nonzeros in each quadratic constraint matrix.
        rowqcol1 - Integer array of size nqcelem, where nqcelem equals the sum of the elements in nrowqcoefs (i.e. the total number of quadratic matrix elements in all the constraints). It contains the first column indices of the quadratic matrices. Indices for the first matrix are listed from 0 to nrowqcoefs[0]-1, for the second matrix from nrowqcoefs[0] to nrowqcoefs[0]+ nrowqcoefs[1]-1, etc.
        rowqcol2 - Integer array of size nqcelem, containing the second index for the quadratic constraint matrices.
        rowqcoef - Integer array of size nqcelem, containing the coefficients for the quadratic constraint matrices.
        nentities - Number of binary, integer, semi-continuous, semi-continuous integer and partial integer entities.
        nsets - Number of SOS1 and SOS2 sets.
        coltype - Character array of length nentities containing the entity types:
        • B: binary variables;
        • I: integer variables;
        • P: partial integer variables;
        • S: semi-continuous variables;
        • R: semi-continuous integer variables.
        entind - Integer array of length nentities containing the column indices of the global entities.
        limit - Double array of length nentities containing the integer limits for the partial integer variables and lower bounds for semi-continuous and semi-continuous integer variables (any entries in the positions corresponding to binary and integer variables will be ignored). May be null if not required.
        settype - Character array of length nsets containing the set types:
        • 1: SOS1 type sets;
        • 2: SOS2 type sets.
        May be null if not required.
        setstart - Integer array containing the offsets in the setind and refval arrays indicating the start of the sets. This array is of length nsets+1, the last member containing the offset where set nsets+1 would start. May be null if not required.
        setind - Integer array of length setstart[nsets]-1 containing the columns in each set. May be null if not required.
        refval - Double array of length setstart[nsets]-1 containing the reference row entries for each member of the sets. May be null if not required.
        Throws:
        XPRSprobException
      • copyCallBacks

        public void copyCallBacks(XPRSprob src)
                           throws XPRSprobException
        Copies callback functions defined for one problem to another.
        Parameters:
        src - The problem from which the callbacks are copied.
        Throws:
        XPRSprobException
      • copyControls

        public void copyControls(XPRSprob src)
                          throws XPRSprobException
        Copies controls defined for one problem to another.
        Parameters:
        src - The problem from which the controls are copied.
        Throws:
        XPRSprobException
      • interrupt

        public void interrupt(XPRSenumerations.StopType reason)
                       throws XPRSprobException
        Interrupts the Optimizer algorithms.
        Parameters:
        reason - The reason for stopping. Possible reasons are:
        • XPRS_STOP_TIMELIMIT: time limit hit;
        • XPRS_STOP_CTRLC: control C hit;
        • XPRS_STOP_NODELIMIT: node limit hit;
        • XPRS_STOP_ITERLIMIT: iteration limit hit;
        • XPRS_STOP_MIPGAP: MIP gap is sufficiently small;
        • XPRS_STOP_SOLLIMIT: solution limit hit;
        • XPRS_STOP_USER: user interrupt.
        Throws:
        XPRSprobException
      • getProbName

        public void getProbName(StringHolder name)
                         throws XPRSprobException
        Returns the current problem name.
        Parameters:
        name - A string of up to MAXPROBNAMELENGTH characters to contain the current problem name.
        Throws:
        XPRSprobException
      • setIntControl

        public void setIntControl(int control,
                                  int value)
                           throws XPRSprobException
        Sets the value of a given integer control parameter.
        Parameters:
        control - Control parameter whose value is to be set. A full list of all controls may be found in , or from the list in the xprs.h header file.
        value - Value to which the control parameter is to be set.
        Throws:
        XPRSprobException
      • setLongControl

        public void setLongControl(int control,
                                   long value)
                            throws XPRSprobException
        Sets the value of a given integer control parameter.
        Parameters:
        control - Control parameter whose value is to be set. A full list of all controls may be found in , or from the list in the xprs.h header file.
        value - Value to which the control parameter is to be set.
        Throws:
        XPRSprobException
      • setDblControl

        public void setDblControl(int control,
                                  double value)
                           throws XPRSprobException
        Sets the value of a given double control parameter.
        Parameters:
        control - Control parameter whose value is to be set. A full list of all controls may be found in , or from the list in the xprs.h header file.
        value - Value to which the control parameter is to be set.
        Throws:
        XPRSprobException
      • setStrControl

        public void setStrControl(int control,
                                  java.lang.String value)
                           throws XPRSprobException
        Used to set the value of a given string control parameter.
        Parameters:
        control - Control parameter whose value is to be set. A full list of all controls may be found in , or from the list in the xprs.h header file.
        value - A string containing the value to which the control is to be set (plus a null terminator).
        Throws:
        XPRSprobException
      • getIntControl

        public void getIntControl(int control,
                                  IntHolder p_value)
                           throws XPRSprobException
        Enables users to recover the values of various integer control parameters
        Parameters:
        control - Control parameter whose value is to be returned. A full list of all controls may be found in Chapter , or from the list in the xprs.h header file.
        p_value - Pointer to an integer where the value of the control will be returned.
        Throws:
        XPRSprobException
      • getLongControl

        public void getLongControl(int control,
                                   LongHolder p_value)
                            throws XPRSprobException
        Enables users to recover the values of various integer control parameters
        Parameters:
        control - Control parameter whose value is to be returned. A full list of all controls may be found in Chapter , or from the list in the xprs.h header file.
        p_value - Pointer to an integer where the value of the control will be returned.
        Throws:
        XPRSprobException
      • getDblControl

        public void getDblControl(int control,
                                  DoubleHolder p_value)
                           throws XPRSprobException
        Retrieves the value of a given double control parameter.
        Parameters:
        control - Control parameter whose value is to be returned. A full list of all controls may be found in Chapter , or from the list in the xprs.h header file.
        p_value - Pointer to the location where the control value will be returned.
        Throws:
        XPRSprobException
      • getIntAttrib

        public void getIntAttrib(int attrib,
                                 IntHolder p_value)
                          throws XPRSprobException
        Enables users to recover the values of various integer problem attributes. Problem attributes are set during loading and optimization of a problem.
        Parameters:
        attrib - Problem attribute whose value is to be returned. A full list of all problem attributes may be found in Chapter , or from the list in the xprs.h header file.
        p_value - Pointer to an integer where the value of the problem attribute will be returned.
        Throws:
        XPRSprobException
      • getLongAttrib

        public void getLongAttrib(int attrib,
                                  LongHolder p_value)
                           throws XPRSprobException
        Enables users to recover the values of various integer problem attributes. Problem attributes are set during loading and optimization of a problem.
        Parameters:
        attrib - Problem attribute whose value is to be returned. A full list of all problem attributes may be found in Chapter , or from the list in the xprs.h header file.
        p_value - Pointer to an integer where the value of the problem attribute will be returned.
        Throws:
        XPRSprobException
      • getDblAttrib

        public void getDblAttrib(int attrib,
                                 DoubleHolder p_value)
                          throws XPRSprobException
        Enables users to retrieve the values of various double problem attributes. Problem attributes are set during loading and optimization of a problem.
        Parameters:
        attrib - Problem attribute whose value is to be returned. A full list of all available problem attributes may be found in Chapter , or from the list in the xprs.h header file.
        p_value - Pointer to a double where the value of the problem attribute will be returned.
        Throws:
        XPRSprobException
      • getControlInfo

        public void getControlInfo(java.lang.String name,
                                   IntHolder p_id,
                                   XPRSenumerationHolders.ParameterType p_type)
                            throws XPRSprobException
        Accesses the id number and the type information of a control given its name. A control name may be for example XPRS_PRESOLVE. Names are case-insensitive and may or may not have the XPRS_ prefix. The id number is the constant used to identify the control for calls to functions such as getIntControl. The function will return an id number of 0 and a type value of XPRS_TYPE_NOTDEFINED if the name is not recognized as a control name. Note that this will occur if the name is an attribute name and not a control name.
        Parameters:
        name - The name of the control to be queried. Names are case-insensitive and may or may not have the XPRS_ prefix. A full list of all controls may be found in , or from the list in the xprs.h header file.
        p_id - Pointer to an integer where the id number will be returned.
        p_type - Pointer to an integer where the type information will be returned. The returned value will be one of the following constants from xprs.h:
        XPRS_TYPE_NOTDEFINED The name was not recognized.
        XPRS_TYPE_INT 32 bit integer.
        XPRS_TYPE_INT64 64 bit integer.
        XPRS_TYPE_DOUBLE Double precision floating point.
        XPRS_TYPE_STRING String.
        Throws:
        XPRSprobException
      • getAttribInfo

        public void getAttribInfo(java.lang.String name,
                                  IntHolder p_id,
                                  XPRSenumerationHolders.ParameterType p_type)
                           throws XPRSprobException
        Accesses the id number and the type information of an attribute given its name. An attribute name may be for example XPRS_ROWS. Names are case-insensitive and may or may not have the XPRS_ prefix. The id number is the constant used to identify the attribute for calls to functions such as getIntAttrib. The type information returned will be one of the below integer constants defined in the xprs.h header file. The function will return an id number of 0 and a type value of XPRS_TYPE_NOTDEFINED if the name is not recognized as an attribute name. Note that this will occur if the name is a control name and not an attribute name.
        Parameters:
        name - The name of the attribute to be queried. Names are case-insensitive and may or may not have the XPRS_ prefix. A full list of all attributes may be found in Chapter , or from the list in the xprs.h header file.
        p_id - Pointer to an integer where the id number will be returned.
        p_type - Pointer to an integer where the type id will be returned. The value will be one of the following constants from xprs.h:
        XPRS_TYPE_NOTDEFINED The name was not recognized.
        XPRS_TYPE_INT 32 bit integer.
        XPRS_TYPE_INT64 64 bit integer.
        XPRS_TYPE_DOUBLE Double precision floating point.
        XPRS_TYPE_STRING String.
        Throws:
        XPRSprobException
      • getIndex

        public void getIndex(int type,
                             java.lang.String name,
                             IntHolder p_index)
                      throws XPRSprobException
        Returns the index for a specified row or column name.
        Parameters:
        type -
        • 1: if a row index is required;
        • 2: if a column index is required.
        name - Null terminated string.
        p_index - Pointer of the integer where the row or column index number will be returned. A value of -1 will be returned if the row or column does not exist.
        Throws:
        XPRSprobException
      • getLastError

        public void getLastError(StringHolder errmsg)
                          throws XPRSprobException
        Returns the error message corresponding to the last error encountered by a library function.
        Parameters:
        errmsg - A 512 character buffer where the last error message will be returned.
        Throws:
        XPRSprobException
      • getQObj

        public void getQObj(int objqcol1,
                            int objqcol2,
                            DoubleHolder p_objqcoef)
                     throws XPRSprobException
        Returns a single quadratic objective function coefficient corresponding to the variable pair (objqcol1, objqcol2) of the Hessian matrix.
        Parameters:
        objqcol1 - Column index for the first variable in the quadratic term.
        objqcol2 - Column index for the second variable in the quadratic term.
        p_objqcoef - Pointer to a double value where the objective function coefficient is to be placed.
        Throws:
        XPRSprobException
      • getDirs

        public void getDirs(IntHolder p_ndir,
                            int[] indices,
                            int[] prios,
                            byte[] branchdirs,
                            double[] uppseudo,
                            double[] downpseudo)
                     throws XPRSprobException
        Used to return the directives that have been loaded into a matrix. Priorities, forced branching directions and pseudo costs can be returned. If called after presolve, getDirs will get the directives for the presolved problem.
        Parameters:
        p_ndir - Pointer to an integer where the number of directives will be returned.
        indices - Integer array of length p_ndir containing the column numbers ( 0, 1, 2,...) or negative values corresponding to special ordered sets (the first set numbered -1, the second numbered -2,...). May be null if not required.
        prios - Integer array of length p_ndir containing the priorities for the columns and sets, where columns/sets with smallest priority will be branched on first. May be null if not required.
        branchdirs - Character array of length p_ndir specifying the branching direction for each column or set:
        • U: the entity is to be forced up;
        • D: the entity is to be forced down;
        • N: not specified.
        May be null if not required.
        uppseudo - Double array of length p_ndir containing the up pseudo costs for the columns and sets. May be null if not required.
        downpseudo - Double array of length p_ndir containing the down pseudo costs for the columns and sets. May be null if not required.
        Throws:
        XPRSprobException
      • getPivotOrder

        public void getPivotOrder(int[] pivotorder)
                           throws XPRSprobException
        Returns the pivot order of the basic variables.
        Parameters:
        pivotorder - Integer array of length ROWS where the pivot order will be returned.
        Throws:
        XPRSprobException
      • getPresolveMap

        public void getPresolveMap(int[] rowmap,
                                   int[] colmap)
                            throws XPRSprobException
        Returns the mapping of the row and column numbers from the presolve problem back to the original problem.
        Parameters:
        rowmap - Integer array of length ROWS where the row maps will be returned.
        colmap - Integer array of length COLS where the column maps will be returned.
        Throws:
        XPRSprobException
      • btran

        public void btran(double[] vec)
                   throws XPRSprobException
        Post-multiplies a (row) vector provided by the user by the inverse of the current basis.
        Parameters:
        vec - Double array of length ROWS containing the values by which the basis inverse is to be multiplied. The transformed values will also be returned in this array.
        Throws:
        XPRSprobException
      • ftran

        public void ftran(double[] vec)
                   throws XPRSprobException
        Pre-multiplies a (column) vector provided by the user by the inverse of the current matrix.
        Parameters:
        vec - Double array of length ROWS containing the values which are to be multiplied by the basis inverse. The transformed values appear in the array.
        Throws:
        XPRSprobException
      • getObj

        public void getObj(double[] objcoef,
                           int first,
                           int last)
                    throws XPRSprobException
        Returns the objective function coefficients for the columns in a given range.
        Parameters:
        objcoef - Double array of length last-first+1 where the objective function coefficients are to be placed.
        first - First column in the range.
        last - Last column in the range.
        Throws:
        XPRSprobException
      • getRHS

        public void getRHS(double[] rhs,
                           int first,
                           int last)
                    throws XPRSprobException
        Returns the right hand side elements for the rows in a given range.
        Parameters:
        rhs - Double array of length last-first+1 where the right hand side elements are to be placed.
        first - First row in the range.
        last - Last row in the range.
        Throws:
        XPRSprobException
      • getRHSrange

        public void getRHSrange(double[] rng,
                                int first,
                                int last)
                         throws XPRSprobException
        Returns the right hand side range values for the rows in a given range.
        Parameters:
        rng - Double array of length last-first+1 where the right hand side range values are to be placed.
        first - First row in the range.
        last - Last row in the range.
        Throws:
        XPRSprobException
      • getLB

        public void getLB(double[] lb,
                          int first,
                          int last)
                   throws XPRSprobException
        Returns the lower bounds for the columns in a given range.
        Parameters:
        lb - Double array of length last-first+1 where the lower bounds are to be placed.
        first - First column in the range.
        last - Last column in the range.
        Throws:
        XPRSprobException
      • getUB

        public void getUB(double[] ub,
                          int first,
                          int last)
                   throws XPRSprobException
        Returns the upper bounds for the columns in a given range.
        Parameters:
        ub - Double array of length last-first+1 where the upper bounds are to be placed.
        first - First column in the range.
        last - Last column in the range.
        Throws:
        XPRSprobException
      • getCols

        public void getCols(int[] start,
                            int[] rowind,
                            double[] rowcoef,
                            int maxcoefs,
                            IntHolder p_ncoefs,
                            int first,
                            int last)
                     throws XPRSprobException
        Returns the nonzeros in the constraint matrix for the columns in a given range.
        Parameters:
        start - Integer array which will be filled with the indices indicating the starting offsets in the rowind and rowcoef arrays for each requested column. It must be of length at least last-first+2. Column i starts at position start[i] in the rowind and rowcoef arrays, and has start[i+1]-start[i] elements in it. May be null if not required.
        rowind - Integer array of length maxcoefs which will be filled with the row indices of the nonzero coefficents for each column. May be null if not required.
        rowcoef - Double array of length maxcoefs which will be filled with the nonzero coefficient values. May be null if not required.
        maxcoefs - The size of the rowind and rowcoef arrays. This is the maximum number of nonzero coefficients that the Optimizer is allowed to return.
        p_ncoefs - Pointer to an integer where the number of nonzero coefficients in the selected columns will be returned. If p_ncoefs exceeds maxcoefs, only the maxcoefs first nonzero coefficients will be returned.
        first - First column in the range.
        last - Last column in the range.
        Throws:
        XPRSprobException
      • getCols

        public void getCols(long[] start,
                            int[] rowind,
                            double[] rowcoef,
                            long maxcoefs,
                            LongHolder p_ncoefs,
                            int first,
                            int last)
                     throws XPRSprobException
        Returns the nonzeros in the constraint matrix for the columns in a given range.
        Parameters:
        start - Integer array which will be filled with the indices indicating the starting offsets in the rowind and rowcoef arrays for each requested column. It must be of length at least last-first+2. Column i starts at position start[i] in the rowind and rowcoef arrays, and has start[i+1]-start[i] elements in it. May be null if not required.
        rowind - Integer array of length maxcoefs which will be filled with the row indices of the nonzero coefficents for each column. May be null if not required.
        rowcoef - Double array of length maxcoefs which will be filled with the nonzero coefficient values. May be null if not required.
        maxcoefs - The size of the rowind and rowcoef arrays. This is the maximum number of nonzero coefficients that the Optimizer is allowed to return.
        p_ncoefs - Pointer to an integer where the number of nonzero coefficients in the selected columns will be returned. If p_ncoefs exceeds maxcoefs, only the maxcoefs first nonzero coefficients will be returned.
        first - First column in the range.
        last - Last column in the range.
        Throws:
        XPRSprobException
      • getRows

        public void getRows(int[] start,
                            int[] colind,
                            double[] colcoef,
                            int maxcoefs,
                            IntHolder p_ncoefs,
                            int first,
                            int last)
                     throws XPRSprobException
        Returns the nonzeros in the constraint matrix for the rows in a given range.
        Parameters:
        start - Integer array which will be filled with the indices indicating the starting offsets in the colind and colcoef arrays for each requested row. It must be of length at least last-first+2. Row i starts at position start[i] in the colind and colcoef arrays, and has start[i+1]-start[i] elements in it. May be null if not required.
        colind - Integer arrays of length maxcoefs which will be filled with the column indices of the nonzero elements for each row. May be null if not required.
        colcoef - Double array of length maxcoefs which will be filled with the nonzero element values. May be null if not required.
        maxcoefs - Maximum number of elements to be retrieved.
        p_ncoefs - Pointer to the integer where the number of nonzero elements in the selected rows will be returned. If the number of nonzero elements is greater than maxcoefs, then only maxcoefs elements will be returned. If p_ncoefs is smaller than maxcoefs, then only p_ncoefs will be returned.
        first - First row in the range.
        last - Last row in the range.
        Throws:
        XPRSprobException
      • getRows

        public void getRows(long[] start,
                            int[] colind,
                            double[] colcoef,
                            long maxcoefs,
                            LongHolder p_ncoefs,
                            int first,
                            int last)
                     throws XPRSprobException
        Returns the nonzeros in the constraint matrix for the rows in a given range.
        Parameters:
        start - Integer array which will be filled with the indices indicating the starting offsets in the colind and colcoef arrays for each requested row. It must be of length at least last-first+2. Row i starts at position start[i] in the colind and colcoef arrays, and has start[i+1]-start[i] elements in it. May be null if not required.
        colind - Integer arrays of length maxcoefs which will be filled with the column indices of the nonzero elements for each row. May be null if not required.
        colcoef - Double array of length maxcoefs which will be filled with the nonzero element values. May be null if not required.
        maxcoefs - Maximum number of elements to be retrieved.
        p_ncoefs - Pointer to the integer where the number of nonzero elements in the selected rows will be returned. If the number of nonzero elements is greater than maxcoefs, then only maxcoefs elements will be returned. If p_ncoefs is smaller than maxcoefs, then only p_ncoefs will be returned.
        first - First row in the range.
        last - Last row in the range.
        Throws:
        XPRSprobException
      • getCoef

        public void getCoef(int row,
                            int col,
                            DoubleHolder p_coef)
                     throws XPRSprobException
        Returns a single coefficient in the constraint matrix.
        Parameters:
        row - Row of the constraint matrix.
        col - Column of the constraint matrix.
        p_coef - Pointer to a double where the coefficient will be returned.
        Throws:
        XPRSprobException
      • getMQObj

        public void getMQObj(int[] start,
                             int[] colind,
                             double[] objqcoef,
                             int maxcoefs,
                             IntHolder p_ncoefs,
                             int first,
                             int last)
                      throws XPRSprobException
        Returns the nonzeros in the quadratic objective coefficients matrix for the columns in a given range. To achieve maximum efficiency, getMQObj returns the lower triangular part of this matrix only.
        Parameters:
        start - Integer array which will be filled with indices indicating the starting offsets in the colind and objqcoef arrays for each requested column. It must be length of at least last-first+2. Column i starts at position start[i] in the mrwind and dmatval arrays, and has start[i+1]-start[i] elements in it. May be null if maxcoefs is 0.
        colind - Integer array of length maxcoefs which will be filled with the column indices of the nonzero elements in the lower triangular part of Q. May be null if maxcoefs is 0.
        objqcoef - Double array of length maxcoefs which will be filled with the nonzero element values. May be null if maxcoefs is 0.
        maxcoefs - The maximum number of elements to be returned (size of the arrays).
        p_ncoefs - Pointer to an integer where the number of nonzero quadratic objective coefficients will be returned. If the number of nonzero coefficients is greater than maxcoefs, then only maxcoefs elements will be returned. If p_ncoefs is smaller than maxcoefs, then only p_ncoefs will be returned.
        first - First column in the range.
        last - Last column in the range.
        Throws:
        XPRSprobException
      • getMQObj

        public void getMQObj(long[] start,
                             int[] colind,
                             double[] objqcoef,
                             long maxcoefs,
                             LongHolder p_ncoefs,
                             int first,
                             int last)
                      throws XPRSprobException
        Returns the nonzeros in the quadratic objective coefficients matrix for the columns in a given range. To achieve maximum efficiency, getMQObj returns the lower triangular part of this matrix only.
        Parameters:
        start - Integer array which will be filled with indices indicating the starting offsets in the colind and objqcoef arrays for each requested column. It must be length of at least last-first+2. Column i starts at position start[i] in the mrwind and dmatval arrays, and has start[i+1]-start[i] elements in it. May be null if maxcoefs is 0.
        colind - Integer array of length maxcoefs which will be filled with the column indices of the nonzero elements in the lower triangular part of Q. May be null if maxcoefs is 0.
        objqcoef - Double array of length maxcoefs which will be filled with the nonzero element values. May be null if maxcoefs is 0.
        maxcoefs - The maximum number of elements to be returned (size of the arrays).
        p_ncoefs - Pointer to an integer where the number of nonzero quadratic objective coefficients will be returned. If the number of nonzero coefficients is greater than maxcoefs, then only maxcoefs elements will be returned. If p_ncoefs is smaller than maxcoefs, then only p_ncoefs will be returned.
        first - First column in the range.
        last - Last column in the range.
        Throws:
        XPRSprobException
      • writeBasis

        public void writeBasis(java.lang.String filename,
                               java.lang.String flags)
                        throws XPRSprobException
        Writes the current basis to a file for later input into the Optimizer.
        Parameters:
        filename - A string of up to MAXPROBNAMELENGTH characters containing the file name from which the basis is to be written. If omitted, the default problem_name is used with a .bss extension.
        flags - Flags to pass to writeBasis ( WRITEBASIS):
        • i: output the internal presolved basis;
        • t: output a compact advanced form of the basis;
        • n: output basis file containing current solution values;
        • h: output values in single precision;
        • p: output values in full precision (obsolete as this is now default behavior);
        • v: use the provided filename verbatim, without appending the .bss extension;
        • z: compress the output file.
        Throws:
        XPRSprobException
      • writeSol

        public void writeSol(java.lang.String filename,
                             java.lang.String flags)
                      throws XPRSprobException
        Writes the current solution to a CSV format ASCII file, problem_name .asc (and .hdr).
        Parameters:
        filename - A string of up to MAXPROBNAMELENGTH characters containing the file name to which the solution is to be written. If omitted, the default problem_name will be used. The extensions .hdr and .asc will be appended.
        flags - Flags to control which optional fields are output:
        • s: sequence number;
        • n: name;
        • t: type;
        • b: basis status;
        • a: activity;
        • c: cost (columns), slack (rows);
        • l: lower bound;
        • u: upper bound;
        • d: dj (column; reduced costs), dual value (rows; shadow prices);
        • r: right hand side (rows).
        If no flags are specified, all fields are output.
        Additional flags:
        • p: outputs in full precision;
        • q: only outputs vectors with nonzero optimum value;
        • x: output the current LP solution instead of the MIP solution;
        • z: compress the output file.
        Throws:
        XPRSprobException
      • writeBinSol

        public void writeBinSol(java.lang.String filename,
                                java.lang.String flags)
                         throws XPRSprobException
        Writes the current MIP or LP solution to a binary solution file for later input into the Optimizer.
        Parameters:
        filename - A string of up to MAXPROBNAMELENGTH characters containing the file name to which the solution is to be written. If omitted, the default problem_name is used with a .sol extension.
        flags - Flags to pass to writeBinSol ( WRITEBINSOL):
        • m: output the MIP solution;
        • x: output the LP solution;
        • v: use the provided filename verbatim, without appending the .sol extension;
        • z: compress the output file.
        Throws:
        XPRSprobException
      • writePrtSol

        public void writePrtSol(java.lang.String filename,
                                java.lang.String flags)
                         throws XPRSprobException
        Writes the current solution to a fixed format ASCII file, problem_name .prt.
        Parameters:
        filename - A string of up to MAXPROBNAMELENGTH characters containing the file name to which the solution is to be written. If omitted, the default problem_name will be used. The extension .prt will be appended.
        flags - Flags for writePrtSol ( WRITEPRTSOL) are:
        • x: write the LP solution instead of the current MIP solution;
        • v: use the provided filename verbatim, without appending the .prt extension;
        • z: write a compressed output file.
        Throws:
        XPRSprobException
      • writeSlxSol

        public void writeSlxSol(java.lang.String filename,
                                java.lang.String flags)
                         throws XPRSprobException
        Creates an ASCII solution file ( .slx) using a similar format to MPS files. These files can be read back into the Optimizer using the readSlxSol function.
        Parameters:
        filename - A string of up to MAXPROBNAMELENGTH characters containing the file name to which the solution is to be written. If omitted, the default problem_name is used with a .slx extension.
        flags - Flags to pass to writeSlxSol ( WRITESLXSOL):
        • l: write the LP solution in case of a MIP problem;
        • m: write the MIP solution;
        • p: use full precision for numerical values (obsolete as this is now default behavior);
        • s: including slack variables;
        • d: LP solution only: including dual variables;
        • r: LP solution only: including reduced cost;
        • v: use the provided filename verbatim, without appending the .slx extension;
        • z: compress the output file.
        Throws:
        XPRSprobException
      • getPrimalRay

        public void getPrimalRay(double[] ray,
                                 IntHolder p_hasray)
                          throws XPRSprobException
        Retrieves a primal ray (primal unbounded direction) for the current problem, if the problem is found to be unbounded.
        Parameters:
        ray - Double array of length COLS to hold the ray. May be null if not required.
        p_hasray - This variable will be set to 1 if the Optimizer is able to return a primal ray, 0 otherwise.
        Throws:
        XPRSprobException
      • getDualRay

        public void getDualRay(double[] ray,
                               IntHolder p_hasray)
                        throws XPRSprobException
        Retrieves a dual ray (dual unbounded direction) for the current problem, if the problem is found to be infeasible.
        Parameters:
        ray - Double array of length ROWS to hold the ray. May be null if not required.
        p_hasray - This variable will be set to 1 if the Optimizer is able to return a dual ray, 0 otherwise.
        Throws:
        XPRSprobException
      • strongBranchCB

        public void strongBranchCB(int nbounds,
                                   int[] colind,
                                   byte[] bndtype,
                                   double[] bndval,
                                   int iterlim,
                                   double[] objval,
                                   int[] status,
                                   XPRSstrongBranchSolveListener callback,
                                   java.lang.Object data)
                            throws XPRSprobException
        Performs strong branching iterations on all specified bound changes. For each candidate bound change, strongBranchCB performs dual simplex iterations starting from the current optimal solution of the base LP, and returns both the status and objective value reached after these iterations.
        Parameters:
        nbounds - Number of bound changes to try.
        colind - Integer array of size nbounds containing the indices of the columns on which the bounds will change.
        bndtype - Character array of length nbounds indicating the type of bound to change:
        • U: indicates change the upper bound;
        • L: indicates change the lower bound;
        • B: indicates change both bounds, i.e. fix the column.
        bndval - Double array of length nbounds giving the new bound values.
        iterlim - Maximum number of LP iterations to perform for each bound change.
        objval - Objective value of each LP after performing the strong branching iterations.
        status - Status of each LP after performing the strong branching iterations, as detailed for the LPSTATUS attribute.
        callback - Function to be called after each strong branch has been reoptimized.
        data - User context to be provided for callback.
        Throws:
        XPRSprobException
      • loadMipSol

        public void loadMipSol(double[] x,
                               IntHolder p_status)
                        throws XPRSprobException
        Loads a starting MIP solution for the problem into the Optimizer.
        Parameters:
        x - Double array of length COLS (for the original problem and not the presolve problem) containing the values of the variables.
        p_status - Pointer to an int where the status will be returned. The status is one of:
        • -1: Solution rejected because an error occurred;
        • 0: Solution accepted. When loading a solution before a MIP solve, the solution is always accepted. See Further Information below.
        • 1: Solution rejected because it is infeasible;
        • 2: Solution rejected because it is cut off;
        • 3: Solution rejected because the LP reoptimization was interrupted.
        Throws:
        XPRSprobException
      • getBasis

        public void getBasis(int[] rowstat,
                             int[] colstat)
                      throws XPRSprobException
        Returns the current basis into the user's data arrays.
        Parameters:
        rowstat - Integer array of length ROWS to the basis status of the slack, surplus or artificial variable associated with each row. The status will be one of:
        • 0: slack, surplus or artificial is non-basic at lower bound;
        • 1: slack, surplus or artificial is basic;
        • 2: slack or surplus is non-basic at upper bound.
        • 3: slack or surplus is super-basic.
        May be null if not required.
        colstat - Integer array of length COLS to hold the basis status of the columns in the constraint matrix. The status will be one of:
        • 0: variable is non-basic at lower bound, or superbasic at zero if the variable has no lower bound;
        • 1: variable is basic;
        • 2: variable is non-basic at upper bound;
        • 3: variable is super-basic.
        May be null if not required.
        Throws:
        XPRSprobException
      • getBasisVal

        public void getBasisVal(int row,
                                int col,
                                IntHolder p_rowstat,
                                IntHolder p_colstat)
                         throws XPRSprobException
        Returns the current basis status for a specific column or row.
        Parameters:
        row - Row index to get the row basis status for.
        col - Column index to get the column basis status for.
        p_rowstat - Integer pointer where the value of the row basis status will be returned. May be null if not required.
        p_colstat - Integer pointer where the value of the column basis status will be returned. May be null if not required.
        Throws:
        XPRSprobException
      • addCuts

        public void addCuts(int ncuts,
                            int[] cuttype,
                            byte[] rowtype,
                            double[] rhs,
                            int[] start,
                            int[] colind,
                            double[] cutcoef)
                     throws XPRSprobException
        Adds cuts directly to the matrix at the current node. Any cuts added to the matrix at the current node and not deleted at the current node will be automatically added to the cut pool. The cuts added to the cut pool will be automatically restored at descendant nodes.
        Parameters:
        ncuts - Number of cuts to add.
        cuttype - Integer array of length ncuts containing the user assigned cut types. The cut types can be any integer chosen by the user, and are used to identify the cuts in other cut manager routines using user supplied parameters. The cut type can be interpreted as an integer or a bitmap - see delCuts.
        rowtype - Character array of length ncuts containing the row types:
        • L: indicates a <= row;
        • G: indicates a >= row;
        • E: indicates an = row.
        rhs - Double array of length ncuts containing the right hand side elements for the cuts.
        start - Integer array containing offset into the colind and cutcoef arrays indicating the start of each cut. This array is of length ncuts+1 with the last element, start[ncuts], being where cut ncuts+1 would start.
        colind - Integer array of length start[ncuts] containing the column indices in the cuts.
        cutcoef - Double array of length start[ncuts] containing the matrix values for the cuts.
        Throws:
        XPRSprobException
      • addCuts

        public void addCuts(int ncuts,
                            int[] cuttype,
                            byte[] rowtype,
                            double[] rhs,
                            long[] start,
                            int[] colind,
                            double[] cutcoef)
                     throws XPRSprobException
        Adds cuts directly to the matrix at the current node. Any cuts added to the matrix at the current node and not deleted at the current node will be automatically added to the cut pool. The cuts added to the cut pool will be automatically restored at descendant nodes.
        Parameters:
        ncuts - Number of cuts to add.
        cuttype - Integer array of length ncuts containing the user assigned cut types. The cut types can be any integer chosen by the user, and are used to identify the cuts in other cut manager routines using user supplied parameters. The cut type can be interpreted as an integer or a bitmap - see delCuts.
        rowtype - Character array of length ncuts containing the row types:
        • L: indicates a <= row;
        • G: indicates a >= row;
        • E: indicates an = row.
        rhs - Double array of length ncuts containing the right hand side elements for the cuts.
        start - Integer array containing offset into the colind and cutcoef arrays indicating the start of each cut. This array is of length ncuts+1 with the last element, start[ncuts], being where cut ncuts+1 would start.
        colind - Integer array of length start[ncuts] containing the column indices in the cuts.
        cutcoef - Double array of length start[ncuts] containing the matrix values for the cuts.
        Throws:
        XPRSprobException
      • delCuts

        public void delCuts(int basis,
                            int cuttype,
                            int interp,
                            double delta,
                            int ncuts,
                            XPRScut[] cutind)
                     throws XPRSprobException
        Deletes cuts from the matrix at the current node. Cuts from the parent node which have been automatically restored may be deleted as well as cuts added to the current node using addCuts or loadCuts. The cuts to be deleted can be specified in a number of ways. If a cut is ruled out by any one of the criteria it will not be deleted.
        Parameters:
        basis - Ensures the basis will be valid if set to 1. If set to 0, cuts with non-basic slacks may be deleted.
        cuttype - User defined type of the cut to be deleted.
        interp - Way in which the cut cuttype is interpreted:
        • -1: match all cut types;
        • 1: treat cut types as numbers;
        • 2: treat cut types as bit maps - delete if any bit matches any bit set in cuttype;
        • 3: treat cut types as bit maps - delete if all bits match those set in cuttype.
        delta - Only delete cuts with an absolute slack value greater than delta. To delete all the cuts, this argument should be set to XPRS_MINUSINFINITY.
        ncuts - Number of cuts to drop if a list of cuts is provided. A value of -1 indicates all cuts.
        cutind - Array containing pointers to the cuts which are to be deleted. This array may be null if ncuts is set to -1 otherwise it has length ncuts.
        Throws:
        XPRSprobException
      • delCPCuts

        public void delCPCuts(int cuttype,
                              int interp,
                              int ncuts,
                              XPRScut[] cutind)
                       throws XPRSprobException
        During the branch and bound search, cuts are stored in the cut pool to be applied at descendant nodes. These cuts may be removed from a given node using delCuts, but if this is to be applied in a large number of cases, it may be preferable to remove the cut completely from the cut pool. This is achieved using delCPCuts.
        Parameters:
        cuttype - User defined cut type to match against.
        interp - Way in which the cut cuttype is interpreted:
        • -1: match all cut types;
        • 1: treat cut types as numbers;
        • 2: treat cut types as bit maps - delete if any bit matches any bit set in cuttype;
        • 3: treat cut types as bit maps - delete if all bits match those set in cuttype.
        ncuts - The number of cuts to delete. A value of -1 indicates delete all cuts.
        cutind - Array containing pointers to the cuts which are to be deleted. This array may be null if ncuts is -1, otherwise it has length ncuts.
        Throws:
        XPRSprobException
      • getCutList

        public void getCutList(int cuttype,
                               int interp,
                               IntHolder p_ncuts,
                               int maxcuts,
                               XPRScut[] cutind)
                        throws XPRSprobException
        Retrieves a list of cut pointers for the cuts active at the current node.
        Parameters:
        cuttype - User defined type of the cuts to be returned. A value of -1 indicates return all active cuts.
        interp - Way in which the cut type is interpreted:
        • -1: get all cuts;
        • 1: treat cut types as numbers;
        • 2: treat cut types as bit maps - get cut if any bit matches any bit set in cuttype;
        • 3: treat cut types as bit maps - get cut if all bits match those set in cuttype.
        p_ncuts - Pointer to the integer where the number of active cuts of type cuttype will be returned.
        maxcuts - Maximum number of cuts to be retrieved.
        cutind - Array of length maxcuts where the pointers to the cuts will be returned.
        Throws:
        XPRSprobException
      • getCPCutList

        public void getCPCutList(int cuttype,
                                 int interp,
                                 double delta,
                                 IntHolder p_ncuts,
                                 int maxcuts,
                                 XPRScut[] cutind,
                                 double[] viol)
                          throws XPRSprobException
        Returns a list of cut indices from the cut pool.
        Parameters:
        cuttype - The user defined type of the cuts to be returned.
        interp - Way in which the cut type is interpreted:
        • -1: get all cuts;
        • 1: treat cut types as numbers;
        • 2: treat cut types as bit maps - get cut if any bit matches any bit set in cuttype;
        • 3: treat cut types as bit maps - get cut if all bits match those set in cuttype.
        delta - Only those cuts with a signed violation greater than delta will be returned.
        p_ncuts - Pointer to the integer where the number of cuts of type cuttype in the cut pool will be returned.
        maxcuts - Maximum number of cuts to be returned.
        cutind - Array of length maxcuts where the pointers to the cuts will be returned.
        viol - Double array of length maxcuts where the values of the signed violations of the cuts will be returned.
        Throws:
        XPRSprobException
      • getCPCuts

        public void getCPCuts(XPRScut[] rowind,
                              int ncuts,
                              int maxcoefs,
                              int[] cuttype,
                              byte[] rowtype,
                              int[] start,
                              int[] colind,
                              double[] cutcoef,
                              double[] rhs)
                       throws XPRSprobException
        Returns cuts from the cut pool. A list of cut pointers in the array rowind must be passed to the routine. The columns and elements of the cut will be returned in the regions pointed to by the colind and cutcoef parameters. The columns and elements will be stored contiguously and the starting point of each cut will be returned in the region pointed to by the start parameter.
        Parameters:
        rowind - Array of length ncuts containing the pointers to the cuts.
        ncuts - Number of cuts to be returned.
        maxcoefs - Maximum number of column indices of the cuts to be returned.
        cuttype - Integer array of length at least ncuts where the cut types will be returned. May be null if not required.
        rowtype - Character array of length at least ncuts where the sense of the cuts ( L, G, or E) will be returned. May be null if not required.
        start - Integer array of length at least ncuts+1 containing the offsets into the colind and cutcoef arrays. The last element indicates where cut ncuts+1 would start. May be null if not required.
        colind - Integer array of length maxcoefs where the column indices of the cuts will be returned. May be null if not required.
        cutcoef - Double array of length maxcoefs where the matrix values will be returned. May be null if not required.
        rhs - Double array of length at least ncuts where the right hand side elements for the cuts will be returned. May be null if not required.
        Throws:
        XPRSprobException
      • getCPCuts

        public void getCPCuts(XPRScut[] rowind,
                              int ncuts,
                              long maxcoefs,
                              int[] cuttype,
                              byte[] rowtype,
                              long[] start,
                              int[] colind,
                              double[] cutcoef,
                              double[] rhs)
                       throws XPRSprobException
        Returns cuts from the cut pool. A list of cut pointers in the array rowind must be passed to the routine. The columns and elements of the cut will be returned in the regions pointed to by the colind and cutcoef parameters. The columns and elements will be stored contiguously and the starting point of each cut will be returned in the region pointed to by the start parameter.
        Parameters:
        rowind - Array of length ncuts containing the pointers to the cuts.
        ncuts - Number of cuts to be returned.
        maxcoefs - Maximum number of column indices of the cuts to be returned.
        cuttype - Integer array of length at least ncuts where the cut types will be returned. May be null if not required.
        rowtype - Character array of length at least ncuts where the sense of the cuts ( L, G, or E) will be returned. May be null if not required.
        start - Integer array of length at least ncuts+1 containing the offsets into the colind and cutcoef arrays. The last element indicates where cut ncuts+1 would start. May be null if not required.
        colind - Integer array of length maxcoefs where the column indices of the cuts will be returned. May be null if not required.
        cutcoef - Double array of length maxcoefs where the matrix values will be returned. May be null if not required.
        rhs - Double array of length at least ncuts where the right hand side elements for the cuts will be returned. May be null if not required.
        Throws:
        XPRSprobException
      • loadCuts

        public void loadCuts(int coltype,
                             int interp,
                             int ncuts,
                             XPRScut[] cutind)
                      throws XPRSprobException
        Loads cuts from the cut pool into the matrix. Without calling loadCuts the cuts will remain in the cut pool but will not be active at the node. Cuts loaded at a node remain active at all descendant nodes unless they are deleted using delCuts.
        Parameters:
        coltype - Cut type.
        interp - The way in which the cut type is interpreted:
        • -1: load all cuts;
        • 1: treat cut types as numbers;
        • 2: treat cut types as bit maps - load cut if any bit matches any bit set in coltype;
        • 3: treat cut types as bit maps - 0 load cut if all bits match those set in coltype.
        ncuts - Number of cuts to load.
        cutind - Array of length ncuts containing pointers to the cuts to be loaded into the matrix. These are pointers returned by either storeCuts or getCPCutList.
        Throws:
        XPRSprobException
      • storeCuts

        public void storeCuts(int ncuts,
                              int nodups,
                              int[] cuttype,
                              byte[] rowtype,
                              double[] rhs,
                              int[] start,
                              XPRScut[] cutind,
                              int[] colind,
                              double[] cutcoef)
                       throws XPRSprobException
        Stores cuts into the cut pool, but does not apply them to the current node. These cuts must be explicitly loaded into the matrix using loadCuts or setBranchCuts before they become active.
        Parameters:
        ncuts - Number of cuts to add.
        nodups -
        • 0: do not exclude duplicates from the cut pool;
        • 1: duplicates are to be excluded from the cut pool;
        • 2: duplicates are to be excluded from the cut pool, ignoring cut type.
        cuttype - Integer array of length ncuts containing the cut types. The cut types can be any integer and are used to identify the cuts.
        rowtype - Character array of length ncuts containing the row types:
        • L: indicates a <= row;
        • E: indicates an = row;
        • G: indicates a >= row.
        rhs - Double array of length ncuts containing the right hand side elements for the cuts.
        start - Integer array containing offsets into the colind and dmtval arrays indicating the start of each cut. This array is of length ncuts+1 with the last element start[ncuts] being where cut ncuts+1 would start.
        cutind - Array of length ncuts where the pointers to the cuts will be returned.
        colind - Integer array of length start[ncuts] containing the column indices in the cuts.
        cutcoef - Double array of length start[ncuts] containing the matrix values for the cuts.
        Throws:
        XPRSprobException
      • storeCuts

        public void storeCuts(int ncuts,
                              int nodups,
                              int[] cuttype,
                              byte[] rowtype,
                              double[] rhs,
                              long[] start,
                              XPRScut[] cutind,
                              int[] colind,
                              double[] cutcoef)
                       throws XPRSprobException
        Stores cuts into the cut pool, but does not apply them to the current node. These cuts must be explicitly loaded into the matrix using loadCuts or setBranchCuts before they become active.
        Parameters:
        ncuts - Number of cuts to add.
        nodups -
        • 0: do not exclude duplicates from the cut pool;
        • 1: duplicates are to be excluded from the cut pool;
        • 2: duplicates are to be excluded from the cut pool, ignoring cut type.
        cuttype - Integer array of length ncuts containing the cut types. The cut types can be any integer and are used to identify the cuts.
        rowtype - Character array of length ncuts containing the row types:
        • L: indicates a <= row;
        • E: indicates an = row;
        • G: indicates a >= row.
        rhs - Double array of length ncuts containing the right hand side elements for the cuts.
        start - Integer array containing offsets into the colind and dmtval arrays indicating the start of each cut. This array is of length ncuts+1 with the last element start[ncuts] being where cut ncuts+1 would start.
        cutind - Array of length ncuts where the pointers to the cuts will be returned.
        colind - Integer array of length start[ncuts] containing the column indices in the cuts.
        cutcoef - Double array of length start[ncuts] containing the matrix values for the cuts.
        Throws:
        XPRSprobException
      • presolveRow

        public void presolveRow(char rowtype,
                                int norigcoefs,
                                int[] origcolind,
                                double[] origrowcoef,
                                double origrhs,
                                int maxcoefs,
                                IntHolder p_ncoefs,
                                int[] colind,
                                double[] rowcoef,
                                DoubleHolder p_rhs,
                                IntHolder p_status)
                         throws XPRSprobException
        Presolves a row formulated in terms of the original variables such that it can be added to a presolved matrix.
        Parameters:
        rowtype - The type of the row:
        • L: indicates a <= row;
        • G: indicates a >= row.
        norigcoefs - Number of elements in the origcolind and origrowcoef arrays.
        origcolind - Integer array of length norigcoefs containing the column indices of the row to presolve.
        origrowcoef - Double array of length norigcoefs containing the non-zero coefficients of the row to presolve.
        origrhs - The right-hand side constant of the row to presolve.
        maxcoefs - Maximum number of elements to return in the colind and rowcoef arrays.
        p_ncoefs - Pointer to the integer where the number of elements in the colind and rowcoef arrays will be returned.
        colind - Integer array which will be filled with the column indices of the presolved row. It must be allocated to hold at least COLS elements.
        rowcoef - Double array which will be filled with the coefficients of the presolved row. It must be allocated to hold at least COLS elements.
        p_rhs - Pointer to the double where the presolved right-hand side will be returned.
        p_status - Status of the presolved row:
        • -3: Failed to presolve the row due to presolve dual reductions;
        • -2: Failed to presolve the row due to presolve duplicate column reductions;
        • -1: Failed to presolve the row due to an error. Check the Optimizer error code for the cause;
        • 0: The row was successfully presolved;
        • 1: The row was presolved, but may be relaxed.
        Throws:
        XPRSprobException
      • storeBounds

        public void storeBounds(int nbounds,
                                int[] colind,
                                byte[] bndtype,
                                double[] bndval,
                                XPRSbounds p_bounds)
                         throws XPRSprobException
        Stores bounds for node separation using user separate callback function.
        Parameters:
        nbounds - Number of bounds to store.
        colind - Array containing the column indices.
        bndtype - Array containing the bounds types:
        • U: indicates an upper bound;
        • L: indicates a lower bound.
        bndval - Array containing the bound values.
        p_bounds - Pointer that the user will use to reference the stored bounds for the Optimizer in setBranchBounds.
        Throws:
        XPRSprobException
      • setBranchCuts

        public void setBranchCuts(int ncuts,
                                  XPRScut[] cutind)
                           throws XPRSprobException
        Specifies the pointers to cuts in the cut pool that are to be applied in order to branch on a user global entity. This routine can only be called from the user separate callback function, addCbSepnode.
        Parameters:
        ncuts - Number of cuts to apply.
        cutind - Array containing the pointers to the cuts in the cut pool that are to be applied. Typically obtained from storeCuts.
        Throws:
        XPRSprobException
      • setBranchBounds

        public void setBranchBounds(XPRSbounds bounds)
                             throws XPRSprobException
        Specifies the bounds previously stored using storeBounds that are to be applied in order to branch on a user global entity. This routine can only be called from the user separate callback function, addCbSepnode.
        Parameters:
        bounds - Pointer previously defined in a call to storeBounds that references the stored bounds to be used to separate the node.
        Throws:
        XPRSprobException
      • getPivots

        public void getPivots(int enter,
                              int[] outlist,
                              double[] x,
                              DoubleHolder p_objval,
                              IntHolder p_npivots,
                              int maxpivots)
                       throws XPRSprobException
        Returns a list of potential leaving variables if a specified variable enters the basis.
        Parameters:
        enter - Index of the specified row or column to enter basis.
        outlist - Integer array of length at least maxpivots to hold list of potential leaving variables. May be null if not required.
        x - Double array of length ROWS + SPAREROWS + COLS to hold the values of all the variables that would result if enter entered the basis. May be null if not required.
        p_objval - Pointer to a double where the objective function value that would result if enter entered the basis will be returned.
        p_npivots - Pointer to an integer where the actual number of potential leaving variables will be returned.
        maxpivots - Maximum number of potential leaving variables to return.
        Throws:
        XPRSprobException
      • writeProb

        public void writeProb(java.lang.String filename,
                              java.lang.String flags)
                       throws XPRSprobException
        Writes the current problem to an MPS or LP file.
        Parameters:
        filename - A string of up to MAXPROBNAMELENGTH characters to contain the file name to which the problem is to be written. If omitted, the default problem_name is used with a .mps extension, unless the l flag is used in which case the extension is .lp.
        flags - Flags, which can be one or more of the following:
        • o: one element per line;
        • n: output the scaled problem;
        • s: scrambled vector names;
        • l: output in LP format;
        • p: output values in full precision (obsolete as this is now default behavior);
        • t: omit the Xpress header in LP format;
        • v: use the provided filename verbatim, without appending the .mps or .lp extension;
        • z: compress the output file.
        Throws:
        XPRSprobException
      • calcSlacks

        public void calcSlacks(double[] solution,
                               double[] slacks)
                        throws XPRSprobException
        Calculates the row slack values for a given solution.
        Parameters:
        solution - Double array of length COLS that holds the solution to calculate the slacks for.
        slacks - Double array of length ROWS in which the calculated row slacks are returned.
        Throws:
        XPRSprobException
      • calcReducedCosts

        public void calcReducedCosts(double[] duals,
                                     double[] solution,
                                     double[] djs)
                              throws XPRSprobException
        Calculates the reduced cost values for a given (row) dual solution.
        Parameters:
        duals - Double array of length ROWS that holds the dual solution to calculate the reduced costs for.
        solution - Optional double array of length COLS that holds the primal solution. This is necessary for quadratic problems.
        djs - Double array of length COLS in which the calculated reduced costs are returned.
        Throws:
        XPRSprobException
      • calcObjective

        public void calcObjective(double[] solution,
                                  DoubleHolder p_objval)
                           throws XPRSprobException
        Calculates the objective value of a given solution.
        Parameters:
        solution - Double array of length COLS that holds the solution.
        p_objval - Pointer to a double in which the calculated objective value is returned.
        Throws:
        XPRSprobException
      • calcSolInfo

        public void calcSolInfo(double[] solution,
                                double[] duals,
                                int property,
                                DoubleHolder p_value)
                         throws XPRSprobException
        Calculates the required property of a solution, like maximum infeasibility of a given primal and dual solution.
        Parameters:
        solution - Double array of length COLS that holds the solution.
        duals - Double array of length ROWS that holds the dual solution.
        property - Defined the property to be calculated.
        • XPRS_SOLINFO_ABSPRIMALINFEAS: the calculated maximum absolute primal infeasibility is returned.
        • XPRS_SOLINFO_RELPRIMALINFEAS: the calculated maximum relative primal infeasibility is returned.
        • XPRS_SOLINFO_ABSDUALINFEAS: the calculated maximum absolute dual infeasibility is returned.
        • XPRS_SOLINFO_RELDUALINFEAS: the calculated maximum relative dual infeasibility is returned.
        • XPRS_SOLINFO_MAXMIPFRACTIONAL: the calculated maximum absolute MIP fractionality or SOS infeasibility.
        • XPRS_SOLINFO_ABSMIPINFEAS: the calculated maximum absolute MIP infeasibility (including delayed rows, indicators, general and piecewise linear constraints) is returned.
        • XPRS_SOLINFO_RELMIPINFEAS: the calculated maximum relative MIP infeasibility (including delayed rows, indicators, general and piecewise linear constraints) is returned.
        p_value - Pointer to a double where the calculated value is returned.
        Throws:
        XPRSprobException
      • getRowType

        public void getRowType(byte[] rowtype,
                               int first,
                               int last)
                        throws XPRSprobException
        Returns the row types for the rows in a given range.
        Parameters:
        rowtype - Character array of length last-first+1 characters where the row types will be returned:
        • N: indicates a free constraint;
        • L: indicates a <= constraint;
        • E: indicates an = constraint;
        • G: indicates a >= constraint;
        • R: indicates a range constraint.
        first - First row in the range.
        last - Last row in the range.
        Throws:
        XPRSprobException
      • getPresolveBasis

        public void getPresolveBasis(int[] rowstat,
                                     int[] colstat)
                              throws XPRSprobException
        Returns the current basis from memory into the user's data areas. If the problem is presolved, the presolved basis will be returned. Otherwise the original basis will be returned.
        Parameters:
        rowstat - Integer array of length ROWS to the basis status of the stack, surplus or artificial variable associated with each row. The status will be one of:
        • 0: slack, surplus or artificial is non-basic at lower bound;
        • 1: slack, surplus or artificial is basic;
        • 2: slack or surplus is non-basic at upper bound.
        May be null if not required.
        colstat - Integer array of length COLS to hold the basis status of the columns in the constraint matrix. The status will be one of:
        • 0: variable is non-basic at lower bound, or superbasic at zero if the variable has no lower bound;
        • 1: variable is basic;
        • 2: variable is at upper bound;
        • 3: variable is super-basic.
        May be null if not required.
        Throws:
        XPRSprobException
      • getColType

        public void getColType(byte[] coltype,
                               int first,
                               int last)
                        throws XPRSprobException
        Returns the column types for the columns in a given range.
        Parameters:
        coltype - Character array of length last-first+1 where the column types will be returned:
        • C: indicates a continuous variable;
        • I: indicates an integer variable;
        • B: indicates a binary variable;
        • S: indicates a semi-continuous variable;
        • R: indicates a semi-continuous integer variable;
        • P: indicates a partial integer variable.
        first - First column in the range.
        last - Last column in the range.
        Throws:
        XPRSprobException
      • getQRowCoeff

        public void getQRowCoeff(int row,
                                 int rowqcol1,
                                 int rowqcol2,
                                 DoubleHolder p_rowqcoef)
                          throws XPRSprobException
        Returns a single quadratic constraint coefficient corresponding to the variable pair ( rowqcol1, rowqcol2) of the Hessian of a given constraint.
        Parameters:
        row - The quadratic row where the coefficient is to be looked up.
        rowqcol1 - Column index for the first variable in the quadratic term.
        rowqcol2 - Column index for the second variable in the quadratic term.
        p_rowqcoef - Pointer to a double value where the objective function coefficient is to be placed.
        Throws:
        XPRSprobException
      • getQRowQMatrix

        public void getQRowQMatrix(int row,
                                   int[] start,
                                   int[] colind,
                                   double[] rowqcoef,
                                   int maxcoefs,
                                   IntHolder p_ncoefs,
                                   int first,
                                   int last)
                            throws XPRSprobException
        Returns the nonzeros in a quadratic constraint coefficients matrix for the columns in a given range. To achieve maximum efficiency, getQRowQMatrix returns the lower triangular part of this matrix only.
        Parameters:
        row - Index of the row for which the quadratic coefficients are to be returned.
        start - Integer array which will be filled with indices indicating the starting offsets in the colind and dobjval arrays for each requested column. It must be length of at least last-first+2. Column i starts at position start[i] in the mrwind and dmatval arrays, and has start[i+1]-start[i] elements in it. May be null if maxcoefs is 0.
        colind - Integer array of length maxcoefs which will be filled with the column indices of the nonzero elements in the lower triangular part of Q. May be null if maxcoefs is 0.
        rowqcoef - Double array of length maxcoefs which will be filled with the nonzero element values. May be null if maxcoefs is 0.
        maxcoefs - Number of elements to be saved in colind and rowqcoef. If maxcoefs < *p_ncoefs, only maxcoefs elements are written.
        p_ncoefs - Pointer to the integer where the number of nonzero elements in the queried columns will be returned. If the number of nonzero elements is greater than maxcoefs, then only maxcoefs elements will be returned. If p_ncoefs is smaller than maxcoefs, then only p_ncoefs will be returned.
        first - First column in the range.
        last - Last column in the range.
        Throws:
        XPRSprobException
      • getQRowQMatrixTriplets

        public void getQRowQMatrixTriplets(int row,
                                           IntHolder p_ncoefs,
                                           int[] rowqcol1,
                                           int[] rowqcol2,
                                           double[] rowqcoef)
                                    throws XPRSprobException
        Returns the nonzeros in a quadratic constraint coefficients matrix as triplets (index pairs with coefficients). To achieve maximum efficiency, getQRowQMatrixTriplets returns the lower triangular part of this matrix only.
        Parameters:
        row - Index of the row for which the quadratic coefficients are to be returned.
        p_ncoefs - Argument used to return the number of quadratic coefficients in the row.
        rowqcol1 - First index in the triplets. May be null if not required.
        rowqcol2 - Second index in the triplets. May be null if not required.
        rowqcoef - Coefficients in the triplets. May be null if not required.
        Throws:
        XPRSprobException
      • chgQRowCoeff

        public void chgQRowCoeff(int row,
                                 int rowqcol1,
                                 int rowqcol2,
                                 double rowqcoef)
                          throws XPRSprobException
        Changes a single quadratic coefficient in a row.
        Parameters:
        row - Index of the row where the quadratic matrix is to be changed.
        rowqcol1 - First index of the coefficient to be changed.
        rowqcol2 - Second index of the coefficient to be changed.
        rowqcoef - The new coefficient.
        Throws:
        XPRSprobException
      • getQRows

        public void getQRows(IntHolder p_nrows,
                             int[] rowind)
                      throws XPRSprobException
        Returns the list indices of the rows that have quadratic coefficients.
        Parameters:
        p_nrows - Used to return the number of quadratic constraints in the matrix.
        rowind - Array of length *p_nrows used to return the indices of rows with quadratic coefficients in them. May be null if not required.
        Throws:
        XPRSprobException
      • save

        public void save()
                  throws XPRSprobException
        Saves the current data structures, i.e. matrices, control settings and problem attribute settings to file and terminates the run so that optimization can be resumed later.
        Throws:
        XPRSprobException
      • refineMipSol

        public void refineMipSol(int options,
                                 java.lang.String flags,
                                 double[] solution,
                                 double[] refined,
                                 IntHolder p_status)
                          throws XPRSprobException
        Deprecated. 
        Executes the MIP solution refiner.
        Parameters:
        options - Refinement options:
        • 0: Reducing MIP fractionality is priority (If bit 10 of REFINEOPS is set, will switch to other mode if unsuccessful).
        • 1: Reducing LP infeasibility is priority.
        flags - Flags passed to any optimization calls during refinement.
        solution - The MIP solution to refine. Must be a valid MIP solution.
        refined - The refined MIP solution in case of success
        p_status - Refinement results:
        • 0: An error has occurred
        • 1: The solution has been refined
        • 2: Current solution meets target criteria
        • 3: Solution cannot be refined
        • 5: The solution has been refined, but MIP fractionality could not be reduced.
        Throws:
        XPRSprobException
      • addMipSol

        public void addMipSol(int length,
                              double[] solval,
                              int[] colind,
                              java.lang.String name)
                       throws XPRSprobException
        Adds a new feasible, infeasible or partial MIP solution for the problem to the Optimizer.
        Parameters:
        length - Number of columns for which a value is provided.
        solval - Double array of length length containing solution values.
        colind - Optional integer array of length length containing the column indices for the solution values provided in solval. Should be null when length is equal to COLS, in which case it is assumed that solval provides a complete solution vector.
        name - An optional name to associate with the solution. Can be null.
        Throws:
        XPRSprobException
      • getCutSlack

        public void getCutSlack(XPRScut cutind,
                                DoubleHolder p_slack)
                         throws XPRSprobException
        Used to calculate the slack value of a cut with respect to the current LP relaxation solution. The slack is calculated from the cut itself, and might be requested for any cut (even if it is not currently loaded into the problem).
        Parameters:
        cutind - Pointer of the cut for which the slack is to be calculated.
        p_slack - Double pointer where the value of the slack is returned.
        Throws:
        XPRSprobException
      • getCutMap

        public void getCutMap(int ncuts,
                              XPRScut[] cutind,
                              int[] cutmap)
                       throws XPRSprobException
        Used to return in which rows a list of cuts are currently loaded into the Optimizer. This is useful for example to retrieve the duals associated with active cuts.
        Parameters:
        ncuts - Number of cuts in the cutind array.
        cutind - Pointer array to the cuts for which the row index is requested.
        cutmap - Integer array of length ncuts, where the row indices are returned.
        Throws:
        XPRSprobException
      • getPresolveSol

        public void getPresolveSol(double[] x,
                                   double[] slack,
                                   double[] duals,
                                   double[] djs)
                            throws XPRSprobException
        Returns the solution for the presolved problem from memory.
        Parameters:
        x - Double array of length COLS where the values of the primal variables will be returned. May be null if not required.
        slack - Double array of length ROWS where the values of the slack variables will be returned. May be null if not required.
        duals - Double array of length ROWS where the values of the dual variables will be returned. May be null if not required.
        djs - Double array of length COLS where the reduced cost for each variable will be returned. May be null if not required.
        Throws:
        XPRSprobException
      • getLpSol

        public void getLpSol(double[] x,
                             double[] slack,
                             double[] duals,
                             double[] djs)
                      throws XPRSprobException
        Used to obtain the LP solution values following optimization.
        Parameters:
        x - Double array of length ORIGINALCOLS where the values of the primal variables will be returned. May be null if not required.
        slack - Double array of length ORIGINALROWS where the values of the slack variables will be returned. May be null if not required.
        duals - Double array of length ORIGINALROWS where the values of the dual variables ( cBTB-1) will be returned. May be null if not required.
        djs - Double array of length ORIGINALCOLS where the reduced cost for each variable ( cT-cBTB-1A) will be returned. May be null if not required.
        Throws:
        XPRSprobException
      • getLpSolVal

        public void getLpSolVal(int col,
                                int row,
                                DoubleHolder p_x,
                                DoubleHolder p_slack,
                                DoubleHolder p_dual,
                                DoubleHolder p_dj)
                         throws XPRSprobException
        Used to obtain a single LP solution value following optimization.
        Parameters:
        col - Column index of the variable for which to return the solution value.
        row - Row index of the constraint for which to return the solution value.
        p_x - Double pointer where the value of the primal variable will be returned. May be null if not required.
        p_slack - Double pointer where the value of the slack variable will be returned. May be null if not required.
        p_dual - Double pointer where the value of the dual variable ( cBTB-1) will be returned. May be null if not required.
        p_dj - Double pointer where the reduced cost for the variable ( cT-cBTB-1A) will be returned. May be null if not required.
        Throws:
        XPRSprobException
      • getMipSol

        public void getMipSol(double[] x,
                              double[] slack)
                       throws XPRSprobException
        Used to obtain the solution values of the last MIP solution that was found.
        Parameters:
        x - Double array of length ORIGINALCOLS where the values of the primal variables will be returned. May be null if not required.
        slack - Double array of length ORIGINALROWS where the values of the slack variables will be returned. May be null if not required.
        Throws:
        XPRSprobException
      • getMipSolVal

        public void getMipSolVal(int col,
                                 int row,
                                 DoubleHolder p_x,
                                 DoubleHolder p_slack)
                          throws XPRSprobException
        Used to obtain a single solution value of the last MIP solution that was found.
        Parameters:
        col - Column index of the variable for which to return the solution value.
        row - Row index of the constraint for which to return the solution value.
        p_x - Double pointer where the value of the primal variable will be returned. May be null if not required.
        p_slack - Double pointer where the value of the slack variable will be returned. May be null if not required.
        Throws:
        XPRSprobException
      • chgBounds

        public void chgBounds(int nbounds,
                              int[] colind,
                              byte[] bndtype,
                              double[] bndval)
                       throws XPRSprobException
        Used to change the bounds on columns in the matrix.
        Parameters:
        nbounds - Number of bounds to change.
        colind - Integer array of size nbounds containing the indices of the columns on which the bounds will change.
        bndtype - Character array of length nbounds indicating the type of bound to change:
        • U: indicates change the upper bound;
        • L: indicates change the lower bound;
        • B: indicates change both bounds, i.e. fix the column.
        bndval - Double array of length nbounds giving the new bound values.
        Throws:
        XPRSprobException
      • chgObj

        public void chgObj(int ncols,
                           int[] colind,
                           double[] objcoef)
                    throws XPRSprobException
        Used to change the objective function coefficients.
        Parameters:
        ncols - Number of objective function coefficient elements to change.
        colind - Integer array of length ncols containing the indices of the columns on which the range elements will change. An index of -1 indicates that the fixed part of the objective function on the right hand side should change.
        objcoef - Double array of length ncols giving the new objective function coefficients.
        Throws:
        XPRSprobException
      • chgCoef

        public void chgCoef(int row,
                            int col,
                            double coef)
                     throws XPRSprobException
        Used to change a single coefficient in the matrix. If the coefficient does not already exist, a new coefficient will be added to the matrix. If many coefficients are being added to a row of the matrix, it may be more efficient to delete the old row of the matrix and add a new row.
        Parameters:
        row - Row index for the coefficient.
        col - Column index for the coefficient.
        coef - New value for the coefficient. If coef is zero, any existing coefficient will be deleted.
        Throws:
        XPRSprobException
      • chgMCoef

        public void chgMCoef(int ncoefs,
                             int[] rowind,
                             int[] colind,
                             double[] rowcoef)
                      throws XPRSprobException
        Used to change multiple coefficients in the matrix. If any coefficient does not already exist, it will be added to the matrix. If many coefficients are being added to a row of the matrix, it may be more efficient to delete the old row of the matrix and add a new one.
        Parameters:
        ncoefs - Number of new coefficients.
        rowind - Integer array of length ncoefs containing the row indices of the coefficients to be changed.
        colind - Integer array of length ncoefs containing the column indices of the coefficients to be changed.
        rowcoef - Double array of length ncoefs containing the new coefficient values. If an element of rowcoef is zero, the coefficient will be deleted.
        Throws:
        XPRSprobException
      • chgMCoef

        public void chgMCoef(long ncoefs,
                             int[] rowind,
                             int[] colind,
                             double[] rowcoef)
                      throws XPRSprobException
        Used to change multiple coefficients in the matrix. If any coefficient does not already exist, it will be added to the matrix. If many coefficients are being added to a row of the matrix, it may be more efficient to delete the old row of the matrix and add a new one.
        Parameters:
        ncoefs - Number of new coefficients.
        rowind - Integer array of length ncoefs containing the row indices of the coefficients to be changed.
        colind - Integer array of length ncoefs containing the column indices of the coefficients to be changed.
        rowcoef - Double array of length ncoefs containing the new coefficient values. If an element of rowcoef is zero, the coefficient will be deleted.
        Throws:
        XPRSprobException
      • chgMQObj

        public void chgMQObj(int ncoefs,
                             int[] objqcol1,
                             int[] objqcol2,
                             double[] objqcoef)
                      throws XPRSprobException
        Used to change multiple quadratic coefficients in the objective function. If any of the coefficients does not exist already, new coefficients will be added to the objective function.
        Parameters:
        ncoefs - The number of coefficients to change.
        objqcol1 - Integer array of size ncol containing the column index of the first variable in each quadratic term.
        objqcol2 - Integer array of size ncol containing the column index of the second variable in each quadratic term.
        objqcoef - New values for the coefficients. If an entry in objqcoef is 0, the corresponding entry will be deleted. These are the coefficients of the quadratic Hessian matrix.
        Throws:
        XPRSprobException
      • chgMQObj

        public void chgMQObj(long ncoefs,
                             int[] objqcol1,
                             int[] objqcol2,
                             double[] objqcoef)
                      throws XPRSprobException
        Used to change multiple quadratic coefficients in the objective function. If any of the coefficients does not exist already, new coefficients will be added to the objective function.
        Parameters:
        ncoefs - The number of coefficients to change.
        objqcol1 - Integer array of size ncol containing the column index of the first variable in each quadratic term.
        objqcol2 - Integer array of size ncol containing the column index of the second variable in each quadratic term.
        objqcoef - New values for the coefficients. If an entry in objqcoef is 0, the corresponding entry will be deleted. These are the coefficients of the quadratic Hessian matrix.
        Throws:
        XPRSprobException
      • chgQObj

        public void chgQObj(int objqcol1,
                            int objqcol2,
                            double objqcoef)
                     throws XPRSprobException
        Used to change a single quadratic coefficient in the objective function corresponding to the variable pair (objqcol1,objqcol2) of the Hessian matrix.
        Parameters:
        objqcol1 - Column index for the first variable in the quadratic term.
        objqcol2 - Column index for the second variable in the quadratic term.
        objqcoef - New value for the coefficient in the quadratic Hessian matrix. If an entry in objqcoef is 0, the corresponding entry will be deleted.
        Throws:
        XPRSprobException
      • chgRHS

        public void chgRHS(int nrows,
                           int[] rowind,
                           double[] rhs)
                    throws XPRSprobException
        Used to change right—hand side values of the problem.
        Parameters:
        nrows - Number of right hand side values to change.
        rowind - Integer array of length nrows containing the indices of the rows on which the right hand side values will change.
        rhs - Double array of length nrows giving the right hand side values.
        Throws:
        XPRSprobException
      • chgRHSrange

        public void chgRHSrange(int nrows,
                                int[] rowind,
                                double[] rng)
                         throws XPRSprobException
        Used to change the range for a row of the problem matrix.
        Parameters:
        nrows - Number of range elements to change.
        rowind - Integer array of length nrows containing the indices of the rows on which the range elements will change.
        rng - Double array of length nrows giving the range values.
        Throws:
        XPRSprobException
      • chgRowType

        public void chgRowType(int nrows,
                               int[] rowind,
                               byte[] rowtype)
                        throws XPRSprobException
        Used to change the type of a row in the matrix.
        Parameters:
        nrows - Number of rows to change.
        rowind - Integer array of length nrows containing the indices of the rows.
        rowtype - Character array of length nrows giving the new row types:
        • L: indicates a <= row;
        • E: indicates an = row;
        • G: indicates a >= row;
        • R: indicates a range row;
        • N: indicates a free row.
        Throws:
        XPRSprobException
      • addLpLogListener

        public void addLpLogListener(XPRSlpLogListener listener)
                              throws XPRSexception
        Add a listener for the LpLog callback. Note that an object can have multiple LpLog listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all LpLog listeners will be removed.)
        Throws:
        XPRSexception
      • addLpLogListener

        public void addLpLogListener(XPRSlpLogListener listener,
                                     java.lang.Object data)
                              throws XPRSexception
        Add a listener for the LpLog callback. Note that an object can have multiple LpLog listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all LpLog listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        Throws:
        XPRSexception
      • addLpLogListener

        public void addLpLogListener(XPRSlpLogListener listener,
                                     int priority)
                              throws XPRSexception
        Add a listener for the LpLog callback. Note that an object can have multiple LpLog listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all LpLog listeners will be removed.)
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • addLpLogListener

        public void addLpLogListener(XPRSlpLogListener listener,
                                     java.lang.Object data,
                                     int priority)
                              throws XPRSexception
        Add a listener for the LpLog callback. Note that an object can have multiple LpLog listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all LpLog listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • removeLpLogListener

        public void removeLpLogListener(XPRSlpLogListener listener,
                                        java.lang.Object data)
                                 throws XPRSexception
        Removes the given LpLog listener with the given data value from the object.
        Throws:
        XPRSexception
      • removeLpLogListeners

        public void removeLpLogListeners()
                                  throws XPRSexception
        Remove all listeners for the LpLog callback
        Throws:
        XPRSexception
      • addGlobalLogListener

        public void addGlobalLogListener(XPRSglobalLogListener listener)
                                  throws XPRSexception
        Add a listener for the GlobalLog callback. Note that an object can have multiple GlobalLog listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all GlobalLog listeners will be removed.)
        Throws:
        XPRSexception
      • addGlobalLogListener

        public void addGlobalLogListener(XPRSglobalLogListener listener,
                                         java.lang.Object data)
                                  throws XPRSexception
        Add a listener for the GlobalLog callback. Note that an object can have multiple GlobalLog listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all GlobalLog listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        Throws:
        XPRSexception
      • addGlobalLogListener

        public void addGlobalLogListener(XPRSglobalLogListener listener,
                                         int priority)
                                  throws XPRSexception
        Add a listener for the GlobalLog callback. Note that an object can have multiple GlobalLog listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all GlobalLog listeners will be removed.)
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • addGlobalLogListener

        public void addGlobalLogListener(XPRSglobalLogListener listener,
                                         java.lang.Object data,
                                         int priority)
                                  throws XPRSexception
        Add a listener for the GlobalLog callback. Note that an object can have multiple GlobalLog listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all GlobalLog listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • removeGlobalLogListener

        public void removeGlobalLogListener(XPRSglobalLogListener listener,
                                            java.lang.Object data)
                                     throws XPRSexception
        Removes the given GlobalLog listener with the given data value from the object.
        Throws:
        XPRSexception
      • removeGlobalLogListeners

        public void removeGlobalLogListeners()
                                      throws XPRSexception
        Remove all listeners for the GlobalLog callback
        Throws:
        XPRSexception
      • addCutLogListener

        public void addCutLogListener(XPRScutLogListener listener)
                               throws XPRSexception
        Add a listener for the CutLog callback. Note that an object can have multiple CutLog listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all CutLog listeners will be removed.)
        Throws:
        XPRSexception
      • addCutLogListener

        public void addCutLogListener(XPRScutLogListener listener,
                                      java.lang.Object data)
                               throws XPRSexception
        Add a listener for the CutLog callback. Note that an object can have multiple CutLog listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all CutLog listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        Throws:
        XPRSexception
      • addCutLogListener

        public void addCutLogListener(XPRScutLogListener listener,
                                      int priority)
                               throws XPRSexception
        Add a listener for the CutLog callback. Note that an object can have multiple CutLog listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all CutLog listeners will be removed.)
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • addCutLogListener

        public void addCutLogListener(XPRScutLogListener listener,
                                      java.lang.Object data,
                                      int priority)
                               throws XPRSexception
        Add a listener for the CutLog callback. Note that an object can have multiple CutLog listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all CutLog listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • removeCutLogListener

        public void removeCutLogListener(XPRScutLogListener listener,
                                         java.lang.Object data)
                                  throws XPRSexception
        Removes the given CutLog listener with the given data value from the object.
        Throws:
        XPRSexception
      • removeCutLogListeners

        public void removeCutLogListeners()
                                   throws XPRSexception
        Remove all listeners for the CutLog callback
        Throws:
        XPRSexception
      • addBarLogListener

        public void addBarLogListener(XPRSbarLogListener listener)
                               throws XPRSexception
        Add a listener for the BarLog callback. Note that an object can have multiple BarLog listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all BarLog listeners will be removed.)
        Throws:
        XPRSexception
      • addBarLogListener

        public void addBarLogListener(XPRSbarLogListener listener,
                                      java.lang.Object data)
                               throws XPRSexception
        Add a listener for the BarLog callback. Note that an object can have multiple BarLog listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all BarLog listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        Throws:
        XPRSexception
      • addBarLogListener

        public void addBarLogListener(XPRSbarLogListener listener,
                                      int priority)
                               throws XPRSexception
        Add a listener for the BarLog callback. Note that an object can have multiple BarLog listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all BarLog listeners will be removed.)
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • addBarLogListener

        public void addBarLogListener(XPRSbarLogListener listener,
                                      java.lang.Object data,
                                      int priority)
                               throws XPRSexception
        Add a listener for the BarLog callback. Note that an object can have multiple BarLog listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all BarLog listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • removeBarLogListener

        public void removeBarLogListener(XPRSbarLogListener listener,
                                         java.lang.Object data)
                                  throws XPRSexception
        Removes the given BarLog listener with the given data value from the object.
        Throws:
        XPRSexception
      • removeBarLogListeners

        public void removeBarLogListeners()
                                   throws XPRSexception
        Remove all listeners for the BarLog callback
        Throws:
        XPRSexception
      • addCutMgrListener

        public void addCutMgrListener(XPRScutMgrListener listener)
                               throws XPRSexception
        Add a listener for the CutMgr callback. Note that an object can have multiple CutMgr listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all CutMgr listeners will be removed.)
        Throws:
        XPRSexception
      • addCutMgrListener

        public void addCutMgrListener(XPRScutMgrListener listener,
                                      java.lang.Object data)
                               throws XPRSexception
        Add a listener for the CutMgr callback. Note that an object can have multiple CutMgr listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all CutMgr listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        Throws:
        XPRSexception
      • addCutMgrListener

        public void addCutMgrListener(XPRScutMgrListener listener,
                                      int priority)
                               throws XPRSexception
        Add a listener for the CutMgr callback. Note that an object can have multiple CutMgr listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all CutMgr listeners will be removed.)
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • addCutMgrListener

        public void addCutMgrListener(XPRScutMgrListener listener,
                                      java.lang.Object data,
                                      int priority)
                               throws XPRSexception
        Add a listener for the CutMgr callback. Note that an object can have multiple CutMgr listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all CutMgr listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • removeCutMgrListener

        public void removeCutMgrListener(XPRScutMgrListener listener,
                                         java.lang.Object data)
                                  throws XPRSexception
        Removes the given CutMgr listener with the given data value from the object.
        Throws:
        XPRSexception
      • removeCutMgrListeners

        public void removeCutMgrListeners()
                                   throws XPRSexception
        Remove all listeners for the CutMgr callback
        Throws:
        XPRSexception
      • addChgNodeListener

        public void addChgNodeListener(XPRSchgNodeListener listener)
                                throws XPRSexception
        Add a listener for the ChgNode callback. Note that an object can have multiple ChgNode listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all ChgNode listeners will be removed.)
        Throws:
        XPRSexception
      • addChgNodeListener

        public void addChgNodeListener(XPRSchgNodeListener listener,
                                       java.lang.Object data)
                                throws XPRSexception
        Add a listener for the ChgNode callback. Note that an object can have multiple ChgNode listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all ChgNode listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        Throws:
        XPRSexception
      • addChgNodeListener

        public void addChgNodeListener(XPRSchgNodeListener listener,
                                       int priority)
                                throws XPRSexception
        Add a listener for the ChgNode callback. Note that an object can have multiple ChgNode listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all ChgNode listeners will be removed.)
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • addChgNodeListener

        public void addChgNodeListener(XPRSchgNodeListener listener,
                                       java.lang.Object data,
                                       int priority)
                                throws XPRSexception
        Add a listener for the ChgNode callback. Note that an object can have multiple ChgNode listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all ChgNode listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • removeChgNodeListener

        public void removeChgNodeListener(XPRSchgNodeListener listener,
                                          java.lang.Object data)
                                   throws XPRSexception
        Removes the given ChgNode listener with the given data value from the object.
        Throws:
        XPRSexception
      • removeChgNodeListeners

        public void removeChgNodeListeners()
                                    throws XPRSexception
        Remove all listeners for the ChgNode callback
        Throws:
        XPRSexception
      • addOptNodeListener

        public void addOptNodeListener(XPRSoptNodeListener listener)
                                throws XPRSexception
        Add a listener for the OptNode callback. Note that an object can have multiple OptNode listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all OptNode listeners will be removed.)
        Throws:
        XPRSexception
      • addOptNodeListener

        public void addOptNodeListener(XPRSoptNodeListener listener,
                                       java.lang.Object data)
                                throws XPRSexception
        Add a listener for the OptNode callback. Note that an object can have multiple OptNode listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all OptNode listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        Throws:
        XPRSexception
      • addOptNodeListener

        public void addOptNodeListener(XPRSoptNodeListener listener,
                                       int priority)
                                throws XPRSexception
        Add a listener for the OptNode callback. Note that an object can have multiple OptNode listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all OptNode listeners will be removed.)
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • addOptNodeListener

        public void addOptNodeListener(XPRSoptNodeListener listener,
                                       java.lang.Object data,
                                       int priority)
                                throws XPRSexception
        Add a listener for the OptNode callback. Note that an object can have multiple OptNode listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all OptNode listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • removeOptNodeListener

        public void removeOptNodeListener(XPRSoptNodeListener listener,
                                          java.lang.Object data)
                                   throws XPRSexception
        Removes the given OptNode listener with the given data value from the object.
        Throws:
        XPRSexception
      • removeOptNodeListeners

        public void removeOptNodeListeners()
                                    throws XPRSexception
        Remove all listeners for the OptNode callback
        Throws:
        XPRSexception
      • addPreNodeListener

        public void addPreNodeListener(XPRSpreNodeListener listener)
                                throws XPRSexception
        Add a listener for the PreNode callback. Note that an object can have multiple PreNode listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all PreNode listeners will be removed.)
        Throws:
        XPRSexception
      • addPreNodeListener

        public void addPreNodeListener(XPRSpreNodeListener listener,
                                       java.lang.Object data)
                                throws XPRSexception
        Add a listener for the PreNode callback. Note that an object can have multiple PreNode listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all PreNode listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        Throws:
        XPRSexception
      • addPreNodeListener

        public void addPreNodeListener(XPRSpreNodeListener listener,
                                       int priority)
                                throws XPRSexception
        Add a listener for the PreNode callback. Note that an object can have multiple PreNode listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all PreNode listeners will be removed.)
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • addPreNodeListener

        public void addPreNodeListener(XPRSpreNodeListener listener,
                                       java.lang.Object data,
                                       int priority)
                                throws XPRSexception
        Add a listener for the PreNode callback. Note that an object can have multiple PreNode listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all PreNode listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • removePreNodeListener

        public void removePreNodeListener(XPRSpreNodeListener listener,
                                          java.lang.Object data)
                                   throws XPRSexception
        Removes the given PreNode listener with the given data value from the object.
        Throws:
        XPRSexception
      • removePreNodeListeners

        public void removePreNodeListeners()
                                    throws XPRSexception
        Remove all listeners for the PreNode callback
        Throws:
        XPRSexception
      • addInfNodeListener

        public void addInfNodeListener(XPRSinfNodeListener listener)
                                throws XPRSexception
        Add a listener for the InfNode callback. Note that an object can have multiple InfNode listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all InfNode listeners will be removed.)
        Throws:
        XPRSexception
      • addInfNodeListener

        public void addInfNodeListener(XPRSinfNodeListener listener,
                                       java.lang.Object data)
                                throws XPRSexception
        Add a listener for the InfNode callback. Note that an object can have multiple InfNode listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all InfNode listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        Throws:
        XPRSexception
      • addInfNodeListener

        public void addInfNodeListener(XPRSinfNodeListener listener,
                                       int priority)
                                throws XPRSexception
        Add a listener for the InfNode callback. Note that an object can have multiple InfNode listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all InfNode listeners will be removed.)
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • addInfNodeListener

        public void addInfNodeListener(XPRSinfNodeListener listener,
                                       java.lang.Object data,
                                       int priority)
                                throws XPRSexception
        Add a listener for the InfNode callback. Note that an object can have multiple InfNode listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all InfNode listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • removeInfNodeListener

        public void removeInfNodeListener(XPRSinfNodeListener listener,
                                          java.lang.Object data)
                                   throws XPRSexception
        Removes the given InfNode listener with the given data value from the object.
        Throws:
        XPRSexception
      • removeInfNodeListeners

        public void removeInfNodeListeners()
                                    throws XPRSexception
        Remove all listeners for the InfNode callback
        Throws:
        XPRSexception
      • addNodeCutoffListener

        public void addNodeCutoffListener(XPRSnodeCutoffListener listener)
                                   throws XPRSexception
        Add a listener for the NodeCutoff callback. Note that an object can have multiple NodeCutoff listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all NodeCutoff listeners will be removed.)
        Throws:
        XPRSexception
      • addNodeCutoffListener

        public void addNodeCutoffListener(XPRSnodeCutoffListener listener,
                                          java.lang.Object data)
                                   throws XPRSexception
        Add a listener for the NodeCutoff callback. Note that an object can have multiple NodeCutoff listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all NodeCutoff listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        Throws:
        XPRSexception
      • addNodeCutoffListener

        public void addNodeCutoffListener(XPRSnodeCutoffListener listener,
                                          int priority)
                                   throws XPRSexception
        Add a listener for the NodeCutoff callback. Note that an object can have multiple NodeCutoff listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all NodeCutoff listeners will be removed.)
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • addNodeCutoffListener

        public void addNodeCutoffListener(XPRSnodeCutoffListener listener,
                                          java.lang.Object data,
                                          int priority)
                                   throws XPRSexception
        Add a listener for the NodeCutoff callback. Note that an object can have multiple NodeCutoff listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all NodeCutoff listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • removeNodeCutoffListener

        public void removeNodeCutoffListener(XPRSnodeCutoffListener listener,
                                             java.lang.Object data)
                                      throws XPRSexception
        Removes the given NodeCutoff listener with the given data value from the object.
        Throws:
        XPRSexception
      • removeNodeCutoffListeners

        public void removeNodeCutoffListeners()
                                       throws XPRSexception
        Remove all listeners for the NodeCutoff callback
        Throws:
        XPRSexception
      • addIntSolListener

        public void addIntSolListener(XPRSintSolListener listener)
                               throws XPRSexception
        Add a listener for the IntSol callback. Note that an object can have multiple IntSol listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all IntSol listeners will be removed.)
        Throws:
        XPRSexception
      • addIntSolListener

        public void addIntSolListener(XPRSintSolListener listener,
                                      java.lang.Object data)
                               throws XPRSexception
        Add a listener for the IntSol callback. Note that an object can have multiple IntSol listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all IntSol listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        Throws:
        XPRSexception
      • addIntSolListener

        public void addIntSolListener(XPRSintSolListener listener,
                                      int priority)
                               throws XPRSexception
        Add a listener for the IntSol callback. Note that an object can have multiple IntSol listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all IntSol listeners will be removed.)
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • addIntSolListener

        public void addIntSolListener(XPRSintSolListener listener,
                                      java.lang.Object data,
                                      int priority)
                               throws XPRSexception
        Add a listener for the IntSol callback. Note that an object can have multiple IntSol listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all IntSol listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • removeIntSolListener

        public void removeIntSolListener(XPRSintSolListener listener,
                                         java.lang.Object data)
                                  throws XPRSexception
        Removes the given IntSol listener with the given data value from the object.
        Throws:
        XPRSexception
      • removeIntSolListeners

        public void removeIntSolListeners()
                                   throws XPRSexception
        Remove all listeners for the IntSol callback
        Throws:
        XPRSexception
      • addPreIntsolListener

        public void addPreIntsolListener(XPRSpreIntsolListener listener)
                                  throws XPRSexception
        Add a listener for the PreIntsol callback. Note that an object can have multiple PreIntsol listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all PreIntsol listeners will be removed.)
        Throws:
        XPRSexception
      • addPreIntsolListener

        public void addPreIntsolListener(XPRSpreIntsolListener listener,
                                         java.lang.Object data)
                                  throws XPRSexception
        Add a listener for the PreIntsol callback. Note that an object can have multiple PreIntsol listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all PreIntsol listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        Throws:
        XPRSexception
      • addPreIntsolListener

        public void addPreIntsolListener(XPRSpreIntsolListener listener,
                                         int priority)
                                  throws XPRSexception
        Add a listener for the PreIntsol callback. Note that an object can have multiple PreIntsol listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all PreIntsol listeners will be removed.)
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • addPreIntsolListener

        public void addPreIntsolListener(XPRSpreIntsolListener listener,
                                         java.lang.Object data,
                                         int priority)
                                  throws XPRSexception
        Add a listener for the PreIntsol callback. Note that an object can have multiple PreIntsol listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all PreIntsol listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • removePreIntsolListener

        public void removePreIntsolListener(XPRSpreIntsolListener listener,
                                            java.lang.Object data)
                                     throws XPRSexception
        Removes the given PreIntsol listener with the given data value from the object.
        Throws:
        XPRSexception
      • removePreIntsolListeners

        public void removePreIntsolListeners()
                                      throws XPRSexception
        Remove all listeners for the PreIntsol callback
        Throws:
        XPRSexception
      • addChgBranchListener

        public void addChgBranchListener(XPRSchgBranchListener listener)
                                  throws XPRSexception
        Add a listener for the ChgBranch callback. Note that an object can have multiple ChgBranch listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all ChgBranch listeners will be removed.)
        Throws:
        XPRSexception
      • addChgBranchListener

        public void addChgBranchListener(XPRSchgBranchListener listener,
                                         java.lang.Object data)
                                  throws XPRSexception
        Add a listener for the ChgBranch callback. Note that an object can have multiple ChgBranch listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all ChgBranch listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        Throws:
        XPRSexception
      • addChgBranchListener

        public void addChgBranchListener(XPRSchgBranchListener listener,
                                         int priority)
                                  throws XPRSexception
        Add a listener for the ChgBranch callback. Note that an object can have multiple ChgBranch listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all ChgBranch listeners will be removed.)
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • addChgBranchListener

        public void addChgBranchListener(XPRSchgBranchListener listener,
                                         java.lang.Object data,
                                         int priority)
                                  throws XPRSexception
        Add a listener for the ChgBranch callback. Note that an object can have multiple ChgBranch listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all ChgBranch listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • removeChgBranchListener

        public void removeChgBranchListener(XPRSchgBranchListener listener,
                                            java.lang.Object data)
                                     throws XPRSexception
        Removes the given ChgBranch listener with the given data value from the object.
        Throws:
        XPRSexception
      • removeChgBranchListeners

        public void removeChgBranchListeners()
                                      throws XPRSexception
        Remove all listeners for the ChgBranch callback
        Throws:
        XPRSexception
      • addEstimateListener

        public void addEstimateListener(XPRSestimateListener listener)
                                 throws XPRSexception
        Add a listener for the Estimate callback. Note that an object can have multiple Estimate listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all Estimate listeners will be removed.)
        Throws:
        XPRSexception
      • addEstimateListener

        public void addEstimateListener(XPRSestimateListener listener,
                                        java.lang.Object data)
                                 throws XPRSexception
        Add a listener for the Estimate callback. Note that an object can have multiple Estimate listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all Estimate listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        Throws:
        XPRSexception
      • addEstimateListener

        public void addEstimateListener(XPRSestimateListener listener,
                                        int priority)
                                 throws XPRSexception
        Add a listener for the Estimate callback. Note that an object can have multiple Estimate listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all Estimate listeners will be removed.)
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • addEstimateListener

        public void addEstimateListener(XPRSestimateListener listener,
                                        java.lang.Object data,
                                        int priority)
                                 throws XPRSexception
        Add a listener for the Estimate callback. Note that an object can have multiple Estimate listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all Estimate listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • removeEstimateListener

        public void removeEstimateListener(XPRSestimateListener listener,
                                           java.lang.Object data)
                                    throws XPRSexception
        Removes the given Estimate listener with the given data value from the object.
        Throws:
        XPRSexception
      • removeEstimateListeners

        public void removeEstimateListeners()
                                     throws XPRSexception
        Remove all listeners for the Estimate callback
        Throws:
        XPRSexception
      • addSepNodeListener

        public void addSepNodeListener(XPRSsepNodeListener listener)
                                throws XPRSexception
        Add a listener for the SepNode callback. Note that an object can have multiple SepNode listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all SepNode listeners will be removed.)
        Throws:
        XPRSexception
      • addSepNodeListener

        public void addSepNodeListener(XPRSsepNodeListener listener,
                                       java.lang.Object data)
                                throws XPRSexception
        Add a listener for the SepNode callback. Note that an object can have multiple SepNode listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all SepNode listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        Throws:
        XPRSexception
      • addSepNodeListener

        public void addSepNodeListener(XPRSsepNodeListener listener,
                                       int priority)
                                throws XPRSexception
        Add a listener for the SepNode callback. Note that an object can have multiple SepNode listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all SepNode listeners will be removed.)
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • addSepNodeListener

        public void addSepNodeListener(XPRSsepNodeListener listener,
                                       java.lang.Object data,
                                       int priority)
                                throws XPRSexception
        Add a listener for the SepNode callback. Note that an object can have multiple SepNode listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all SepNode listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • removeSepNodeListener

        public void removeSepNodeListener(XPRSsepNodeListener listener,
                                          java.lang.Object data)
                                   throws XPRSexception
        Removes the given SepNode listener with the given data value from the object.
        Throws:
        XPRSexception
      • removeSepNodeListeners

        public void removeSepNodeListeners()
                                    throws XPRSexception
        Remove all listeners for the SepNode callback
        Throws:
        XPRSexception
      • addMessageListener

        public void addMessageListener(XPRSmessageListener listener)
                                throws XPRSexception
        Add a listener for the Message callback. Note that an object can have multiple Message listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all Message listeners will be removed.)
        Throws:
        XPRSexception
      • addMessageListener

        public void addMessageListener(XPRSmessageListener listener,
                                       java.lang.Object data)
                                throws XPRSexception
        Add a listener for the Message callback. Note that an object can have multiple Message listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all Message listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        Throws:
        XPRSexception
      • addMessageListener

        public void addMessageListener(XPRSmessageListener listener,
                                       int priority)
                                throws XPRSexception
        Add a listener for the Message callback. Note that an object can have multiple Message listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all Message listeners will be removed.)
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • addMessageListener

        public void addMessageListener(XPRSmessageListener listener,
                                       java.lang.Object data,
                                       int priority)
                                throws XPRSexception
        Add a listener for the Message callback. Note that an object can have multiple Message listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all Message listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • removeMessageListener

        public void removeMessageListener(XPRSmessageListener listener,
                                          java.lang.Object data)
                                   throws XPRSexception
        Removes the given Message listener with the given data value from the object.
        Throws:
        XPRSexception
      • removeMessageListeners

        public void removeMessageListeners()
                                    throws XPRSexception
        Remove all listeners for the Message callback
        Throws:
        XPRSexception
      • addMipThreadListener

        public void addMipThreadListener(XPRSmipThreadListener listener)
                                  throws XPRSexception
        Add a listener for the MipThread callback. Note that an object can have multiple MipThread listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all MipThread listeners will be removed.)
        Throws:
        XPRSexception
      • addMipThreadListener

        public void addMipThreadListener(XPRSmipThreadListener listener,
                                         java.lang.Object data)
                                  throws XPRSexception
        Add a listener for the MipThread callback. Note that an object can have multiple MipThread listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all MipThread listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        Throws:
        XPRSexception
      • addMipThreadListener

        public void addMipThreadListener(XPRSmipThreadListener listener,
                                         int priority)
                                  throws XPRSexception
        Add a listener for the MipThread callback. Note that an object can have multiple MipThread listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all MipThread listeners will be removed.)
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • addMipThreadListener

        public void addMipThreadListener(XPRSmipThreadListener listener,
                                         java.lang.Object data,
                                         int priority)
                                  throws XPRSexception
        Add a listener for the MipThread callback. Note that an object can have multiple MipThread listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all MipThread listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • removeMipThreadListener

        public void removeMipThreadListener(XPRSmipThreadListener listener,
                                            java.lang.Object data)
                                     throws XPRSexception
        Removes the given MipThread listener with the given data value from the object.
        Throws:
        XPRSexception
      • removeMipThreadListeners

        public void removeMipThreadListeners()
                                      throws XPRSexception
        Remove all listeners for the MipThread callback
        Throws:
        XPRSexception
      • addDestroyMTListener

        public void addDestroyMTListener(XPRSdestroyMTListener listener)
                                  throws XPRSexception
        Add a listener for the DestroyMT callback. Note that an object can have multiple DestroyMT listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all DestroyMT listeners will be removed.)
        Throws:
        XPRSexception
      • addDestroyMTListener

        public void addDestroyMTListener(XPRSdestroyMTListener listener,
                                         java.lang.Object data)
                                  throws XPRSexception
        Add a listener for the DestroyMT callback. Note that an object can have multiple DestroyMT listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all DestroyMT listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        Throws:
        XPRSexception
      • addDestroyMTListener

        public void addDestroyMTListener(XPRSdestroyMTListener listener,
                                         int priority)
                                  throws XPRSexception
        Add a listener for the DestroyMT callback. Note that an object can have multiple DestroyMT listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all DestroyMT listeners will be removed.)
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • addDestroyMTListener

        public void addDestroyMTListener(XPRSdestroyMTListener listener,
                                         java.lang.Object data,
                                         int priority)
                                  throws XPRSexception
        Add a listener for the DestroyMT callback. Note that an object can have multiple DestroyMT listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all DestroyMT listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • removeDestroyMTListener

        public void removeDestroyMTListener(XPRSdestroyMTListener listener,
                                            java.lang.Object data)
                                     throws XPRSexception
        Removes the given DestroyMT listener with the given data value from the object.
        Throws:
        XPRSexception
      • removeDestroyMTListeners

        public void removeDestroyMTListeners()
                                      throws XPRSexception
        Remove all listeners for the DestroyMT callback
        Throws:
        XPRSexception
      • addNewnodeListener

        public void addNewnodeListener(XPRSnewnodeListener listener)
                                throws XPRSexception
        Add a listener for the Newnode callback. Note that an object can have multiple Newnode listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all Newnode listeners will be removed.)
        Throws:
        XPRSexception
      • addNewnodeListener

        public void addNewnodeListener(XPRSnewnodeListener listener,
                                       java.lang.Object data)
                                throws XPRSexception
        Add a listener for the Newnode callback. Note that an object can have multiple Newnode listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all Newnode listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        Throws:
        XPRSexception
      • addNewnodeListener

        public void addNewnodeListener(XPRSnewnodeListener listener,
                                       int priority)
                                throws XPRSexception
        Add a listener for the Newnode callback. Note that an object can have multiple Newnode listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all Newnode listeners will be removed.)
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • addNewnodeListener

        public void addNewnodeListener(XPRSnewnodeListener listener,
                                       java.lang.Object data,
                                       int priority)
                                throws XPRSexception
        Add a listener for the Newnode callback. Note that an object can have multiple Newnode listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all Newnode listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • removeNewnodeListener

        public void removeNewnodeListener(XPRSnewnodeListener listener,
                                          java.lang.Object data)
                                   throws XPRSexception
        Removes the given Newnode listener with the given data value from the object.
        Throws:
        XPRSexception
      • removeNewnodeListeners

        public void removeNewnodeListeners()
                                    throws XPRSexception
        Remove all listeners for the Newnode callback
        Throws:
        XPRSexception
      • addBarIterationListener

        public void addBarIterationListener(XPRSbarIterationListener listener)
                                     throws XPRSexception
        Add a listener for the BarIteration callback. Note that an object can have multiple BarIteration listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all BarIteration listeners will be removed.)
        Throws:
        XPRSexception
      • addBarIterationListener

        public void addBarIterationListener(XPRSbarIterationListener listener,
                                            java.lang.Object data)
                                     throws XPRSexception
        Add a listener for the BarIteration callback. Note that an object can have multiple BarIteration listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all BarIteration listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        Throws:
        XPRSexception
      • addBarIterationListener

        public void addBarIterationListener(XPRSbarIterationListener listener,
                                            int priority)
                                     throws XPRSexception
        Add a listener for the BarIteration callback. Note that an object can have multiple BarIteration listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all BarIteration listeners will be removed.)
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • addBarIterationListener

        public void addBarIterationListener(XPRSbarIterationListener listener,
                                            java.lang.Object data,
                                            int priority)
                                     throws XPRSexception
        Add a listener for the BarIteration callback. Note that an object can have multiple BarIteration listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all BarIteration listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • removeBarIterationListener

        public void removeBarIterationListener(XPRSbarIterationListener listener,
                                               java.lang.Object data)
                                        throws XPRSexception
        Removes the given BarIteration listener with the given data value from the object.
        Throws:
        XPRSexception
      • removeBarIterationListeners

        public void removeBarIterationListeners()
                                         throws XPRSexception
        Remove all listeners for the BarIteration callback
        Throws:
        XPRSexception
      • addPresolveListener

        public void addPresolveListener(XPRSpresolveListener listener)
                                 throws XPRSexception
        Add a listener for the Presolve callback. Note that an object can have multiple Presolve listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all Presolve listeners will be removed.)
        Throws:
        XPRSexception
      • addPresolveListener

        public void addPresolveListener(XPRSpresolveListener listener,
                                        java.lang.Object data)
                                 throws XPRSexception
        Add a listener for the Presolve callback. Note that an object can have multiple Presolve listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all Presolve listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        Throws:
        XPRSexception
      • addPresolveListener

        public void addPresolveListener(XPRSpresolveListener listener,
                                        int priority)
                                 throws XPRSexception
        Add a listener for the Presolve callback. Note that an object can have multiple Presolve listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all Presolve listeners will be removed.)
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • addPresolveListener

        public void addPresolveListener(XPRSpresolveListener listener,
                                        java.lang.Object data,
                                        int priority)
                                 throws XPRSexception
        Add a listener for the Presolve callback. Note that an object can have multiple Presolve listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all Presolve listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • removePresolveListener

        public void removePresolveListener(XPRSpresolveListener listener,
                                           java.lang.Object data)
                                    throws XPRSexception
        Removes the given Presolve listener with the given data value from the object.
        Throws:
        XPRSexception
      • removePresolveListeners

        public void removePresolveListeners()
                                     throws XPRSexception
        Remove all listeners for the Presolve callback
        Throws:
        XPRSexception
      • addChangeBranchObjectListener

        public void addChangeBranchObjectListener(XPRSchangeBranchObjectListener listener)
                                           throws XPRSexception
        Add a listener for the ChangeBranchObject callback. Note that an object can have multiple ChangeBranchObject listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all ChangeBranchObject listeners will be removed.)
        Throws:
        XPRSexception
      • addChangeBranchObjectListener

        public void addChangeBranchObjectListener(XPRSchangeBranchObjectListener listener,
                                                  java.lang.Object data)
                                           throws XPRSexception
        Add a listener for the ChangeBranchObject callback. Note that an object can have multiple ChangeBranchObject listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all ChangeBranchObject listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        Throws:
        XPRSexception
      • addChangeBranchObjectListener

        public void addChangeBranchObjectListener(XPRSchangeBranchObjectListener listener,
                                                  int priority)
                                           throws XPRSexception
        Add a listener for the ChangeBranchObject callback. Note that an object can have multiple ChangeBranchObject listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all ChangeBranchObject listeners will be removed.)
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • addChangeBranchObjectListener

        public void addChangeBranchObjectListener(XPRSchangeBranchObjectListener listener,
                                                  java.lang.Object data,
                                                  int priority)
                                           throws XPRSexception
        Add a listener for the ChangeBranchObject callback. Note that an object can have multiple ChangeBranchObject listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all ChangeBranchObject listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • removeChangeBranchObjectListeners

        public void removeChangeBranchObjectListeners()
                                               throws XPRSexception
        Remove all listeners for the ChangeBranchObject callback
        Throws:
        XPRSexception
      • addComputeRestartListener

        public void addComputeRestartListener(XPRScomputeRestartListener listener)
                                       throws XPRSexception
        Add a listener for the ComputeRestart callback. Note that an object can have multiple ComputeRestart listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all ComputeRestart listeners will be removed.)
        Throws:
        XPRSexception
      • addComputeRestartListener

        public void addComputeRestartListener(XPRScomputeRestartListener listener,
                                              java.lang.Object data)
                                       throws XPRSexception
        Add a listener for the ComputeRestart callback. Note that an object can have multiple ComputeRestart listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all ComputeRestart listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        Throws:
        XPRSexception
      • addComputeRestartListener

        public void addComputeRestartListener(XPRScomputeRestartListener listener,
                                              int priority)
                                       throws XPRSexception
        Add a listener for the ComputeRestart callback. Note that an object can have multiple ComputeRestart listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all ComputeRestart listeners will be removed.)
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • addComputeRestartListener

        public void addComputeRestartListener(XPRScomputeRestartListener listener,
                                              java.lang.Object data,
                                              int priority)
                                       throws XPRSexception
        Add a listener for the ComputeRestart callback. Note that an object can have multiple ComputeRestart listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all ComputeRestart listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • removeComputeRestartListener

        public void removeComputeRestartListener(XPRScomputeRestartListener listener,
                                                 java.lang.Object data)
                                          throws XPRSexception
        Removes the given ComputeRestart listener with the given data value from the object.
        Throws:
        XPRSexception
      • removeComputeRestartListeners

        public void removeComputeRestartListeners()
                                           throws XPRSexception
        Remove all listeners for the ComputeRestart callback
        Throws:
        XPRSexception
      • addGapNotifyListener

        public void addGapNotifyListener(XPRSgapNotifyListener listener)
                                  throws XPRSexception
        Add a listener for the GapNotify callback. Note that an object can have multiple GapNotify listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all GapNotify listeners will be removed.)
        Throws:
        XPRSexception
      • addGapNotifyListener

        public void addGapNotifyListener(XPRSgapNotifyListener listener,
                                         java.lang.Object data)
                                  throws XPRSexception
        Add a listener for the GapNotify callback. Note that an object can have multiple GapNotify listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all GapNotify listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        Throws:
        XPRSexception
      • addGapNotifyListener

        public void addGapNotifyListener(XPRSgapNotifyListener listener,
                                         int priority)
                                  throws XPRSexception
        Add a listener for the GapNotify callback. Note that an object can have multiple GapNotify listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all GapNotify listeners will be removed.)
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • addGapNotifyListener

        public void addGapNotifyListener(XPRSgapNotifyListener listener,
                                         java.lang.Object data,
                                         int priority)
                                  throws XPRSexception
        Add a listener for the GapNotify callback. Note that an object can have multiple GapNotify listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all GapNotify listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • removeGapNotifyListener

        public void removeGapNotifyListener(XPRSgapNotifyListener listener,
                                            java.lang.Object data)
                                     throws XPRSexception
        Removes the given GapNotify listener with the given data value from the object.
        Throws:
        XPRSexception
      • removeGapNotifyListeners

        public void removeGapNotifyListeners()
                                      throws XPRSexception
        Remove all listeners for the GapNotify callback
        Throws:
        XPRSexception
      • addUserSolNotifyListener

        public void addUserSolNotifyListener(XPRSuserSolNotifyListener listener)
                                      throws XPRSexception
        Add a listener for the UserSolNotify callback. Note that an object can have multiple UserSolNotify listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all UserSolNotify listeners will be removed.)
        Throws:
        XPRSexception
      • addUserSolNotifyListener

        public void addUserSolNotifyListener(XPRSuserSolNotifyListener listener,
                                             java.lang.Object data)
                                      throws XPRSexception
        Add a listener for the UserSolNotify callback. Note that an object can have multiple UserSolNotify listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all UserSolNotify listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        Throws:
        XPRSexception
      • addUserSolNotifyListener

        public void addUserSolNotifyListener(XPRSuserSolNotifyListener listener,
                                             int priority)
                                      throws XPRSexception
        Add a listener for the UserSolNotify callback. Note that an object can have multiple UserSolNotify listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all UserSolNotify listeners will be removed.)
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • addUserSolNotifyListener

        public void addUserSolNotifyListener(XPRSuserSolNotifyListener listener,
                                             java.lang.Object data,
                                             int priority)
                                      throws XPRSexception
        Add a listener for the UserSolNotify callback. Note that an object can have multiple UserSolNotify listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all UserSolNotify listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • removeUserSolNotifyListener

        public void removeUserSolNotifyListener(XPRSuserSolNotifyListener listener,
                                                java.lang.Object data)
                                         throws XPRSexception
        Removes the given UserSolNotify listener with the given data value from the object.
        Throws:
        XPRSexception
      • removeUserSolNotifyListeners

        public void removeUserSolNotifyListeners()
                                          throws XPRSexception
        Remove all listeners for the UserSolNotify callback
        Throws:
        XPRSexception
      • addBeforeSolveListener

        public void addBeforeSolveListener(XPRSbeforeSolveListener listener)
                                    throws XPRSexception
        Add a listener for the BeforeSolve callback. Note that an object can have multiple BeforeSolve listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all BeforeSolve listeners will be removed.)
        Throws:
        XPRSexception
      • addBeforeSolveListener

        public void addBeforeSolveListener(XPRSbeforeSolveListener listener,
                                           java.lang.Object data)
                                    throws XPRSexception
        Add a listener for the BeforeSolve callback. Note that an object can have multiple BeforeSolve listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all BeforeSolve listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        Throws:
        XPRSexception
      • addBeforeSolveListener

        public void addBeforeSolveListener(XPRSbeforeSolveListener listener,
                                           int priority)
                                    throws XPRSexception
        Add a listener for the BeforeSolve callback. Note that an object can have multiple BeforeSolve listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all BeforeSolve listeners will be removed.)
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • addBeforeSolveListener

        public void addBeforeSolveListener(XPRSbeforeSolveListener listener,
                                           java.lang.Object data,
                                           int priority)
                                    throws XPRSexception
        Add a listener for the BeforeSolve callback. Note that an object can have multiple BeforeSolve listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all BeforeSolve listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • removeBeforeSolveListener

        public void removeBeforeSolveListener(XPRSbeforeSolveListener listener,
                                              java.lang.Object data)
                                       throws XPRSexception
        Removes the given BeforeSolve listener with the given data value from the object.
        Throws:
        XPRSexception
      • removeBeforeSolveListeners

        public void removeBeforeSolveListeners()
                                        throws XPRSexception
        Remove all listeners for the BeforeSolve callback
        Throws:
        XPRSexception
      • addCheckTimeListener

        public void addCheckTimeListener(XPRScheckTimeListener listener)
                                  throws XPRSexception
        Add a listener for the CheckTime callback. Note that an object can have multiple CheckTime listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all CheckTime listeners will be removed.)
        Throws:
        XPRSexception
      • addCheckTimeListener

        public void addCheckTimeListener(XPRScheckTimeListener listener,
                                         java.lang.Object data)
                                  throws XPRSexception
        Add a listener for the CheckTime callback. Note that an object can have multiple CheckTime listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all CheckTime listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        Throws:
        XPRSexception
      • addCheckTimeListener

        public void addCheckTimeListener(XPRScheckTimeListener listener,
                                         int priority)
                                  throws XPRSexception
        Add a listener for the CheckTime callback. Note that an object can have multiple CheckTime listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all CheckTime listeners will be removed.)
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • addCheckTimeListener

        public void addCheckTimeListener(XPRScheckTimeListener listener,
                                         java.lang.Object data,
                                         int priority)
                                  throws XPRSexception
        Add a listener for the CheckTime callback. Note that an object can have multiple CheckTime listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all CheckTime listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • removeCheckTimeListener

        public void removeCheckTimeListener(XPRScheckTimeListener listener,
                                            java.lang.Object data)
                                     throws XPRSexception
        Removes the given CheckTime listener with the given data value from the object.
        Throws:
        XPRSexception
      • removeCheckTimeListeners

        public void removeCheckTimeListeners()
                                      throws XPRSexception
        Remove all listeners for the CheckTime callback
        Throws:
        XPRSexception
      • addMsgHandlerListener

        public void addMsgHandlerListener(XPRSmsgHandlerListener listener)
                                   throws XPRSexception
        Add a listener for the MsgHandler callback. Note that an object can have multiple MsgHandler listeners.
        Specified by:
        addMsgHandlerListener in class  XPRSobject
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all MsgHandler listeners will be removed.)
        Throws:
        XPRSexception
      • addMsgHandlerListener

        public void addMsgHandlerListener(XPRSmsgHandlerListener listener,
                                          java.lang.Object data)
                                   throws XPRSexception
        Add a listener for the MsgHandler callback. Note that an object can have multiple MsgHandler listeners.
        Specified by:
        addMsgHandlerListener in class  XPRSobject
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all MsgHandler listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        Throws:
        XPRSexception
      • addMsgHandlerListener

        public void addMsgHandlerListener(XPRSmsgHandlerListener listener,
                                          int priority)
                                   throws XPRSexception
        Add a listener for the MsgHandler callback. Note that an object can have multiple MsgHandler listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all MsgHandler listeners will be removed.)
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • addMsgHandlerListener

        public void addMsgHandlerListener(XPRSmsgHandlerListener listener,
                                          java.lang.Object data,
                                          int priority)
                                   throws XPRSexception
        Add a listener for the MsgHandler callback. Note that an object can have multiple MsgHandler listeners.
        Parameters:
        listener - The listener to which the event will be dispatched. (If null, all MsgHandler listeners will be removed.)
        data - An additional object which will be passed down to the callback function
        priority - Listeners with higher priorities are called first
        Throws:
        XPRSexception
      • removeMsgHandlerListener

        public void removeMsgHandlerListener(XPRSmsgHandlerListener listener,
                                             java.lang.Object data)
                                      throws XPRSexception
        Removes the given MsgHandler listener with the given data value from the object.
        Throws:
        XPRSexception
      • removeMsgHandlerListeners

        public void removeMsgHandlerListeners()
                                       throws XPRSexception
        Remove all listeners for the MsgHandler callback
        Throws:
        XPRSexception
      • attributes

        public XPRSprob.Attributes attributes()
        Access the attributes of this instance.
        Returns:
        an object that allows accessing the attributes of this instance.
      • controls

        public XPRSprob.Controls controls()
        Access the controls of this instance.
        Returns:
        an object that allows accessing the controls of this instance.

© 2001-2021 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.