XPRB
- java.lang.Object
-
- com.dashoptimization.XPRB
-
-
Field Summary
Modifier and Type Field and Description static intBVVariable type: binarystatic intCTRModel object type: constraintstatic intDICT_IDXDictionary choice: index set element names dictionarystatic intDICT_NAMESDictionary choice: names dictionarystatic intDIRProblem status: directives addedstatic intDNBranching directive: first branch downwardsstatic intEConstraint type: equationstatic intGConstraint type: inequality "greater or equal"static intGENProblem status: matrix generatedstatic intIDXModel object type: index setstatic doubleINFINITYPlus infinitystatic intLConstraint type: inequality "less or equal"static intLCOSTRange type: lower coststatic intLOACTRange type: lower activitystatic intLPMatrix file format: extended LPstatic intLP_CUTOFFLP status: objective value worse than cutoff valuestatic intLP_CUTOFF_IN_DUALLP status: LP cutoff in dualstatic intLP_INFEASLP status: LP infeasiblestatic intLP_NONCONVEXLP status: QP nonconvexstatic intLP_OPTIMALLP status: LP optimalstatic intLP_UNBOUNDEDLP status: LP unboundedstatic intLP_UNFINISHEDLP status: LP unfinishedstatic intLP_UNSOLVEDLP status: LP unsolvedstatic intMAXIMSense of the objective function: maximizationstatic intMINIMSense of the objective function: minimizationstatic intMIP_INFEASMIP status: global search complete, no integer solution foundstatic intMIP_LP_NOT_OPTIMALMIP status: LP has not been optimizedstatic intMIP_LP_OPTIMALMIP status: LP has been optimizedstatic intMIP_NO_SOL_FOUNDMIP status: global search incomplete, no integer solution foundstatic intMIP_NOT_LOADEDMIP status: problem has not been loadedstatic intMIP_OPTIMALMIP status: global search complete, an integer solution has been foundstatic intMIP_SOLUTIONMIP status: global search incomplete, an integer solution has been foundstatic intMIP_UNBOUNDEDMIP status: LP unboundedstatic intMODProblem status: problem modifiedstatic intMPSMatrix file format: extended MPSstatic intNConstraint type: non-bindingstatic intPDBranching directive: pseudocost on branching downwardsstatic intPIVariable type: partial integerstatic intPLVariable type: continuousstatic intPRBranching directive: prioritystatic intPUBranching directive: pseudocost on branching upwardsstatic intRConstraint type: rangestatic intS1SOS type: Special ordered set of type 1static intS2SOS type: Special ordered set of type 2static intSCVariable type: semi-continuousstatic intSIVariable type: semi-continuous integerstatic intSOLProblem status: solution availablestatic intSOSModel object type: SOSstatic intUCOSTRange type: upper coststatic intUDNRange type: lower unit coststatic intUIVariable type: general integerstatic intUPBranching directive: first branch upwardsstatic intUPACTRange type: upper activitystatic intUUPRange type: upper unit coststatic intVARModel object type: variablestatic intXPRS_PROBBCL - Optimizer synchronization: force problem reloadingstatic intXPRS_SOLBCL - Optimizer synchronization: LP solution updatestatic intXPRS_SOLMIPBCL - Optimizer synchronization: MIP solution update-
Fields inherited from interface com.dashoptimization.XOctrl
XPRS_ACTIVENODES, XPRS_ACTIVESET, XPRS_ALG_BARRIER, XPRS_ALG_DEFAULT, XPRS_ALG_DUAL, XPRS_ALG_PRIMAL, XPRS_AUTOPERTURB, XPRS_BACKTRACK, XPRS_BAR_DEFAULT, XPRS_BAR_MIN_DEGREE, XPRS_BAR_MIN_LOCAL_FILL, XPRS_BAR_NESTED_DISSECTION, XPRS_BARAASIZE, XPRS_BARCROSSOVER, XPRS_BARDENSECOL, XPRS_BARDUALINF, XPRS_BARDUALOBJ, XPRS_BARDUALSTOP, XPRS_BARGAPSTOP, XPRS_BARINDEFLIMIT, XPRS_BARITER, XPRS_BARITERLIMIT, XPRS_BARLSIZE, XPRS_BARORDER, XPRS_BAROUTPUT, XPRS_BARPRIMALINF, XPRS_BARPRIMALOBJ, XPRS_BARPRIMALSTOP, XPRS_BARSTEPSTOP, XPRS_BARSTOP, XPRS_BARTHREADS, XPRS_BESTBOUND, XPRS_BIGM, XPRS_BIGMMETHOD, XPRS_BRANCHCHOICE, XPRS_BRANCHVALUE, XPRS_BRANCHVAR, XPRS_BREADTHFIRST, XPRS_CACHESIZE, XPRS_CHOLESKYALG, XPRS_CHOLESKYTOL, XPRS_COLS, XPRS_CONBRANCH, XPRS_COVERCUTS, XPRS_CPKEEPALLCUTS, XPRS_CPMAXCUTS, XPRS_CPMAXELEMS, XPRS_CPUTIME, XPRS_CRASH, XPRS_CROSSOVER, XPRS_CSTYLE, XPRS_CUTDEPTH, XPRS_CUTFREQ, XPRS_CUTS, XPRS_CUTSTRATEGY, XPRS_DEFAULTALG, XPRS_DEGRADEFACTOR, XPRS_DENSECOLLIMIT, XPRS_DUALGRADIENT, XPRS_DUALINFEAS, XPRS_DUALIZE, XPRS_ELEMS, XPRS_ELIMTOL, XPRS_ERRORCODE, XPRS_ETATOL, XPRS_EXTRACOLS, XPRS_EXTRAELEMS, XPRS_EXTRAMIPENTS, XPRS_EXTRAPRESOLVE, XPRS_EXTRAROWS, XPRS_FEASTOL, XPRS_GOMCUTS, XPRS_HEURDEPTH, XPRS_HEURDIVESTRATEGY, XPRS_HEURFREQ, XPRS_HEURMAXSOL, XPRS_HEURNODES, XPRS_HEURSELECT, XPRS_HEURSTRATEGY, XPRS_IIS, XPRS_INVERTFREQ, XPRS_INVERTMIN, XPRS_KEEPBASIS, XPRS_KEEPMIPSOL, XPRS_KEEPNROWS, XPRS_LNPBEST, XPRS_LNPITERLIMIT, XPRS_LP_CUTOFF, XPRS_LP_CUTOFF_IN_DUAL, XPRS_LP_INFEAS, XPRS_LP_OPTIMAL, XPRS_LP_UNBOUNDED, XPRS_LP_UNFINISHED, XPRS_LP_UNSOLVED, XPRS_LPITERLIMIT, XPRS_LPLOG, XPRS_LPOBJVAL, XPRS_LPSTATUS, XPRS_MARKOWITZTOL, XPRS_MATRIXTOL, XPRS_MAXCUTTIME, XPRS_MAXIIS, XPRS_MAXMIPSOL, XPRS_MAXNODE, XPRS_MAXPAGELINES, XPRS_MAXTIME, XPRS_MIP_INFEAS, XPRS_MIP_LP_NOT_OPTIMAL, XPRS_MIP_LP_OPTIMAL, XPRS_MIP_NO_SOL_FOUND, XPRS_MIP_NOT_LOADED, XPRS_MIP_OPTIMAL, XPRS_MIP_SOLUTION, XPRS_MIPABSCUTOFF, XPRS_MIPABSSTOP, XPRS_MIPADDCUTOFF, XPRS_MIPENTS, XPRS_MIPINFEAS, XPRS_MIPLOG, XPRS_MIPOBJVAL, XPRS_MIPPRESOLVE, XPRS_MIPRELCUTOFF, XPRS_MIPRELSTOP, XPRS_MIPSOLNODE, XPRS_MIPSOLS, XPRS_MIPSTATUS, XPRS_MIPTARGET, XPRS_MIPTHREADID, XPRS_MIPTHREADS, XPRS_MIPTOL, XPRS_MPSECHO, XPRS_MPSERRIGNORE, XPRS_MPSFORMAT, XPRS_MPSNAMELENGTH, XPRS_NAMELENGTH, XPRS_NODEDEPTH, XPRS_NODES, XPRS_NODESELECTION, XPRS_NUMIIS, XPRS_OBJFIXED, XPRS_OBJRHS, XPRS_OBJSENSE, XPRS_OMNIFORMAT, XPRS_OPTIMALITYTOL, XPRS_OUTPUTLOG, XPRS_OUTPUTTOL, XPRS_PARENTNODE, XPRS_PENALTY, XPRS_PERTURB, XPRS_PIVOTTOL, XPRS_PPFACTOR, XPRS_PRESOLVE, XPRS_PRESOLVEOPS, XPRS_PRESOLVESTATE, XPRS_PRICINGALG, XPRS_PRIMALINFEAS, XPRS_PSEUDOCOST, XPRS_QELEMS, XPRS_REFACTOR, XPRS_REL10STYLE, XPRS_RELPIVOTTOL, XPRS_ROWS, XPRS_SBBEST, XPRS_SBITERLIMIT, XPRS_SBSELECT, XPRS_SBTHREADS, XPRS_SCALING, XPRS_SETMEMBERS, XPRS_SETS, XPRS_SIMPLEXITER, XPRS_SOLUTIONFILE, XPRS_SOSREFTOL, XPRS_SPARECOLS, XPRS_SPAREELEMS, XPRS_SPAREMIPENTS, XPRS_SPAREROWS, XPRS_SUMPRIMALINF, XPRS_TRACE, XPRS_TREECOVERCUTS, XPRS_TREEGOMCUTS, XPRS_VARSELECTION, XPRS_VERSION
-
-
Constructor Summary
Constructor and Description XPRB()Generate an XPRB object and initialize BCL.
-
Method Summary
Modifier and Type Method and Description static booleanbeginLicensing()Begin the OEM licensing process.static voidendLicensing()End the OEM licensing process.voidfinalize()Finalize BCL.static intgetTime()Get the running time.static java.lang.StringgetVersion()Get the version number of BCL.static XPRBlicenselicense()Generate a license object.static XPRBlicenselicense(java.lang.String path)Generate a license object.static voidlicense(XPRBlicense lic)Check license.XPRBprobnewProb(java.lang.String name)Create and initialize a new problem.static voidsetColOrder(int num)Set a column ordering criterion for matrix generation.static voidsetMsgLevel(int level)Set the message print level.static voidsetOutputStream()Set the output stream object.static voidsetOutputStream(java.lang.Object stream)Set the output stream object.static voidsetRealFmt(java.lang.String fmt)Set the format for printing real numbers.
-
-
-
Field Detail
-
PL
public static final int PL
Variable type: continuous- See Also:
- Constant Field Values
-
BV
public static final int BV
Variable type: binary- See Also:
- Constant Field Values
-
UI
public static final int UI
Variable type: general integer- See Also:
- Constant Field Values
-
PI
public static final int PI
Variable type: partial integer- See Also:
- Constant Field Values
-
SC
public static final int SC
Variable type: semi-continuous- See Also:
- Constant Field Values
-
SI
public static final int SI
Variable type: semi-continuous integer- See Also:
- Constant Field Values
-
PR
public static final int PR
Branching directive: priority- See Also:
- Constant Field Values
-
UP
public static final int UP
Branching directive: first branch upwards- See Also:
- Constant Field Values
-
DN
public static final int DN
Branching directive: first branch downwards- See Also:
- Constant Field Values
-
PU
public static final int PU
Branching directive: pseudocost on branching upwards- See Also:
- Constant Field Values
-
PD
public static final int PD
Branching directive: pseudocost on branching downwards- See Also:
- Constant Field Values
-
L
public static final int L
Constraint type: inequality "less or equal"- See Also:
- Constant Field Values
-
G
public static final int G
Constraint type: inequality "greater or equal"- See Also:
- Constant Field Values
-
E
public static final int E
Constraint type: equation- See Also:
- Constant Field Values
-
N
public static final int N
Constraint type: non-binding- See Also:
- Constant Field Values
-
R
public static final int R
Constraint type: range- See Also:
- Constant Field Values
-
S1
public static final int S1
SOS type: Special ordered set of type 1- See Also:
- Constant Field Values
-
S2
public static final int S2
SOS type: Special ordered set of type 2- See Also:
- Constant Field Values
-
UPACT
public static final int UPACT
Range type: upper activity- See Also:
- Constant Field Values
-
LOACT
public static final int LOACT
Range type: lower activity- See Also:
- Constant Field Values
-
UUP
public static final int UUP
Range type: upper unit cost- See Also:
- Constant Field Values
-
UDN
public static final int UDN
Range type: lower unit cost- See Also:
- Constant Field Values
-
UCOST
public static final int UCOST
Range type: upper cost- See Also:
- Constant Field Values
-
LCOST
public static final int LCOST
Range type: lower cost- See Also:
- Constant Field Values
-
LP
public static final int LP
Matrix file format: extended LP- See Also:
- Constant Field Values
-
MPS
public static final int MPS
Matrix file format: extended MPS- See Also:
- Constant Field Values
-
XPRS_SOL
public static final int XPRS_SOL
BCL - Optimizer synchronization: LP solution update- See Also:
- Constant Field Values
-
XPRS_SOLMIP
public static final int XPRS_SOLMIP
BCL - Optimizer synchronization: MIP solution update- See Also:
- Constant Field Values
-
XPRS_PROB
public static final int XPRS_PROB
BCL - Optimizer synchronization: force problem reloading- See Also:
- Constant Field Values
-
MAXIM
public static final int MAXIM
Sense of the objective function: maximization- See Also:
- Constant Field Values
-
MINIM
public static final int MINIM
Sense of the objective function: minimization- See Also:
- Constant Field Values
-
GEN
public static final int GEN
Problem status: matrix generated- See Also:
- Constant Field Values
-
DIR
public static final int DIR
Problem status: directives added- See Also:
- Constant Field Values
-
MOD
public static final int MOD
Problem status: problem modified- See Also:
- Constant Field Values
-
SOL
public static final int SOL
Problem status: solution available- See Also:
- Constant Field Values
-
LP_OPTIMAL
public static final int LP_OPTIMAL
LP status: LP optimal- See Also:
- Constant Field Values
-
LP_INFEAS
public static final int LP_INFEAS
LP status: LP infeasible- See Also:
- Constant Field Values
-
LP_CUTOFF
public static final int LP_CUTOFF
LP status: objective value worse than cutoff value- See Also:
- Constant Field Values
-
LP_UNFINISHED
public static final int LP_UNFINISHED
LP status: LP unfinished- See Also:
- Constant Field Values
-
LP_UNBOUNDED
public static final int LP_UNBOUNDED
LP status: LP unbounded- See Also:
- Constant Field Values
-
LP_CUTOFF_IN_DUAL
public static final int LP_CUTOFF_IN_DUAL
LP status: LP cutoff in dual- See Also:
- Constant Field Values
-
LP_UNSOLVED
public static final int LP_UNSOLVED
LP status: LP unsolved- See Also:
- Constant Field Values
-
LP_NONCONVEX
public static final int LP_NONCONVEX
LP status: QP nonconvex- See Also:
- Constant Field Values
-
MIP_NOT_LOADED
public static final int MIP_NOT_LOADED
MIP status: problem has not been loaded- See Also:
- Constant Field Values
-
MIP_LP_NOT_OPTIMAL
public static final int MIP_LP_NOT_OPTIMAL
MIP status: LP has not been optimized- See Also:
- Constant Field Values
-
MIP_LP_OPTIMAL
public static final int MIP_LP_OPTIMAL
MIP status: LP has been optimized- See Also:
- Constant Field Values
-
MIP_NO_SOL_FOUND
public static final int MIP_NO_SOL_FOUND
MIP status: global search incomplete, no integer solution found- See Also:
- Constant Field Values
-
MIP_SOLUTION
public static final int MIP_SOLUTION
MIP status: global search incomplete, an integer solution has been found- See Also:
- Constant Field Values
-
MIP_INFEAS
public static final int MIP_INFEAS
MIP status: global search complete, no integer solution found- See Also:
- Constant Field Values
-
MIP_OPTIMAL
public static final int MIP_OPTIMAL
MIP status: global search complete, an integer solution has been found- See Also:
- Constant Field Values
-
MIP_UNBOUNDED
public static final int MIP_UNBOUNDED
MIP status: LP unbounded- See Also:
- Constant Field Values
-
VAR
public static final int VAR
Model object type: variable- See Also:
- Constant Field Values
-
CTR
public static final int CTR
Model object type: constraint- See Also:
- Constant Field Values
-
SOS
public static final int SOS
Model object type: SOS- See Also:
- Constant Field Values
-
IDX
public static final int IDX
Model object type: index set- See Also:
- Constant Field Values
-
DICT_NAMES
public static final int DICT_NAMES
Dictionary choice: names dictionary- See Also:
- Constant Field Values
-
DICT_IDX
public static final int DICT_IDX
Dictionary choice: index set element names dictionary- See Also:
- Constant Field Values
-
INFINITY
public static final double INFINITY
Plus infinity- See Also:
- Constant Field Values
-
-
Constructor Detail
-
XPRB
public XPRB() throws XPRBlicenseErrorGenerate an XPRB object and initialize BCL. This method must be called first in order to use the library. In applications that create a large number of problems it is recommended to call the initialization once only per process for highest efficiency. The initialization of BCL Java does not initialize the Java interface of Xpress-Optimizer. If direct access to the Optimizer is required, this interface needs to be initialized by a separate call toXPRS.init.- Throws:
-
XPRBlicenseError- If no valid license is available.
-
-
Method Detail
-
license
public static XPRBlicense license(java.lang.String path)
Generate a license object. This method initiates the OEM licensing procedure.- Parameters:
-
path- path to the license file (may benull) - Returns:
- A new license object.
- See Also:
-
license(XPRBlicense lic)
-
license
public static XPRBlicense license()
Generate a license object. This method initiates the OEM licensing procedure.- Returns:
- A new license object.
- See Also:
-
license(XPRBlicense lic),license(null)
-
license
public static void license(XPRBlicense lic) throws XPRBlicenseError
Check license. This method is used for checking an OEM License.- Parameters:
-
lic- license object obtained from a call tolicense(String path) - Throws:
-
XPRBlicenseError- If the OEM license is not valid. - See Also:
-
license(String path)
-
setMsgLevel
public static void setMsgLevel(int level)
Set the message print level. BCL can produce different types of messages; status information, warnings and errors. This method controls which of these are output. In case of an error, an exception is raised before any message is output by BCL. The text and numbers of errors can be obtained with methodsXPRBerror.getMessage()andXPRBerror.getErrorCode()respectively (the same methods apply toXPRBlicenseError).XPRB.setMsgLevel(0);- Parameters:
-
level- message level (= types of messages printed by BCL). Possible values:0disable all output from BCL and Xpress-Optimizer2print warnings3print warnings and Optimizer log (default)4all messages printed
-
setOutputStream
public static void setOutputStream(java.lang.Object stream)
Set the output stream object. BCL uses this object whenever it needs to display text (information, warning or error messages). The provided object must implement either a 'void write(String)' method (like in a Writer class) or a 'void print(String)' method (like in a printStream class). Each problem may have its own stream set using the corresponding method in the XPRBprob object.XPRB.setOutputStream(System.err);- Parameters:
-
stream- an object implementing either a 'write' or 'print' method - See Also:
-
XPRBprob.setOutputStream(java.lang.Object)
-
setOutputStream
public static void setOutputStream()
Set the output stream object.- See Also:
-
setOutputStream(System.err)
-
setRealFmt
public static void setRealFmt(java.lang.String fmt)
Set the format for printing real numbers. In problems with very large or very small numbers it may become necessary to change the printing format to obtain a more exact output. In particular, by changing the precision it is possible to reduce the difference between matrices loaded in memory into Xpress-Optimizer and the output produced by exporting them to a file.XPRB.setRealFmt("%.10f");- Parameters:
-
fmt- format string (as used by the C function printf). Possible values include:"%g"default printing format (precision: 6 digits; exponential notation if the exponent resulting from the conversion is less than -4 or greater than or equal to the precision)"%.numfprint real numbers in the style[-]d.dwhere the number of digits after the decimal point is equal to the given precision num
-
setColOrder
public static void setColOrder(int num)
Set a column ordering criterion for matrix generation. BCL runs reproduce always the same matrix for a problem. This method allows the user to choose a different ordering criterion than the default one.XPRB.setColOrder(1);- Parameters:
-
num- ordering criterion. Possible values:0default order1alphabetical order
-
getVersion
public static java.lang.String getVersion()
Get the version number of BCL. This information is required if the user is reporting a problem.String version; version = XPRB.getVersion(); System.out.println("BCL version number:" + version);- Returns:
- BCL version number
-
newProb
public XPRBprob newProb(java.lang.String name)
Create and initialize a new problem. The name given to a problem determines the name and the location of the working files of Xpress-Optimizer. At the creation of a problem any existing working files of the same name are deleted. When solving several instances of a problem simultaneously the user must make sure to assign a different name to every instance. If no problem name is indicated, BCL creates a unique name including the full path to the temporary directory (Xpress-Optimizer creates its working files in the temporary directory).XPRBprob expl2; XPRB bcl; bcl=new XPRB(); expl2 = bcl.XPRBprob("example2");- Parameters:
-
name- problem name, may benull
-
getTime
public static int getTime()
Get the running time.int starttime; starttime = XPRB.getTime(); System.out.println("Current run time:" + (XPRB.getTime()-starttime)/1000 + "seconds");- Returns:
- time measure in milliseconds
-
beginLicensing
public static boolean beginLicensing()
Begin the OEM licensing process.- Returns:
-
trueif no license has been obtained yet
-
endLicensing
public static void endLicensing()
End the OEM licensing process.
-
finalize
public void finalize()
Finalize BCL. This method is called automatically by the system. If this method is called explicitly from the user's program to force the finalization of BCL (releasing the license) any problems created by the program must have been finalized (seeXPRBprob.finalize()) previously and the program must not access any BCL objects after this call.XPRB bcl=new XPRB(); // Initialize BCL XPRBprob expl2; expl2 = new XPRBprob("example2"); // Create a problem ... prob.finalize(); // Finalize the problem prob=null; bcl.finalize(); // Finalize BCL (release license) bcl=null;- Overrides:
-
finalizein classjava.lang.Object
-
-
© 2001-2020 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.
