======================================================================= QUICK INSTALLATION GUIDE OF LPL ======================================================================= FILE: README.TXT ::Read carefully:: First Instructions for LPL users LPL Version 7.11 ---- 04 Mar 2025 ---- https://matmod.ch ======================================================================= LPL (Logical Programming Language) is a mathematical modeling language to formulate linear, logical and non-linear mathematical models. ======================================================================= Contents: ********* (1) Installing LPL (2) Unistall LPL (3) Test the LPL installation (4) Install a solver (5) If something went wrong (6) The different LPL Software Packages (7) The files in the Packages (8) License and Warrants (9) Acknowledgements (1) Installing LPL *********************************************************************** 1. Download LPL from: matmod.ch/papers.html#sect04. 2. The downloaded file is called "install-lpl.exe". 3. Double-click the file install-lpl.exe. Follow the instructions. This will - create a folder (by default c:\lpl) and put all files there. - creates a shortcut on the desktop: "LPL". 4. That's it ! 5. Double-Click the shortcut "LPL" to start LPL. 6. Click the buttom "Use Free Package" (to use the free software). 7. Choose on the Menubar: <> to quit the program again. -- for more information on installing, read the "Installation Guide".-- (2) Uninstalling LPL *********************************************************************** 1. Go to the folder where LPL is installed (default is c:\lpl). 2. Double-Click the file : Uninstall.exe. Follow the instructions. Everything will be removed, even the shortcut on the desktop. --- nothing will be left on your computer --- (3) Test the LPL installation *********************************************************************** 1. Double-Click the shortcut "LPL" on the desktop to start LPL. 2. Click "Use Free Package" (if no license was installed). 3. Choose on the Menubar: <> 4. Choose the file "alloy.lpl" in the folder list. (The model alloy.lpl was already opened automatically before) 5. Choose on the Menubar: <> (or press key F9). 6. The model runs and the output is something like the following : cost 86400.00 AMOUNT{o} ore1 ore2 ore3 ore4 800.00 1200.00 2000.00 800.00 7. If the output is not what mentioned above, then the solver was not correctly configured. Then see (4) below; "Install the Solver" (4) Install a Solver *********************************************************************** LPL comes with an integrated LP solver to solve small, simple models. It is normally pre-installed in the downloaded package. If a run does not output as described in (3) and the alloy.lpl was not solved, proceed as follows: 1. Open the file lplcfg.lpl 2. Within the file look for "SetSolver(lplSol);" 3. If the line begins with "--" , remove the two dashes ("--") at the beginning of that line. 4. Make sure that ALL lines follow that one line begin with "--" 5. Save the modified file lplcfg.lpl If you need to solve large, discrete or non-linear models then you need a free or commercial solver (CBC, Gurobi, etc.). LPL can communicate well with many free and commercial solvers. There are links to several free and commercial solvers at the https://matmod.ch/papers.html#sect04 The simplest is to try the free solver CBC or glpk. Proceed as follows (for CBC): 1. Download the solver from https://matmod.ch/papers.html#sect04 click "cbc" which downloads "install-cbc.exe" 2. Install it, make sure that it is in the same directory as LPL [ or set a path in lplcfg.lpl to it (using the SetPaths()). ] 3. Open the file lplcfg.lpl 4. Within the file look for "--SetSolver(cbcSol);" 5. Remove the two dashes ("--") at the beginning of that line. 6. Make sure that ALL lines follow that one begin with "--" 7. Save the modified file lplcfg.lpl If you need to execute another commerial solver (for example Gurobi): 1. Install the solver (see documentation from the solver provider) 2. Open the file lplcfg.lpl 4. Within the file look for "--SetSolver(gurobiLSol);" 5. Remove the two dashes ("--") at the beginning of the line. 6. Make sure that ALL lines follow that one begin with "--" 7. Save the modified file lplcfg.lpl 8. Check the version: go to the line "string parameter gurobiLSol..." Check if the path to the solver is correct: "lib:C/:..." Test the Internet Solver (only for paid Packages): 1. Open the file lplcfg.lpl 2. Remove the two dashes at the line "SetSolver(InterSol);" 3. Make sure that ALL lines follow that one begin with "--" 4. Save the file lplcfg.lpl 5. Run the model alloy.lpl (as above) (the model is solved remotely) (6) If something went wrong *********************************************************************** LPL did not find a file: Make sure that everything is in the same folder or edit carefully the instruction "SetPaths('....')" in the file lplcfg.lpl. Please note that '\\' means '\' in a file path or use '/' as an alternative. Add an environment variable LPLPATH as described in the Ref. Manual. The solver did not work: Be sure that the corresponding solver was correctly installed and you have installed eventually a solver license. Be sure to install the 64bit solver form 64bit LPL, or else 32bit. Be sure to add the path to the solver at the "SetPaths('...');" within the file lplcfg.lpl. Be sure that the last "SetSolver(...)" in file lplcfg.lpl points to the corresponding solver you want. If the solver is not defined in lplcfg.lpl then you need to define it yourself. This is more involving: read the Reference Manual. (7) The different LPL Software Packages *********************************************************************** The full LPL modeling software comes in one single compressed file: lpl-install.exe The downloaded version does not include a license file, and is called the "Free Package". Install a Academic License free of charge as prompted at the initial screen of lplw.exe. One can also buy an upgrade to get an "Academic Package" "Professional Package" "Enterprise Package" Contact the author: tony.huerlimann@unifr.ch (8) The files in the Packages *********************************************************************** files/folders comment --------------------------------------------------------------------- README.TXT this file update.txt the update log for LPL versions license-free.txt the licence text for Free Package license.txt the licence text for the other packages lplmsg.txt the LPL compiler error messages file manual.pdf LPL Reference Manual user.pdf LPLW User Manual install.pdf Installation Guide lpl.pdf Product Description Guide lplw.exe The main LPL software for model environment lplc.exe The console compiler of the LPL lpls.exe The console version of the LPL server compareEQU.exe An EQU-file comparing tool Uninstall-lpl.exe Unistall lpl completely from the harddisk lpldb.dll Needed for database & report connectivity of LPL lpldb1.dll SQLlite database & report connectivity of LPL lplint.dll Needed for connecting to the Internet Solver lpl.dll A complete library (dynamic link library) of LPL lplj.dll same as lpl.dll, for JNI Java direct access alloy.lpl A test LPL-model (automatically loaded) lplcfg.lpl A LPL config file (defines pre-installed solvers) lpl.ini An initialization file (pre-define LPL parameters) lpl.tex A LaTeX macro file for the LaTeX-PDF generation (pdflatex) lpl-html.tex A LaTeX macro file for the LaTeX-HTML generation (htlatex) htlatex.cfg Configurations for the LaTeX-HTML generation access.mdb A blank Access2000 database (used to generate DBs) excel.xls A blank Excel (used to generate a new xls-file) gurobi.prm The solver interface parameter file to gurobi cplex.prm The solver interface parameter file to Cplex xpress.prm The solver interface parameter file to Xpress lindo.prm The solver interface parameter file to Lindo knitro.prm The solver interface parameter file to Knitro modeldoc.bat Batch job to generate the model docs in PDF modeldoc-h.bat Batch job to generate the model docs in HTML svg2pdf.bat Batch job to translate graphic svg to pdg file. svg2png.bat Batch job to translate graphic svg to png file. javaexam.zip Full java-to-LPL interface example \tutor Subfolder with many tutor examples \textbooks Subfolder with many (small) model examples from textbooks \x32 Subfolder with the 32bit executables of LPL (9) License and Warrants **************************************************************************** By installing or using any Package of LPL you must agree to the license text written in the license file: license.txt and license-free.txt (A) Acknowledgements **************************************************************************** The first version of LPL was created in 1987 for larger projects at the Department of Informatics (DIUF) at the University of Fribourg, Switzerland. LPL grew over time and was permanently supported using the infrastructure of the mentioned Department and over 4 years (1997-2001) financed by the Swiss National Science Foundation (project no. 12-55989.98). AUTHOR: Tony Huerlimann tony@matmod.ch --end of document