Re: [UrbanSim-Users] MySql configuration

From: Zuccarello Philippe <philippe.zuccarello_at_wanadoo.fr>
Date: Fri, 14 Sep 2007 20:08:14 +0100

Mark,

In fact the file to modify is
urbansim/configs/general_configuration_with_changed_elcm.py but not
urbansim/configs/general_configuration.py (check the
eugene/configs/baseline.py, it import the first one).

I tryed also to add the parameter "Sampler"="None" : the following warnings
no more appear (ok) but we have the same last Error.

                        WARNING: weight_array sums to 0 or less
                        WARNING: weight array dosen't have enough non-zero
counts, use sample with replacement
                        WARNING: prob_array doesn't sum up to 1, and is
normalized.

Hana, I work with Mark but I'm not near him.

I continue to have a look on this.

Regards,
Philippe.
  -----Message d'origine-----
  De : users-bounces_at_urbansim.org [mailto:users-bounces_at_urbansim.org]De la
part de Mark Kryvobokov
  Envoye : vendredi 14 septembre 2007 15:02
  A : Hana Sevcikova
  Cc : users
  Objet : Re: [UrbanSim-Users] MySql configuration

  Hana,

  Unfortunately, I have errors for ELCM again.

  For "sample_size_location" equals to either 10 or 5 or 3:

  WARNING: weight_array sums to 0 or less

  WARNING: weight array dosen't have enough non-zero counts, use sample with
replacement

  WARNING: prob_array doesn't sum up to 1, and is normalized.

  For "sample_size_location" equals to None:

  WARNING: Neither 'sample_proportion_locations' nor 'sample_size_locations'
given. Locations will not be sampled.

  In annual_employment_control_totals table there is sector_id equals to 6.
This number 6 is absent in our dataset. Could it be the reason of the error?

  Mark

  --- Исходное сообщение ---
  От кого: Hana Sevcikova (hana_at_cs.washington.edu)
  Кому: Mark Kryvobokov
  Дата: 14 сентября, 17:06:37
  Тема: Re: [UrbanSim-Users] MySql configuration

> Mark,
>
> The reason for this error is that there are not enough eligible
locations
> to sample from in order to create a set of alternatives for placing
jobs.
> The default setting is to sample 30 locations. You can try to decrease
> this number by adding an argument sample_size_locations=10 (e.g.) to
>
> 'employment_location_choice_model': {
> 'controller':
> EmploymentLocationChoiceModelConfigurationCreator(
> input_index = 'erm_index',
> # here add the argument
> ).execute(),
> },
>
> in urbansim/configs/general_configuration.py. Or switch the sampling off
> by adding an argument sampler=None to the same place.
>
> I hope it works.
>
> Hana
>
>
> On Fri, 14 Sep 2007, Mark Kryvobokov wrote:
>
> > Hi,
> > When we run simulation with the Eugene data, everything was OK. Then
> > we started to change the Eugene baseyear dataset in order to transform
> > it to the dataset for the city of Lyon. The intention is to change the
> > Eugene dataset step by step. Thus, in Zones table we changed the
travel
> > time and added data for additional zones. In Gridcells table we
remained
> > only one gridcell for each zone (for the beginning). We remain only
> > these gridcells in other tables. After running simulation for the same
> > sequence of models as for Eugene data, the only problem is with {
> > 'employment_location_choice_model' : { 'group_members' : '_all_' }} .
> > When we run simulation without that model, it is OK. When we run
> > simulation with that model, the problems are as follows:
> >
> >
> >
> > WARNING: weight array dosen't have enough non-zero counts, use sample
with replacement
> >
> >
> > Traceback (most recent call last):
> >
> > File
"C:\MyNew\projects\OPUS\opus-4.0\urbansim\model_coordinators\model_system.py
", line 521, in ?
> >
> > s.run(resources)
> >
> > File
"C:\MyNew\projects\OPUS\opus-4.0\urbansim\model_coordinators\model_system.py
", line 132, in run
> >
> > resources=resources, flt_directory=flt_directory)
> >
> > File
"C:\MyNew\projects\OPUS\opus-4.0\urbansim\model_coordinators\model_system.py
", line 358, in run_year
> >
> > self.vardict[outputvar] = self.do_process(locals())
> >
> > File
"C:\MyNew\projects\OPUS\opus-4.0\urbansim\model_coordinators\model_system.py
", line 424, in do_process
> >
> > return eval(ev)
> >
> > File "", line 0, in ?
> >
> > File "C:\MyNew\projects\OPUS\opus-4.0\opus_core\model.py", line 45, in
logged_run_method
> >
> > results = run_method(*req_args, **opt_args)
> >
> > File "C:\MyNew\projects\OPUS\opus-4.0\opus_core\configurable.py", line
39, in config_run_method
> >
> > results = run_method(*req_args, **opt_args)
> >
> > File
"C:\MyNew\projects\OPUS\opus-4.0\urbansim\models\agent_location_choice_model
_member.py", line 44, in run
> >
> > agents_index=agents_index[new_agents_index], **kwargs)
> >
> > File
"C:\MyNew\projects\OPUS\opus-4.0\urbansim\models\agent_location_choice_model
.py", line 68, in run
> >
> > agents_index[unplaced], chunk_specification, data_objects, run_config,
debuglevel)
> >
> > File
"C:\MyNew\projects\OPUS\opus-4.0\urbansim\models\location_choice_model.py",
line 123, in run
> >
> > debuglevel=debuglevel)
> >
> > File "C:\MyNew\projects\OPUS\opus-4.0\opus_core\choice_model.py", line
134, in run
> >
> > data_objects=data_objects)
> >
> > File "C:\MyNew\projects\OPUS\opus-4.0\opus_core\chunk_model.py", line
74, in run
> >
> > dataset, **kwargs)
> >
> > File
"C:\MyNew\projects\OPUS\opus-4.0\urbansim\models\agent_location_choice_model
.py", line 83, in run_chunk
> >
> > data_objects)
> >
> > File
"C:\MyNew\projects\OPUS\opus-4.0\urbansim\models\location_choice_model.py",
line 140, in run_chunk
> >
> > choices = ChoiceModel.run_chunk(self,agents_index, agent_set,
specification, coefficients, data_objects)
> >
> > File "C:\MyNew\projects\OPUS\opus-4.0\opus_core\choice_model.py", line
147, in run_chunk
> >
> > index = self.get_choice_index(nchoices, agent_set, agents_index,
agentsubset, data_objects)
> >
> > File
"C:\MyNew\projects\OPUS\opus-4.0\urbansim\models\location_choice_model.py",
line 283, in get_choice_index
> >
> > weight=self.weights, resources=self.run_config)
> >
> > File "C:\MyNew\projects\OPUS\opus-4.0\opus_core\configurable.py", line
39, in config_run_method
> >
> > results = run_method(*req_args, **opt_args)
> >
> > File
"C:\MyNew\projects\OPUS\opus-4.0\opus_core\samplers\weighted_sampler.py",
line 103, in run
> >
> > replace=replace, return_indices=True )
> >
> > File "C:\MyNew\projects\OPUS\opus-4.0\opus_core\sampling_toolbox.py",
line 273, in prob2dsample
> >
> > cum_prob = ncumsum(p_array)
> >
> > File "C:\MyNew\projects\OPUS\opus-4.0\opus_core\misc.py", line 401, in
ncumsum
> >
> > raise ValueError, "The probability array must sum up to 1. It is " + \
> >
> > ValueError: The probability array must sum up to 1. It is -1.#IND
> >
> >
C:\Python24\Lib\site-packages\mysql_python-1.2.2-py2.4-win32.egg\_mysql.py:3
: UserWarning: Module _mysql was already imported from
C:\Python24\Lib\site-packages\mysql_python-1.2.2-py2.4-win32.egg\_mysql.pyc,
but c:\python24\lib\site-packages\mysql_python-1.2.2-py2.4-win32.egg is
being added to sys.path
> >
> >
C:\Python24\Lib\site-packages\mysql_python-1.2.2-py2.4-win32.egg\_mysql.py:3
: UserWarning: Module MySQLdb was already imported from
C:\Python24\Lib\site-packages\mysql_python-1.2.2-py2.4-win32.egg\MySQLdb\__i
nit__.pyc, but
c:\python24\lib\site-packages\mysql_python-1.2.2-py2.4-win32.egg is being
added to sys.path
> >
> >
C:\Python24\Lib\site-packages\mysql_python-1.2.2-py2.4-win32.egg\_mysql.py:3
: UserWarning: Module opus_core was already imported from
C:\MyNew\projects\OPUS\opus-4.0\opus_core\__init__.pyc, but
c:\mynew\projects\opus\opus-4.0 is being added to sys.path
> >
> > Traceback (most recent call last):
> >
> > File "C:\MyNew\projects\OPUS\opus-4.0\opus_core\tools\start_run.py",
line 73, in ?
> >
> > run_manager.run_run(config)
> >
> > File
"C:\MyNew\projects\OPUS\opus-4.0\opus_core\services\run_server\run_manager.p
y", line 162, in run_run
> >
> > model_system.run_multiprocess(run_resources)
> >
> > File
"C:\MyNew\projects\OPUS\opus-4.0\urbansim\model_coordinators\model_system.py
", line 457, in run_multiprocess
> >
> > ForkProcess().fork_new_process(
> >
> > File "C:\MyNew\projects\OPUS\opus-4.0\opus_core\fork_process.py", line
47, in fork_new_process
> >
> > raise StandardError("Problem with %s" % module_name)
> >
> > StandardError: Problem with urbansim.model_coordinators.model_system
> >
> > Traceback (most recent call last):
> >
> > File "C:\MyNew\projects\OPUS\opus-4.0\eugene\tools\letsim_run.py",
line 54, in ?
> >
> > ForkProcess().fork_new_process('opus_core.tools.start_run',
resources=config)
> >
> > File "C:\MyNew\projects\OPUS\opus-4.0\opus_core\fork_process.py", line
47, in fork_new_process
> >
> > raise StandardError("Problem with %s" % module_name)
> >
> > StandardError: Problem with opus_core.tools.start_run
> > >From employment_sectors table we deleted those sector_id values,
which are not used in our data in jobs table, we did the same for other
tables (race_id for race_names etc.), but after running simulation we have
the same errors. What is the reason of the problem?
> >
> > Mark
> >
>

  --
  Найдите работу просто и быстро на JOB.ukr.net
  http://job.ukr.net

Received on Fri Sep 14 2007 - 11:09:43 PDT

This archive was generated by hypermail 2.2.0 : Sun Sep 16 2007 - 22:15:47 PDT