Installing GLPK (GNU Linear Programming Kit) on Windows

情到浓时终转凉″ 提交于 2021-01-28 04:02:18

问题


This could be an annoying question. But I was hoping someone could provide me with step by step instructions on how to get GLPK up and running on a Windows machine. I have Windows 7 64-bit.

I have tried looking at some instructions on various websites but keep running into problems. I am not very versed in creating directories, working with binaries (e.g. what is a binary), etc.... Even running commands is a little foreign to me.

To get an idea of what kind of detail I need in the instructions, here are some I have tried (and failed) to use:

http://winglpk.sourceforge.net/

http://en.wikibooks.org/wiki/GLPK/Windows

As you can see, I need something fairly detailed. I have read an example of a GLPK program in action, and I believe that once I get the program up and running I should be able to write the code to use it.

Can anyone help me? I would be so grateful.

EDIT: As a parallel question, I would also be interested in suggestions for other programs that will do the similar things as GLPK, but are more straightforward to install and use.


回答1:


Here are a few suggestions to get you moving forward:

  1. If you are having difficulty with running Windows command-line, then maybe GLPK (installing by yourself) is not the best bet.
    • See if you can find someone more experienced in Windows help you with the installation? (Once installed the LP modules are fairly easy to use, no more complex than any of the others)
    • Do you have access to any commercial solvers? (MATLAB and CPLEX can be great)
    • If you are going to be working with Windows for some time to come, it is a good idea to invest some time to learn how to download and install software
  2. This SO question has links to lots of other LP/IP solvers such as Gurobi and COIN-OR.
  3. If you don't mind learning a bit of R programming language, I'd recommend downloading R and RStudio, both of which are straightforward. Next, what you want is the lpSolveAPI package. The examples are decent and you can get going in a day or two. (You'll have to learn the basics of R)

If none of these help you progress, post some details of where you are getting stuck in the GLPK download (post the errors you are getting) and someone will try and assist you.

Hope that helps




回答2:


In my opinion, it would be way easier for you to install e.g. ubuntu, especially if you are interested in other GNU programs. You can use every open-source program on windows, but it will not be easy if you don't understand what is a "search path for binaries"...

Installing softwares and libraries on windows is not easy, which is why windows program usually come with a setup.exe installer that does everything for you (but GNU programs don't).

On the other hand, ubuntu has a beginner-friendly documentation, and once you have installed it on your computer (it won't take you more than 2 hours at most, and 10G of disk space), installing GLPK or any GNU program is pretty straigtforward (just type sudo apt-get install glpk on the command-line).

There is no drawback in having the two systems on the same computer (except for the small amount of disk space used), and getting to know another operating system will certainly teach you more than following any step-by-step guide anyway.

That would be my "general advice". Now if you just want help on how to install glpk on windows, please post more details about what "doesn't work" for you (where did you "failed" to use those instruction? what happened?) because I don't think you can find something more detailed than the second link you posted.




回答3:


have you set the PATH correctly once you have unziped the files?

To check it, run the cmd.exe and put "echo %path%", if in the list does not appears your glpk folder then you are unnable to execute it right since windows does not find the glpk executables.

more info: http://en.wikibooks.org/wiki/GLPK/Windows_executables

https://superuser.com/questions/284342/what-are-path-and-other-environment-variables-and-how-can-i-set-or-use-them




回答4:


here an easy step-by-step explanation of "how to make glpk work":

To download GLPK , first go to the GLPK windows download page and then follow the instructions here from 1:

  1. Go to control panel to determine whether you have 32-bit or 64-bit Windows (assume 64-bit from now on).
  2. Download the latest version of GLPK, 4.65 at the time of writing, from the following address Sourceforge.
  3. Extract the Zip folder by: right clicking on the folder and then>> 7-Zip >> Extract Here as shown. Move the glpk-4.65 folder from your downloads folder to your C: drive.
  4. Assuming you’re using 64-bit Windows, click on the C:\glpk-4.65 folder in Windows explorer, click on the w64 folder, and select and copy the file path, which should be C:\glpk-4.65\w64.
  5. Search and open your Control Panel, select System and Security>>System>>Advanced system settings>>Environment Variables. Then click on ‘path’ in the top window, click the ‘Edit’ button, then ‘New’.
  6. Paste the file path you copied above and save.

DONE.



来源:https://stackoverflow.com/questions/17513666/installing-glpk-gnu-linear-programming-kit-on-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!