[AMPL 1631] Error executing "read_table" command

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[AMPL 1631] Error executing "read_table" command

Jessie-30

I'm having some trouble reading in data files from excel.  Here's a
portion of my code:

param P;     #Number of breaks per day

set TASK = {1..35};     #Number of Maintenance Tasks: (1..35)
set SLOT = {1..365*P};     #Time Slots (to be determined by user
input:
                  # 365*P, where P is the number of time slots per days of
production
set MACH = {1..6}; #number of machines

param l{SLOT} > 0;     #length of particular time slot
param c{TASK, MACH} > 0;   #time required to complete a specific task
on a specific machine

var x{i in TASK,j in SLOT, k in MACH} binary; # equals 1 if task i is
performed during time slot j on machine k
                    # is the binary part formulated right?

maximize schedule:
        sum {i in TASK} (sum{ j in SLOT} (sum{ k in MACH} c[i, k]*x [i, j,
k]));
subject to
time_limits {j in SLOT}:
   sum {i in TASK}(sum{k in MACH} c[i, k]*x[i,j, k]) <= l[j];

The table corresponding to SLOT and c loads properly, but when I read
the table I get this error message:
Table windows cannot be read:
set SLOT cannot be assigned a value
because it was declared with a := value.

I've loaded and read the table several times last week without
encountering this problem.  I've double checked all of the code and
SLOT is not declared with a := value anywhere.  Any help would be much
appreciated.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/ampl?hl=en
-~----------~----~----~----~------~----~------~--~---