help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] Help: How to build MIP model


From: Raniere Silva
Subject: Re: [Help-glpk] Help: How to build MIP model
Date: Fri, 4 Jan 2013 08:53:01 -0200
User-agent: Mutt/1.5.21 (2010-09-15)

Hi Luca,

> The problem is as follows:
> 
> minimize { sum[from i=1 to 96] of {c1*x1(i)+c2*x2(i)+c3*x3(i)} } 
> with this constraints:
> x1(i)+x2(i)+x3(i)=c4(i)
> x1(i)+x3(i)=c5
> x1>=5 
> 0<=x2<=1 binary 
> 0<=x3<=1 binary
> 
> where x1, x2, x3 and c4 are vectors of 96 elements. c1,c2,c3,c5 are
> contants.
> 
> someone could write the corresponding model?
> I am using the language c and visual studio as a compiler.

Did you take a look at the brief example [1]? If you are having problem
with the C API maybe
https://github.com/r-gaia-cs/glpk_bindings/blob/master/c/assign.c you
help you.

If you need only to solve the problem and know the solution it will be
easy if you use the gmpl [2]. Take a look at the attached.

Raniere

[1] GNU Linear Programming Kit Reference Manual, Andrew Makhorin. Pag. 14.
[2] Modeling Language GNU MathProg Language Reference, Andrew Makhorin.

Attachment: sample.m
Description: Text document


reply via email to

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