. If you have used the Windows installer to install OPUS, then a Windows Start menu item has been added under the Opus menu item under programs, so launching OPUS is a simple as selecting the OpusGUI Opus menu item. If you did not use the installer, for example, on OS X, or Linux, then open a command window or shell, change directory to the opus_gui directory and type python opus.py. In Windows, you can also double-click on the opus.py file in the /opus/src/opus_gui directory to launch the GUI.
However it is launched, it will start from a command shell, and this window remains active while OPUS is running. Do not attempt to quit this window or OPUS will close also. After launching OPUS, the main OPUS GUI window should be displayed as in Figure 3.2.
The main window contains a section on the left with four tabs in it, labeled Data Manager, Model Manager, Scenario Manager, and Results Manager. Each tab provides a location for configuring and running a variety of tasks, organized into the main functional areas involved in developing and using a simulation model.
Notice that at this point there are no contents in any of the four tabs. OPUS uses a novel approach to dynamically creating and managing content in the GUI by loading, editing, and saving content in the form of XML files. XML stands for Extensible Markup Language, and is an extension of the HTML markup language used to display web pages. It is more flexible, and has become widely used to store content in a strucured form.
To add content to the GUI, we will load a Project, which is in fact, just an XML file containing configuration information. From the main menu, load a project from eugene_gridcell.xml, which is in the default location of opus/project_configs. The OPUS window should now appear as in Figure 3.3.
A small section of the eugene_gridcell.xml file is shown in Figure 3.4. It is just text, but in a structured format, with nodes corresponding to information that is displayed in the GUI. Some of the content of the XML provide data used by the GUI to determine how to display information, or what menu items are appropriate to connect to the node in the GUI.
Note that one of the first entries in the xml file is a parent type, and that this line refers to another xml file named urbansim/gridcell.xml. This reflects an important aspect of the GUI design: it supports inheritance among projects. In practical terms for a user, this means that you can use default projects as templates, or parents, for another project you want to create that is mostly the same as an existing project, but has some changes from it. The new project is called a child project, and it inherits all of its information from the parent, but can override any aspect it so chooses from the parent. The parallels with human behavior are pretty obvious!
Users will create their own projects in the opus/project_configs directory. This will allow them to keep projects localized in one place, and to avoid editing and possibly corrupting one of the projects that are in an OPUS package.