Project

General

Profile

Statistics
| Branch: | Revision:

scoutos / scout / libscout / src / behaviors / Scheduler.h @ 76cefba1

History | View | Annotate | Download (627 Bytes)

1
#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();
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
        //assumes a set_task(Order o) function in WH_Robot
33
        
34
        
35
    
36
};
37
#endif