Error: Endogenous operands for * not allowed in linear models Topic is solved

Problems with modeling
Post Reply
Asadujjaman
User
User
Posts: 16
Joined: 4 years ago

Error: Endogenous operands for * not allowed in linear models

Post by Asadujjaman »

Hi,

I am trying to solve a transportation model. One customer wants to purchase two different types of resources in three different orders. There are three suppliers. In three different orders, the supplier’s capacity is different. The customer aims to choose the right suppliers in each order that minimizes the total cost.

However, when I run the problem it shows an error message “Endogenous operands for * not allowed in linear models”. I do not understand why this message as it is a MIP problem. Can anyone say why this error?

Later, I run the program using MINLP instead of MIP, but the problem shows an infeasible result. I have attached the gms file of the problem. Can anyone help me to solve the problem?
transport_ex.gms
(1.39 KiB) Downloaded 222 times
User avatar
bussieck
Moderator
Moderator
Posts: 1042
Joined: 7 years ago

Re: Error: Endogenous operands for * not allowed in linear models

Post by bussieck »

x(o,r,s)*supplier(o,r,s) looks to me like two variables multiplied. This is not a MIP but a MIQCP. Your binary variable supplier has currently zero effect. So you can just leave it out. I guess this is only a start of a bigger model. Good luck.

-Michael
Asadujjaman
User
User
Posts: 16
Joined: 4 years ago

Re: Error: Endogenous operands for * not allowed in linear models

Post by Asadujjaman »

Hi Michael,

Thanks for your information. However, I have run the program using MIQCP. But, I still have not got the exact result. The reports summary is infeasible.
Moreover, I am a little bit confused about the demand constraint (the total quantity supplied by all suppliers for any resource type (r) in an order (o) is equal to the the order quantity of resource (r) in that order (o)). Am I written the demand constraint correctly? Why don't the model shows the exact result?
Would you please have a look on the attached gms file!
transport_ex.gms
(1.49 KiB) Downloaded 214 times
User avatar
bussieck
Moderator
Moderator
Posts: 1042
Joined: 7 years ago

Re: Error: Endogenous operands for * not allowed in linear models

Post by bussieck »

Look at r1 and o1. The supply capacity from s1, s2, and s3 is 8+6+0=14. The demand is o1.r1 is 18. No way to make it, so the model is infeasible. How did I get there? Again, I removed the unhelpful and superfluous supplier variables, get an LP and solved with e.g. Cplex, now I get a infeasible solution with just one infeasibility marked:

Code: Select all

---- EQU supplier_capacity  supplier capacity constraint

                LOWER          LEVEL          UPPER         MARGINAL

o1.r1.s1        -INF            8.0000         8.0000        -1.0000      
o1.r1.s2        -INF            6.0000         6.0000        -1.0000      
o1.r1.s3        -INF            4.0000          .            -1.0000 INFES
o1.r2.s1        -INF           16.0000        16.0000          .          
o1.r2.s2        -INF             .            20.0000          .          
that points to the problem described earlier.

-Michael
Asadujjaman
User
User
Posts: 16
Joined: 4 years ago

Re: Error: Endogenous operands for * not allowed in linear models

Post by Asadujjaman »

Dear Michael,

You are absolutely right. Now I understand it.
Thank you so much for helping me to solve the problem.

Regards
Asadujjaman
Post Reply