Results 1 to 4 of 4

Thread: How should I do this?

  1. #1

    Thread Starter
    Addicted Member NOMADMAN's Avatar
    Join Date
    Aug 2002
    Location
    Closer than you think
    Posts
    237

    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

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Whoa, that's a lot of information. Sorry, can't digest it now.

    But there is a nice priority queue in the STL...
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3
    Frenzied Member
    Join Date
    Jul 2002
    Posts
    1,370
    This sounds like modeling traffic flow or cashiering in a large store.
    What are you trying to simulate?

  4. #4

    Thread Starter
    Addicted Member NOMADMAN's Avatar
    Join Date
    Aug 2002
    Location
    Closer than you think
    Posts
    237
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width