Hi Im running AMPL on a mac and Im trying to solve an LP model using AMPL. I keep running to this error constantly where it says: "d is not a param (or var or constraint or objective)
context: param >>> d <<< := "
My line of code for the data mod is:
param d:=
1 30
2 15
3 15
4 25
5 33
6 40
7 45
8 45
9 26
10 14
11 25
12 30;
and the other code for LP model:
var X{1..12} >= 0;
var Y{1..12} >= 0;
var Z{1..12} >= 0;
param d{1..12};
minimize cost: sum{t in 1..12} (32*X[t] + 40*Y[t] + 5*Z[t]);
subj to constraint1{t in 1..12}:
X[t] <= 30;
subj to constraint2{t in 1..12}:
Y[t] <= 15;
subj to constraint3{t in 1..12}:
Z[t-1] + X[t] + Y[t] = d[t] + Z[t];
subj to constraint5:
Y[0] = 2;
Please help.