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

Hi Rob

Getting a syntax issue on Constraint "LSP_DC_Link1". What am I missing?

 

con LSP_DC_Link1{p in Ports, t in Transit,c in LSP: c not in {'ZIMU','ONEY'}, d in DC}:
ContainersfromPortstoLSPtoDC[p,t,c,d] <= BigM * IsLSPDC[c,d];
1 ACCEPTED SOLUTION

Accepted Solutions
RobPratt
SAS Super FREQ

Here are two correct ways:

con LSP_DC_Link1{p in Ports, t in Transit, c in LSP, d in DC: c not in {'ZIMU','ONEY'}}:
   ContainersfromPortstoLSPtoDC[p,t,c,d] <= BigM * IsLSPDC[c,d];
con LSP_DC_Link1{p in Ports, t in Transit, c in LSP diff {'ZIMU','ONEY'}, d in DC}:
   ContainersfromPortstoLSPtoDC[p,t,c,d] <= BigM * IsLSPDC[c,d];

View solution in original post

2 REPLIES 2
RobPratt
SAS Super FREQ

Here are two correct ways:

con LSP_DC_Link1{p in Ports, t in Transit, c in LSP, d in DC: c not in {'ZIMU','ONEY'}}:
   ContainersfromPortstoLSPtoDC[p,t,c,d] <= BigM * IsLSPDC[c,d];
con LSP_DC_Link1{p in Ports, t in Transit, c in LSP diff {'ZIMU','ONEY'}, d in DC}:
   ContainersfromPortstoLSPtoDC[p,t,c,d] <= BigM * IsLSPDC[c,d];
Santha
Pyrite | Level 9

aah. so i get the syntax now. thanks rob as always

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 630 views
  • 0 likes
  • 2 in conversation