I realize there are pages and pages on error 149 but I’ve done my due diligence and looked through several trying to find out why I keep getting this error.
This is a basic assignment problem.
I am getting Error 149 when I try to define tasks. I’m trying to tell GAMS to make it so the sum the rows(r) and make them equal to 1 for each column(c).
Set r row labels
c column labels;
Parameter p(r,c);
$onecho > tasks.txt
set=r rng=Sheet1!a2 rdim=1
set=c rng=Sheet1!b1 cdim=1
par=p rng=Sheet1!a1 rdim=1 cdim=1
$offecho
$call GDXXRW indata.xlsx trace=5 @tasks.txt
$GDXIN indata.gdx
$LOAD r c
$LOAD p
$GDXIN
Display r, c, p;
$call XLSDUMP indata.xlsx mydump.gdx
Binary Variable x person assigned to task;
Variable
z total minutes to complete all tasks;
Equations
total objective function
tasks all tasks assigned;
total.. z =e= sum((r,c), x(r,c)*p(r,c));
tasks.. sum(r, x(r,c)) =e= 1 ;
Model assign /all/ ;
Solve assign using lp minimizing z;
display x.l;
Any help would be appreciated. I am very new to GAMS but I’ve watched several videos and searched this forum and google for an answer that I have yet to find.