public interface ExtEnvironmentDiscrete extends ExtEnvironmentInteractive, ExtEnvironmentWithLayout, ExtWithSpaceType
P_AGENT_INTERACTIVE_DELEGATE, P_AGENT_WITH_SPATIAL_METRICS_DELEGATE, P_AGENT_WITH_SPECIFIC_SPACE, P_AGENT_WITH_SPECIFIC_SPACE_DELEGATE, P_ENTITY_DELEGATE, P_ENV_WITH_SPECIFIC_SPACE, P_ROOT, P_SPACE, P_USER_EXT
Modifier and Type | Method and Description |
---|---|
double |
cToX_xjal(int c)
This method is internal and shouldn't be called by user.
|
Agent |
getAgentAtCell(int r,
int c)
Returns the agent located in the cell with a given row and column, or null.
|
NeighborhoodType |
getNeighborhoodType()
Returns the type of neighbourhood (Euclidean, Moore)
|
boolean |
isCellInsideSpace(int r,
int c) |
void |
putAgent_xjal(Agent a,
int r,
int c) |
CellPosition |
randomEmptyCell()
Tries to find a pseudo-randomly located empty cell and return its row and column in
the array with two elements.
|
double |
rToY_xjal(int r)
This method is internal and shouldn't be called by user.
|
void |
setupSpace(double width,
double height,
int rows,
int columns,
NeighborhoodType neighborhoodType)
Sets the space type to discrete with the given dimensions and neighbourhood
type.
|
double |
spaceCellHeight()
Returns the height of the cell in discrete space.
|
double |
spaceCellWidth()
Returns the width of the cell in discrete space.
|
int |
spaceColumns()
Returns the number of columns in the space.
|
double |
spaceHeight()
Returns the height of environment space.
|
int |
spaceRows()
Returns the number of rows in the space.
|
double |
spaceWidth()
Returns the width of environment space.
|
void |
swapAgents_xjal(int r,
int c,
int r2,
int c2) |
applyLayout, getLayoutType, setLayoutType
agents, applyNetwork, applyNetwork, areStepsEnabled, deliverToAllAgentsInside, deliverToRandomAgentInside, disableSteps, enableSteps, getNetworkConnectionsPerAgent, getNetworkNeighborLinkProbability, getNetworkScaleFreeM, getNetworkType, getSpaceType, randomAgentExcept, randomAgentExcept, randomAgentInside, randomAgentInside, register_xjal, register_xjal, setNetworkRandom, setNetworkRingLattice, setNetworkScaleFree, setNetworkSmallWorld, setNetworkType_xjal, setNetworkUserDefined, size, toStringNetwork_xjal, toStringSpace_xjal, unregister_xjal
getAgent, next_xjal, onDestroy, onExtensionRemoved, priority, setNext_xjal, supportsInterface_xjal
void setupSpace(double width, double height, int rows, int columns, NeighborhoodType neighborhoodType)
width
- the width of the spaceheight
- the height of the spacerows
- the number of rows in the spacecolumns
- the number of columns in the spaceneighborhoodType
- the type of neighbourhood (Euclidean, Moore)double spaceWidth()
double spaceHeight()
double spaceCellWidth()
double spaceCellHeight()
int spaceRows()
int spaceColumns()
NeighborhoodType getNeighborhoodType()
CellPosition randomEmptyCell()
null
Agent getAgentAtCell(int r, int c)
r
- the row of the cellc
- the column of the cell@AnyLogicInternalAPI void swapAgents_xjal(int r, int c, int r2, int c2)
boolean isCellInsideSpace(int r, int c)
@AnyLogicInternalAPI double cToX_xjal(int c)
@AnyLogicInternalAPI double rToY_xjal(int r)
@AnyLogicInternalAPI void putAgent_xjal(Agent a, int r, int c)
Copyright © AnyLogic North America, LLC. All Rights Reserved.