My sincere thanks to you all!=)
Your help has been very important.
bye, "ciao"
--
View this message in context:
http://old.nabble.com/Help%3A-How-to-build-MIP-model-tp34858053p34859455.html
Sent from the Gnu - GLPK - Help mailing list archive at Nabble.com.
__
Jeffrey,
> Maybe I'm missing something, but shouldn't there be a call to mip solver
> somewhere in your code?
Yes, you right. Sorry about the mistake.
Briefly, just replace `glp_simplex` in line 81 by `glp_intopt`.
Raniere
___
Help-glpk mailing list
Raniere,
Maybe I'm missing something, but shouldn't there be a call to mip solver
somewhere in your code?
Jeff
On Fri, Jan 4, 2013 at 9:47 AM, Raniere Silva wrote:
> Luca,
>
> > First, thanks to all. Jeff you're right. I misspelled my problem. The
> problem
> > is:
> >
> > minimize { sum[from
Luca,
> First, thanks to all. Jeff you're right. I misspelled my problem. The problem
> is:
>
> minimize { sum[from i=1 to 96] of {c1*x1(i)+c2*x2+c3*x3(i)} }
> with this constraints:
> x1(i)+x2+x3(i)=c4(i)
> x1(i)+x3(i)=c5
> x1(i)>=5
> 0<=x3(i)<=100
> 0<=x2<=1 binary
>
> where x1, x3 and c4 a
You still have reason Jeff. I'm sorry... :-(I've probably done something
wrong in the modeling phase of the problem.
I have another problem.
Is as follows:
minimize { sum[from i=1 to 96] 0,1*x1(i)+0,2*x2(i)+0,3*x3(i)+40*x4(i) }
constraints:
x1(i)+x2(i)+x3(i)=c(i)
sum[from i=1 to 96] x4(i)=10
Hi Lucas,
This version of the problem also has issues. Subtracting the second
equality constraint from the first leaves
x2 = c4(i)-c5
so without going further, this problem wouldn't have a feasible solution
unless all c4(i) are equal. Since x2 is binary, even then you'd need
either c4(i) = c5 o
First, thanks to all. Jeff you're right. I misspelled my problem. The problem
is:
minimize { sum[from i=1 to 96] of {c1*x1(i)+c2*x2+c3*x3(i)} }
with this constraints:
x1(i)+x2+x3(i)=c4(i)
x1(i)+x3(i)=c5
x1(i)>=5
0<=x3(i)<=100
0<=x2<=1 binary
where x1, x3 and c4 are vectors of 96 elements. c1,
Hi Luca,
This problem can be solved by inspection. You were given
> 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 elemen
Hi Raniere Silva.
Thank you so much for your help.
I need to build the model with the c language without using the mathprog and
standalone solver.
an example of code to resolve a minimization problem that I have is as
follows:
/* provaglpk.c */
#include
#include
#include
int main(void)
{
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
>
Hello everyone!I 'm new to the forum! I recently started using GNU glpk. I
have problems in the construction of the MIP model .
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<
11 matches
Mail list logo