-
How should I do this?
I'm working on a school project where I need to make an event simulation. Each event takes place with certain time parameters. Like a start time and a completion time. I've made a prioirty queue to handel the order of events. And now I'm working on a event class to store data about the events so as to pass them to my PQ.
The user inputs simulation iinformation like time to run sim for, %s for customers, and so one. Instead of saving these as global varibles I was thinking of making a class to store the info in then some how inheriting or polymorphing a class of type sub-event for individual-customer events that the priority queue could take care of...
Any ideas on this?
NOMAD
-
Whoa, that's a lot of information. Sorry, can't digest it now.
But there is a nice priority queue in the STL...
-
This sounds like modeling traffic flow or cashiering in a large store.
What are you trying to simulate?
-
Close, a car wash with arrival and completion events. Its due tonight at midnight (10 hours). I've kinda worked around this with static varibles in the public part of the Event class (guess they could be globals)
Anyway, its too late for anything else, thanks anyway for the attempt!
NOMAD