Class CentralizedNegotiation::Agent

Nested Relationships

This class is a nested type of Class CentralizedNegotiation.

Class Documentation

class Agent

Public Functions

Agent(schedule::ParticipantId id, Plan::Start start, Plan::Goal goal, std::shared_ptr<const Planner> planner, std::optional<SimpleNegotiator::Options> options = std::nullopt)

Constructor

Parameters:
  • id[in] This agent’s ID within the schedule database. If multiple agents are given the same ID in a negotiation, then a runtime exception will be thrown.

  • starts[in] The starting condition for this agent.

  • goal[in] The goal for this agent.

  • planner[in] The single-agent planner used for this agent. Each agent can have its own planner or they can share planners. If this is set to nullptr when the negotiation begins, then a runtime exception will be thrown.

  • options[in] Options to use for the negotiator of this agent. If nullopt is provided, then the default options of the SimpleNegotiator will be used.

Agent(schedule::ParticipantId id, std::vector<Plan::Start> starts, Plan::Goal goal, std::shared_ptr<const Planner> planner, std::optional<SimpleNegotiator::Options> options = std::nullopt)

Constructor

The planner will use whichever starting condition provides the optimal plan.

Parameters:
  • id[in] This agent’s ID within the schedule database. If multiple agents are given the same ID in a negotiation, then a runtime exception will be thrown.

  • starts[in] One or more starting conditions for this agent. If no starting conditions are provided before the negotiation begins, then a runtime exception will be thrown.

  • goal[in] The goal for this agent.

  • planner[in] The single-agent planner used for this agent. Each agent can have its own planner or they can share planners. If this is set to nullptr when the negotiation begins, then a runtime exception will be thrown.

  • options[in] Options to use for the negotiator of this agent. If nullopt is provided, then the default options of the SimpleNegotiator will be used.

schedule::ParticipantId id() const

Get the ID for this agent.

Agent &id(schedule::ParticipantId value)

Set the ID for this agent.

const std::vector<Plan::Start> &starts() const

Get the starts for this agent.

Agent &starts(std::vector<Plan::Start> values)

Set the starts for this agent.

const Plan::Goal &goal() const

Get the goal for this agent.

Agent &goal(Plan::Goal value)

Set the goal for this agent.

const std::shared_ptr<const Planner> &planner() const

Get the planner for this agent.

Agent &planner(std::shared_ptr<const Planner> value)

Set the planner for this agent.

const std::optional<SimpleNegotiator::Options> &options() const

Get the options for this agent.

Agent &options(std::optional<SimpleNegotiator::Options> value)

Set the options for this agent.