[AMPL 15274] mistake in a table

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[AMPL 15274] mistake in a table

Fernando Dumont
Hi, im having some troubles with the file data, when i try to run it appears an error in the first line of the param Cv.
This is what is asking the program "expected ; . or number" it is for the first row. 
hope you can help me.
Thnks


set producto:= M-G M-P M G P;
set sem:= 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26;

param  Cv (tr):
M-G M-P M G P:=
1 1000 1500 700 300 1900
2 1100 1400 600 400 2000
3 1200 1500 500 300 2100
4 1100 1600 600 200 2000
5 1000 1500 700 300 1900
6 1100 1400 600 400 2000
7 1200 1500 500 300 2100
8 1100 1600 600 200 2000
9 1000 1500 700 300 1900
10 1100 1400 600 400 2000
11 1200 1500 500 300 2100
12 1100 1600 600 200 2000
13 1000 1500 700 300 1900
14 1100 1400 600 400 2000
15 1200 1500 500 300 2100
16 1100 1600 600 200 2000
17 1000 1500 700 300 1900
18 1100 1400 600 400 2000
19 1200 1500 500 300 2100
20 1100 1600 600 200 2000
21 1000 1500 700 300 1900
22 1100 1400 600 400 2000
23 1200 1500 500 300 2100
24 1100 1600 600 200 2000
25 1000 1500 700 300 1900
26 1100 1400 600 400 2000;

expected ; . or number


--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [AMPL 15289] mistake in a table

ptiwari
I tried reading your table and it's working in my end. We suspect that there should be problem in your model file.  I have following statement in my model file to read your data:

set producto;

set sem;

param  Cv{producto,sem};


Are you using similar statement in the model file to read data?


Thanks,

Paras


On Fri, Dec 1, 2017 at 7:54 AM, Fernando Dumont <[hidden email]> wrote:
Hi, im having some troubles with the file data, when i try to run it appears an error in the first line of the param Cv.
This is what is asking the program "expected ; . or number" it is for the first row. 
hope you can help me.
Thnks


set producto:= M-G M-P M G P;
set sem:= 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26;

param  Cv (tr):
M-G M-P M G P:=
1 1000 1500 700 300 1900
2 1100 1400 600 400 2000
3 1200 1500 500 300 2100
4 1100 1600 600 200 2000
5 1000 1500 700 300 1900
6 1100 1400 600 400 2000
7 1200 1500 500 300 2100
8 1100 1600 600 200 2000
9 1000 1500 700 300 1900
10 1100 1400 600 400 2000
11 1200 1500 500 300 2100
12 1100 1600 600 200 2000
13 1000 1500 700 300 1900
14 1100 1400 600 400 2000
15 1200 1500 500 300 2100
16 1100 1600 600 200 2000
17 1000 1500 700 300 1900
18 1100 1400 600 400 2000
19 1200 1500 500 300 2100
20 1100 1600 600 200 2000
21 1000 1500 700 300 1900
22 1100 1400 600 400 2000
23 1200 1500 500 300 2100
24 1100 1600 600 200 2000
25 1000 1500 700 300 1900
26 1100 1400 600 400 2000;

expected ; . or number


--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.