massim.competition2012
Class GraphSimulationConfiguration

java.lang.Object
  extended by massim.framework.simulation.DefaultSimpleSimulationConfiguration
      extended by massim.competition2012.GraphSimulationConfiguration
All Implemented Interfaces:
java.io.Serializable, SimpleSimulationConfiguration, SimulationConfiguration, XMLCodec.XMLDecodable, ServerSimulationConfiguration

public class GraphSimulationConfiguration
extends DefaultSimpleSimulationConfiguration
implements java.io.Serializable, ServerSimulationConfiguration, XMLCodec.XMLDecodable

This class holds the simulation configuration specified in the XML config file.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface massim.framework.simulation.SimpleSimulationConfiguration
SimpleSimulationConfiguration.AgentConfiguration
 
Field Summary
 java.util.Vector<Achievement> achievements
          A vector holding the configurations of every possible achievement.
 java.util.HashMap<java.lang.String,ActionConfiguration> actionsConfMap
          A map from action names to their configurations.
 int agentsPerTeam
          The number of agents taking part in each team.
 int blurIterations
          How many iterations of blurring shall happen (only relevant if optimaWeight > 0)
 int cellWidth
          The width of each grid cell in the abstract grid in which the graph nodes will be randomly placed when generating the graph.
 int gradientWeight
          The weighting factor of gradient node weight generation
 int gridHeight
          The height of the abstract grid in which the graph nodes will be randomly placed when generating the graph.
 int gridWidth
          The width of the abstract grid in which the graph nodes will be randomly placed when generating the graph.
 java.lang.String mapGenerator
          The type of generator to be used
 int maxEdgeCost
          Maximum possible value for the random assignment of costs to edges during map generation.
 int maxNodeWeight
          Maximum possible value for the random assignment of weights to nodes during map generation.
 int maxNumberOfSteps
          The max number of steps that this simulation should run if not finalized or interrupted before.
 int minEdgeCost
          Minimum possible value for the random assignment of costs to edges during map generation.
 int minNodeWeight
          Minimum possible value for the random assignment of weights to nodes during map generation.
 int numberOfAgents
          The number of agents taking part in the simulation.
 int numberOfNodes
          The number of nodes for the graph to generate.
 int numberOfTeams
          The number of teams taking part in the simulation.
 int optimaPercentage
          The probability with which a node might be a local optimum (only relevant if optimaWeight > 0)
 int optimaWeight
          The weighting factor of optima node weight generation
 long randomSeed
          The seed that will be used for the random graph generator
 int randomWeight
          The weighting factor of random node weight generation
 java.util.HashMap<java.lang.String,RoleConfiguration> rolesConfMap
          A map from role names to their configurations.
 java.lang.String simulationName
          Simulation's name.
 java.lang.String tournamentName
          Tournament's name.
 
Constructor Summary
GraphSimulationConfiguration()
           
 
Method Summary
 void decodeFromXML(org.w3c.dom.Element source)
          Populates this object from the contents of an XML subtree with its root in source (taken from the configuration file).
 ActionConfiguration getActionConf(java.lang.String name)
          Returns the configuration object of the action whose name is given as a parameter.
 RoleConfiguration getRoleConf(java.lang.String name)
          Returns the configuration object of the role whose name is given as a parameter.
 java.util.Vector<java.lang.String> getTeamNames()
           
 void setSimulationName(java.lang.String name)
           
 void setTeamName(int n, java.lang.String name)
           
 void setTournamentName(java.lang.String name)
           
 
Methods inherited from class massim.framework.simulation.DefaultSimpleSimulationConfiguration
getAgentConfigurations, setAgentConfigurations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tournamentName

public java.lang.String tournamentName
Tournament's name.


simulationName

public java.lang.String simulationName
Simulation's name.


maxNumberOfSteps

public int maxNumberOfSteps
The max number of steps that this simulation should run if not finalized or interrupted before.


numberOfAgents

public int numberOfAgents
The number of agents taking part in the simulation.


numberOfTeams

public int numberOfTeams
The number of teams taking part in the simulation.


agentsPerTeam

public int agentsPerTeam
The number of agents taking part in each team.


numberOfNodes

public int numberOfNodes
The number of nodes for the graph to generate.


gridWidth

public int gridWidth
The width of the abstract grid in which the graph nodes will be randomly placed when generating the graph.


gridHeight

public int gridHeight
The height of the abstract grid in which the graph nodes will be randomly placed when generating the graph.


cellWidth

public int cellWidth
The width of each grid cell in the abstract grid in which the graph nodes will be randomly placed when generating the graph. Used for visualization.


minNodeWeight

public int minNodeWeight
Minimum possible value for the random assignment of weights to nodes during map generation.


maxNodeWeight

public int maxNodeWeight
Maximum possible value for the random assignment of weights to nodes during map generation.


minEdgeCost

public int minEdgeCost
Minimum possible value for the random assignment of costs to edges during map generation.


maxEdgeCost

public int maxEdgeCost
Maximum possible value for the random assignment of costs to edges during map generation.


actionsConfMap

public java.util.HashMap<java.lang.String,ActionConfiguration> actionsConfMap
A map from action names to their configurations.


rolesConfMap

public java.util.HashMap<java.lang.String,RoleConfiguration> rolesConfMap
A map from role names to their configurations.


achievements

public java.util.Vector<Achievement> achievements
A vector holding the configurations of every possible achievement.


randomSeed

public long randomSeed
The seed that will be used for the random graph generator


mapGenerator

public java.lang.String mapGenerator
The type of generator to be used


randomWeight

public int randomWeight
The weighting factor of random node weight generation


gradientWeight

public int gradientWeight
The weighting factor of gradient node weight generation


optimaWeight

public int optimaWeight
The weighting factor of optima node weight generation


blurIterations

public int blurIterations
How many iterations of blurring shall happen (only relevant if optimaWeight > 0)


optimaPercentage

public int optimaPercentage
The probability with which a node might be a local optimum (only relevant if optimaWeight > 0)

Constructor Detail

GraphSimulationConfiguration

public GraphSimulationConfiguration()
Method Detail

setSimulationName

public void setSimulationName(java.lang.String name)
Specified by:
setSimulationName in interface ServerSimulationConfiguration

setTournamentName

public void setTournamentName(java.lang.String name)
Specified by:
setTournamentName in interface ServerSimulationConfiguration

setTeamName

public void setTeamName(int n,
                        java.lang.String name)
Specified by:
setTeamName in interface ServerSimulationConfiguration

getTeamNames

public java.util.Vector<java.lang.String> getTeamNames()

getActionConf

public ActionConfiguration getActionConf(java.lang.String name)
Returns the configuration object of the action whose name is given as a parameter.

Parameters:
name - The name of the action.
Returns:
an ActionConfiguration object.

getRoleConf

public RoleConfiguration getRoleConf(java.lang.String name)
Returns the configuration object of the role whose name is given as a parameter.

Parameters:
name - The name of the role.
Returns:
a RoleConfiguration object.

decodeFromXML

public void decodeFromXML(org.w3c.dom.Element source)
Populates this object from the contents of an XML subtree with its root in source (taken from the configuration file).

Specified by:
decodeFromXML in interface XMLCodec.XMLDecodable
Parameters:
source -


Copyright © 2012. All Rights Reserved.