Yes, if you want the same text value for every observation, you can just do this:
create data mydata from [p t c d] ContainersfromPortstoLSPtoDC InboundLinehaul Trial="Best5CustomerScenario";
You can also specify a string array that depends on any combination of p, t, c, or d. For example:
str mytrial {Ports, LSP};
...
create data mydata from [p t c d] ContainersfromPortstoLSPtoDC InboundLinehaul Trial=mytrial[p,c];
Perfect. Thank you
For my next scenario, I want to store my numbers (my field names are same as previous one). Instead of create data, can i just append the current scenario results to the previous scenario results that are contained in mydata?
If not i can create a new table name, and then consolidate them together. Suggestions?
There is no direct functionality to append. You can create two data sets and then combine them with DATA step, PROC SQL, PROC APPEND, etc. You can do this either after the PROC OPTMODEL call or from within PROC OPTMODEL by using a SUBMIT block:
create data mydata1 from ...;
create data mydata2 from ...;
submit;
data mydata3;
mydata1 mydata1;
run;
endsubmit;
Rob
I want to add a constraint UseProperRates where I want only if the rates are greater than 1000 to be considered for model.
I did this but it is not working.
con UseProperRates {p in Ports, t in Transit, c in LSP, d in DC}: InboundLinehaul[p,t,c,d] >=1000;
Hi Santha,
Please open a new thread for this new question, and I will answer it there.
Thanks,
Rob
sure will do thanks
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.