Changeset 3340

Show
Ignore:
Timestamp:
05/13/08 17:02:50 (2 months ago)
Author:
lmwang
Message:

(lmwang)added scripts for water demand model

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/urbansim_parcel/configs/controller_config.py

    r3259 r3340  
    476476#                 } 
    477477#             }, 
    478         } 
     478 
     479         'water_demand_model': { 
     480            "import": {"psrc_parcel.models.water_demand_model":"WaterDemandModel"}, 
     481            "init": { 
     482                "name": "WaterDemandModel", 
     483                "arguments": {"submodel_string": "'land_use_type_id'", 
     484                              "outcome_attribute": "'ln_month_combination_2'", 
     485                              "filter_attribute": None, 
     486                              "dataset_pool": "dataset_pool", 
     487                              }, 
     488                }, 
     489            "prepare_for_run": { 
     490                "name": "prepare_for_run", 
     491                "arguments": {"specification_storage": "base_cache_storage", 
     492                              "specification_table": "'water_demand_model_specification_for_month_combination_2'", 
     493                               "coefficients_storage": "base_cache_storage", 
     494                               "coefficients_table": "'water_demand_model_coefficients_for_month_combination_2'"}, 
     495                "output": "(specification, coefficients)" 
     496                }, 
     497            "run": { 
     498                "arguments": { 
     499                              "specification": "specification", 
     500                              "coefficients":"coefficients", 
     501                              "dataset": "parcel", 
     502                              "data_objects": "datasets", 
     503                } 
     504                }, 
     505            }, 
     506         } 
     507         
     508        for month in range(2, 13, 2): 
     509            month_string = "month_combination_" + str(month) 
     510            my_controller_configuration['water_demand_model_for_' + month_string] = copy.deepcopy(my_controller_configuration['water_demand_model']) 
     511            my_controller_configuration['water_demand_model_for_' + month_string]['init']['arguments']['outcome_attribute'] = "'%s'" % month_string 
     512            my_controller_configuration['water_demand_model_for_' + month_string]['prepare_for_run']['arguments']['specification_table'] = "'water_demand_model_specification_for_%s'" % month_string 
     513            my_controller_configuration['water_demand_model_for_' + month_string]['prepare_for_run']['arguments']['coefficients_table'] = "'water_demand_model_coefficients_for_%s'" % month_string 
    479514         
    480515        my_controller_configuration["workplace_choice_model_for_immigrant"] = copy.deepcopy(my_controller_configuration["workplace_choice_model_for_resident"])