Class RolesPopulationLineChartDrawer
java.lang.Object
madkit.kernel.Agent
madkit.simulation.SimuAgent
madkit.kernel.Watcher
madkit.simulation.Viewer
madkit.simulation.viewer.LineChartDrawer<Probe>
madkit.simulation.viewer.RolesPopulationLineChartDrawer
A Viewer that displays the population of roles in the artificial organization
-
Nested Class Summary
Nested classes/interfaces inherited from class madkit.kernel.Agent
Agent.ReturnCode
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addRoleToMonitoring
(String group, String role) Adds a role to the monitoringvoid
display()
The display method called by the simulation engine.protected String
Gets the title of the line chartprotected String
Gets the label of the x axisprotected String
Gets the label of the y axisprotected void
This method is called when the agent is activated.void
render()
Renders the simulation state.Methods inherited from class madkit.simulation.viewer.LineChartDrawer
addData, addSerie, getLineChart, getMaxXDataPoints, getSeries, setMaxXDataPoints
Methods inherited from class madkit.simulation.Viewer
getGUI, onEnd, onSimulationStart, setGUI
Methods inherited from class madkit.kernel.Watcher
addProbe, getProbes, removeAllProbes, removeProbe, toString
Methods inherited from class madkit.simulation.SimuAgent
createSimuGroup, getCommunity, getEngineGroup, getEnvironment, getLauncher, getModel, getModelGroup, getNextEventDate, getScheduler, getSimuTimer, getViewers, launchAgent, leaveRole, leaveSimuGroup, leaveSimuRole, playRole, prng, requestSimuRole
Methods inherited from class madkit.kernel.Agent
activate, broadcast, broadcastWithRole, broadcastWithRoleWaitForReplies, checkAgentAddress, createGroup, createGroup, createGroup, end, equals, executeThisAgent, executeThisAgent, exitOnKill, getAgentsWithRole, getAgentWithRole, getKernelAddress, getKernelConfig, getLogger, getMailbox, getName, getNetworkID, getOrganization, getReplyTo, handleRequestActionMessage, hashCode, isAlive, killAgent, killAgent, launchAgent, launchAgent, leaveGroup, leaveRole, live, nextMessage, onLive, pause, receiveMessage, reload, reply, replyWithRole, requestRole, requestRole, send, send, sendWaitReply, sendWaitReply, sendWithRole, sendWithRole, sendWithRoleWaitReply, sendWithRoleWaitReply, setupDefaultGUI, waitAnswer, waitAnswer, waitNextMessage, waitNextMessage
-
Constructor Details
-
RolesPopulationLineChartDrawer
public RolesPopulationLineChartDrawer()
-
-
Method Details
-
onActivation
protected void onActivation()Description copied from class:LineChartDrawer
This method is called when the agent is activated. By default, it requests the roleSimuOrganization.VIEWER_ROLE
in the groupSimuOrganization.ENGINE_GROUP
.The GUI is initialized with a
LineChart
as the central node.- Overrides:
onActivation
in classLineChartDrawer<Probe>
-
getLineChartTitle
Gets the title of the line chart- Specified by:
getLineChartTitle
in classLineChartDrawer<Probe>
- Returns:
- the title of the line chart
-
getyAxisLabel
Gets the label of the y axis- Specified by:
getyAxisLabel
in classLineChartDrawer<Probe>
- Returns:
- the label of the y-axis of the line chart
-
getxAxisLabel
Gets the label of the x axis- Specified by:
getxAxisLabel
in classLineChartDrawer<Probe>
- Returns:
- the label of the x-axis of the line chart
-
display
-
addRoleToMonitoring
-
render
-