Brian,
I would need to see more of your log file to tell you why this happens.
BTW, you can investigate your data (stored in cache) interactively in
python using opus functions. To make it more convenient, I just wrote a
function (called get_dataset_from_flt_storage) that returns a given
dataset (see attached, or update opus_core/misc.py from SVN).
Let me give you an example how to use it:
Say, due to a crash in year 2005 you want to check if your urbansim run
created some strange values in the dataset 'job' in 2004. So go to the
cache directory for 2004 and start a python shell. Then do:
>>> from opus_core.misc import get_dataset_from_flt_storage
>>> ds = get_dataset_from_flt_storage('job', '.', ['urbansim'])
Then you can use any Dataset method for data analysis, e.g.
>>> ds.summary()
or methods for plotting - plot_histogram, plot_scatter, or just simply
get_attribute (see opus_core/datasets/abstract_dataset.py).
In your case, given that the job relocation model fails, I would also
look the relocation rates, which you can do (from the base year) by :
>>> ds = get_dataset_from_flt_storage('rate', '.', ['urbansim'],
dataset_args={'what':'jobs'})
Hana
------
def get_dataset_from_flt_storage(dataset_name, directory,
package_order=['opus_core'], dataset_args=None):
from opus_core.storage_factory import StorageFactory
from opus_core.datasets.dataset_pool import DatasetPool
from opus_core.datasets.dataset_factory import DatasetFactory
from opus_core.datasets.dataset import Dataset
storage =
StorageFactory().get_storage('flt_storage',storage_location = directory)
if dataset_args is None:
pool = DatasetPool(storage=storage, package_order=package_order)
return pool.get_dataset(dataset_name)
dataset_args.update({'in_storage':storage})
try:
return DatasetFactory().search_for_dataset(dataset_name,
package_order, arguments=dataset_args)
except: # take generic dataset
return Dataset(dataset_name=dataset_name, **dataset_args)
Brian Miles wrote:
> Hello,
>
> I'm troubleshooting our models to identify problems such as data
> missing from/improperly formatted in our base year.
>
> In at least two cases (industrial employment relocation model, and
> household location choice model), I'm seeing the same proximate error:
>
> File "C:\opusworkspace-svn\opus_core\misc.py", line 515, in ncumsum
> str(prob_array.sum(axis=axis, dtype=dtype))
> ValueError: The probability array must sum up to 1. It is -1.#IND
>
>
> What I'm looking for is a suggested strategy for interpreting this
> error in these disparate cases.
>
> Thanks,
>
> Brian
> _______________________________________________
> Users mailing list
> Users_at_urbansim.org
> http://www.urbansim.org/mailman/listinfo/users
Received on Mon Feb 11 2008 - 11:37:37 PST
This archive was generated by hypermail 2.2.0 : Mon Feb 11 2008 - 11:37:39 PST