Modifiers | Name | Description |
---|---|---|
protected static long |
serialVersionUID |
This value is used to automatically generate agent identifiers. |
Type Params | Return Type | Name and description |
---|---|---|
|
AgentSet<Turtle> |
createOrderedTurtlesFromCSV(String fileName, Closure initClosure = null) Creates default ordered turtles from a CSV file. |
<E extends ReLogoAgent> |
AgentSet<E> |
createOrderedTurtlesFromCSV(String fileName, Class<E> turtleType, Closure initClosure = null) Creates ordered turtles of specific type from a CSV file. |
|
AgentSet<Turtle> |
createOrderedTurtlesFromExcel(String fileName, Closure initClosure = null) Creates ordered default turtles from the first sheet of an Excel file. |
<E extends ReLogoAgent> |
AgentSet<E> |
createOrderedTurtlesFromExcel(String fileName, Class<E> turtleType, Closure initClosure = null) Creates ordered turtles of specific type from the first sheet of an Excel file. |
|
AgentSet<Turtle> |
createOrderedTurtlesFromExcelWithSheet(String fileName, String sheetName, Closure initClosure = null) Creates ordered default turtles from a specific sheet in an Excel file. |
<E extends ReLogoAgent> |
AgentSet<E> |
createOrderedTurtlesFromExcelWithSheet(String fileName, String sheetName, Class<E> turtleType, Closure initClosure = null) Creates ordered turtles of specific type from a specific sheet in an Excel file. |
|
AgentSet<Turtle> |
createTurtlesFromCSV(String fileName, Closure initClosure = null) Creates default turtles from a CSV file. |
<E extends ReLogoAgent> |
AgentSet<E> |
createTurtlesFromCSV(String fileName, Class<E> turtleType, Closure initClosure = null) Creates turtles of specific type from a CSV file. |
|
AgentSet<Turtle> |
createTurtlesFromExcel(String fileName, Closure initClosure = null) Creates default turtles from the first sheet of an Excel file. |
<E extends ReLogoAgent> |
AgentSet<E> |
createTurtlesFromExcel(String fileName, Class<E> turtleType, Closure initClosure = null) Creates turtles of specific type from the first sheet of an Excel file. |
|
AgentSet<Turtle> |
createTurtlesFromExcelWithSheet(String fileName, String sheetName, Closure initClosure = null) Creates default turtles from a specific sheet in an Excel file. |
<E extends ReLogoAgent> |
AgentSet<E> |
createTurtlesFromExcelWithSheet(String fileName, String sheetName, Class<E> turtleType, Closure initClosure = null) Creates turtles of specific type from a specific sheet in an Excel file. |
|
protected Object |
getCellContent(Cell cell) Get Excel cell content according to type. |
|
protected List<String> |
getPublicFieldsAndProperties(Class clazz) Utility method to gather all the names of the public fields and properties of a class. |
|
protected void |
populateFieldValues(def t, Row row, List<String> headerFields, List<String> fieldsToUse) |
|
String |
toString() This method provides a human-readable name for the agent. |
|
void |
watch(Object watched) Does nothing, included for translation compatibility. |
This value is used to automatically generate agent identifiers.
Creates default ordered turtles from a CSV file. Optionally provide an initialization closure.
The format for the CSV file is:
prop1,prop2,prop3
val1a,val2a,val3a
val1b,val2b,val3b
Where if the turtle type has any of the properties (prop1,prop2,prop3), they will be set to (val1a,val2a,val3a) for the first turtle, (val1b,val2b,val3b) for the second turtle, and so on.
fileName
- the path to the CSV fileinitClosure
- the initialization routineCreates ordered turtles of specific type from a CSV file. Optionally provide an initialization closure.
The format for the CSV file is:
prop1,prop2,prop3
val1a,val2a,val3a
val1b,val2b,val3b
Where if the turtle type has any of the properties (prop1,prop2,prop3), they will be set to (val1a,val2a,val3a) for the first turtle, (val1b,val2b,val3b) for the second turtle, and so on.
fileName
- the path to the CSV fileturtleType
- the class of turtle to createinitClosure
- the initialization routineCreates ordered default turtles from the first sheet of an Excel file. Optionally provide an initialization closure.
The format for the Excel file is:
| prop1 | prop2 | prop3 |
| val1a | val2a | val3a |
| val1b | val2b | val3b |
Where if the turtle type has any of the properties (prop1,prop2,prop3), they will be set to (val1a,val2a,val3a) for the first turtle, (val1b,val2b,val3b) for the second turtle, and so on.
fileName
- the path from the default system directoryinitClosure
- the initialization routineCreates ordered turtles of specific type from the first sheet of an Excel file. Optionally provide an initialization closure.
The format for the Excel file is:
| prop1 | prop2 | prop3 |
| val1a | val2a | val3a |
| val1b | val2b | val3b |
Where if the turtle type has any of the properties (prop1,prop2,prop3), they will be set to (val1a,val2a,val3a) for the first turtle, (val1b,val2b,val3b) for the second turtle, and so on.
fileName
- the path from the default system directoryturtleType
- the class of turtle to createinitClosure
- the initialization routineCreates ordered default turtles from a specific sheet in an Excel file. Optionally provide an initialization closure.
fileName
- the path from the default system directorysheetName
- the specific sheet nameinitClosure
- the initialization routineCreates ordered turtles of specific type from a specific sheet in an Excel file. Optionally provide an initialization closure.
fileName
- the path from the default system directorysheetName
- the specific sheet nameturtleType
- the class of turtle to createinitClosure
- the initialization routineCreates default turtles from a CSV file. Optionally provide an initialization closure.
The format for the CSV file is:
prop1,prop2,prop3
val1a,val2a,val3a
val1b,val2b,val3b
Where if the turtle type has any of the properties (prop1,prop2,prop3), they will be set to (val1a,val2a,val3a) for the first turtle, (val1b,val2b,val3b) for the second turtle, and so on.
fileName
- the path to the CSV fileinitClosure
- the initialization routineCreates turtles of specific type from a CSV file. Optionally provide an initialization closure.
The format for the CSV file is:
prop1,prop2,prop3
val1a,val2a,val3a
val1b,val2b,val3b
Where if the turtle type has any of the properties (prop1,prop2,prop3), they will be set to (val1a,val2a,val3a) for the first turtle, (val1b,val2b,val3b) for the second turtle, and so on.
fileName
- the path to the CSV fileturtleType
- the class of turtle to createinitClosure
- the initialization routineCreates default turtles from the first sheet of an Excel file. Optionally provide an initialization closure.
The format for the Excel file is:
| prop1 | prop2 | prop3 |
| val1a | val2a | val3a |
| val1b | val2b | val3b |
Where if the turtle type has any of the properties (prop1,prop2,prop3), they will be set to (val1a,val2a,val3a) for the first turtle, (val1b,val2b,val3b) for the second turtle, and so on.
fileName
- the path from the default system directoryinitClosure
- the initialization routineCreates turtles of specific type from the first sheet of an Excel file. Optionally provide an initialization closure.
The format for the Excel file is:
| prop1 | prop2 | prop3 |
| val1a | val2a | val3a |
| val1b | val2b | val3b |
Where if the turtle type has any of the properties (prop1,prop2,prop3), they will be set to (val1a,val2a,val3a) for the first turtle, (val1b,val2b,val3b) for the second turtle, and so on.
fileName
- the path from the default system directoryturtleType
- the class of turtle to createinitClosure
- the initialization routineCreates default turtles from a specific sheet in an Excel file. Optionally provide an initialization closure.
The format for the Excel file is:
| prop1 | prop2 | prop3 |
| val1a | val2a | val3a |
| val1b | val2b | val3b |
Where if the turtle type has any of the properties (prop1,prop2,prop3), they will be set to (val1a,val2a,val3a) for the first turtle, (val1b,val2b,val3b) for the second turtle, and so on.
fileName
- the path from the default system directorysheetName
- the specific sheet nameinitClosure
- the initialization routineCreates turtles of specific type from a specific sheet in an Excel file. Optionally provide an initialization closure.
The format for the Excel file is:
| prop1 | prop2 | prop3 |
| val1a | val2a | val3a |
| val1b | val2b | val3b |
Where if the turtle type has any of the properties (prop1,prop2,prop3), they will be set to (val1a,val2a,val3a) for the first turtle, (val1b,val2b,val3b) for the second turtle, and so on.
fileName
- the path from the default system directorysheetName
- the specific sheet nameturtleType
- the class of turtle to createinitClosure
- the initialization routineGet Excel cell content according to type.
Utility method to gather all the names of the public fields and properties of a class.
clazz
- classThis method provides a human-readable name for the agent.
Does nothing, included for translation compatibility.