Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
README.md | 2015-09-25 | 3.5 kB | |
libglpk-cli-1.0.0.tar.gz | 2015-09-25 | 458.5 kB | |
Totals: 2 Items | 462.0 kB | 0 |
GLPK for C# and the Common Language Infrastructure (CLI)
The GNU Linear Programming Kit (GLPK) package supplies a solver for large scale linear programming (LP) and mixed integer programming (MIP). The GLPK for C# and the Common Language Infrastructure (CLI) package provides a language binding that can be used with C# and other CLI supported languages like F#.
The project homepage is http://glpk-cli.sourceforge.net.
GLPK for C#/CLI provides a common language interface binding for the GLPK linear programming library. It allows you to use the Gnu Linear Programming Kit with all .NET/Mono languages (C#, F#, Python, J#, Scala, Visual Basic, ...).
Makefiles for Windows and Linux are provided.
To report problems and suggestions concerning GLPK for C#/CLI, please, send an email to the author at xypron.glpk@gmx.de.
The GNU Linear Programming Kit (GLPK) supplies a solver for large scale linear programming (LP) and mixed integer programming (MIP). The GLPK project is hosted at http://www.gnu.org/software/glpk.
It has two mailing lists:
To subscribe to one of these lists, please, send an empty mail with a Subject: header line of just "subscribe" to the list.
GLPK provides a library written in C and a standalone solver.
The source code provided at ftp://gnu.ftp.org/gnu/glpk/ contains the documentation of the library in file doc/glpk.pdf. This should be your first reference for the usage of the library.
Obtaining the source
The latest release of "GLPK for C#/CLI" is available at http://sourceforge.net/projects/glpk-cli/
You can download the latest development version from the git repository with
git clone https://github.com/xypron/glpk-cli.git
or view it the repository at https://github.com/xypron/glpk-cli/.
Building from source
Linux
To build the package on Linux execute the following commands.
./autogen.sh
./configure
make
make check
sudo make install
For building and running your own application you will need to the following files
- /usr/local/lib/libglpk.so - the GLPK native library
- /usr/local/lib/glpk-cli/libglpk-cli.so - the GLPK for C#/CLI native library
- /usr/local/lib/glpk-cli/libglpk-cli.dll - the GLPK for C#/CLI assembly
You will probably want to add /usr/local/lib/glpk-cli to the MONO_PATH and the LD_LIBRARY_PATH environment variables.
The following example shows how to compile an application version.exe which writes the GLPK version number to the console.
export MONO_PATH=/usr/local/lib/glpk-cli
export LD_LIBRARY_PATH=/usr/local/lib/glpk-cli
cat > version.cs << EOF
using System;
using org.gnu.glpk;
class Program
{
static void Main(string[] args)
{
Console.WriteLine("GLPK " + GLPK.glp_version());
}
}
EOF
mcs -r:libglpk-cli -lib:/usr/local/lib/glpk-cli/ version.cs
./version.exe
Windows
To build the package on Windows:
- Copy file glpk.h to new directory src.
- Copy files glpk_?_??.* to directory w64.
- Cd to directory w64.
- Verify the paths in Build_CLI.bat.
- Execute Build_CLI.bat
For building and running your own application you will need the following files from the w64 directory:
- glpk_?_??.dll - the GLPK native library
- libglpk_cli_native.dll - the GLPK for C#/CLI native library
- libglpk_cli.dll - the GLPK for C#/CLI assembly
Open issues
- Incomplete documentation
- Missing support for network optimization
Revision history
1.0.0 - 2015-09-26 * initial release