+ Reply to Thread
Results 1 to 4 of 4

Thread: Queuing elevator destinations

  1. #1
    Wire Noob Xerof3ar's Avatar
    Join Date
    Jun 2008
    Location
    Kansas, USA
    Posts
    10

    Default Queuing elevator destinations

    Okay, I'm in the process of building an elevator, and I was wondering how I would go about queuing up elevator floors?

    For example, I have someone on the 5th floor wanting to go down, someone on the 3rd floor wanting to go up to the 6th floor, and someone in the elevator, at the first floor wanting to go to the 3rd floor.

    2 call buttons are pressed, 1 button in the elevator is pressed. Now, the best way I can think of handling this is through 2 expressions and a RAM chip.

    1 expression to handle where the elevator is and where it goes next. The other expression to manage the queue. The RAM chip to manage what buttons were pressed and what direction the people waiting want to go.

    I'm a programmer, I've been doing it for 3 years. This is driving me insane, because it would be very easy to write in a language like C or PHP, but it's almost impossible without functions and loops in the expressions.

    What do you think?

  2. #2
    Wire Weeaboo Pyro-Fire's Avatar
    Join Date
    Aug 2007
    Location
    WA, Australia
    Posts
    1,804

    Default Re: Queuing elevator destinations

    CPU allows loops.

    use bp's C# -> ZASM program.



  3. #3
    Wire Amateur Synchro's Avatar
    Join Date
    Feb 2008
    Posts
    73

    Default Re: Queuing elevator destinations

    However, this is possible with an expression, it would only eat up your time, and you would need a 64x64 RAM to write down multiple values inside it.

    This is the example:

    Somebody on the 6th floor presses the button, the elevator goes up, but shortly, somebody on the third floor presses the button while the elevator is moving, The expression has the part scripted, if the elevator is not at set location and still moving, then qeue += 1, and possibly, write the button's value.


    Once the elevator is done moving, and a delay chip is set up to open the door + keep the elevator still, once the elevator starts moving again, it would call up the memory from the ram ant that "qeue" adress.


    The problem is, this will never be like in real life, as the people who press the button first will get the most priority.
    Last edited by Synchro; 07-04-2008 at 05:24 AM.

  4. #4
    Wire Amateur Selig's Avatar
    Join Date
    Jun 2008
    Posts
    58

    Default Re: Queuing elevator destinations

    Quote Originally Posted by Synchro View Post
    However, this is possible with an expression, it would only eat up your time, and you would need a 64x64 RAM to write down multiple values inside it.

    This is the example:

    Somebody on the 6th floor presses the button, the elevator goes up, but shortly, somebody on the third floor presses the button while the elevator is moving, The expression has the part scripted, if the elevator is not at set location and still moving, then qeue += 1, and possibly, write the button's value.


    Once the elevator is done moving, and a delay chip is set up to open the door + keep the elevator still, once the elevator starts moving again, it would call up the memory from the ram ant that "qeue" adress.


    The problem is, this will never be like in real life, as the people who press the button first will get the most priority.
    In reality there are a series of different systems. Eg, sometimes if an elevator is going up, and someone pushes the up call button, it'll stop and grab em, where if they are pushing down, it;ll wait till its on its way back down. Thats just the basic gist, not even, from my experience with elevators.

+ Reply to Thread

Similar Threads

  1. Queuing up items via array
    By Arc in forum Expression 2 Discussion & Help
    Replies: 3
    Last Post: 03-16-2009, 06:36 AM
  2. Asgard Transporter - Origins and Destinations
    By Cpt. Archie in forum Gate Nostalgia (Old School Wiring) Discussion & Help
    Replies: 3
    Last Post: 07-30-2008, 08:52 AM
  3. Elevator!
    By awfa3 in forum Gate Nostalgia (Old School Wiring) Discussion & Help
    Replies: 2
    Last Post: 02-07-2008, 10:54 AM
  4. Elevator...
    By craze in forum Finished contraptions
    Replies: 1
    Last Post: 08-15-2007, 05:24 PM
  5. Elevator
    By Black Phoenix in forum CPU, GPU, and Hi-speed Discussion & Help
    Replies: 6
    Last Post: 05-20-2007, 04:02 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
proceed-collector
proceed-collector
proceed-collector
proceed-collector
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots