[Scip] Define parameters in ZIMPL
Ambros Gleixner
gleixner at zib.de
Fri May 14 20:10:28 MEST 2010
Hi Julio,
you have not defined e2 and y, I suppose they are something like
set e2 := {1..100} cross {1..15};
var y[e2] binary;
Then what you want is probably
param p[<k> in {1..100}] := <1> .1, <2> .2, <3> .3 default 0;
param s[<i,j> in e2] := p[i];
For more details on the syntax and the difference between sets and
parameters you can have a look at the manual:
http://zimpl.zib.de/download/zimpl.pdf. Many cases are explained by
small examples, but there are subtleties which may be confusing. If you
can't find what you need, feel free to ask!
Best,
ambros
Am 14.05.2010 19:32, schrieb Julio Rojas:
> Dear all, I would like to define the matrix of parameters from a set. I have
> tried with the following:
>
> set p := {.1,.2,.3};
> param s[<i,j> in e2] := p[i in {1..card(p)}] default 0;
> maximize sim: sum<i,j> in e2: s[i,j]*y[i,j];
>
> The following message appears:
>
> *** Error 800: File problem.zpl Line 7 : syntax error, unexpected SETSYM
> *** param s[<i,j> in e2] := p[<i> in {1..card(p)}] default 0;
> *** ^^^
>
> Is there a way to do this? Thanks in advance.
> -------------------------------------------------
> Julio Rojas
> jcredberry at gmail.com
>
>
>
>
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> http://listserv.zib.de/mailman/listinfo/scip
--
____________________________________________________________
Ambros M. Gleixner
Zuse Institute Berlin - Matheon - Berlin Mathematical School
http://www.zib.de/gleixner
More information about the Scip
mailing list