Solved

How to solve duplicate column error

  • 22 February 2024
  • 1 reply
  • 18 views

May I know how to solve the duplicate column error since I have put the Xconstraint(i,l,g,g0) so that duplicate column does not occur? Whoever is the sender Q(i,l,g,g0) of the product cannot be the same one who is receiving the product Q(i,l,g0,g) to satisfy the local demand. May I know if there is any other way to solve this problem instead of using the constraint such as X(i,l,g,g0) + X(i,l,g0,g) <= 1 since the system does not apply this constraint at all?

icon

Best answer by Chris Kuip 29 March 2024, 08:35

View original

1 reply

Userlevel 5
Badge +7

The constraint XConstraint:

Constraint XConstraint {
    IndexDomain: (i,l,g,g0) |g<>g0;
    Definition: X(i,l,g,g0)+X(i,l,g0,g)<=1;
}
When for index values g= 'g1’, g0='g2’ the same row is generated as when g= 'g2’, g0='g1’; the warning issued is justified.

To avoid generating the same row in this situation, the index domain condition 'g <> g0’ can be changed to 'g < g0’

 

 

Reply


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

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