Modifier and Type | Field and Description |
---|---|
private static int |
coherenceRejection
Proportion for the coherence
|
private static int |
coherenceSelection
Proportion for the coherence for selections
|
private static deck.DeckRandom[][] |
deckAffinity
The random generators for the suitability and unsuitability between
agent types.
|
private static deck.DeckRandom |
deckCoherenceRejection
The random generators for the coherence of rejections
|
private static deck.DeckRandom |
deckCoherenceSelection
The random generators for the coherence of selections
|
private int |
index
Identifier that is used in the Sociogram for its identification.
|
private java.lang.String |
name
Name of the student
|
private static int |
NEUTRAL_CHOICE
The neutral choice
|
private static int |
sizeDeckAffinity
Size of decks for affinity (i.e. suitability and unsuitability).
|
private static int |
sizeDeckCoherenceRejection
Size of the deck for coherence for rejections
|
private static int |
sizeDeckCoherenceSelection
Size of the deck for coherence for selections
|
private int[] |
sizeLimits
The size limits of each size level.
|
private static int[][] |
suitable
Proportion of social selections with other agent of other type.
|
private static int |
SUITABLE_CHOICE
The selection choice from suitability
|
private AgentType |
type
Type of individual agent
|
private static int[][] |
unsuitable
Proportion of social rejection with other agent of other type
The indexes are (a) the first type of agent, and the (b) second type of agent.
|
private static int |
UNSUITABLE_CHOICE
The rejection choice from suitability
|
private double |
x
Coordinates in the graphical position of the sociogram
|
private double |
y
Coordinates in the graphical position of the sociogram
|
Constructor and Description |
---|
IndividualAgent(AgentType type)
Constructor of the class.
|
Modifier and Type | Method and Description |
---|---|
private static void |
createDecks()
It creates all the Deck Random generators.
|
static int |
getDeckValue(java.lang.String nameDeckChoice,
int[] indexes)
It gets the value of a deck for a specific choice.
|
int |
getIndex() |
java.lang.String |
getName() |
int |
getNumSizeLevels()
Obtains the number of size levels
|
static int |
getSizeDeckAffinity() |
static int |
getSizeDeckCoherenceRejection() |
static int |
getSizeDeckCoherenceSelection() |
AgentType |
getType() |
double |
getX() |
double |
getY() |
static int |
intValue(AgentType type)
Convert a type of an agent into an integer for accessing the
suitability of two types of agents
|
void |
live()
This method is periodically called withing the
multi-agent system simulation.
|
static void |
setDeckValue(java.lang.String nameDeckChoice,
int[] indexes,
int value)
It sets the value of a deck for a specific choice.
|
void |
setIndex(int index) |
void |
setName(java.lang.String name) |
static void |
setSizeDeckAffinity(int sizeDeckAffinity) |
static void |
setSizeDeckCoherenceRejection(int sizeDeckCoherenceRejection) |
static void |
setSizeDeckCoherenceSelection(int sizeDeckCoherenceSelection) |
void |
setX(double x) |
void |
setY(double y) |
int |
sizeLevel()
Returns the size level, by checking in which limits is bounded the size
of the current simulation.
|
private java.lang.String name
private AgentType type
private int index
private double x
private double y
private int[] sizeLimits
private static int sizeDeckAffinity
private static int[][] suitable
private static int[][] unsuitable
private static int sizeDeckCoherenceSelection
private static int coherenceSelection
private static int sizeDeckCoherenceRejection
private static int coherenceRejection
private static deck.DeckRandom deckCoherenceSelection
private static deck.DeckRandom deckCoherenceRejection
private static deck.DeckRandom[][] deckAffinity
private static final int SUITABLE_CHOICE
private static final int UNSUITABLE_CHOICE
private static final int NEUTRAL_CHOICE
public IndividualAgent(AgentType type)
public int getNumSizeLevels()
public int sizeLevel()
public static int intValue(AgentType type)
public void live()
private static void createDecks()
public static void setDeckValue(java.lang.String nameDeckChoice, int[] indexes, int value)
nameDeckChoice
- A name that identifies a deck and
specific choices. This parameter can be "suitable",
"unsuitable", "coherenceSelection" or "coherenceRejection".indexes
- If the deck choice values are stored
in a vector/matrix of one or several directions, this
parameter represents the position in this vector/matrix.
Otherwise, this parameter is ignored. It also sets the simetric
position, which makes sense with the simiplifications in which
only the i, j is consulted when i>j.value
- Value that is assigned to the specific
choice of the particular deck.public static int getDeckValue(java.lang.String nameDeckChoice, int[] indexes)
nameDeckChoice
- A name that identifies a deck and
specific choices. This parameter can be "suitable",
"unsuitable", "coherenceSelection" or "coherenceRejection".indexes
- If the deck choice values are stored
in a vector/matrix of one or several directions, this
parameter represents the position in this vector/matrix.
Otherwise, this parameter is ignored.public java.lang.String getName()
public int getIndex()
public void setName(java.lang.String name)
public void setIndex(int index)
public double getX()
public double getY()
public void setX(double x)
public void setY(double y)
public AgentType getType()
public static int getSizeDeckAffinity()
public static void setSizeDeckAffinity(int sizeDeckAffinity)
public static int getSizeDeckCoherenceSelection()
public static void setSizeDeckCoherenceSelection(int sizeDeckCoherenceSelection)
public static int getSizeDeckCoherenceRejection()
public static void setSizeDeckCoherenceRejection(int sizeDeckCoherenceRejection)