Project

General

Profile

Statistics
| Revision:

root / trunk / code / projects / warehouse / Scheduler.h @ 2002

History | View | Annotate | Download (625 Bytes)

1 2002 jmcarrol
#ifndef _SCHEDULER_
2
#define _SCHEDULER_
3
4
#include "../helper_classes/PQWrapper.h"
5
#include "../helper_classes/Order.h"
6
#include "WH_Robot.h"
7
#include "../Behavior.h"
8
9
class Scheduler : Behavior {
10
  std::vector<WH_Robot> robots;
11
        PQWrapper unassignedOrders;
12
        std::vector<Order> assignedOrders;
13
        std::queue<WH_Robot> waitingRobots;
14
15
        void create_orders();
16
17
        void waiting_dance();
18
19
public:
20
  Scheduler(std::string scoutname):Behavior(scoutname, "Scheduler"){};
21
        ~Scheduler();
22
23
        void get_task(WH_Robot robot);
24
25
        void task_complete(Order o);
26
        void task_failed(Order o);
27
28
29
        Order get_next_item();
30
31
        void run();
32
33
};
34
#endif