Solved

Supply Chain Optimization Warning: Duplicate row errors leading to non-unique shadow prices

  • 28 April 2022
  • 7 replies
  • 96 views

Badge

Hi! I’m doing a supply chain optimization using AIMMS for my master project and I have a problem with my binary determinant variable as well as the result error computed. Since this is my first time using AIMMS, I am not sure on how to debug it.

The constraint of my binary is X(i,l,g,g2) + X(i,l,g2,g) ; where g≠g2.

After I run the program, it says

Warning: The rows "TransportationBinary(liquid hydrogen,truck,g1,g3)" and "TransportationBinary(liquid hydrogen,truck,g3,g1)" are equal in the generated mathematical program "MinimizeDailyCost".  This may lead to non-unique shadow prices.  For more information regarding potential causes and consequences, see the help associated with the option "Warning_duplicate_row".

 

Can anyone help me explain what is the problem? I am also confuse on which section to declare the g≠g2 in the transportation constraint (g represents the grid squares/ supply demand location).

Appreciate your help!

icon

Best answer by deannezhang 29 April 2022, 05:06

View original

7 replies

Userlevel 4
Badge +3

From what your described, 

row TransportationBinary(liquid hydrogen,truck,g1,g3) looks like:

X(liquid hydrogen,truck,g1,g3) + X(liquid hydrogen,truck,g3,g1)  ...

row TransportationBinary(liquid hydrogen,truck,g3,g1) looks like:

X(liquid hydrogen,truck,g3,g1) + X(liquid hydrogen,truck,g1,g3) …

so they are symmetrical.

 

Since you only need one of them, you can add a domain condition at the constraint index domain:

Constraint : TransportationBinary

Index domain: (i,l,g,g2) |ord(g)>ord(g2)

“|” is the condition operator, followed by the boolean formualtion. 

 

And for your question to have condition of g≠g2, for example on variable x, you can add index domain as well

Variable : X

Index domain: (i,l,g,g2) | g <> g2

 

Hope this helps

Badge

From what your described, 

row TransportationBinary(liquid hydrogen,truck,g1,g3) looks like:

X(liquid hydrogen,truck,g1,g3) + X(liquid hydrogen,truck,g3,g1)  ...

row TransportationBinary(liquid hydrogen,truck,g3,g1) looks like:

X(liquid hydrogen,truck,g3,g1) + X(liquid hydrogen,truck,g1,g3) …

so they are symmetrical.

 

Since you only need one of them, you can add a domain condition at the constraint index domain:

Constraint : TransportationBinary

Index domain: (i,l,g,g2) |ord(g)>ord(g2)

“|” is the condition operator, followed by the boolean formualtion. 

 

And for your question to have condition of g≠g2, for example on variable x, you can add index domain as well

Variable : X

Index domain: (i,l,g,g2) | g <> g2

 

Hope this helps

Thank you so much! Your suggestion helps in solving the error! I have one more question, for a constraint;

Qmin(i,l)*X(i,l,g,g2) <= Q(i,l,g,g2) ← Qmax(i,l)*X(i,l,g,g2) ∀(i,l,g,g2) ; g≠g2 (Transportation Constraint)

 

how do I write it down in the constraint definition? Because when I key in the whole equation as above, it states

“in an inclusion only the middle term is allowed to contain variables, however in the inclusion Qmin(i,l)*X(i,l,g,g2) $ X. domain (g,g2) <= Q(i,l,g,g2) $ Q. domain (g,g2) <= Qmax(i,l)*X(i,l,g,g2) $ X.domain(g,g2) the left term contains variables.”

 

For now I separate the Qmin and Qmax equation into two constraints but the solution given is nonbasic [for Q(i,l,g,g2) variable]. So I was wondering if I put it in one constraint would it give me a different solution. Hope you can help! 

Userlevel 4
Badge +3

Separating the orginal euqation to two constraints looks good to me. Do you get any unexpected solution? Like some of the constraints are violated?

Badge

I see. There are no other error or constraints violated after you’ve help given the solutions earlier. I was actually expecting AIMMS to give me numerical results on the Q(i,l,g,g2) variable (flow rate of hydrogen produced) but instead it only states “nonbasic” solution for the variable. So I am trying to explore other ways to find a different solution. Thank you again :)

Userlevel 4
Badge +3

I see. I suspect you looked at the data page of the constraint, instead the data of the variable. Would you check?

Userlevel 4
Badge +5

@Hazirah, you are seeing “Nonbasic” because your model has 0 as the best solution. For now, X has no ‘reason’ to be 1, since if it is 0 to all indexes, the three contraints are good. 

Other note, TDC is empty, you need to set the objective function for the solve to run properly. With an objective function defined, I think you will start to see values for all the variables. 

 

Let us know if it worked!

Badge

Hi @gabiservidone and @deannezhang ! First of all I just wanted to apologize for the late reply. I just recovered from dengue fever and was able to work on my problem this week. I feel obliged to let you both know that the program works as it gives me numerical results after I adjusted the TDC and objective function. Thank you so much! 😄

Reply


Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator