Hello,
Thanks a lot for your Help Hana.
Yesterday, we have worked in this way with Mark but looking to the similar
script cache_mysql_data.py in same directory.
First, we have concluded that the Estimator / ModelSystem classes code
manage the output database set on configuration for store results but not
the input database to create a cache directory. The confusing part is that
in the run() method of the ModelSystem class
(urbansim/model_coordinators/model_system.py), we can read comment on header
method about the input database, but it seams to be ignored on the rest of
code.
Finally, as your suggest, we have modified the <our
city>/estimation/run_estimation.py to the create the cache data into a
temporary directory based on the 'cache_directory' and
'creating_baseyear_cache_configuration' settings take from the <our
city>/configs/baseline.py (remark it is not from <our
city>/estimation/my_estimation_config.py).
We only inconvenient is that if cache directory exists, it is not refresh.
So, we overwrite the temporary directory value to complete it with a sub
directory based on "date+time".
Regards,
Philippe and Mark.
-----Message d'origine-----
De : users-bounces_at_urbansim.org [mailto:users-bounces_at_urbansim.org]De la
part de Hana Sevcikova
Envoye : jeudi 29 novembre 2007 19:08
A : Fabrice Marchal
Cc : users_at_urbansim.org
Objet : Re: [UrbanSim-Users] using mysql for estimation input
Fabrice,
You need to first create a cache directory (with
opus_core/tools/create_baseyear_cache.py), set the 'cache_directory' in
my_configuration to that directory and run the estimation. The
input_configuration is included in order to be able to use that
configuration file as an argument for create_baseyear_cache.py.
Hana
Fabrice Marchal wrote:
> Hi,
>
> How can we specify the configuration to use the mysql tables for input
> before caching the data? The eugene/estimation/my_estimation_config.py
> looks like this:
>
> my_configuration = {
> 'cache_directory':'/urbansim_cache/eugene', # change or leave out
> 'input_configuration':DatabaseConfiguration(
> host_name = os.environ.get('MYSQLHOSTNAME','localhost'),
> user_name = os.environ.get('MYSQLUSERNAME',''),
> password = os.environ.get('MYSQLPASSWORD',''),
> database_name = 'eugene_1980_baseyear',
> ),
> 'output_configuration':DatabaseConfiguration(
> host_name = os.environ.get('MYSQLHOSTNAME','localhost'),
> user_name = os.environ.get('MYSQLUSERNAME',''),
> password = os.environ.get('MYSQLPASSWORD',''),
> database_name = 'eugene_1980_baseyear_estimation',
> ),
>
> but it seems the input_configuration is not used at all:
> data for the estimation are read from the cache, then output data
> are written to both the cache and the database.
> Is it possible to specify in the config to first dump
> the required mysql tables (as for simulation?)
>
> Thanks
> Fabrice
>
> =====================================================
> Fabrice Marchal
> http://marchal.let.fr
> CNRS Associate researcher +33 472
> 72 79 44
> Lab of Transportation Economics (LET), Berthelot 14, F-69363 Lyon
> =====================================================
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users_at_urbansim.org
> http://www.urbansim.org/mailman/listinfo/users
_______________________________________________
Users mailing list
Users_at_urbansim.org
http://www.urbansim.org/mailman/listinfo/users
Received on Fri Nov 30 2007 - 02:18:27 PST
This archive was generated by hypermail 2.2.0 : Fri Nov 30 2007 - 02:18:28 PST