Jump to content
Simio Forum

Welcome to the Simio Forum

Welcome to the Simio Forum! Experience the full experience of the forum by becoming a Simio Insider! You must be an Insider to post on any forum!

Click_Here_button.png

New Software Release

Our latest release, Simio 11, is here!

NewSimUser123

Conditional Tallying based on time

Recommended Posts

Hi All,


I've got a simulation that creates entities based on a data table - premiumCustomers and regularCustomers. I've got a tally defined PremCustWaitTillService that tallies: Run.TimeNow - ModelEntity.TimeCreated for premiumCustomers. If the premiumCustomer waits longer than 5 minutes, I want to be able to tally these events such that at the end of the simulation I can see x discounts have been awarded to premiumCustomers in the results stats in a tally stat called CountDiscountsGiven.


I might have a couple of issues that I am confused on here. In particular: Using an entity's wait time as a conditional statement for assignment in Processes.


When the premiumCustomer enters the server (processing), I tally PremCustWaitTillService with Value: Run.TimeNow - ModelEntity.TimeCreated. I imagine a conditional that states something like If PremCustWaitTillService > 5 I updated a tallystat CountDiscountsGiven + 1 but I can't seem to get it to work - I don't see any entities changing color (as I've set them to if they wait longer than 5).


I've attached my file because my terminology may be off - the sim runs but no CountDiscountsGiven values show up.

SpeedeeCarRentalNew.spfx

Share this post


Link to post
Share on other sites

Hi,


The Decide step is looking a the variable ModelEntity.CustWaitTime but that state is never assigned a value so it is always False. Also this state is a DateTime state, but should probably be a Real State instead with the Units of Time. Assign the state a value or just use 'TimeNow - ModelEntity.TimeCreated > (5/60)' expression.


To use a Tally as a count, I would recommend just using the Number Observations result (automatically recorded) and either set the Expression to '1' or actually record something like 'Run.TimeNow - ModelEntity.TimeCreated'. You cannot use the TallyStatistic Name in the expression.


Best,

Katie

Share this post


Link to post
Share on other sites

×
×
  • Create New...