This page is for an old version of Hexaly Optimizer. We recommend that you update your version and read the documentation for the latest stable release.

LSVersion Class

class

Version, license and copyright info.

Public Static Functions

static int localsolver::LSVersion::getMajorVersionNumber()

Returns LocalSolver’s major version number.

This number is an integer in the range [0, 2999].

Return:Major version number.

static int localsolver::LSVersion::getMinorVersionNumber()

Returns LocalSolver’s minor version number.

This number is an integer in the range [0, 9].

Return:Minor version number.

static int localsolver::LSVersion::getBuildDate()

Returns LocalSolver’s build date.

This number is an integer YYYYMMDD with YYYY the year, MM the month, DD the day.

Return:Build date.

static std::string localsolver::LSVersion::getPlatform()

Returns the platform of the LocalSolver’s binary as a string.

The format of the string is PPPPXX where PPPP is the platform (Win, Linux or MacOS) and XX is the architecture (32 or 64 bits).

Return:Platform as string.
Since:3.0

static std::string localsolver::LSVersion::getVersion()

Returns LocalSolver’s version as a string.

The format of the string is: MA.MI.YYYYMMDD-PPPPXX with MA the major number version, MI the minor number version, YYYY the year, MM the month, DD the day, PPPP the platform (Win, Linux or MacOS) and XX the architecture.

Return:Version as string “MA.MI.YYYYMMDD-PPPPXX”.

static int localsolver::LSVersion::getVersionCode()

Returns LocalSolver’s version code as an integer in the range [0, 29999].

The version code is computed as follows: MA * 10 + MI with MA the major number version, MI the minor number version. Note that the version code can be encoded as a 16-bit integer.

Return:Version code.

static std::string localsolver::LSVersion::getCopyright()

Returns LocalSolver’s copyright as a string.

Return:Copyright notice.

static std::string localsolver::LSVersion::getInfo()

Returns version and copyright info as a string.

Return:Version and copyright info.

static std::string localsolver::LSVersion::getLicensePath()

Returns the license path of LocalSolver.

By default, LocalSolver looks for a license file in the following locations, in that order:

  1. A file specified by a call to setLicensePath.
  2. The LS_LICENSE_PATH environment variable.
  3. A license.dat file in the current directory.
  4. In the default location (c:\localsolver_X_Y\license.dat on Windows, /opt/localsolver_X_Y/license.dat on Linux and Mac OS).

For windows users: If you used the installer to setup LocalSolver, the LS_LICENSE_PATH environment variable is already defined and points to the license file present in the installation folder.

Return:Path to the license
See:setLicensePath
See:getLicenseContent
See:setLicenseContent
Since:3.0

static void localsolver::LSVersion::setLicensePath(const std::string &licensePath)

Change the license path used by LocalSolver.

See:getLicensePath
See:setLicenseContent
See:getLicenseContent
Since:3.0
Parameters:licensePath - new path for the license

static std::string localsolver::LSVersion::getLicenseContent()

Returns the license content previously set with setLicenseContent.

See:setLicenseContent
See:getLicensePath
See:setLicensePath
Since:5.0
Return:The content of the license or an empty string if the content was not set.

static void localsolver::LSVersion::setLicenseContent(const std::string &licenseContent)

Change the license content.

By default, LocalSolver tries to get the license from the path specified in setLicensePath or in a default location. Use this function to set the license content directly, without using a file.

See:getLicenseContent
See:setLicensePath
See:getLicensePath
Since:5.0
Parameters:licenseContent - content of the license to use.