Class RandomConnectedInit

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

public class RandomConnectedInit
extends java.lang.Object
implements IInitializer

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

Since:
1.0

Nested Class Summary
 class RandomConnectedInit.VecComp
           
 
Constructor Summary
RandomConnectedInit(int nAgents, double[] arrLfSizes, double lfRad)
          constructor specifying number of agents, the dimensionality in which they live, and the size of the containing box along each dimension.
RandomConnectedInit(int nAgents, double[] arrLfMin, double[] arrLfMax, double lfRad)
          constructor specifying number of agents, the dimensionality in which they live, and the size of the containing box along each dimension.
RandomConnectedInit(int nAgents, int nDim, double lfRad)
          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)
 void setMinRad(double lfMinRad)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomConnectedInit

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

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

RandomConnectedInit

public RandomConnectedInit(int nAgents,
                           double[] arrLfSizes,
                           double lfRad)
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.

RandomConnectedInit

public RandomConnectedInit(int nAgents,
                           double[] arrLfMin,
                           double[] arrLfMax,
                           double lfRad)
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
arrLfMin - min corner of box in which agents live.
arrLfMax - max corner of box in which agents live.
Method Detail

setMinRad

public void setMinRad(double lfMinRad)

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

getInitContState

public double[] getInitContState()
Initial continuous state vector

Specified by:
getInitContState in interface IInitializer

resetState

public void resetState()
Specified by:
resetState 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