[SAL-HELP] Regarding random number generator in SAL
suman kasam
sumankasam1 at yahoo.co.in
Thu Jan 18 11:18:37 PST 2007
Hi everybody,
Can any one help me .Iam trying to model a Multiple Integer Linear Programming problem in SAL.
It deals with lot of constraints as well as lot of variables.Depending on the values of a single variable, values of few other variables can be determined by applying the constraints.Say for example there is a constraint : x[1]+x[2]+x[3] =1 .Then I can model it like this :
if x[i]=1 then FOR ALL i (i/=j) x[j]=0.
But in my model I can't initialize the variables as I like because if iam doing so then Iam determining a specific solution
My doubt is if i have variables which are not initalized in SAL will they take the same vallues every time they run or they take values randomly.Say for the given example above is it possible for me to get all the possible combinations for the variables in the above example.Like say first time when I run it it considered all the vallues as x[1]=1,x[2]=1 and x[3]=1 and 1st process is called so then the variables become x[1]=1,x[2]=0 and x[3]=0. Is it that every time I run the simulation it takes the same initial values x[1]=1,x[2]=1 and x[3]=1 and the same process is called.If it is so how can I get the model for different values of those variables.
So what iam thinking is that once i reach the final state of my state transition diagram, I will give other random set of values to the variables and proceed in to the state transition diagram from the initial state again.In that way I can explore all the possible combinations of the above variables.So how can i generate a random number set like that, is there any function for doing so.
Please help me in this regard.
Thanking you,
Regards,
Suman Kasam
---------------------------------
Don't pick lemons.
See all the new 2007 cars at Yahoo! Autos.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.csl.sri.com/pipermail/sal-help/attachments/20070118/e0da9bb6/attachment.html
More information about the SAL-HELP
mailing list