I have a waitForEvent activity which I want to have a change rule "Increase to Exact Value" but I want it to only count specific token labels at another activity. Should I write code for the Event? How do I accomplish this?
I have a waitForEvent activity which I want to have a change rule "Increase to Exact Value" but I want it to only count specific token labels at another activity. Should I write code for the Event? How do I accomplish this?
The first thing you'll need to do is make sure the label on the token is a Tracked Variable. This can be accomplished by using the Add Tracked Variable pick option in the Assign Labels activity.
Once the label is a tracked variable, the Wait for Event activity can listen to it change. Run the model until you have a token with a Tracked Variable label on it. Go to your Wait for Event and use the Sampler (either in the Process Flow view or next to the Object field) and mouse over the token.
You'll see a Token: On Label Value Change option. Click on the token and then select this option. The Wait for Event properties will now look like this:
Change the Label Name field to the name of your tracked variable label. Then you just have to update the token.Unassigned! to reference the correct token. The easiest way to do this would be to have a label on the token that enters the Wait for Event that references the correct token. Then you would just put
token.TokenRefLabelName
into the Object field of the Wait for Event. Otherwise you can use the command gettoken().
I don't get an option on my waitForEvent to select a labelName. Is there something I'm missing?
Also, what type of tracked variable do I choose? Input?
Does your token have a tracked variable label on it?
A tracked variable label will show up with a small green arrow at the upper left corner of the value column. If the token doesn't have a tracked variable label, the On Label Value Change will not be in the event list.
If the value will only increase then Cumulative is okay. If it will increase and decrease use Level.
Here is tracked variable token:
Here is my waitForEvent after I use an eye dropper on the token above:
I can't seem to choose the label name criteria like you can...
Can you supply an example model? I might understand your solution better if I can see it in action.
Here's an example model.
So I looked at the model, and here is where I get lost. Your model has this option, which did not appear on mine:
14 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