fpmas 1.6
Classes | Typedefs | Functions
fpmas::api::scheduler Namespace Reference

Classes

class  Epoch
 
class  Job
 
class  NodeTask
 
class  Scheduler
 
class  Task
 

Typedefs

typedef unsigned long Period
 
typedef float Date
 
typedef unsigned long TimeStep
 
typedef float SubTimeStep
 
typedef size_t JID
 
typedef std::vector< std::reference_wrapper< const Job > > JobList
 

Functions

TimeStep time_step (Date date)
 
SubTimeStep sub_time_step (Date date)
 
Date sub_step_end (TimeStep step)
 

Detailed Description

Scheduler components API namespace.

Typedef Documentation

◆ Period

typedef unsigned long fpmas::api::scheduler::Period

Type used to define a time period.

◆ Date

Type used to define a particular date.

The integer part of a Date corresponds to the TimeStep used to build an Epoch, and the rational part is the SubTimeStep, that can be used to order events within a TimeStep.

◆ TimeStep

typedef unsigned long fpmas::api::scheduler::TimeStep

Integral part of a Date.

◆ SubTimeStep

Decimal part of a Date.

◆ JID

Job ID type.

◆ JobList

typedef std::vector<std::reference_wrapper<const Job> > fpmas::api::scheduler::JobList

A list of Jobs.

Function Documentation

◆ time_step()

TimeStep fpmas::api::scheduler::time_step ( Date  date)

Returns the integer time step represented by date.

Parameters
datedate
Returns
time step

◆ sub_time_step()

SubTimeStep fpmas::api::scheduler::sub_time_step ( Date  date)

Returns the decimal sub time step represented by date.

Parameters
datedate
Returns
sub stime step

◆ sub_step_end()

api::scheduler::SubTimeStep fpmas::api::scheduler::sub_step_end ( api::scheduler::TimeStep  time_step)

The maximum Date value in the provided time_step.

This value can be used to schedule a job after all other in the current time step.

example
// Ordered list of jobs
scheduler.schedule(0, 1, job1);
scheduler.schedule(0.1, 1, job2);
...
// Always executed at the end of each time step
scheduler.schedule(fpmas::scheduler::sub_step_end(0), 1, final_job);