help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] Is there anyway to use mod file in glpkmex


From: Nicolo Giorgetti
Subject: Re: [Help-glpk] Is there anyway to use mod file in glpkmex
Date: Tue, 23 Oct 2007 08:18:59 +0200

For time being there is no possibility to load a *.mod file (or any other model type defined by glpk) through glpkmex. You should define the problem matrices by hand.
 
Best regards,
Nicolo Giorgetti

 
On 10/23/07, Koo Wonyong <address@hidden> wrote:
dear all
I have some problem with glpkmex.

I had made model file(*.mod) and run it using glpsol.exe in console mode.
Now I would try it using glpkmex in matlab,
but I have no idea to convert mod file which I had written to glpkmex
format.

---mod file---
param nr;
param nc;
param bai;

set RA := 1..nc;
set R := 1..nc-1;
set C := 1..nr;
set X1 := 1..nc-4;
set X2 := nc-3..nc-1;
set X3 := nc-0..nc-1;
set X4 := nc-0..nc-1;


param x{C, RA};

var a1{X1} >= 0;
var a2{X2} <= 0;
var a3{X3} >= 0;
var a4{X4} <= 0;
var b;
var s{C} >= 0;
var zmin >= 0;
var zmax;

minimize debiation: sum{i in C}s[i];
s.t. abs1{i in C}: sum{j in X1}a1[j]*x[i, j]+sum{k in X2}a2[k]*x[i,
k]+sum{l in X3}a3[l]*x[i, l]+sum{m in X4}a4[m]*x[i, m]+ b - x[i, nc] <=
s[i];
s.t. abs2{i in C}: sum{j in X1}a1[j]*x[i, j]+sum{k in X2}a2[k]*x[i,
k]+sum{l in X3}a3[l]*x[i, l]+sum{m in X4}a4[m]*x[i, m]+ b - x[i, nc] >=
-s[i];
s.t. amin1{ o in X3}: a3[o] >= zmin;
s.t. amin2{ p in X4}: a4[p] >= zmin;
s.t. amax1{o in X3}: a3[o] <= zmax;
s.t. amax2{p in X4}: a4[p] <= zmax;
s.t. zz: zmax <= zmin * bai;
------------------------------------------------------------------

Is there anyway using this mod file with glpkmex in matlab ?


Any assistance would be much appreciated.




_______________________________________________
Help-glpk mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/help-glpk


reply via email to

[Prev in Thread] Current Thread [Next in Thread]