Error expected ;

4 views
Skip to first unread message

birajpa...@u.northwestern.edu

unread,
Nov 14, 2017, 11:28:59 PM11/14/17
to AMPL Modeling Language
I can't get rid of this error. Here is my data file:

set P := 1 2 3 4 5 6 7 8 9 10;

param M:=
1 10000
2 10000
3 10000
4 10000
5 10000
6 10000
7 10000
8 10000
9 10000
10 10000;

param e:= 
1 45
2 30
3 120
4 100
5 90
6 75
7 140
8 145
9 130
10 110;

param t:=
1 75
2 65
3 160
4 125
5 120
6 110
7 200
8 180
9 175
10 150;

param l:=
1 150
2 150
3 220
4 200
5 180
6 190
7 275
8 250
9 260
10 225;

# early penalty
param a:=
1 25
2 25
3 45
4 50
5 40
6 40
7 50
8 45
9 50
10 35;

#late penalty
param b := 
1 50
2 50
3 70
4 75
5 90
6 100
7 85
8 65
9 65
10 60;

param s: 1 2 3 4 5 6 7 8 9 :=
     1 0 5 10 8 4 7 10 6 10
     2 5 0 15 15 10 8 10 15 10
     3 10 15 0 10 5 15 15 7 15
     4 8 15 10 0 7 10 8 8 8
5 4 10 5 7 0 10 15 10 15
6 7 8 15 10 10 0 6 10 6
7 10 10 15 8 15 6 0 10 10
8 6 15 7 8 10 10 10 0 8
9 10 10 15 8 15 6 10 8 0
10  7 15 10 10 8 9 8 10 7;

It gives the error after the M parameter, but I have a semicolon there.

Robert Fourer

unread,
Nov 15, 2017, 12:58:25 AM11/15/17
to am...@googlegroups.com
Did you define "param M;" in your model? In that case your data statement should give just one value for M, and the expected semicolon is after the "1" in the second line.

If it's some other situation then try posting also your model, as the error may be some other mismatch between model and data.

Bob Fourer
am...@googlegroups.com

=======

From: am...@googlegroups.com [mailto:am...@googlegroups.com] On Behalf Of birajpa...@u.northwestern.edu
Sent: Tuesday, November 14, 2017 10:02 PM
To: AMPL Modeling Language
Subject: [AMPL 15112] Error expected ;

I can't get rid of this error. Here is my data file:

set P := 1 2 3 4 5 6 7 8 9 10;

param M:=
1 10000
2 10000
3 10000
4 10000
5 10000
6 10000
7 10000
8 10000
9 10000
10 10000;

.......
Reply all
Reply to author
Forward
0 new messages