|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuchicago.src.sim.engine.SimModelImpl
uk.ac.ucl.casa.andrew.phd.segModelPreferencesForBothDislike.SegGISModel
This variation of the segregation model was created to see what effect agents preferences for another group have on the outcome of the model. In a sense this is loosly based on Sakoda (1971) paper. The previous models have all focused on agents wanting to be in an area where at least a certain percentage of the neighbouring agents are of the same type as themselves with no consideration of the other group. This model will explore how the pattern of segregation alters if agents have preferences for its own group and for another group. The model could therefore be considered more of Sakoda-type(1971) than that of Schelling-type (1971) of model. The only thing that was changed was what makes the agent satisfied: For agents who want mixed neighbourhoods, a dislike for their own group Red Agent is satisfied if: Red Population % of neighbourhood <=50% and Blue Population % is >=50% Blue Agent is satisfied if: Blue Population % of neighbourhood <=30% and Red Population % is >=70%
Nested Class Summary | |
(package private) class |
SegGISModel.happystats
|
(package private) class |
SegGISModel.happystatsBlues
|
(package private) class |
SegGISModel.happystatsReds
|
(package private) class |
SegGISModel.landuseStats
|
(package private) class |
SegGISModel.landuseStatsNine
|
(package private) class |
SegGISModel.landuseStatsThree
|
(package private) class |
SegGISModel.landuseStatsTwo
|
(package private) class |
SegGISModel.residentAgentsCount
|
(package private) class |
SegGISModel.residentAgentsRemovedAsUnHappy
|
(package private) class |
SegGISModel.residentAgentsRemovedAsUnHappyBlue
|
(package private) class |
SegGISModel.residentAgentsRemovedAsUnHappyRed
|
(package private) class |
SegGISModel.residentAgentsSocCountBlue
|
(package private) class |
SegGISModel.residentAgentsSocCountRed
|
(package private) class |
SegGISModel.totalHappyAndUnhappyAgents
|
(package private) class |
SegGISModel.unhappystats
|
(package private) class |
SegGISModel.unhappystatsBlues
|
(package private) class |
SegGISModel.unhappystatsReds
|
Field Summary | |
(package private) static int |
blue_blue
|
(package private) static int |
BLUE_BLUE
|
(package private) static int |
blue_red
|
(package private) static int |
BLUE_RED
|
(package private) static java.lang.String |
datasource1
|
(package private) javax.swing.JFileChooser |
fileChooser
|
(package private) OpenMapData |
gisData
|
private uchicago.src.sim.analysis.OpenSequenceGraph |
landuseGraph
|
(package private) static org.apache.log4j.Category |
log
|
(package private) static int |
movement
|
(package private) static int |
MOVEMENT
|
(package private) static int |
moveToWithIn
|
(package private) static int |
MOVETOWITHIN
|
(package private) static java.lang.String |
neighbourhoodFile1
|
private uchicago.src.sim.gui.Legend |
newlegend
|
(package private) anl.repast.gis.display.OpenMapDisplay |
omDisplay
|
(package private) static int |
perAgents
|
(package private) static int |
PERAGNETS
|
private uchicago.src.sim.analysis.OpenSequenceGraph |
recorderHappyAgentsGraph
|
private uchicago.src.sim.analysis.DataRecorder |
recorderLanduse
|
private uchicago.src.sim.analysis.OpenSequenceGraph |
recorderTotalHappyAndSad
|
(package private) static int |
red_blue
|
(package private) static int |
RED_BLUE
|
(package private) static int |
red_red
|
(package private) static int |
RED_RED
|
(package private) java.util.ArrayList |
residentAgentsList
|
(package private) static boolean |
saveDataOn
|
(package private) uchicago.src.sim.engine.Schedule |
schedule
|
(package private) static int |
search
|
(package private) static int |
SEARCH
|
(package private) static boolean |
searchOn
|
private int |
simulationSpeed
|
(package private) static float |
sizeOfAgent
|
(package private) static float |
SIZEOFAGENT
|
(package private) static boolean |
snapshotOn
|
(package private) int |
STEP_NUM
|
(package private) double |
totalArea
|
(package private) java.util.ArrayList |
urbanAgentList
|
Fields inherited from class uchicago.src.sim.engine.SimModelImpl |
descriptors, modelManipulator |
Constructor Summary | |
SegGISModel()
|
Method Summary | |
void |
begin()
Calls the buildModel, buildDisplay and buildSchedule methods the method initialises the repast model In this order. |
void |
buildDisplay()
|
void |
buildModel()
|
void |
buildSchedule()
Schedules the execution of the specified method (ie step)on the specified object(ie this model) to start at the specified clock tick and continue every tick thereafter. |
void |
createShapefileForAgents()
creates a new point shapefile containting all the resident agents this uses information from the Resident class specifically information in the gisPropertyList()each element in the dbf file needs a get and set method in a similar way to reading in and storing changes in the urban agent. |
private void |
densityStats(java.util.ArrayList urbanAgentList)
Used to calculate max and miniuim density of Urban agent along with average density of the area. |
int |
getBlue_blue()
|
int |
getBlue_red()
|
java.lang.String[] |
getInitParam()
|
int |
getMovement()
|
int |
getMoveToWithin()
|
java.lang.String |
getName()
|
java.util.ArrayList |
getNeighborAgents(int[] neighbors)
|
int |
getNeighbourhood()
|
int |
getPerAgents()
|
int |
getRed_blue()
|
int |
getRed_red()
|
java.util.ArrayList |
getResidentAgents()
|
boolean |
getSaveDataOn()
|
uchicago.src.sim.engine.Schedule |
getSchedule()
Schedule manages the execution of BasicAction accoriding to the simulation clock. |
boolean |
getSearchOn()
|
float |
getSizeOfAgent()
|
boolean |
getSnapshotOn()
|
int |
getSTEP_NUM()
|
java.util.ArrayList |
getUrbanAgentList()
|
static void |
main(java.lang.String[] args)
|
void |
metresToDecimalDegress()
|
static float |
movementInDegreesCalculation()
|
private void |
numberOfHappyResdientAgents(java.util.ArrayList residentAgentsList)
Used to calculate the number of unhappy agents in the area. |
void |
postStep()
|
void |
preStep()
|
void |
reset()
The reset mmethod is called whenever the model is reset. |
void |
saveGALFile()
|
void |
saveShapefile()
|
void |
setBlue_blue(int i)
|
void |
setBlue_red(int j)
|
void |
setMovement(int mov)
|
void |
setMoveToWithin(int newMovementToWithin)
|
void |
setNeighbourhood(int ser)
|
void |
setPerAgents(int pa)
|
void |
setRed_blue(int c)
|
void |
setRed_red(int a)
|
void |
setResidentAgents(java.util.ArrayList residentAgents)
|
void |
setSaveDataOn(boolean show)
|
void |
setSearchOn(boolean show)
|
void |
setSizeOfAgent(float soa)
|
void |
setSnapshotOn(boolean show)
|
void |
setSnapShotRecording()
Created to save time when images are wanted when running a simulation. |
void |
setSTEP_NUM(int step_num)
|
void |
setup()
|
void |
setUrbanAgentList(java.util.ArrayList agentList)
|
void |
step()
Step method tells the program what to do at evey step THis therefore should contain infomation about agent movement, what agents are where etc. |
void |
takesnapshot()
Record snapshots of all of the displays, so one does not have to select the displays to be saved manually |
Methods inherited from class uchicago.src.sim.engine.SimModelImpl |
addPropertyListener, addSimEventListener, clearMediaProducers, clearPropertyListeners, fireBooleanPropertyEvent, fireEndSim, fireNumericPropertyEvent, fireObjectPropertyEvent, firePauseSim, fireSimEvent, fireStopSim, fireStringPropertyEvent, generateNewSeed, getController, getMediaProducers, getModelManipulator, getParameterDescriptors, getPropertiesValues, getRngSeed, getTickCount, pause, registerDisplaySurface, registerMediaProducer, removePropertyListener, removeSimEventListener, setController, setRngSeed, stop |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
static org.apache.log4j.Category log
javax.swing.JFileChooser fileChooser
static final int RED_RED
static int red_red
static final int RED_BLUE
static int red_blue
static final int BLUE_BLUE
static int blue_blue
static final int BLUE_RED
static int blue_red
static boolean snapshotOn
static boolean saveDataOn
static final int PERAGNETS
static float SIZEOFAGENT
static final int MOVEMENT
static final int SEARCH
static int perAgents
static float sizeOfAgent
static int search
static int movement
double totalArea
static final int MOVETOWITHIN
static int moveToWithIn
static java.lang.String datasource1
static java.lang.String neighbourhoodFile1
OpenMapData gisData
anl.repast.gis.display.OpenMapDisplay omDisplay
java.util.ArrayList urbanAgentList
java.util.ArrayList residentAgentsList
uchicago.src.sim.engine.Schedule schedule
int STEP_NUM
private int simulationSpeed
private uchicago.src.sim.analysis.OpenSequenceGraph landuseGraph
private uchicago.src.sim.analysis.DataRecorder recorderLanduse
private uchicago.src.sim.analysis.OpenSequenceGraph recorderHappyAgentsGraph
private uchicago.src.sim.analysis.OpenSequenceGraph recorderTotalHappyAndSad
static boolean searchOn
private uchicago.src.sim.gui.Legend newlegend
Constructor Detail |
public SegGISModel()
Method Detail |
public static void main(java.lang.String[] args)
public void begin()
public void buildModel()
public void buildDisplay()
public void setSnapShotRecording()
public void takesnapshot()
public void buildSchedule()
public void step()
public void preStep()
public void postStep()
private void numberOfHappyResdientAgents(java.util.ArrayList residentAgentsList)
private void densityStats(java.util.ArrayList urbanAgentList)
public java.util.ArrayList getNeighborAgents(int[] neighbors)
public void setup()
public void reset()
public uchicago.src.sim.engine.Schedule getSchedule()
public void saveShapefile()
public void createShapefileForAgents()
public void saveGALFile()
public java.lang.String getName()
public java.lang.String[] getInitParam()
public int getRed_red()
public void setRed_red(int a)
public int getRed_blue()
public void setRed_blue(int c)
public int getBlue_blue()
public void setBlue_blue(int i)
public int getBlue_red()
public void setBlue_red(int j)
public int getMoveToWithin()
public void setMoveToWithin(int newMovementToWithin)
public boolean getSaveDataOn()
public void setSaveDataOn(boolean show)
public boolean getSnapshotOn()
public void setSnapshotOn(boolean show)
public boolean getSearchOn()
public void setSearchOn(boolean show)
public int getPerAgents()
public void setPerAgents(int pa)
public float getSizeOfAgent()
public void setSizeOfAgent(float soa)
public int getMovement()
public void setMovement(int mov)
public int getNeighbourhood()
public void setNeighbourhood(int ser)
public java.util.ArrayList getUrbanAgentList()
public void setUrbanAgentList(java.util.ArrayList agentList)
public java.util.ArrayList getResidentAgents()
public void setResidentAgents(java.util.ArrayList residentAgents)
public int getSTEP_NUM()
public void setSTEP_NUM(int step_num)
public void metresToDecimalDegress()
public static float movementInDegreesCalculation()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |