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 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()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(com.dashoptimization.StringHolder).voidgetBanner(StringHolder banner)Returns the banner and copyright message.booleangetCheckedMode()Convenience wrapper forgetCheckedMode(com.dashoptimization.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()Query whether the current application is allowed to use the Insight Compute interface.intgetDaysLeft()Convenience wrapper forgetDaysLeft(com.dashoptimization.IntHolder).voidgetDaysLeft(IntHolder p_daysleft)Returns the number of days left until the license expires.voidgetDebugMode(IntHolder p_debugmode)java.lang.StringgetLastError()Returns the last error encountered during a call to the Xpress global environment.java.lang.StringgetLastError(IntHolder p_msgcode)Returns the last error encountered during a call to the Xpress global environment.voidgetSafeMode(IntHolder p_safemode)static java.lang.StringgetVersion()Convenience wrapper forgetVersion(com.dashoptimization.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 voidgetVersionNumbers(IntHolder p_major, IntHolder p_minor, IntHolder p_build)Returns the Optimizer version numbers split into major, minor, and build number.static intlicense(IntHolder p_i)Convenience wrapper forlicense(com.dashoptimization.IntHolder, com.dashoptimization.StringHolder).static intlicense(IntHolder p_i, StringHolder p_c)voidremoveMsgHandlerListener()Deprecated.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(com.dashoptimization.IntHolder, com.dashoptimization.StringHolder).
 -  beginLicensingpublic static boolean beginLicensing() throws XPRSexception- Throws:
- 
          XPRSexception
 
 -  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 bysetCheckedMode.- 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(com.dashoptimization.BoolHolder).- Returns:
- 
          The value that would be returned by 
          getCheckedMode(com.dashoptimization.BoolHolder)as output parameter.
- Throws:
- 
          XPRSexception
- See Also:
- 
          getCheckedMode(com.dashoptimization.BoolHolder)
 
 -  getBannerpublic void getBanner(StringHolder banner) throws XPRSexception Returns the banner and copyright message.- Parameters:
- 
          banner- A buffer of at leastXPRS_MAXBUFFERLENGTHcharacters in which the null terminated banner string will be returned.
- Throws:
- 
          XPRSexception
 
 -  getBannerpublic java.lang.String getBanner() throws XPRSexceptionConvenience wrapper forgetBanner(com.dashoptimization.StringHolder).- Returns:
- 
          The value that would be returned by 
          getBanner(com.dashoptimization.StringHolder)as output parameter.
- Throws:
- 
          XPRSexception
- See Also:
- 
          getBanner(com.dashoptimization.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(com.dashoptimization.StringHolder).- Returns:
- 
          The value that would be returned by 
          getVersion(com.dashoptimization.StringHolder)as output parameter.
- Throws:
- 
          XPRSexception
- See Also:
- 
          getVersion(com.dashoptimization.StringHolder)
 
 -  getVersionNumberspublic static void getVersionNumbers(IntHolder p_major, IntHolder p_minor, IntHolder p_build) throws XPRSexception Returns the Optimizer version numbers split into major, minor, and build number.- Parameters:
- 
          p_major- Pointer to integer to receive the major version number. Can benull.
- 
          p_minor- Pointer to integer to receive the minor version number. This is a number from 0 to 99. Can benull.
- 
          p_build- Pointer to integer to receive the build number. This is a number from 0 to 99. Can benull.
- Throws:
- 
          XPRSexception
 
 -  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 beXPRS_MAXINT
- Throws:
- 
          XPRSexception
 
 -  getDaysLeftpublic int getDaysLeft() throws XPRSexceptionConvenience wrapper forgetDaysLeft(com.dashoptimization.IntHolder).- Returns:
- 
          The value that would be returned by 
          getDaysLeft(com.dashoptimization.IntHolder)as output parameter.
- Throws:
- 
          XPRSexception
- See Also:
- 
          getDaysLeft(com.dashoptimization.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 XPRSexceptionReturns the last error encountered during a call to the Xpress global environment.- Specified by:
- 
          getLastErrorin classXPRSobject
- Returns:
- The requested information.
- Throws:
- 
          XPRSexception
 
 -  getLastErrorpublic java.lang.String getLastError(IntHolder p_msgcode) throws XPRSexception Returns the last error encountered during a call to the Xpress global environment.- Parameters:
- 
          p_msgcode- Memory location in which the error code will be returned. Can be null if not required.
- Returns:
- The requested information.
- Throws:
- 
          XPRSexception
 
 -  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 Query whether the current application is allowed to use the Insight Compute interface.- Returns:
- 
          Value will equal 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
 
 -  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
 
 -  removeMsgHandlerListener@Deprecated public void removeMsgHandlerListener() throws XPRSexceptionDeprecated.Removes 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-2024 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.
 
