- Download lpsolve for 64-bit Windows.
(For 32-bit Windows: Download lpsolve for 32-bit Windows.
I'll assume you download things to your Downloads folder.
- Go to your Downloads folder.
You should see a file with a name like
lp_solve_5.5.2.11_exe_win64
This is a compressed (zipped) file containing lpsolve.
Double-click on this file to uncompress this file into the Downloads folder
- Click Start, type cmd and hit enter to open a command line window.
- In the command line window, change the directory to the Downloads using the following commands:
cd Downloads
cd lp_solve_5.5.2.11_exe_win64
- Now you are in the directory with the executable lpsolve: if you list the files in the directory
with the dir command, you will see the file lp_solve.exe here.
-
You will need a text
file containing an LP to try out lpsolve.
Download this example lp file, test.lp,
and put it in the same directory as lp_solve.
- On the command line, enter the command
lp_solve test.lp
and lpsolve will run and produce this output:
Value of objective function: 4.61764706
Actual values of the variables:
x 3.58824
y 1.02941
If you see this output, congratulations! You have successfully installed and run lpsolve.
- You can move the file lp_solve.exe to any directory you like. Note that it needs to be in the same folder
as your LP file in order for the command
lp_solve myfile.lp
to work.