LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (March 2006, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 30 Mar 2006 09:03:18 -0800
Reply-To:     shiling99@YAHOO.COM
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         shiling99@YAHOO.COM
Organization: http://groups.google.com
Subject:      Re: simulation-optimization with SAS/OR, is it possible?
Comments: To: sas-l@uga.edu
In-Reply-To:  <1143648143.147194.294240@i39g2000cwa.googlegroups.com>
Content-Type: text/plain; charset="iso-8859-1"

It seems to me you want to plug the results(coefs) from QSIM into your OPTIMIZATON problem. If this is the case, you may consider using SAS macro variables to pass the values betwween procedure. There are other options available that depends upon your REAL satuation.

Soppose you want to minimize a function in OR,

f(z)=a*z + b*z^2

where a and b are the results(coefs) from a regression model as,

y=const + a * x1 + b* x2 + err;

then the following PGM illustrates the idea.

*create fake data; data test; do i = 1 to 30; x1=rannor(12345); x2=rannor(12345); y=1+2*x1+3*x2+rannor(12345); output; end; run;

*regression and save coefs; proc reg data=test outest=coef; model y= x1 x2; run; quit;

*pass coefs to macro variable so than they can be used by other procdure; data _null_; set coef; call symput('coef_x1',compress(put(x1,best.))); call symput('coef_x2',compress(put(x2,best.))); run;

%put >>>coef_x1=&coef_x1 :: coef_x2=&coef_x2<<<;

*retrieve values from macro variable for optimization problem; proc nlp; parms x=0; min l; l=&coef_x1*x + &coef_x2*x*x; run;

Qingpei Hu wrote: > Hi, Dear All, > > First of all, I am a newbee for SAS, although I have some background on > simulation/optimization/statistics. > > Currently, I am interested in the topic of "simulation optimization". > Specifically, I have a queueing system to simulation, and with the > simulation results I can have a objective function. I want to find a > optimal parameter in the queueing system to minimize the objective > function. > > I want to try this idea with SAS. As far as I know, QSIM can be used to > simulate the Q-system. Also, in the SAS 9.1, there is Genetic algorithm > in SAS/OR. I want to PROGRAM in SAS by using these two modules > together. > > As I am not quite sure whether SAS can DO, I want to consult here for > your advice. > > Thanks. > > Regards, > QP


Back to: Top of message | Previous page | Main SAS-L page