libs/setup.nls

Setup routines.  ToDo: for parsing further, non-mandatory input: is it possible to set variables given by names “directly”?

Summary
libs/setup.nlsSetup routines.
setupGlobal setup function
initialize-setupLoads file names of sceenario to load and checks that all files necessary are present.
setup-globalsReads globals data from external file and sets some values, e.g.
setup-nodesDefinition of nodes is read from external file.
add-non-usable-technologies
setup-edgesReads edges specification from external file and sets variables like edge->edge-id.
setup-technologiesReads technologies data from external file.
setup-agentsReads agents data from external file.
setup-seu-valuesReads seu values and destination-nodes from seu-value-file and creates global seu table and destinations table Number of seu values per agent-type has to be same as number of p’s (at the moment 4)
setup-p-calculationsReads p calculations from p-calculations-file and creates global calculations table.
setup-clientsSetup of hubnet clients.
setup-interfaceAdds data to the interface gathered from external files
setup-viewsSets default shape of hubnet-views.
setup-global-statsInitializes global variables measuring statistics
replace-seu-u-extra-valuesChanges some u-values for calibration purposes

setup

to setup

Global setup function

initialize-setup

to-report initialize-setup

Loads file names of sceenario to load and checks that all files necessary are present.

Returns

booltrue if setup was initialized successfully.

setup-globals

to-report setup-globals

Reads globals data from external file and sets some values, e.g. concerning which output files shall be written, manually.

Returns

booltrue if globals’ setup was successfully.

setup-nodes

to-report setup-nodes

Definition of nodes is read from external file.

Returns

booltrue, of nodes’ setup was successfull

add-non-usable-technologies

to-report add-non-usable-technologies [right-of-use-vector]
Adds empty lists to the given right-of-use-vector, indicating that the technology on the respective position cannot be used here.  This differs from a technology being bannedas a ban can be cancelled.

Parameters

right-of-use-vectorvector of [technology-type bool], indicating whether the technology-type may be used or not

Returns

resultinput-vector, with added [] in case of technology not usable at all.

setup-edges

to-report setup-edges

Reads edges specification from external file and sets variables like edge->edge-id.

Returns

booltrue if edges’ setup was successfully.

setup-technologies

to-report setup-technologies

Reads technologies data from external file.

Returns

booltrue if setup technologies was successfully.

setup-agents

to-report setup-agents

Reads agents data from external file.

Returns

booltrue if agents’ setup was successfully.

setup-seu-values

to-report setup-seu-values

Reads seu values and destination-nodes from seu-value-file and creates global seu table and destinations table Number of seu values per agent-type has to be same as number of p’s (at the moment 4)

Returns

booltrue if seu value setup was successfully.

setup-p-calculations

to-report setup-p-calculations

Reads p calculations from p-calculations-file and creates global calculations table.  Function contains a list of often used p-calculations as tasks to replace the string-type input, because tasks run much fuster using “run-result” than strings.  Strings on the other hand allow to simply alter parameters in scenarios, so this option shall be permanent.  Users should add their functions to the list of tasks to improve speed of simulation.

Returns

booltrue if p calculations setup was successfully.

setup-clients

to setup-clients

Setup of hubnet clients.

setup-interface

to setup-interface

Adds data to the interface gathered from external files

setup-views

to-report setup-views

Sets default shape of hubnet-views.

Returns

booltrue if setup-views was successfully.

setup-global-stats

to setup-global-stats

Initializes global variables measuring statistics

replace-seu-u-extra-values

to replace-seu-u-extra-values

Changes some u-values for calibration purposes

to setup
Global setup function
to-report initialize-setup
Loads file names of sceenario to load and checks that all files necessary are present.
to-report setup-globals
Reads globals data from external file and sets some values, e.g.
to-report setup-nodes
Definition of nodes is read from external file.
to-report add-non-usable-technologies [right-of-use-vector]
to-report setup-edges
Reads edges specification from external file and sets variables like edge->edge-id.
Hold the edges.
unique ID
to-report setup-technologies
Reads technologies data from external file.
to-report setup-agents
Reads agents data from external file.
to-report setup-seu-values
Reads seu values and destination-nodes from seu-value-file and creates global seu table and destinations table Number of seu values per agent-type has to be same as number of p’s (at the moment 4)
to-report setup-p-calculations
Reads p calculations from p-calculations-file and creates global calculations table.
to setup-clients
Setup of hubnet clients.
to setup-interface
Adds data to the interface gathered from external files
to-report setup-views
Sets default shape of hubnet-views.
to setup-global-stats
Initializes global variables measuring statistics
to replace-seu-u-extra-values
Changes some u-values for calibration purposes
Close