#include "stop.hpp"
#include "position.hpp"
#include "elevator.hpp"
+#include "elevatorcontroller.hpp"
int main (int argc, char *argv[])
{
+ const int floors = 10;
+ const int elevators = 2;
+
+ ElevatorController ec(floors, elevators);
+
+ //ec.elevator_request (0, 2);
+ ec.call_elevator_to (3, DOWN);
+
+ for (int i=0; i<35; i++)
+ ec.move_elevators ();
+
+ // Note: without the GUI, this is dependent on choosing the same elevator
+ // that was randomly chosen by the call_elevator_to() funtion.
+ //
+ // This may need to be run a few times to work :)
+ ec.elevator_request (0, 2);
+
+ for (int i=0; i<35; i++)
+ ec.move_elevators ();
+
+
+#if TEST_ELEVATOR
Elevator e(2);
Stop s2(3, DOWN);
usleep (500000);
e.move ();
}
+#endif
return 0;
}