Installation on Linux¶
Here are described the main steps for installing and licensing LocalSolver on your computer. LocalSolver is implemented in C++ language. The software can be used either as a standalone executable or as a callable library (C++, Java, Python). Please check that your computer meets the minimum system requirements before installing the software.
System requirements¶
- Architectures: x86, x64. Note that x64 version offers full 64-bit capabilities.
- Operating systems: Linux with libc 2.3.2 (or superior) and libstdc++ 3.4.9 (or superior).
- For the C++ library: GCC 4.4 (or superior).
- For the Java library: Java Development Kit 5.0 with J2SE Runtime Environment 5.0 (or superior).
- For the .NET library: Mono 2.6 (or superior).
- For the Python library: Python 3.2 or Python 2.7.
Installation¶
You must have root privileges on your computer to setup LocalSolver. LocalSolver will be installed for all users. Then, install LocalSolver in 2 steps:
- Open a terminal as root where the archive
LocalSolver_XXXX.run
is located. - Execute the following command line: bash
LocalSolver_XXXX.run
LocalSolver is installed in your /opt
directory.
You can install different versions of LocalSolver on your system but only the
last installed version will be easily accessible from the command line.
To use the previous ones, you have to use their exact path
(eg. /opt/localsolver_4_5/bin/localsolver
). Furthermore, you will experience
troubles if you try to use the native C library without modifying environment
variables such as LD_LIBRARY_PATH
.
Licensing for a desktop, academic, server or trial license¶
In your LocalSolver directory a license.dat file is provided for a size-limited
usage of LocalSolver (at most 100 decisions). If you bought a commercial license
or obtained an academic license, your must replace this license.dat
by your
own license file available on your account.
- Go to your account and download your license file.
- Replace the
license.dat
file in/opt/localsolver_XXX/
by the downloaded file from your account.
Licensing for a floating license or academic network license¶
This procedure applies only if you bought a floating or an academic network licence. For other licences, please consult the dedicated part.
You have to setup a token server and then license each client machine as follows.
For the token server¶
- Go to your account and download the license file of the token server.
- Replace the “license.dat” file in
/opt/localsolver_XXX/
by your server license file downloaded from your account. - Open a terminal and launch the executable “lstokenserver”. Note that this program is launched in background and will keep running until the machine is shut down. You can safely close your terminal.
If you want to start automatically the token server when the machine is rebooted you have to create a init script. You could also add the following line in /etc/rc.local:
/opt/localsolver_XXX/bin/lstokenserver
For each client machine¶
Create a new file and write the following line with the IP of the token server:
TOKEN_SERVER = <HOST NAME OR IP ADDRESS OF THE TOKEN SERVER>
Save it in /opt/localsolver_XXX/license.dat
.
Note
Port 7462 must be open (and allowed by the firewall) on both client and server.
Testing¶
Open a terminal in folder /opt/localsolver_XXX/
and enter the following line:
$ localsolver examples/toy/toy.lsp lsTimeLimit=1
If no error occurs, you are ready to use LocalSolver and solve your first model.
Uninstall LocalSolver¶
You must have root privileges on your computer to uninstall LocalSolver. Then, uninstall LocalSolver in 2 steps:
- Open a terminal as root and go in
/opt/localsolver_XXX/
- Execute the following command line:
bash uninstall.sh