Scilab Function
Last update : 11/02/2007

glpk - GLPK interface

Calling Sequence

[xopt,fmin,status,extra] = glpk(c,a,b,lb,ub,ctype,vartype,sense,param)

Parameters

Description

Solve an LP/MILP problem using the GNU GLPK library. Given three arguments, glpk solves the following standard LP:

min C'*x subject to A*x <= b

but may also solve problems of the form

[ min | max ] C'*x subject to A*x [ "=" | "<=" | ">=" ] b x >= LB x <= UB

Examples

    c = [10, 6, 4]';
    a = [ 1, 1, 1;
         10, 4, 5;
          2, 2, 6];
    b = [100, 600, 300]';
    lb = [0, 0, 0]';
    ub = [];
    ctype = "UUU";
    vartype = "CCC";
    s = -1;

    param.msglev = 1;
    param.itlim = 100;

    [xmin, fmin, status, extra] = glpk (c, a, b, lb, ub, ctype, vartype, s, param);
    

Authors

Nicolo Giorgetti Nicolo Giorgetti