So you've taught me how to create companions for every patient. What if a companion only shows up 75% of the time for a particular patient type? How do I create companions based on probability?
So you've taught me how to create companions for every patient. What if a companion only shows up 75% of the time for a particular patient type? How do I create companions based on probability?
You can use a Decision Point activity that 75% of the time starts the activity that makes companions while the other 25% of the time it starts either a different activity or the activity after the companion creation activity. Basically you want to use the decision point activity to branch your logic.
In the Next Activity field of the Decision Point activity you'll find a Based on Percentages pickoption that you'll find useful.
Alternatively you could put some code right into the trigger where the companions are created.
In HC there's a simplified command, P(), for doing things by percentage. For example, the code in this if statement would fire 75% of the time:
if( P(75, 1, 25, 0) ) { //Do Something }
So you could open up the code editor for the trigger that's creating companions and wrap the trigger in an if statement like the one above.
Can I edit the code editor the same way you mentioned in FlexSim 21.1.1?
Not by default with that syntax - you can use the bernoulli() function though.
6 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved