next up previous
Next: Computing an Indicator Up: How To Run the Previous: Install Software and Download

Running a Simulation

In this part of the tutorial, you will execute a two-year simulation run of the Eugene-Springfield metro area.

  1. First, run the file opus.py in the opus_gui directory in your opus workspace. You can do this by navigating to the file, right-clicking on it (on a Mac, control-click), and selecting ``Open with ...'' and then ``python'' (Or ``python launcher'' if you are using a Mac). Alternatively, you can run the file through a graphical editor like Eclipse, or from the command line by typing python opus.py from the appropriate directory.

    This will launch a graphical user interface that will allow you to, among other things, run a test simulation. If you don't see the graphical user interface, check your task bar, as the application may be hidden behind another window.

  2. In the top menu bar, select ``Project'' and then ``Open Project''. In the projects directory, select the file ``eugene_gridcell.xml'' and click ``Open.'' This loads the run configuration information for the Eugene simulation.

  3. Select the ``Scenario Manager'' tab on the left side of the GUI window. You should be able to see and navigate the information loaded from ``eugene_gridcell.xml''. Under the top-level node ``Eugene_baseline'' you will find another called ``years_to_run'' and under this two variables that specify the start and end years for the simulation. Edit ``endyear'' by double-clicking in the ``Value'' column next to ``endyear''. Then change the value to ``1982''. Many values in the configuration can be edited in this way.

  4. Still in the ``Scenario Manager'' tab, right click on the top-level node ``Eugene_baseline'' and select ``Run This Model''. This will cause a new tab with the name ``eugene_gridcell.xml'' to pop up on the right side of the GUI. This gets the model ready to run.

  5. In the ``eugene_gridcell.xml'' tab, click the ``Start Model...'' button. The model will then begin to run. You can watch its progress in the status bar of this tab. When the simulation is finished, the status bar will reach 100% and underneath it will say something like
    Model finished with status = True
    

That's it! You have now installed Opus and UrbanSim, a full application for Eugene-Springfield, Oregon, and run a simulation using a default scenario.

The results are all stored on your computer in the runs subdirectory of the eugene directory where you originally unzipped the cache data. The folder will have a name that indicates when the output was created. If you run this multiple times, it will create a new directory for each run. The contents of these directories are the complete set of ``primary'' variables and values predicted for all objects in the model, from which UrbanSim can recompute any ''computed'' variables defined by an Opus . However, these results are in binary files (arrays) that are not easy to read directly. Now we move on to how to examine the results by creating indicators from them. You should keep the GUI open for this next part.


next up previous
Next: Computing an Indicator Up: How To Run the Previous: Install Software and Download
info (at) urbansim.org