GLPK Delphi Interface (English)

October 17th, 2009 Leave a comment Go to comments

We have received a job in my master degree to produce a solution for the Nurse Scheduling problem.

The GLPK (GNU Linear Programming Kit) is one of the many library we can use to solve this type of problem. I have searched for a interface for the Delphi Language and found the DELI interface, who was made in 2003. But I can’t find updates from that time for now. Furthermore, the DELI interface don’t map all the functions I need. I found posts on the web who said the DELI interface would be included in the GLPK official distribution. At this time, I can’t see it in the distribution.

For these reasons, I have converted the glpk.h file, creating a new Delphi Interface for GLPK. You can get it in the link bellow.

You need add the unit glpk.pas in your project and distribute the file glpk.dll for start using and distributing the GLPK software.

You can get glpk.dll from the gnuwin32 project. But the DLL distributed is for GLPK version 4.34, and it needs another dlls: libltdl3.dll e zlib1.dll.

The version 4.39 build with Visual Studio don’t have these dependencies. So, I build the version 4.39 in the Visual Studio and distributed it together. The sources were downloaded from the GNU foundation web site. You can do the same, if you need.

The sources have a small sample, loading a MathProg model and showing the solution.

Download here the GLPK Interface for Delphi

  1. No comments yet.
  1. No trackbacks yet.