NewSimUser123 Posted November 4, 2017 Share Posted November 4, 2017 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 Link to comment Share on other sites More sharing options...
KatieP Posted December 12, 2017 Share Posted December 12, 2017 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 Link to comment Share on other sites More sharing options...
Recommended Posts