BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Yannic_Wera
Calcite | Level 5

Hello,

I want to combine two conditions to restrict constraint generation :

I try to avoid of having to products without setup timeslot and therefore I want to force that when it is another product the binary flag is force to be 0

 

con setsup {i in produit, j in produit , t in time : i<>j and t > 0} : periode_prod[i,t-1] + periode_prod[j,t] = 0 ;

the question is how to combine the two conditions following the : I'm not sure that the AND is working, I quite sure that it doesn't work

 

Thanks in advance

Yannic

1 ACCEPTED SOLUTION

Accepted Solutions
RobPratt
SAS Super FREQ

The AND is correct, but "i<>j" means max(i,j).  If you want to express that i is not equal to j, please use "i ne j" or "i ^= j" or " i ~= j" instead.

View solution in original post

2 REPLIES 2
RobPratt
SAS Super FREQ

The AND is correct, but "i<>j" means max(i,j).  If you want to express that i is not equal to j, please use "i ne j" or "i ^= j" or " i ~= j" instead.

RobPratt
SAS Super FREQ

And here is an alternative approach:

con setsup {i in produit, j in produit diff {i}, t in time : t > 0} : periode_prod[i,t-1] + periode_prod[j,t] = 0 ;

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

Discussion stats
  • 2 replies
  • 1426 views
  • 2 likes
  • 2 in conversation