fpmas 1.6
Public Member Functions | List of all members
fpmas::api::runtime::Runtime Class Referenceabstract

#include <runtime.h>

Inheritance diagram for fpmas::api::runtime::Runtime:
Inheritance graph
[legend]

Public Member Functions

virtual void run (Date start, Date end)=0
 
virtual void run (Date end)=0
 
virtual void execute (const scheduler::Job &job)=0
 
virtual void execute (const scheduler::JobList &job_list)=0
 
virtual Date currentDate () const =0
 
virtual void setCurrentDate (Date date)=0
 

Detailed Description

Runtime API.

The purpose of a Runtime is to execute jobs scheduled in a Scheduler.

Member Function Documentation

◆ run() [1/2]

virtual void fpmas::api::runtime::Runtime::run ( Date  start,
Date  end 
)
pure virtual

Runs jobs from start, included, to end, excluded.

The Runtime is currently based on a unit time step. In consequence, the Runtime will execute jobs at dates start, start+1 and start+n for any integer n such that start+n < end.

At the end of the execution, currentDate() is reinitialized to 0.

Parameters
startstart date
endend date

Implemented in fpmas::runtime::Runtime.

◆ run() [2/2]

virtual void fpmas::api::runtime::Runtime::run ( Date  end)
pure virtual

Runs jobs from currentDate() to end, excluded.

Equivalent to

this->run(this->currentDate(), end);
virtual Date currentDate() const =0
virtual void run(Date start, Date end)=0
Parameters
endend date
See also
run(Date, Date)

Implemented in fpmas::runtime::Runtime.

◆ execute() [1/2]

virtual void fpmas::api::runtime::Runtime::execute ( const scheduler::Job job)
pure virtual

Executes the provided job.

Tasks of the job (excluding scheduler::Job::getBeginTask() and scheduler::Job::getEndTask()) are executed in a random order.

Parameters
jobjob to execute

Implemented in fpmas::runtime::Runtime.

◆ execute() [2/2]

virtual void fpmas::api::runtime::Runtime::execute ( const scheduler::JobList job_list)
pure virtual

Sequentially executes the jobs contained in the provided job_list.

Parameters
job_listlist of jobs to execute sequentially

Implemented in fpmas::runtime::Runtime.

◆ currentDate()

virtual Date fpmas::api::runtime::Runtime::currentDate ( ) const
pure virtual

Current internal date of the runtime.

The current date is initialized to 0 when a Runtime is built.

Returns
current date of this Runtime

Implemented in fpmas::runtime::Runtime.

◆ setCurrentDate()

virtual void fpmas::api::runtime::Runtime::setCurrentDate ( Date  date)
pure virtual

Sets the internal date of this Runtime, so that the next call to run(Date) will start to run jobs from date.

Parameters
datenew date

Implemented in fpmas::runtime::Runtime.


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