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

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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