[Help-glpk] Transforming a Piecewise Linear Functions in a Convex Predicate

2009-05-11 Thread Simone Atzeni
Hi, I need to transform a Piecewise Linear Functions in a Convex Predicate. In attachment there is a tex file with the function and my transformation in a convex predicate. Using that convex predicate in a milp, the milp does not found solution. So in attachment there is my .c file with

Re: [Help-glpk] how to defne an array (something like pointer to pointer in C)

2009-05-11 Thread xypron
Hello Maryam, you could use the following formulation set N; set E{n in N}; display E; data; set N:= A B C D E; set E[A]:= A AB; set E[B]:= AB BC; set E[C]:= BC CD; set E[D]:= CD DE; set E[E]:= DE; end; If you have large data sets consider using the table statement described in doc\tables.pdf

Re: [Help-glpk] how to defne an array (something like pointer to pointer in C)

2009-05-11 Thread Andrew Makhorin
I am new to glpk and MathProg. I am trying to model a problem in glpk and solve it. The problem is that I don’t know how should I define the following : We have E[i] for each i that is member of N : N is a set that contains A B C D E, So, we have E[A], E[B], E[C], E[D], E[E] The value for