ending a simulation
2007-06-10 02:32:32 GMT
Hi,
I've wondered about something, but so far have not had time to look more closely at it. So I'm wondering if others have done something like this before.
I'm gathering statistics from a simulation of Taxis and Fares. One of them is the span of time from Fare activation, until pickup by a Taxi. The second is the span of time from when the Fare is picked up, until it is dropped off at its destination. In every simulation, I wind up with three distinct groups of Fares: those that are picked up and taken to their destination, essentially completing the Fare's lifecycle; those that are picked up, but are still en'route when the simulation ends; and those that never get picked up at all, for one reason or another.
The problem I have (or maybe only imagine I have) is that this presents something of a dilemma when I'm trying to gather data with a Monitor. I'm not sure how to report it! Whatever I do with it at this point, it's a separate set (or sets) of data, that I'd like incorporated into the data for completed Fares. So I'm thinking about using a sort of compound condition for terminating a simulation. That would leave me with just the completed Fares and the waiting Fares, which is more manageable. I tried this,
simulate(until=(SIMTIME and len(Agents.waitingFares.theBuffer) == 0))
but it doesn't work, and I'm not sure why. It almost seems to behave like I'm using a logical OR instead of AND in there. The simulation starts up, and as the buffer is almost immediately emptied the simulation terminates, even though it's nowhere near SIMTIME. Now I'm thinking about just calculating the time remaining for the en'route Fares to reach their destinations, and adding those Fares to the set of completed Fares, with a note to that effect. But it's definitely a second choice.
Has anyone tried anything like this? Had any success with it? More generally, does anyone have strategies or pointers to documentation for dealing with these types of loose ends in data collection?
Thanks!
Tim
------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/
_______________________________________________ Simpy-users mailing list Simpy-users <at> lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/simpy-users
RSS Feed