|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuchicago.src.sim.engine.SimModelImpl
uchicago.src.sim.engine.SimpleModel
uchicago.src.repastdemos.neural.NeuralModel
public class NeuralModel
This demo illustrates the use of the neural network package in an agent. The premise of this model is that there is an office with numerous employees and two bosses. Every tick of the model the bosses may or may not tell each employee to do something. Each employee then is to either perform some task or not depending on the tasks given to them by the bosses. After that the actions of the employee are judged by a consultant.
If an employee does not receive any command for a tick, the consultant will expect the emplyee to perform no tasks. If an employee receives one command from a boss, the employee should perform that task. If an employee receives a command from each boss, since the employee cannot perform multiple tasks she is to not perform the wrong taks and just do nothing. Encoding> this results in (Doing nothing = 0, doing something = 1):| receive no command (0, 0) | do nothing (0) |
| receive one command (0, 1) or (1, 0) | do something (1) |
| receive two commands (1, 1) | do nothing |
| Field Summary | |
|---|---|
protected Office |
office
|
protected int |
officeHeight
|
protected int |
officeWidth
|
| Fields inherited from class uchicago.src.sim.engine.SimpleModel |
|---|
agentList, autoStep, isGui, name, params, schedule, seed, shuffle, startAt |
| Fields inherited from class uchicago.src.sim.engine.SimModelImpl |
|---|
descriptors, modelManipulator |
| Constructor Summary | |
|---|---|
NeuralModel()
|
|
| Method Summary | |
|---|---|
void |
begin()
Begins a simulation run. |
protected void |
buildDisplay()
This builds the display surface for the office |
protected void |
buildGraphs()
This builds the error graphs. |
int |
getEmployeeCount()
|
java.lang.String[] |
getInitParam()
Gets the names of the initial model parameters to set. |
java.lang.String |
getName()
Gets the name of this model. |
int |
getOfficeHeight()
|
int |
getOfficeWidth()
|
static void |
main(java.lang.String[] args)
|
protected void |
postStep()
|
protected void |
preStep()
|
void |
setEmployeeCount(int employeeCount)
|
void |
setOfficeHeight(int officeHeight)
|
void |
setOfficeWidth(int officeWidth)
|
void |
setup()
Sets up the model for the next run, clears out all the old employees and the old displays |
protected void |
step()
|
| Methods inherited from class uchicago.src.sim.engine.SimpleModel |
|---|
atEnd, atPause, buildModel, buildSchedule, getNextDoubleFromTo, getNextIntFromTo, getSchedule, run, runAutoStep, setRngSeed, setStoppingTime, setStoppingTime |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Office office
protected int officeWidth
protected int officeHeight
| Constructor Detail |
|---|
public NeuralModel()
| Method Detail |
|---|
public java.lang.String[] getInitParam()
SimModel
getInitParam in interface SimModelgetInitParam in class SimpleModelpublic void begin()
SimModel
begin in interface SimModelbegin in class SimpleModelprotected void buildDisplay()
protected void buildGraphs()
public void setup()
setup in interface SimModelsetup in class SimpleModelprotected void preStep()
preStep in class SimpleModelprotected void step()
step in class SimpleModelprotected void postStep()
postStep in class SimpleModelpublic java.lang.String getName()
SimpleModel
getName in interface SimModelgetName in class SimpleModelpublic int getEmployeeCount()
public void setEmployeeCount(int employeeCount)
employeeCount - The number of employees in the office.public int getOfficeHeight()
public void setOfficeHeight(int officeHeight)
officeHeight - the officeHeightpublic int getOfficeWidth()
public void setOfficeWidth(int officeWidth)
officeWidth - the officeWidthpublic static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||