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

Posting this question in a new thread. 

I have a constraint below that gives syntax error. 

 

con DC_LSP_Direct_Link1{p in Ports, t in Transit,c in lsp, d in DC: d not in {'SAV','LAX'}}:
ContainersfromPortstoLSPtoDC[p,t,c,d in DC: d not in {'SAV','LAX'}] <= BigM * IsLSPDC[c,d in DC: d not in {'SAV','LAX'}];

 

This is the error

ERROR 22-322: Syntax error, expecting one of the following: !, !!, &, (, *, **, +, ',', -, .., /, <, <=, <>, =, >, ><, >=, AND, BY,
CROSS, DIFF, ELSE, IN, INTER, NOT, OR, SYMDIFF, TO, UNION, WITHIN, [, ], ^, ^=, |, ||, ~, ~=.
ERROR 76-322: Syntax error, statement will be ignored.
1 ACCEPTED SOLUTION

Accepted Solutions
RobPratt
SAS Super FREQ

Correct syntax is:

con DC_LSP_Direct_Link1{p in Ports, t in Transit, c in lsp, d in DC: d not in {'SAV','LAX'}}:
   ContainersfromPortstoLSPtoDC[p,t,c,d] <= BigM * IsLSPDC[c,d];

View solution in original post

2 REPLIES 2
RobPratt
SAS Super FREQ

Correct syntax is:

con DC_LSP_Direct_Link1{p in Ports, t in Transit, c in lsp, d in DC: d not in {'SAV','LAX'}}:
   ContainersfromPortstoLSPtoDC[p,t,c,d] <= BigM * IsLSPDC[c,d];
Santha
Pyrite | Level 9

Thanks Rob as always

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
  • 690 views
  • 0 likes
  • 2 in conversation