next up previous index
Next: Model Controller Configuration Up: Configurations Previous: Model System Configuration   Index


Models Configuration

The run configuration can contain an entry 'models_configuration' which can include any information specific to models or common to a set of models. The value of this entry is a dictionary. Model specific information would be included in an entry of the same name as the model name used in the entry 'models' (see Section 4.2.2). The ModelSystem class makes this information available to the controller by creating two local variables: 'models_configuration' (containing the value of 'models_configuration' and available to all models) and 'model_configuration' (available to each model at the time of its processing and containing information for this model). See the variable 'models_configuration' in the file urbansim/configs/general_configuration.py for an example how UrbanSim configures models.

If a model is running out of memory, you can add a 'chunk_specification' to that model's configuration. This instructs that model to run in multiple chunks, each containing a subset of the records (e.g., agents) to process. This specification can either limit the chunk to contain at most a given number of records:

    'chunk_specification':{
        'records_per_chunk':300,     # Put at most 300 records in a chunk
        per chunk },

or specify the number of chunks to use regardless of the number of records:

    'chunk_specification':{
        'nchunks':10,                # Use 10 chunks
        },


next up previous index
Next: Model Controller Configuration Up: Configurations Previous: Model System Configuration   Index
info (at) urbansim.org