Release Notes for Version 4.4
- A set of demographic models are implemented, including AgingModel?, FertilityModel?, MortalityModel?, EducationModel?, MarriageModel?, CohabitationModel?, DivorceModel?, BreakupModel?, ChildLeavingHomeModel?, RoommateModel?, HouseholdWorkersInitializationModel?, HouseholdWorkersModel?, IncomeRegressionModel?. See documentation fore more details: http://urbansim.org/Documentation/DemographicModels
- A logical entry 'accept_unavailability_of_choices' can be passed to run_config to control for accepting 'homeless' agents. The default behavior of the choice model causes the simulation to crash if there are no choices to be sampled from (e.g. due to running out of residential capacity in the HLCM). If this flag is set to True, the simulation will continue on by leaving the affected agents without a choice assignment (i.e. homeless in the HLCM).
- Nodes can be exported to and imported from XML files in the GUI. The new feature is accessible via context menu entries. The former, similar functionality for the "Data manager" is now handled by the generic import/export routines; an important difference is that now the import overwrites the selected node instead of inserting below the selected node. The tag and the "name" attribute are checked to avoid import errors. A right click on an empty area allows importing and exporting the hidden "root node" for the corresponding section of the configuration. Selection and expansion state are restored after importing.
- Nodes can be edited in XML format from within the GUI. The new functionality is available from the context menu, and is implemented internally using the new import/export feature. A right click on an empty area allows editing the hidden "root node" for the corresponding section of the configuration.
- New tool for a quick look at the data in a cache directory implemented, called DataExplorer. Here is an example how to use it:
$ python -i ~/workspace/src/opus_core/tools/explore_data.py -d path/to/cache_directory
Exploring data in path/to/cache_directory
>>> b = ex.get_dataset('building') # or ex.get_dataset('buildings', id_name='building_id')
>>> # (Any dataset method can be applied on b now.)
>>> # Compute any expression that can be derived from available datasets
>>> v = ex.compute_expression('building.residential_units>0')
- The weighted_sampler class can automatically create an attribute that can be used for sampling bias correction in multinomial logit estimation/computation. It computes log(p(D|i)) as defined in Ben-Akiva, Lerman:Discrete Choice Analysis, Chapter 9.3, Equation 9.22. To turn it on, set "include_mnl_bias_correction_term" to True in your estimate_config/run_config. In such a case, the model interaction dataset contains an attribute called '__mnl_bias_correction_term' which can be directly used in the model specification where it should be constrained to 1. For example, if used in a household location choice model, the variable library should have an entry for 'bias = household_x_building.__mnl_bias_correction_term' and the specification would contain a node
<variable_spec name="household_x_building.bias" fixed_value="1"/>
- Similarly to sampling by submodels, the location choice model was extended to allow for sampling by any types of groups. The user can switch this behavior on by setting two additional nodes in estimate_config/run_config: set "sample_alternatives_by_group" to True, and set "group_definition_for_sampling_alternatives" to an agent attribute that defines the groups. For example, if you want to sample alternatives by large areas of household's previous location, you can set that node to urbansim_parcel.household.large_area_id_lag1, in which case the groups are defined as the unique set of large area ids from the previous year. In addition, nodes "estimation_weight_string", "simulation_weight_string" and "filter" can contain the string 'GROUP' which will be during the simulation/estimation replaced by the specific group number. Thus, one can define group specific sampling weights or filters. Note that submodel sampling has priority over group sampling and thus, if your estimate_config/run_config has the node "sample_alternatives_by_submodel" set to True, submodel sampling will take place.
- The model system can now automatically detect datasets_to_preload. A dataset is included in the datasets_to_preload list, if the corresponding node in the xml configuration contains the tag model_dependency_type='dataset'.
- The ModelExplorer class has a method called model_dependencies(model, group), which prints out all primary attributes that the model depends on. This is taken from its specification and possibly model structure. In the latter case, the nodes containing dependencies must have tags called model_dependency_type which can be either 'variable', 'dataset' or 'table'. Some of the urbansim xml files do now contain these tags.
- The ModelExplorer class has a new method, called create_latex_tables(directory), which creates two latex files, one with a table containing the model specification, one with a table containing the model coefficients.
- The ModelExplorer class has a new method, called plot_coefficients(submodel, ...). It creates a barchart of coefficient values. It is to be used for regression coefficients, when estimated using standardized predictiors (see below). It can be used in an interactive estimation process.
- New estimation module for linear regression added, called estimate_linear_regression_standardized. It standardizes predictors using (X-mean(X))/(scale*sd(X)) where scale is configurable (in estimate_config['scale_for_data_standardization']; it defaults to 2). It allows to bring the resulting coefficients on the same scale. The value of each coefficient is the change in the outcome if the corresponding predictor changes from scale/2 * standard error below to scale/2 * standard error above its mean, keeping all other predictors at their means. This module should be used only for exploratory analysis, that is, the resulting coefficients should not be used in a simulation, since the simulation modules do not standardize data.
- Building construction model now modifies the land use type of parcels that are redeveloped.
- The dummy variable urbansim.household.is_income_DDD (used for categorizing households into income categories) accepts now user-specific income groups. These groups can be set in the urbansim_constants table as columns 'income_category_x_min' and 'income_category_x_max' where x is the number of the category. If these columns are not defined, the variable behaves as before, i.e. considers internal four categories.
- The Results tab of OPUS GUI is refactored to enable delete and restart a run; The results_manager node now doesn't save simulation_runs, instead reads runs on disk and inserts nodes upon starting of GUI.
- fixed an issue in ndimage.mean in scipy 0.8.0 where NaN? is returned for indices with zero counts.
- opus_core/estimation/estimator now saves the whole estimation results in log file estimate_models.log in the base_year_data directory when the specification and coefficients are saved to base_year_data cache.
- urbansim/models/transition_model has been refactored to accept optional sampling_threshold and sampling_hierarchy argument that specify criterion to move up sampling_hierarchy to sample agents. This generic transition_model now can synchronize a second dataset (e.g. synchronize persons for household transition model).
- Attribute 'start_time' added to the SimulationState class, including its setter and getter methods. It is a holder of the starting time of the simulation, i.e. the base year.
- Work At Home Choice Model - added an option of sampling as many at-home-workers as there are home-based jobs. They are sampled from the final logit probability distribution. To turn it on, in the run section of the config file set the argument match_number_of_jobs to True.
Topic revision: r24 - 29 Jan 2012 - 05:22:18 - LimingWang