XPRSglobalenv
- java.lang.Object
-  
  - com.dashoptimization.XPRSobject
-  
    - com.dashoptimization.XPRSglobalenv
 
 
-  
   - All Implemented Interfaces:
- java.lang.AutoCloseable
 
 
 public class XPRSglobalenv extends XPRSobject Provides access to the global optimizer environment.
-  
    
   -  
        Method SummaryModifier and Type Method and Description voidaddMsgHandlerListener(XPRSmsgHandlerListener listener)Add a listener for the MsgHandler callback.voidaddMsgHandlerListener(XPRSmsgHandlerListener listener, int priority)Add a listener for the MsgHandler callback.voidaddMsgHandlerListener(XPRSmsgHandlerListener listener, java.lang.Object data)Add a listener for the MsgHandler callback.voidaddMsgHandlerListener(XPRSmsgHandlerListener listener, java.lang.Object data, int priority)Add a listener for the MsgHandler callback.static booleanbeginLicensing()Convenience wrapper forbeginLicensing(BoolHolder).voidclose()The Global Environment is destroyed byXPRS.free()so thisclose()function does nothing.static voidendLicensing()voidfeatureQuery(java.lang.String feature, IntHolder p_status)Checks if the provided feature is available in the current license used by the optimizer.java.lang.StringgetBanner()Convenience wrapper forgetBanner(StringHolder).voidgetBanner(StringHolder banner)Returns the banner and copyright message.booleangetCheckedMode()Convenience wrapper forgetCheckedMode(BoolHolder).voidgetCheckedMode(BoolHolder p_checkedmode)You can use this function to interrogate whether checking and validation of all Optimizer function calls is enabled for the current process.XPRSenumerations.AllowComputegetComputeAllowed()Convenience wrapper forgetComputeAllowed(XPRSenumerationHolders.AllowCompute).intgetDaysLeft()Convenience wrapper forgetDaysLeft(IntHolder).voidgetDaysLeft(IntHolder p_daysleft)Returns the number of days left until the license expires.voidgetDebugMode(IntHolder p_debugmode)java.lang.StringgetLastError()Convenience wrapper forgetLastError(IntHolder, StringHolder, int, IntHolder).java.lang.StringgetLastError(IntHolder p_msgcode)Convenience wrapper forgetLastError(IntHolder, StringHolder, int, IntHolder).voidgetSafeMode(IntHolder p_safemode)static java.lang.StringgetVersion()Convenience wrapper forgetVersion(StringHolder).static voidgetVersion(StringHolder version)Returns the full Optimizer version number in the form 15.10.03, where 15 is the major release, 10 is the minor release, and 03 is the build number.static intlicense(IntHolder p_i)Convenience wrapper forlicense(IntHolder, StringHolder).static intlicense(IntHolder p_i, StringHolder p_c)voidremoveMsgHandlerListener()Removes all MsgHandler listeners from the object.voidremoveMsgHandlerListener(XPRSmsgHandlerListener listener)Removes the given MsgHandler listener from the object.voidremoveMsgHandlerListener(XPRSmsgHandlerListener listener, java.lang.Object data)Removes the given MsgHandler listener with the given data value from the object.voidremoveMsgHandlerListeners()Remove all listeners for the MsgHandler callbackvoidsetArchConsistency(int consistent)Sets whether to force the same execution path on various CPU architecture extensions, in particular (pre-)AVX and AVX2.voidsetCheckedMode(boolean checkedmode)You can use this function to disable some of the checking and validation of function calls and function call parameters for calls to the Xpress Optimizer API.voidsetComputeAllowed(XPRSenumerations.AllowCompute allow)Set whether the current application is allowed to use the Insight Compute interface.voidsetDebugMode(int debugmode)voidsetSafeMode(int safemode)-  
          Methods inherited from class com.dashoptimization.XPRSobjectaddMsgHandlerListener, addMsgHandlerListener, destroy, isDestroyed
 
-  
          
 
-  
        
-  
    
   -  
        Method Detail-  closepublic void close() throws XPRSexceptionThe Global Environment is destroyed byXPRS.free()so thisclose()function does nothing.- Specified by:
- 
         closein interfacejava.lang.AutoCloseable
- Specified by:
- 
         closein classXPRSobject
- Throws:
- 
         XPRSexception
- Since:
- 38
 
 -  licensepublic static int license(IntHolder p_i, StringHolder p_c) throws XPRSexception - Throws:
- 
         XPRSexception
 
 -  licensepublic static int license(IntHolder p_i) throws XPRSexception Convenience wrapper forlicense(IntHolder, StringHolder).- Throws:
- 
         XPRSexception
- See Also:
- 
         license(IntHolder, StringHolder)
 
 -  beginLicensingpublic static boolean beginLicensing() throws XPRSexceptionConvenience wrapper forbeginLicensing(BoolHolder).- Throws:
- 
         XPRSexception
- See Also:
- 
         beginLicensing(BoolHolder)
 
 -  endLicensingpublic static void endLicensing() throws XPRSexception- Throws:
- 
         XPRSexception
 
 -  setCheckedModepublic void setCheckedMode(boolean checkedmode) throws XPRSexceptionYou can use this function to disable some of the checking and validation of function calls and function call parameters for calls to the Xpress Optimizer API. This checking is relatively lightweight but disabling it can improve performance in cases where non-intensive Xpress Optimizer functions are called repeatedly in a short space of time. Please note: after disabling function call checking and validation, invalid usage of Xpress Optimizer functions may not be detected and may cause the Xpress Optimizer process to behave unexpectedly or crash. It is not recommended that you disable function call checking and validation during application development.- Parameters:
- 
         checkedmode- Pass as 0 to disable much of the validation for all Xpress function calls from the current process. Pass 1 to re-enable validation. By default, validation is enabled.
- Throws:
- 
         XPRSexception
 
 -  getCheckedModepublic void getCheckedMode(BoolHolder p_checkedmode) throws XPRSexception You can use this function to interrogate whether checking and validation of all Optimizer function calls is enabled for the current process. Checking and validation is enabled by default but can be disabled by setCheckedMode.- Parameters:
- 
         p_checkedmode- Variable that is set to 0 if checking and validation of Optimizer function calls is disabled for the current process, non-zero otherwise.
- Throws:
- 
         XPRSexception
 
 -  getCheckedModepublic boolean getCheckedMode() throws XPRSexceptionConvenience wrapper forgetCheckedMode(BoolHolder).- Throws:
- 
         XPRSexception
- See Also:
- 
         getCheckedMode(BoolHolder)
 
 -  getBannerpublic void getBanner(StringHolder banner) throws XPRSexception Returns the banner and copyright message.- Parameters:
- 
         banner- A buffer of at least XPRS_MAXBUFFERLENGTH characters in which the null terminated banner string will be returned.
- Throws:
- 
         XPRSexception
 
 -  getBannerpublic java.lang.String getBanner() throws XPRSexceptionConvenience wrapper forgetBanner(StringHolder).- Throws:
- 
         XPRSexception
- See Also:
- 
         getBanner(StringHolder)
 
 -  getVersionpublic static void getVersion(StringHolder version) throws XPRSexception Returns the full Optimizer version number in the form 15.10.03, where 15 is the major release, 10 is the minor release, and 03 is the build number.- Parameters:
- 
         version- Buffer long enough to hold the version string (plus a null terminator). This should be at least 16 characters.
- Throws:
- 
         XPRSexception
 
 -  getVersionpublic static java.lang.String getVersion() throws XPRSexceptionConvenience wrapper forgetVersion(StringHolder).- Throws:
- 
         XPRSexception
- See Also:
- 
         getVersion(StringHolder)
 
 -  getDaysLeftpublic void getDaysLeft(IntHolder p_daysleft) throws XPRSexception Returns the number of days left until the license expires.- Parameters:
- 
         p_daysleft- Pointer to an integer where the number of days is to be returned. For a permanent license, the return value will be XPRS_MAXINT
- Throws:
- 
         XPRSexception
 
 -  getDaysLeftpublic int getDaysLeft() throws XPRSexceptionConvenience wrapper forgetDaysLeft(IntHolder).- Throws:
- 
         XPRSexception
- See Also:
- 
         getDaysLeft(IntHolder)
 
 -  featureQuerypublic void featureQuery(java.lang.String feature, IntHolder p_status) throws XPRSexceptionChecks if the provided feature is available in the current license used by the optimizer.- Parameters:
- 
         feature- The feature string to be checked in the license.
- 
         p_status- Return status of the check, a value of 1 indicates the feature is available.
- Throws:
- 
         XPRSexception
 
 -  setArchConsistencypublic void setArchConsistency(int consistent) throws XPRSexceptionSets whether to force the same execution path on various CPU architecture extensions, in particular (pre-)AVX and AVX2.- Parameters:
- 
         consistent- Whether to force the same execution path:- 0: Do not force the same execution path (default behavior);
- 1: Force the same execution path.
 
- Throws:
- 
         XPRSexception
 
 -  setSafeModepublic void setSafeMode(int safemode) throws XPRSexception- Throws:
- 
         XPRSexception
 
 -  getSafeModepublic void getSafeMode(IntHolder p_safemode) throws XPRSexception - Throws:
- 
         XPRSexception
 
 -  setDebugModepublic void setDebugMode(int debugmode) throws XPRSexception- Throws:
- 
         XPRSexception
 
 -  getDebugModepublic void getDebugMode(IntHolder p_debugmode) throws XPRSexception - Throws:
- 
         XPRSexception
 
 -  getLastErrorpublic java.lang.String getLastError() throws XPRSexceptionConvenience wrapper forgetLastError(IntHolder, StringHolder, int, IntHolder).- Specified by:
- 
         getLastErrorin classXPRSobject
- Throws:
- 
         XPRSexception
- See Also:
- 
         getLastError(IntHolder, StringHolder, int, IntHolder)
 
 -  getLastErrorpublic java.lang.String getLastError(IntHolder p_msgcode) throws XPRSexception Convenience wrapper forgetLastError(IntHolder, StringHolder, int, IntHolder).- Throws:
- 
         XPRSexception
- See Also:
- 
         getLastError(IntHolder, StringHolder, int, IntHolder)
 
 -  setComputeAllowedpublic void setComputeAllowed(XPRSenumerations.AllowCompute allow) throws XPRSexception Set whether the current application is allowed to use the Insight Compute interface.- Parameters:
- 
         allow- Whether the Insight Compute interface may be used; must be one of the following constants:- XPRS_ALLOW_COMPUTE_ALWAYS: Always allow solves to be sent to Compute.
- XPRS_ALLOW_COMPUTE_NEVER: Never allow solves to be sent to Compute.
- XPRS_ALLOW_COMPUTE_DEFAULT: Allow solves to be sent to Compute only from non-OEM applications.
 
- Throws:
- 
         XPRSexception
 
 -  getComputeAllowedpublic XPRSenumerations.AllowCompute getComputeAllowed() throws XPRSexception Convenience wrapper forgetComputeAllowed(XPRSenumerationHolders.AllowCompute).- Throws:
- 
         XPRSexception
- See Also:
- 
         getComputeAllowed(XPRSenumerationHolders.AllowCompute)
 
 -  addMsgHandlerListenerpublic void addMsgHandlerListener(XPRSmsgHandlerListener listener) throws XPRSexception Add a listener for the MsgHandler callback. Note that an object can have multiple MsgHandler listeners.- Specified by:
- 
         addMsgHandlerListenerin classXPRSobject
- Parameters:
- 
         listener- The listener to which the event will be dispatched. (If null, all MsgHandler listeners will be removed.)
- Throws:
- 
         XPRSexception
 
 -  addMsgHandlerListenerpublic 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:
- 
         addMsgHandlerListenerin classXPRSobject
- 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
 
 -  addMsgHandlerListenerpublic 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
 
 -  addMsgHandlerListenerpublic 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
 
 -  removeMsgHandlerListenerpublic void removeMsgHandlerListener(XPRSmsgHandlerListener listener) throws XPRSexception Removes the given MsgHandler listener from the object.- Throws:
- 
         XPRSexception
 
 -  removeMsgHandlerListenerpublic 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
 
 -  removeMsgHandlerListenerpublic void removeMsgHandlerListener() throws XPRSexceptionRemoves all MsgHandler listeners from the object. @deprecated as of Xpress 7.1, please useremoveMsgHandlerListener(XPRSmsgHandlerListener)orremoveMsgHandlerListeners()- Specified by:
- 
         removeMsgHandlerListenerin classXPRSobject
- Throws:
- 
         XPRSexception
 
 -  removeMsgHandlerListenerspublic void removeMsgHandlerListeners() throws XPRSexceptionRemove all listeners for the MsgHandler callback- Throws:
- 
         XPRSexception
 
 
-  
 
-  
        
© 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.
 
