Incompatible operands for addition error 133.

Problems with modeling
Post Reply
delelayo08
User
User
Posts: 12
Joined: 5 years ago

Incompatible operands for addition error 133.

Post by delelayo08 »

Hello Gurus,

Hello Gurus, am having difficulty in clearing this error code in my model.


Would be very grateful if your could help.

Regards,

Dele
Attachments
19.gms
(590.29 KiB) Downloaded 312 times
User avatar
bussieck
Moderator
Moderator
Posts: 1033
Joined: 7 years ago

Re: Incompatible operands for addition error 133.

Post by bussieck »

The code is unclear what z is. Your declare z as a set: Set z Zone the feedstock is located (within 15 30 45 and 60 miles) from the plant /z1*z4/ but then you use it as a variable in equation

Code: Select all

con_obj(om1).. 1$z(om1) - dir(om1)*sl(om1) =e= rhs(om1);    
and more obvious in your loop:

Code: Select all

   
   repeat
      solve mod_payoff using MINLP maximizing obj;
      payoff(op,oo) = z.l(oo);
      z.fx(oo)      = z.l(oo); // freeze the value of the last objective optimized
I changed the variable z to a zz but then there are plenty of other compilation errors.

-Michael
delelayo08
User
User
Posts: 12
Joined: 5 years ago

Re: Incompatible operands for addition error 133.

Post by delelayo08 »

Tnx Mr, Micheal,


I was able to reduce the compilation errors to the barest minimum. the 'z' was changed to 'b'.

am still having some errors if you could help me with. (in the attached file below).


Tnx sir in anticipation.
Attachments
20.gms
(593.84 KiB) Downloaded 265 times
User avatar
bussieck
Moderator
Moderator
Posts: 1033
Joined: 7 years ago

Re: Incompatible operands for addition error 133.

Post by bussieck »

I see no compilations error, but the default MINLP solver (DICOPT) has trouble finding a feasible solution. That's not an error. Optimal, unbounded, and infeasible are all valid and good outcomes of an optimization model. In case of a non-convex model you also have to deal with local optima and local infeasibility when using a local solver. Your model is to big to be solved with a global MINLP solver to determine if it locally or truly infeasible. You need to work this out differently. Bruce McCarl has a nice writeup how to address infeasible models, see Misbehaving Model - Infeasible, https://www.gams.com/fileadmin/communit ... news40.pdf.

-Michael
delelayo08
User
User
Posts: 12
Joined: 5 years ago

Re: Incompatible operands for addition error 133.

Post by delelayo08 »

Tnx. Mr Mike...


I appreciate..
Post Reply