question

Rania A avatar image
0 Likes"
Rania A asked Jeanette F commented

ASRS VEHICLE SPEED MODIFICATION DISTRIBUTION

Hey everyone, I have an ASRS vehicle in my system and I want to introduce uncertainty in its behaviour,so I want to set its lift speed and extension speed as a normal distribution. I tried with custom code on entry but it doesn't work. Any help on how I can set the speed with a normal distribution will be very helpful



/**Custom Code*/

Object current = ownerobject(c);


// Define the mean and standard deviation for the normal distribution

var mu = 10.0; // Adjust this value to set the mean speed

var sigma = 0.05; // Adjust this value to set the standard deviation


// Generate a random speed value from a normal distribution

var randomSpeed = normal(mu, sigma);


// Set the AS/RS object's "Lift Speed" label to the generated value

setlabelnum(current, "Lift Speed", randomSpeed);

FlexSim 20.0.10
asrsasrs speed
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Rania A, was Jason Lightfoot's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes 0 ·

1 Answer

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Jason Lightfoot edited

You should be using the object properties before any related tasks start.

myASRS.setProperty("LiftSpeed",randomSpeed);
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.