Loading and Running a Model
Now that we have installed the environment and created a project and a very simple model, let's take a brief moment to look at an existing model and get a sense for the power and simplicity of the metaABM environment. (Or you can move on to the next section to continue building your own model.)
  • First, download the Demographic Prisoner's Dilemma model. A number of models will be available in the model download section of the website. You can save the model directly to your project or copy it to the desktop and drag it into the project.

    Image We've tried to make the metaABM modeling experience as unlike the typical Java based ABM experience as possible. We've found that for the typical researcher wanting simply to design and explore models the process of learning how to do this is daunting at best. On top of learning about ABM and basic Java programming skills, they need to become experts at software management and configuration!
    MetaABM takes care of the project complexities, and metaABM models contain all of the configuration information necessary to build a complete model. They are completely self-contained and unlike traditional Java models you don't have to worry about where you place them in projects or with following other obscure incantations. You can send a metaABM model as an email attachment and another researcher can open the email, copy the model to a metaABM project and execute it with no installation, importing or other configuration.
  • Let's take a quick look at the model. Double-click on the model file, and open up the model hierarchy.

    Image
  • To execute the model, just right-click on the model file, and select Run As.. | Ascape metaModel.

    Image Even though the Run As.. menu shows a Repast run menu item, this option will only work within a Repast project as we demonstrate below.
  • You can now work directly in the Ascape runtime environment..

    Image To find out more about the Ascape environment, visit the Ascape home page
  • The model file contained no Java or Ascape code. (To view the raw xml file, you can choose "open as.." and select XML editor.) To see how the metaABM system accomplished this, we can take a look in the "srcgen" folder and open up one of the model Java files. We can see that the model was just created, and take a look at how metaABM implements the model..

    Image
  • metaABM also auto-generates model documentation. Double-click on the html files in the document folder to take a look.

    Image
  • Now, for the really cool part. We can take the same PD model and build and execute it as a Repast model. (If you haven't done so already, you will need to return to the previous page on installing repast.) Create a new Repast project, just as you did with the Ascape project.
  • Now, copy and paste the model into the Repast project. (Or Drag and Copy, for example by option-dragging in OS X.)

    Image
  • As soon as the model appears in the project, the Repast code will automatically be generated.

    Image metaABM also generates all of the necessary Simphony artifacts, such as model.score (an earlier version of the metaabm meta-model), and the scenario files. This demonstrates an important feature of metaABM -- it can be useful simply as an aid in the configuration necessary to support complex ABM environments.
  • This time, we can select Run As.. | Repast metaABM Model, and when the Repast model opens, click on the play button to run it.

    Image