HxVersion Class¶
- class Hexaly.Optimizer.HxVersion¶
Version, license and copyright info.
Summary¶
Returns Hexaly Optimizer major version number. |
|
Returns Hexaly Optimizer minor version number. |
|
Returns Hexaly Optimizer build date. |
|
Returns the platform of the Hexaly Optimizer binary as a string. |
|
Returns Hexaly Optimizer version as a string. |
|
Returns Hexaly Optimizer version code as an integer in the range [0, 29999]. |
|
Returns Hexaly Optimizer copyright as a string. |
|
Returns version and copyright info as a string. |
|
Returns the license path of Hexaly Optimizer. |
|
Change the license path used by Hexaly Optimizer. |
|
Returns the license content previously set with HxVersion.SetLicenseContent or the HX_LICENSE_CONTENT environment variable. |
|
Change the license content. |
Static methods¶
- static int GetMajorVersionNumber()¶
Returns Hexaly Optimizer major version number. This number is an integer in the range [0, 2999].
- Returns:
Major version number.
- Return type:
int
- static int GetMinorVersionNumber()¶
Returns Hexaly Optimizer minor version number. This number is an integer in the range [0, 9].
- Returns:
Minor version number.
- Return type:
int
- static int GetBuildDate()¶
Returns Hexaly Optimizer build date. This number is an integer
YYYYMMDDwithYYYYthe year,MMthe month,DDthe day.- Returns:
Build date.
- Return type:
int
- static int GetPlatform()¶
Returns the platform of the Hexaly Optimizer binary as a string. The format of the string is
PPPPXXwherePPPPis the platform (Win, Linux or MacOS) andXXis the architecture (32 or 64 bits).- Since:
3.0
- Returns:
Platform as string.
- Return type:
string
- static string GetVersion()¶
Returns Hexaly Optimizer version as a string. The format of the string is:
MA.MI.YYYYMMDD-PPPPXXwithMAthe major number version,MIthe minor number version,YYYYthe year,MMthe month,DDthe day,PPPPthe platform (Win, Linux or MacOS) andXXthe architecture (32 or 64 bits)- Returns:
Version as string
MA.MI.YYYYMMDD-PPPPXX- Return type:
string
- static int GetVersionCode()¶
Returns Hexaly Optimizer version code as an integer in the range [0, 29999]. The version code is computed as follows:
MA * 10 + MIwithMAthe major number version,MIthe minor number version. Note that the version code can be encoded as a 16-bit integer.- Returns:
Version code
- Return type:
int
- static string GetCopyright()¶
Returns Hexaly Optimizer copyright as a string.
- Returns:
Copyright notice.
- Return type:
string
- static string GetInfo()¶
Returns version and copyright info as a string.
- Returns:
Version and copyright info.
- Return type:
string
- static string GetLicensePath()¶
Returns the license path of Hexaly Optimizer. By default, Hexaly Optimizer looks for a license in the following locations, in that order:
A file specified by a call to
HxVersion.SetLicensePath(string).The
HX_LICENSE_PATHenvironment variable.The deprecated
LS_LICENSE_PATHenvironment variable.A license.dat file in the current directory.
- In the default global location (
c:\\hexaly\\license.daton Windows,
/opt/hexaly/license.daton Linux and macOS.
- In the default global location (
- In the deprecated LocalSolver global location
(
c:\localsolver\license.daton Windows,/opt/localsolver/license.daton Linux and macOS).
For windows users: If you used the installer to setup Hexaly, the
HX_LICENSE_PATHenvironment variable is already defined and points to the license file present in the installation folder.Note: The license content can also be set directly with
HxVersion.SetLicenseContent(string)or with theHX_LICENSE_CONTENTenvironment variable and this definition will have priority over the license file. The old environment variableLS_LICENSE_CONTENTcan also be used, but its usage is deprecated.- Since:
3.0
- Returns:
Path to the license
- Return type:
string
- See:
- See:
- See:
- static void SetLicensePath(string path)¶
Change the license path used by Hexaly Optimizer.
- Since:
3.0
- Arguments:
path (string) – New path for the license
- See:
- See:
- See:
- static string GetLicenseContent()¶
Returns the license content previously set with
HxVersion.SetLicenseContentor theHX_LICENSE_CONTENTenvironment variable.- Since:
5.0
- Returns:
The content of the license or an empty string if the content was not set.
- Return type:
string
- See:
- See:
- See:
- static void SetLicenseContent(string licenseContent)¶
Change the license content. By default, Hexaly Optimizer tries to get the license content from the
HX_LICENSE_CONTENTenvironment variable or from the file specified inHxVersion.SetLicensePathor in a default location. Use this function to set the license content directly, without using a file.- Since:
5.0
- Arguments:
licenseContent (string) – content of the license to use.
- See:
- See:
- See: