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-white.png

Missed SAS Innovate in Orlando?

Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.

 

Register now

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