Descripción
CONFIGDATA permite declarar estructuras de datos complejas en formato JSON al inicio de la simulación. Es una herramienta pensada para almacenar configuraciones globales que puedan ser accedidas o modificadas durante la simulación, como si fuesen una especie de "memoria estructurada del sistema".
Su sintaxis básica puede ser del estilo:
CONFIGDATA {
Primera: "AVION",
Segunda: 9,
camioneta: 100,
theSubObject: {name:"theName",type:7}
theArray: [110, 111, 12, 13, 14]
}
Internamente, este bloque construye un único objeto JS accesible desde cualquier punto del modelo mediante el SNA:
CD$(theSubObject.name) -> theName
CD$(theArray,LENGTH) -> 5
CD$(theArray.2) -> 12
CD$(,1) -> SEGUNDA
CD$(theSubObject,1) -> TYPE
Obteniéndose valores, tamaños y nombres de claves
CONFIGDATA_SET permite su modificado.
Su sintaxis básica puede ser del estilo:
CONFIGDATA {
Primera: "AVION",
Segunda: 9,
camioneta: 100,
theSubObject: {name:"theName",type:7}
theArray: [110, 111, 12, 13, 14]
}
Internamente, este bloque construye un único objeto JS accesible desde cualquier punto del modelo mediante el SNA:
CD$(theSubObject.name) -> theName
CD$(theArray,LENGTH) -> 5
CD$(theArray.2) -> 12
CD$(,1) -> SEGUNDA
CD$(theSubObject,1) -> TYPE
Obteniéndose valores, tamaños y nombres de claves
CONFIGDATA_SET permite su modificado.
Parámetros
A. Unico parámetro formato JSONEjemplo
CONFIGDATA {
Primera: "AVION",
Segunda: 9,
camioneta: 100,
theSubObject: {name:"theName",type:7}
theArray: [110, 111, 12, 13, 14]
}