Class RandomInit

java.lang.Object
  extended by RandomInit
All Implemented Interfaces:
IInitializer

public class RandomInit
extends java.lang.Object
implements IInitializer

Creates a random flock of robots in an n-dimensional box

Since:
1.0

Constructor Summary
RandomInit(int nAgents, double[] arrLfSizes)
          constructor specifying number of agents, the dimensionality in which they live, and the size of the containing box along each dimension.
RandomInit(int nAgents, int nDim)
          constructor specifying number of agents and dimensionality in which they live.
 
Method Summary
 IEnvironment getEnv()
           
 double[] getInitContState()
          Initial continuous state vector
 StateBundle[] getInitDiscreteState()
          convenient to have this...
 int getNumAgents()
           
 boolean isAgentCompatible(IAgent agent)
           
 void resetState()
           
 void setDefaultIniControlFunc(IControlFunc copyMe)
          Default initial control func (implementation may ignore)
 void setDefaultIniVars(ILogicVarBundle copyMe)
          Default initial logic var state (implementation may ignore)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomInit

public RandomInit(int nAgents,
                  int nDim)
constructor specifying number of agents and dimensionality in which they live.

Parameters:
nAgents - number of agents
nDim - dimensionality in which they live

RandomInit

public RandomInit(int nAgents,
                  double[] arrLfSizes)
constructor specifying number of agents, the dimensionality in which they live, and the size of the containing box along each dimension.

Parameters:
nAgents - number of agents
arrLfSizes - length, height, width, etc of box in which agents live-arrLfSizes.length is dimensionality.
Method Detail

setDefaultIniVars

public void setDefaultIniVars(ILogicVarBundle copyMe)
Description copied from interface: IInitializer
Default initial logic var state (implementation may ignore)

Specified by:
setDefaultIniVars in interface IInitializer

setDefaultIniControlFunc

public void setDefaultIniControlFunc(IControlFunc copyMe)
Description copied from interface: IInitializer
Default initial control func (implementation may ignore)

Specified by:
setDefaultIniControlFunc in interface IInitializer

resetState

public void resetState()
Specified by:
resetState in interface IInitializer

getInitContState

public double[] getInitContState()
Initial continuous state vector

Specified by:
getInitContState in interface IInitializer

getEnv

public IEnvironment getEnv()
Specified by:
getEnv in interface IInitializer

getNumAgents

public int getNumAgents()
Specified by:
getNumAgents in interface IInitializer

getInitDiscreteState

public StateBundle[] getInitDiscreteState()
convenient to have this...

Specified by:
getInitDiscreteState in interface IInitializer

isAgentCompatible

public boolean isAgentCompatible(IAgent agent)
Specified by:
isAgentCompatible in interface IInitializer