SOLA
Loading...
Searching...
No Matches
Public Member Functions | List of all members
daisi::cpps::logical::LayeredPrecedenceGraph Class Reference

Helper class to implement the pIA algorithm. A directed graph is layered into a free, second, and hidden layer. Prioritization is neglected in this modification of the algorithm. Therefore, all tasks from the free layer are automatically auctionable. More...

#include <layered_precedence_graph.h>

Inheritance diagram for daisi::cpps::logical::LayeredPrecedenceGraph:
daisi::datastructure::DirectedGraph< LPCVertex, std::monostate >

Public Member Functions

 LayeredPrecedenceGraph (std::shared_ptr< material_flow::MFDLScheduler > scheduler, const std::string &connection_string)
 
void next ()
 Taking the next step in the algorithm. Updating the graph by assuming that all tasks of the free layer are now scheduled. Accordingly, layers from the second and hidden layer need to be updated.
 
std::vector< material_flow::TaskgetAuctionableTasks () const
 In this modification of pIA we do not consider prioritizations yet. Therefore, all free tasks are auctionable.
 
void setEarliestValidStartTime (const std::string &task_uuid, const util::Duration &time)
 Setting the earliest valid start time, in pIA represented as PC[t], of a task.
 
void setLatestFinishTime (const std::string &task_uuid, const util::Duration &time)
 Setting the latest finish time, in pIA represented as F[t], of a task.
 
util::Duration getEarliestValidStartTime (const std::string &task_uuid) const
 
util::Duration getLatestFinishTime (const std::string &task_uuid) const
 
material_flow::Task getTask (const std::string &task_uuid) const
 
bool areAllTasksScheduled () const
 Checks whether all tasks are on the scheduled layer. The scheduled flag is not considered in this.
 
bool areAllFreeTasksScheduled () const
 Checks whether for all free tasks the scheduled flag is set. If yes, this means that the iteration is finished.
 
void setTaskScheduled (const std::string &task_uuid)
 Setting the scheduled flag of a task.
 
bool isFreeTaskScheduled (const std::string &task_uuid) const
 Checking whether a free task has already been scheduled in this iteration before the layers get updated.
 
bool isTaskFree (const std::string &task_uuid) const
 
std::vector< material_flow::TaskgetTasks () const
 

Detailed Description

Helper class to implement the pIA algorithm. A directed graph is layered into a free, second, and hidden layer. Prioritization is neglected in this modification of the algorithm. Therefore, all tasks from the free layer are automatically auctionable.

The algorithm is based on the following paper: McIntire, Mitchell, Ernesto Nunes, and Maria Gini. "Iterated multi-robot auctions for precedence-constrained task scheduling." Proceedings of the 2016 international conference on autonomous agents & multiagent systems. 2016.

Member Function Documentation

◆ areAllFreeTasksScheduled()

bool daisi::cpps::logical::LayeredPrecedenceGraph::areAllFreeTasksScheduled ( ) const

Checks whether for all free tasks the scheduled flag is set. If yes, this means that the iteration is finished.

Returns
True if for all free tasks the scheduled flag is set.

◆ areAllTasksScheduled()

bool daisi::cpps::logical::LayeredPrecedenceGraph::areAllTasksScheduled ( ) const

Checks whether all tasks are on the scheduled layer. The scheduled flag is not considered in this.

Returns
True if all tasks are on the scheduled layer.

◆ getAuctionableTasks()

std::vector< daisi::material_flow::Task > daisi::cpps::logical::LayeredPrecedenceGraph::getAuctionableTasks ( ) const

In this modification of pIA we do not consider prioritizations yet. Therefore, all free tasks are auctionable.

Returns
Vector of all free tasks.

◆ isFreeTaskScheduled()

bool daisi::cpps::logical::LayeredPrecedenceGraph::isFreeTaskScheduled ( const std::string &  task_uuid) const

Checking whether a free task has already been scheduled in this iteration before the layers get updated.

Parameters
task_uuidUuid of the task we refer to
Returns
True if the task is on the free layer and the scheduled flag is set

◆ next()

void daisi::cpps::logical::LayeredPrecedenceGraph::next ( )

Taking the next step in the algorithm. Updating the graph by assuming that all tasks of the free layer are now scheduled. Accordingly, layers from the second and hidden layer need to be updated.

Implements pseudocode of Algorithm 2 "UpdatePrecGraph" from pIA paper All free tasks are scheduled.

◆ setEarliestValidStartTime()

void daisi::cpps::logical::LayeredPrecedenceGraph::setEarliestValidStartTime ( const std::string &  task_uuid,
const util::Duration &  time 
)

Setting the earliest valid start time, in pIA represented as PC[t], of a task.

Parameters
taskTask to search for the according vertex
timeEarliest valid start time

◆ setLatestFinishTime()

void daisi::cpps::logical::LayeredPrecedenceGraph::setLatestFinishTime ( const std::string &  task_uuid,
const util::Duration &  time 
)

Setting the latest finish time, in pIA represented as F[t], of a task.

Parameters
taskTask to search for the according vertex
timeEarliest valid start time

◆ setTaskScheduled()

void daisi::cpps::logical::LayeredPrecedenceGraph::setTaskScheduled ( const std::string &  task_uuid)

Setting the scheduled flag of a task.

Parameters
task_uuidUuid of the task we refer to

The documentation for this class was generated from the following files: