fpmas 1.6
Public Member Functions | List of all members
fpmas::model::detail::AgentGroup Class Reference

#include <model.h>

Inheritance diagram for fpmas::model::detail::AgentGroup:
Inheritance graph
[legend]
Collaboration diagram for fpmas::model::detail::AgentGroup:
Collaboration graph
[legend]

Public Member Functions

api::scheduler::JobList jobs () const override
 
 AgentGroupBase (GroupId group_id, api::model::AgentGraph &agent_graph)
 
 AgentGroupBase (const AgentGroupBase &)=delete
 
 AgentGroupBase (GroupId group_id, api::model::AgentGraph &agent_graph, const api::model::Behavior &behavior)
 
- Public Member Functions inherited from fpmas::model::detail::AgentGroupBase
 AgentGroupBase (GroupId group_id, api::model::AgentGraph &agent_graph)
 
 AgentGroupBase (const AgentGroupBase &)=delete
 
AgentGroupBaseoperator= (const AgentGroupBase &)=delete
 
 AgentGroupBase (GroupId group_id, api::model::AgentGraph &agent_graph, const api::model::Behavior &behavior)
 
GroupId groupId () const override
 
const api::model::Behaviorbehavior () override
 
void add (api::model::Agent *) override
 
void remove (api::model::Agent *) override
 
void insert (api::model::AgentPtr *) override
 
void erase (api::model::AgentPtr *) override
 
void clear () override
 
scheduler::Jobjob () override
 
const scheduler::Jobjob () const override
 
api::scheduler::JobagentExecutionJob () override
 
const api::scheduler::JobagentExecutionJob () const override
 
std::vector< api::model::Agent * > agents () const override
 
std::vector< api::model::Agent * > localAgents () const override
 
std::vector< api::model::Agent * > distantAgents () const override
 
void addEventHandler (Event event, api::utils::Callback< api::model::Agent * > *callback) override
 
void removeEventHandler (Event event, api::utils::Callback< api::model::Agent * > *callback) override
 
virtual GroupId groupId () const =0
 
virtual const Behaviorbehavior ()=0
 
virtual void add (Agent *agent)=0
 
virtual void remove (Agent *agent)=0
 
virtual void clear ()=0
 
virtual void insert (AgentPtr *agent)=0
 
virtual void erase (AgentPtr *agent)=0
 
virtual std::vector< Agent * > agents () const =0
 
virtual std::vector< Agent * > localAgents () const =0
 
virtual std::vector< Agent * > distantAgents () const =0
 
virtual api::scheduler::Jobjob ()=0
 
virtual const api::scheduler::Jobjob () const =0
 
virtual api::scheduler::JobagentExecutionJob ()=0
 
virtual const api::scheduler::JobagentExecutionJob () const =0
 
virtual api::scheduler::JobList jobs () const =0
 
virtual void addEventHandler (Event event, api::utils::Callback< Agent * > *callback)=0
 
virtual void removeEventHandler (Event event, api::utils::Callback< Agent * > *callback)=0
 

Additional Inherited Members

- Public Types inherited from fpmas::api::model::AgentGroup
enum  Event { INSERT , ERASE , ADD , REMOVE }
 

Detailed Description

Simple api::model::AgentGroup.

The jobs() list only contains the agentExecutionJob().

Member Function Documentation

◆ jobs()

api::scheduler::JobList fpmas::model::detail::AgentGroup::jobs ( ) const
inlineoverridevirtual

Returns the list of Jobs associated to this group.

This list must at least contain the agentExecutionJob(). Extra processes might be added internally to ensure the proper execution of Agents: in consequence, this list of job can be safely scheduled to plan agents execution.

Example
// Schedules agent_group to be executed from iteration 10 with a
// period of 2
scheduler.schedule(10, 2, agent_group.jobs());

See the complete api::scheduler::Scheduler interface for more scheduling options.

Returns
list of jobs associated to this group

Implements fpmas::api::model::AgentGroup.

◆ AgentGroupBase() [1/3]

fpmas::model::detail::AgentGroupBase::AgentGroupBase ( GroupId  group_id,
api::model::AgentGraph agent_graph 
)

AgentGroupBase constructor.

Parameters
group_idunique id of the group
agent_graphassociated agent graph

◆ AgentGroupBase() [2/3]

fpmas::model::detail::AgentGroupBase::AgentGroupBase ( const AgentGroupBase )
delete

Deletes copy constructor.

◆ AgentGroupBase() [3/3]

fpmas::model::detail::AgentGroupBase::AgentGroupBase ( GroupId  group_id,
api::model::AgentGraph agent_graph,
const api::model::Behavior behavior 
)

AgentGroupBase constructor.

Parameters
group_idunique id of the group
agent_graphassociated agent graph
behaviorgroup behavior

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