Initializing help system before first use

XPRBprob Methods

The XPRBprob type exposes the following members.

Methods
  Name Description
Public methodCode example addCuts
Add an array of cuts to the Optimizer problem. This method adds an array of previously defined cuts to the problem currently held in Xpress-Optimizer. Typically, this method will be called from the cut manager callback of the Optimizer. Cuts are not stored in the BCL problem. See the BCL examples for demonstrations.
Public methodCode example AddDelVarCallback Obsolete.
Add a BCL variable deletions callback.
Public methodCode example AddErrorCallback
Add a BCL error callback.
Public methodCode example AddMessageCallback
Add a BCL message callback.
Public methodCode example addMIPSol(XPRBsol)
Adds a MIP solution from an external source into the Optimizer. The solution is given in the form of an XPRBsol object and can be feasible, infeasible or partial. The function returns immediately after passing the solution to the Optimizer. The solution is placed in a pool until the Optimizer is able to analyze the solution during a MIP solve. If the provided solution is found to be infeasible, a limited local search heuristic will be run to attempt to find a close feasible integer solution. If a partial solution is provided, global columns will be fixed to any provided values and a limited local search will be run in an attempt to find integer feasible values for the remaining unspecified columns. Values provided for continuous columns in partial solutions are currently ignored.
Public methodCode example addMIPSol(XPRBsol, String)
Adds a MIP solution from an external source into the Optimizer. The solution is given in the form of an XPRBsol object and can be feasible, infeasible or partial. The function returns immediately after passing the solution to the Optimizer. The solution is placed in a pool until the Optimizer is able to analyze the solution during a MIP solve. If the provided solution is found to be infeasible, a limited local search heuristic will be run to attempt to find a close feasible integer solution. If a partial solution is provided, global columns will be fixed to any provided values and a limited local search will be run in an attempt to find integer feasible values for the remaining unspecified columns. Values provided for continuous columns in partial solutions are currently ignored.
Public methodCode example beginCB
Start working with BCL within an Optimizer callback. This method precedes any call to BCL functionality within an Optimizer callback. It updates the BCL problem information for working with the local Optimizer subproblem and resets the BCL problem status. This method blocks access to the BCL problem until it is released by a matching call to endCB.
Public methodCode example clearDir
Delete all directives. Directives may be set on objects of type XPRBvar or XPRBsos.
Public methodCode example delCtr
Delete an XPRBctr constraint from the current problem.
Public methodCode example delCut
Release the memory used by an XPRBcut object created for this problem. Does not remove a cut previously added by XPRSprob.addCuts from the problem.
Public methodCode example delSol
Remove a solution object from this problem.
Public methodCode example delSos
Delete an XPRBsos from the current problem.
Public method Dispose()
Protected method Dispose(Boolean)
Public methodCode example endCB
Terminate working with BCL within an Optimizer callback. This method sets the BCL problem information back to working with the main Optimizer problem, this includes resetting the BCL problem status. There must be a matching call to beginCB
Public method Equals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodCode example exportProb()
Same as exportProb(BCLconstant.XPRB_LP, null);
Public methodCode example exportProb(Int32, String)
Print problem matrix to a file. This method prints the matrix to a file with an extended LP or extended MPS format. Provided that no extension is given by the user LP files receive the extension .lp. MPS files always receive the extension .mat. When exporting matrices semi-continuous and semi-continuous integer variables are preprocessed: if a lower bound value greater than 0 is given, then the variable is treated like a continuous (resp. integer) variable. The precision used by BCL for printing real numbers can be changed with setRealFmt(string) to obtain more accurate output for very large or very small numbers. For full precision matrix output the user is advised to switch to the Optimizer function XPRSprob.writeProb, preceded by a call to loadMat().
Protected method Finalize (Overrides Object.Finalize().)
Public methodCode example fixMIPEntities()
Fix all the global entities. Fixes 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.
Public methodCode example fixMIPEntities(Boolean)
Fix all the global entities. Fixes 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.
Public methodCode example getCRef
Retrieve the reference of the current XPRBprob object.
Public methodCode example getCtrByName
Retrieve an XPRBctr constraint by name.
Public method getCtrs
Public method GetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public method getIIS(IList, IList)
Same as getIIS(vars, ctrs, null, 1);
Public method getIIS(IList, IList, IList)
Same as getIIS(vars, ctrs, soss, 1);
Public method getIIS(IList, IList, Int32)
Same as getIIS(vars, ctrs, null, num);
Public method getIIS(IList, IList, IList, Int32)
Get IIS variables, constraints, and SOS.
Public methodCode example getIndexSetByName
Retrieve an XPRBindexSet by name.
Public methodCode example getLPStat
Get the LP status.
Public methodCode example getMIPStat
Get the MIP (global) status.
Public methodCode example getName
Retrieve the name of the current problem.
Public methodCode example getNumIIS
Get the number of independent IIS. The method returns the number of independent irreducible infeasible sets found by Xpress-Optimizer for an infeasible LP problem.
Public methodCode example getObjVal
Get the objective function value.
Public methodCode example getProbStat
Get the problem status.
Public methodCode example getSense
Get the sense of the objective function.
Public methodCode example getSosByName
Retrieve an XPRBsos by name.
Public method GetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodCode example getVarByName
Retrieve an XPRBvar variable by name.
Public methodCode example getXPRSprob
Returns an XPRSprob problem object for a problem defined in BCL and subsequently loaded into the Xpress-Optimizer.
Public method isValid
Public methodCode example loadBasis
Load a previously saved basis. This method loads a basis for the current problem in the optimizer. The basis must have been saved using method saveBasis(). It is not possible to load a basis saved for any other problem, even if the problems are similar. This method takes into account that the problem may have been modified (addition/deletion of variables and constraints) since the basis has been stored. Note that the problem has to be loaded explicitly (method loadMat()) before the basis is re-input with this method.
Public methodCode example loadMat
Load a problem into Xpress-Optimizer. This method transforms the current BCL problem definition into a matrix in Xpress-Optimizer. Empty rows and columns are deleted before generating the matrix. Semi-continuous (integer) variables are preprocessed: if a lower bound value greater than 0 is given, then the variable is treated like a continuous (resp. integer) variable. Variables that belong to the problem but do not appear in the matrix receive negative column numbers. Usually, it is not necessary to call this method explicitly because BCL automatically does this conversion whenever it is required.
Public method loadMIPSol(Double, Int32)
Load a MIP solution from the MIP solution pool.
Public method loadMIPSol(Double, Int32, Boolean)
Load a MIP solution from the MIP solution pool.
Public method lpOptimise()
Public method lpOptimise(String)
Public method lpOptimize()
Public methodCode example lpOptimize(String)
Solve as a continuous problem.
Public method maxim() Obsolete.
Public methodCode example maxim(String) Obsolete.
Maximize a problem. This method selects and starts the Xpress-Optimizer solution algorithm. The characters indicating the algorithm choice may be combined where it makes sense, e.g. "dg". If the matrix loaded in Xpress-Optimizer does not correspond to the current problem definition it is regenerated automatically prior to the start of the algorithm. Before solving a problem, the objective function must be selected with setObj(). Note that if you use an incomplete global search you should finish your program with a call to the Xpress-Optimizer method XPRSprob.PostSolve() (see Xpress-Optimizer manual for details) in order to remove all search tree information that has been stored. Otherwise you may not be able to re-run your program.
Protected method MemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public method minim() Obsolete.
Public methodCode example minim(String) Obsolete.
Minimize a problem. This method selects and starts the Xpress-Optimizer solution algorithm. The characters indicating the algorithm choice may be combined where it makes sense, e.g. "dg". If the matrix loaded in Xpress-Optimizer does not correspond to the current problem definition it is regenerated automatically prior to the start of the algorithm. Before solving a problem, the objective function must be selected with setObj(). Note that if you use an incomplete global search you should finish your program with a call to the Xpress-Optimizer method XPRSprob.PostSolve() (see Xpress-Optimizer manual for details) in order to remove all search tree information that has been stored. Otherwise you may not be able to re-run your program.
Public method mipOptimise()
Public method mipOptimise(String)
Public method mipOptimize()
Public methodCode example mipOptimize(String)
Solve as a discrete problem.
Public methodCode example newCtr(String)
Create an empty XPRBctr constraint in the current problem.
Public methodCode example newCtr(XPRBexpr)
Create a new, unnamed, XPRBctr constraint in the current problem.
Public methodCode example newCtr(XPRBrelation)
Create a new, unnamed, XPRBctr constraint in the current problem.
Public methodCode example newCtr(XPRBvar)
Create a new, unnamed, XPRBctr constraint in the current problem.
Public methodCode example newCtr(String, XPRBexpr)
Create a new XPRBctr constraint in the current problem.
Public methodCode example newCtr(String, XPRBrelation)
Create a new XPRBctr constraint in the current problem.
Public methodCode example newCut(Int32)
Create a new cut. This method has to be called before XPRBcut.addTerm(XPRBvar, double) or XPRBcut.setTerm(XPRBvar, double) are used to add terms to the cut. Cuts are inequalities or equations. If no type is specified the type BCLconstant.XPRB.E is assumed, it can be changed with method XPRBcut.setType(int).
Public methodCode example newCut(XPRBrelation)
Create a new cut. This method has to be called before XPRBcut.addTerm(XPRBvar, double) or XPRBcut.setTerm(XPRBvar, double) are used to add terms to the cut. Cuts are inequalities or equations. If no type is specified the type BCLconstant.XPRB.E is assumed, it can be changed with method XPRBcut.setType(int).
Public methodCode example newCut(XPRBrelation, Int32)
Create a new cut. This method has to be called before XPRBcut.addTerm(XPRBvar, double) or XPRBcut.setTerm(XPRBvar, double) are used to add terms to the cut. Cuts are inequalities or equations. If no type is specified the type BCLconstant.XPRB.E is assumed, it can be changed with method XPRBcut.setType(int).
Public methodCode example newIndexSet(Int32)
Create a default named new XPRBindexSet index set in the current problem. The maximum size may be altered dynamically at a later time.
Public methodCode example newIndexSet(String)
Create a new XPRBindexSet index set in the current problem with a maxsize of zero. This size may be altered dynamically at a later time.
Public methodCode example newIndexSet(String, Int32)
Create a new XPRBindexSet index set in the current problem. This maxsize may be altered dynamically at a later time.
Public methodCode example newSol
Create a new solution object for this problem.
Public methodCode example newSos()
Create a default XPRBsos Special Ordered Set (of type 1) in the current problem.
Public methodCode example newSos(Int32)
Create a default named XPRBsos Special Ordered Set in the current problem.
Public methodCode example newSos(Int32, XPRBexpr)
Create a default named XPRBsos Special Ordered Set in the current problem. For the expression which is given as a parameter, the variables in the expression are added to the SOS and the coefficient of each variable becomes its weight.
Public methodCode example newSos(String, Int32)
Create an XPRBsos Special Ordered Set in the current problem.
Public methodCode example newSos(String, Int32, XPRBexpr)
Create an XPRBsos Special Ordered Set in the current problem. For the expression which is given as a parameter, the variables in the expression are added to the SOS and the coefficient of each variable becomes its weight.
Public methodCode example newVar(String)
Create a new XPRBvar variable in the current problem. The lower bound is set to zero, the upper bound to BCLconstant.XPRB_INFINITY and the type to BCLconstant.XPRB_PL (continuous).
Public methodCode example newVar(String, Int32)
Create a new XPRBvar variable in the current problem. The lower bound is set to zero and the upper bound to BCLconstant.XPRB_INFINITY.
Public methodCode example newVar(String, Int32, Double, Double)
Create a new XPRBvar variable in the current problem.
Public methodCode example print
Print out the current problem.
Public methodCode example printF
Print a string.
Public methodCode example readBinSol()
Read the solution from a binary file. Read a binary solution file (.bin), created by the writeBinSol method, loading it into the Optimizer.
Public methodCode example readBinSol(String)
Read the solution from a binary file. Read a binary solution file (.bin), created by the writeBinSol method, loading it into the Optimizer.
Public methodCode example readBinSol(String, String)
Read the solution from a binary file. Read a binary solution file (.bin), created by the writeBinSol method, loading it into the Optimizer.
Public methodCode example readSlxSol()
Read the solution from an ASCII file. Read an ASCII solution file (.slx), created by the writeSlxSol method, loading it into the Optimizer.
Public methodCode example readSlxSol(String)
Read the solution from an ASCII file. Read an ASCII solution file (.slx), created by the writeSlxSol method, loading it into the Optimizer.
Public methodCode example readSlxSol(String, String)
Read the solution from an ASCII file. Read an ASCII solution file (.slx), created by the writeSlxSol method, loading it into the Optimizer.
Public methodCode example RemoveDelVarCallback Obsolete.
Remove a BCL variable deletions callback.
Public methodCode example RemoveErrorCallback
Remove a BCL error callback.
Public methodCode example RemoveMessageCallback
Remove a BCL message callback.
Public methodCode example reset
Reset the current XPRBprob object.
Public methodCode example saveBasis
Save the current basis. This method saves the basis for the current problem in the optimizer by creating a new object of type XPRBbasis.
Public methodCode example setColOrder
Create the XPRBprob object.
Public methodCode example setCutMode
Parameter settings for cuts. This methods sets certain Xpress-Optimizer control parameters to enable the addition of cuts defined in BCL during the MIP search.
Public methodCode example setDictionarySize
Set the size of a dictionary. This method sets the size of the names or indices dictionaries. It can only be called immediately after the creation of a problem. Once the names dictionary has been disabled it cannot be enabled any more. All methods relative to the names cannot be used if this dictionary has been disabled. The indices dictionary cannot be disabled.
Public methodCode example setErrCtrl
Set the error flag control.
Public methodCode example setMsgLevel
Set the message print level.
Public method setName
Set the name of the problem.
Public methodCode example setObj(Double)
Set double objective function for the current problem (usually used to set "none" with a 0.0 value).
Public methodCode example setObj(XPRBctr)
Set the objective function for the current problem.
Public methodCode example setObj(XPRBexpr)
Set the objective function for the current problem.
Public methodCode example setRealFmt
Set the format for printing real numbers.
Public methodCode example setSense
Set the sense of the objective function. The objective sense is set to minimization by default.
Public method solve() Obsolete.
Public methodCode example solve(String) Obsolete.
Call Xpress-Optimizer solution algorithm. This method selects and starts the Xpress-Optimizer solution algorithm. The characters indicating the algorithm choice may be combined where it makes sense, e.g. "dg". If the matrix loaded in Xpress-Optimizer does not correspond to the current problem definition it is regenerated automatically prior to the start of the algorithm. The sense of the optimization (default: minimization) can be changed with method setSense(int). Before solving a problem, the objective function must be selected with setObj(). Note that if you use an incomplete global search you should finish your program with a call to the Xpress-Optimizer method XPRSprob.PostSolve() (see Xpress-Optimizer manual for details) in order to remove all search tree information that has been stored. Otherwise you may not be able to re-run your program.
Public methodCode example sync
Synchronize BCL with the Optimizer. This method resets the BCL problem status.
Public method ToString
Retrieve the name of the current problem.
(Overrides Object.ToString().)
Public methodCode example writeBinSol()
Writes the solution to a binary file. Writes the current MIP or LP Optimizer solution to a binary solution file (.sol) for later input into the Optimizer.
Public methodCode example writeBinSol(String)
Writes the solution to a binary file. Writes the current MIP or LP Optimizer solution to a binary solution file (.sol) for later input into the Optimizer.
Public methodCode example writeBinSol(String, String)
Writes the solution to a binary file. Writes the current MIP or LP Optimizer solution to a binary solution file (.sol) for later input into the Optimizer.
Public methodCode example writeDir
Write directives to a file. This method writes out to a file the directives defined for a problem. The extension .dir is appended to the given file name. When no file name is given (null), the name of the problem is used. If a file of the given name exists already it is replaced.
Public methodCode example writePrtSol()
Write solution to a fixed format ASCII file. Writes the current Optimizer solution to a fixed format ASCII file (.prt).
Public methodCode example writePrtSol(String)
Write solution to a fixed format ASCII file. Writes the current Optimizer solution to a fixed format ASCII file (.prt).
Public methodCode example writePrtSol(String, String)
Write solution to a fixed format ASCII file. Writes the current Optimizer solution to a fixed format ASCII file (.prt).
Public methodCode example writeSlxSol()
Write solution to a an ASCII file. Writes the current Optimizer solution to an ASCII solution file (.slx) using a similar format to MPS files.
Public methodCode example writeSlxSol(String)
Write solution to a an ASCII file. Writes the current Optimizer solution to an ASCII solution file (.slx) using a similar format to MPS files.
Public methodCode example writeSlxSol(String, String)
Write solution to a an ASCII file. Writes the current Optimizer solution to an ASCII solution file (.slx) using a similar format to MPS files.
Public method writeSol()
Write solution to a CSV file. This method writes the current Optimizer solution to a CSV format ASCII file (.asc and .hdr).
Public method writeSol(String)
Write solution to a CSV file. This method writes the current Optimizer solution to a CSV format ASCII file (.asc and .hdr).
Public methodCode example writeSol(String, String)
Write solution to a CSV file. This method writes the current Optimizer solution to a CSV format ASCII file (.asc and .hdr). Please refer to the documentation of XPRSwritesol in the Xpress-Optimizer Reference Manual for a description of the various flags.
Public methodCode example XPRBreadarrline(StreamReader, Int32, String, Double, Int32)
Read a line of an array from a data file.
Public methodCode example XPRBreadarrline(StreamReader, Int32, String, Int32, Int32)
Read a line of an array from a data file.
Public methodCode example XPRBreadarrline(StreamReader, Int32, String, Object, Int32)
Read a line of an array from a data file.
Public methodCode example XPRBreadarrline(StreamReader, Int32, String, String, Int32)
Read a line of an array from a data file.
Public methodCode example XPRBreadline
Read a formatted line from a data file. Anything after a comment (! denotes the beginning of a comment) will be ignored. This will read multiple lines if the line ends with &.
Top
See Also

© 2001-2025 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.