LSVersion Class¶
-
class
localsolver.LSVersion¶ Version, license and copyright info.
Summary¶
major_version_number |
Major version number. |
minor_version_number |
Minor version number. |
build_date |
Build date. |
platform |
Platform of the LocalSolver binary. |
version |
Version as string. |
version_code |
Version code. |
copyright |
LocalSolver’s copyright. |
info |
Version and copyright info. |
license_path |
License path. |
license_content |
License content. |
get_major_version_number |
Returns LocalSolver’s major version number. |
get_minor_version_number |
Returns LocalSolver’s minor version number. |
get_build_date |
Returns LocalSolver’s build date. |
get_platform |
Returns the platform of the LocalSolver’s binary as a string. |
get_version |
Returns LocalSolver’s version as a string. |
get_version_code |
Returns LocalSolver’s version code as an integer in the range [0, 29999]. |
get_copyright |
Returns LocalSolver’s copyright as a string. |
get_info |
Returns version and copyright info as a string. |
get_license_path |
Returns the license path of LocalSolver. |
set_license_path |
Change the license path used by LocalSolver. |
get_license_content |
Returns the license content previously set with set_license_content(). |
set_license_content |
Change the license content. |
Instance methods¶
-
LSVersion.get_major_version_number()¶ Returns LocalSolver’s major version number. This number is an integer in the range
[0, 2999].You can also use the shortcut member
major_version_numberReturns: Major version number. Return type: int
-
LSVersion.get_minor_version_number()¶ Returns LocalSolver’s minor version number. This number is an integer in the range
[0, 9].You can also use the shortcut member
minor_version_numberReturns: Minor version number. Return type: int
-
LSVersion.get_build_date()¶ Returns LocalSolver’s build date. This number is an integer
YYYYMMDDwithYYYYthe year,MMthe month,DDthe day.You can also use the shortcut member
build_dateReturns: Build date Return type: int
-
LSVersion.get_platform()¶ Returns the platform of the LocalSolver’s binary as a string. The format of the string is
PPPPXXwherePPPPis the platform (Win, Linux or MacOS) andXXis the architecture (32 or 64 bits).You can also use the shortcut member
platformReturns: Platform as string. Return type: strSince: 3.0
-
LSVersion.get_version()¶ Returns LocalSolver’s 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.You can also use the shortcut member
versionReturns: Version as string MA.MI.YYYYMMDD-PPPPXX.Return type: str
-
LSVersion.get_version_code()¶ Returns LocalSolver’s 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.You can also use the shortcut member
version_codeReturns: Version code. Return type: int
-
LSVersion.get_copyright()¶ Returns LocalSolver’s copyright as a string.
You can also use the shortcut member
copyrightReturns: Copyright notice. Return type: str
-
LSVersion.get_info()¶ Returns version and copyright info as a string.
You can also use the shortcut member
infoReturns: Version and copyright info. Return type: str
-
LSVersion.get_license_path()¶ Returns the license path of LocalSolver. By default, LocalSolver looks for a license in the following locations, in that order:
- A file specified by a call to
set_license_path(). - The
LS_LICENSE_PATHenvironment variable. - A
license.datfile in the current directory. - In the default location (
c:\localsolver_X_Y\license.daton Windows,/opt/localsolver_X_Y/license.daton Linux and Mac OS).
For windows users: If you used the installer to setup LocalSolver, the
LS_LICENSE_PATHenvironment variable is already defined and points to the license file present in the installation folder.You can also use the shortcut member
license_pathReturns: Path to the license Return type: strSince: 3.0 - A file specified by a call to
-
LSVersion.set_license_path(path)¶ Change the license path used by LocalSolver.
You can also use the shortcut member
license_pathParameters: path ( str) – New path for the licenseSince: 3.0
-
LSVersion.get_license_content()¶ Returns the license content previously set with
set_license_content().You can also use the shortcut member
license_contentReturns: The content of the license or an empty string if the content was not set. Return type: strSince: 5.0
-
LSVersion.set_license_content(content)¶ Change the license content. By default, LocalSolver try to get the license from the path specified in set_license_path or in a default location. Use this function to set the license content directly, without using a file.
You can also use the shortcut member
license_contentParameters: content ( str) – Content of the license to use.Since: 5.0
Instance attributes¶
All get/set methods have their attribute counterpart. You can use them as
shortcuts to improve the readability or your models and codes.
-
LSVersion.major_version_number¶ Major version number. This attribute is read-only. It is a shortcut for
get_major_version_number().
-
LSVersion.minor_version_number¶ Minor version number. This attribute is read-only. It is a shortcut for
get_minor_version_number().
-
LSVersion.build_date¶ Build date. This attribute is read-only. It is a shortcut for
get_build_date().
-
LSVersion.platform¶ Platform of the LocalSolver binary. This attribute is read-only. It is a shortcut for
get_platform().
-
LSVersion.version¶ Version as string. This attribute is read-only. It is a shortcut for
get_version().
-
LSVersion.version_code¶ Version code. This attribute is read-only. It is a shortcut for
get_version_code().
-
LSVersion.copyright¶ LocalSolver’s copyright. This attribute is read-only. It is a shortcut for
get_copyright().
-
LSVersion.info¶ Version and copyright info. This attribute is read-only. It is a shortcut for
get_info().
-
LSVersion.license_path¶ License path. It is a shortcut for
get_license_path()andset_license_path().
-
LSVersion.license_content¶ License content. It is a shortcut for
get_license_content()andset_license_content().