summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
Ira W. Snyder [Tue, 9 Oct 2007 20:59:20 +0000 (13:59 -0700)]
Fix ElevatorGUI's Gtk::Table
The table was being initialized with the wrong number of elements. It's
row, then col.
Signed-off-by: Ira W. Snyder <devel@irasnyder.com>
Ira W. Snyder [Tue, 9 Oct 2007 20:56:48 +0000 (13:56 -0700)]
Add spacing to the GUI
Also, remove an extra table column that was not needed.
Signed-off-by: Ira W. Snyder <devel@irasnyder.com>
Ira W. Snyder [Tue, 9 Oct 2007 20:42:46 +0000 (13:42 -0700)]
Make PositionLabels have direction status indicators
Signed-off-by: Ira W. Snyder <devel@irasnyder.com>
Ira W. Snyder [Tue, 9 Oct 2007 19:49:53 +0000 (12:49 -0700)]
Remove Debug Code
Signed-off-by: Ira W. Snyder <devel@irasnyder.com>
Ira W. Snyder [Tue, 9 Oct 2007 19:48:01 +0000 (12:48 -0700)]
Add TODO list
Signed-off-by: Ira W. Snyder <devel@irasnyder.com>
Ira W. Snyder [Mon, 8 Oct 2007 07:51:03 +0000 (00:51 -0700)]
Make Elevator idleness depend on number of stops
This makes the Elevator's is_idle() method depend not only on its current
state, but on the likelihood that it will be non-idle very soon. If the
Elevator has no stops, and its direction is IDLE, then we can really
consider it idle.
Signed-off-by: Ira W. Snyder <devel@irasnyder.com>
Ira W. Snyder [Mon, 8 Oct 2007 07:33:21 +0000 (00:33 -0700)]
Fix RequestButton clearing
The RequestButtons for some floors wouldn't clear themselves. Fix that.
Signed-off-by: Ira W. Snyder <devel@irasnyder.com>
Ira W. Snyder [Sun, 7 Oct 2007 06:34:53 +0000 (23:34 -0700)]
Improve ElevatorController's Dispatching Algorithm
This improves the ElevatorController's Dispatching Algorithm so that it
always sends the closest IDLE Elevator first, rather than just a random
IDLE Elevator.
Signed-off-by: Ira W. Snyder <devel@irasnyder.com>
Ira W. Snyder [Sun, 7 Oct 2007 06:18:02 +0000 (23:18 -0700)]
Use the GUI
Signed-off-by: Ira W. Snyder <devel@irasnyder.com>
Ira W. Snyder [Sun, 7 Oct 2007 04:14:00 +0000 (21:14 -0700)]
Add Elevator Number to Elevators
All of the Elevators need a unique number so that they can call into the
GUI and update their positions, etc.
Signed-off-by: Ira W. Snyder <devel@irasnyder.com>
Ira W. Snyder [Sun, 7 Oct 2007 04:07:31 +0000 (21:07 -0700)]
Get ready to add the calls into the GUI into Elevator
Clean up so that I can add the calls into the GUI in the Elevator class.
Signed-off-by: Ira W. Snyder <devel@irasnyder.com>
Ira W. Snyder [Sun, 7 Oct 2007 03:57:17 +0000 (20:57 -0700)]
Get Ready for the main program
Rename test.cpp to main.cpp
Create main.hpp
Modify Makefile accordingly
Signed-off-by: Ira W. Snyder <devel@irasnyder.com>
Ira W. Snyder [Sun, 7 Oct 2007 03:46:42 +0000 (20:46 -0700)]
Implement the GUI
This implements the GUI in it's entirety.
Signed-off-by: Ira W. Snyder <devel@irasnyder.com>
Ira W. Snyder [Sat, 6 Oct 2007 18:25:17 +0000 (11:25 -0700)]
Add ElevatorController
This implements and adds the ElevatorController class to the project.
An ElevatorController manages a list of Elevators in a building, deciding
which ones to dispatch based on distance. It also can "step the simulation"
for all of the Elevators.
Signed-off-by: Ira W. Snyder <devel@irasnyder.com>
Ira W. Snyder [Sat, 6 Oct 2007 18:22:43 +0000 (11:22 -0700)]
Add distance_from(Stop)
It would be nice to get the distance from a Stop, not only a position. This
way, direction can also be taken into account.
Signed-off-by: Ira W. Snyder <devel@irasnyder.com>
Ira W. Snyder [Sat, 6 Oct 2007 05:37:55 +0000 (22:37 -0700)]
Use for-loop in test program
This uses a for-loop in the test program, so that adding and removing a
delay is easy.
Signed-off-by: Ira W. Snyder <devel@irasnyder.com>
Ira W. Snyder [Sat, 6 Oct 2007 04:49:08 +0000 (21:49 -0700)]
Use Finite State Machine to manage Elevator movement
This implements the usage of a Finite State Machine to manange the movement
of an Elevator. This makes all of the logic in Elevator::move() fairly
straightforward, which is a big improvement from before.
Signed-off-by: Ira W. Snyder <devel@irasnyder.com>
Ira W. Snyder [Fri, 5 Oct 2007 23:38:27 +0000 (16:38 -0700)]
Checkpoint before trying to convert to a state machine
Signed-off-by: Ira W. Snyder <devel@irasnyder.com>
Ira W. Snyder [Fri, 5 Oct 2007 18:26:17 +0000 (11:26 -0700)]
Fix underflow in Position
The operator-=() function in Position could underflow the part right of the
decimal point. Fix it.
Signed-off-by: Ira W. Snyder <devel@irasnyder.com>
Ira W. Snyder [Fri, 5 Oct 2007 01:10:23 +0000 (18:10 -0700)]
Much Better Now
This was a major rewrite, but it seems to be working out more sanely now.
Signed-off-by: Ira W. Snyder <devel@irasnyder.com>
Ira W. Snyder [Thu, 4 Oct 2007 20:23:14 +0000 (13:23 -0700)]
Experimental Changes
Signed-off-by: Ira W. Snyder <devel@irasnyder.com>
Ira W. Snyder [Wed, 3 Oct 2007 02:26:46 +0000 (19:26 -0700)]
Stop inherits from Position
This change makes Stop inherit from Position, since all a Stop is is a
Position with directional information tacked on.
Signed-off-by: Ira W. Snyder <devel@irasnyder.com>
Ira W. Snyder [Wed, 3 Oct 2007 00:33:08 +0000 (17:33 -0700)]
Initial commit
Signed-off-by: Ira W. Snyder <devel@irasnyder.com>