self["models_configuration"]["household_location_choice_model"]["controller"]["prepare_for_estimate"]["arguments"]["index_to_unplace"] = 'None' self["models_configuration"]["household_location_choice_model"]["controller"]["prepare_for_estimate"]["arguments"]["filter"] = "'household.move == 1'"#None #"'psrc.household.customized_filter'" self["models_configuration"]["household_location_choice_model"]["controller"]["init"]["arguments"]['filter'] = "'urbansim_parcel.building.is_residential'" # self["datasets_to_preload"].merge({"tour":{}, "person":{}}) # self["datasets_to_cache_after_each_model"] += ["person"] self["models"] = [ # {"household_relocation_model": ["run"]}, # {"tour_schedule_model": ["run"]}, {"household_location_choice_model": ["estimate"]} ] if __name__ == '__main__': from my_estimation_config import my_configuration from urbansim.estimation.estimator import Estimator from urbansim.estimation.estimator import update_controller_by_specification_from_module from opus_core.simulation_state import SimulationState from opus_core.store.attribute_cache import AttributeCache run_configuration = HlcmParcelEstimation() run_configuration.update_config() run_configuration = update_controller_by_specification_from_module( run_configuration, "household_location_choice_model", "inprocess.bhylee.hlcm_parcel_specification") er = Estimator(run_configuration, save_estimation_results=False) er.estimate() # er.create_prediction_success_table() # er.create_prediction_success_table(choice_geography_id="area_type_id=building.disaggregate(zone.area_type_id, intermediates=[parcel])" ) # er.create_prediction_success_table(choice_geography_id="building_type_id=building.building_type_id" ) # er.create_prediction_success_table(choice_geography_id="large_area_id=building.disaggregate(faz.large_area_id, intermediates=[zone, parcel])" ) # er.reestimate("hlcm_parcel_specification")
'sampler'] = None #"'opus_core.samplers.weighted_sampler'" #run_configuration["models_configuration"]["household_location_choice_model"]["init"]["arguments"]["estimate_config"] = {"weights_for_estimation_string":"urbansim.zone.vacant_residential_units"} run_configuration["models_configuration"]["household_location_choice_model"][ "controller"]["prepare_for_estimate"]["arguments"][ "join_datasets"] = 'True' run_configuration["models_configuration"]["household_location_choice_model"][ "controller"]["prepare_for_estimate"]["arguments"][ "index_to_unplace"] = 'None' run_configuration["models_configuration"]["household_location_choice_model"][ "controller"]["init"]["arguments"]["location_set"] = "zone" run_configuration["models_configuration"]["household_location_choice_model"][ "controller"]["init"]["arguments"][ "location_id_string"] = "'urbansim.household.zone_id'" run_configuration["datasets_to_preload"].merge({'zone': {}}) run_configuration['models'] = [{ 'household_location_choice_model': ['estimate'] }] if __name__ == '__main__': from washtenaw.estimation.my_estimation_config import my_configuration from urbansim.estimation.estimator import Estimator from urbansim.estimation.estimator import update_controller_by_specification_from_module run_configuration = update_controller_by_specification_from_module( run_configuration, "household_location_choice_model", "washtenaw.aocm.hlcm_zone_specification") run_configuration.merge(my_configuration) estimator = Estimator(run_configuration, save_estimation_results=False) estimator.estimate()
"parcels", # 'gridcells', # 'households', # 'jobs', # 'travel_data', "persons", # need to cache # 'zones', "households_for_estimation", ] run_configuration["datasets_to_preload"].merge( {"zone": {}, "household": {}, "person": {"package_name": "psrc"}, "parcel": {"package_name": "psrc"}} ) run_configuration["models"] = [ # {"household_relocation_model": ["run"]}, {"household_location_choice_model": ["estimate"]} ] if __name__ == "__main__": from my_estimation_config import my_configuration from urbansim.estimation.estimator import Estimator from urbansim.estimation.estimator import update_controller_by_specification_from_module run_configuration = update_controller_by_specification_from_module( run_configuration, "household_location_choice_model", "inprocess.psrc_parcel.hlcm_parcel_specification" ) run_configuration.merge(my_configuration) estimator = Estimator(run_configuration, save_estimation_results=False) estimator.estimate() # estimator.reestimate("hlcm_parcel_specification")
# self["datasets_to_preload"].merge({"tour":{}, "person":{}}) # self["datasets_to_cache_after_each_model"] += ["person"] self["models"] = [ # {"household_relocation_model": ["run"]}, # {"tour_schedule_model": ["run"]}, { "household_location_choice_model": ["estimate"] } ] if __name__ == '__main__': from my_estimation_config import my_configuration from urbansim.estimation.estimator import Estimator from urbansim.estimation.estimator import update_controller_by_specification_from_module from opus_core.simulation_state import SimulationState from opus_core.store.attribute_cache import AttributeCache run_configuration = HlcmParcelEstimation() run_configuration.update_config() run_configuration = update_controller_by_specification_from_module( run_configuration, "household_location_choice_model", "inprocess.bhylee.hlcm_parcel_specification") er = Estimator(run_configuration, save_estimation_results=False) er.estimate() # er.create_prediction_success_table() # er.create_prediction_success_table(choice_geography_id="area_type_id=building.disaggregate(zone.area_type_id, intermediates=[parcel])" ) # er.create_prediction_success_table(choice_geography_id="building_type_id=building.building_type_id" ) # er.create_prediction_success_table(choice_geography_id="large_area_id=building.disaggregate(faz.large_area_id, intermediates=[zone, parcel])" ) # er.reestimate("hlcm_parcel_specification")