Adding an example

From SUMOwiki
Revision as of 16:41, 10 June 2009 by Dgorissen (talk | contribs)

This page explains how to add your own data/simulation code/... to the toolbox to model it.

Project directories

The SUMO Toolbox comes with a large number of example problems and datasets which you can use for testing, benchmarking, or simply to get a feel of what is possible. These problems cover a very large range of domains, from Biology to Geography and Electronics.

Since version 6.0 every example (and all related files) is self contained in a project directory. See examples/ for a list of examples and associated project directories. If you open one of those directories you will see they contain the following things:

  1. A simulator xml file with the same name as the project directory (mandatory)
  2. One or more executables: matlab script, C++ file, binary, ... (optional)
  3. One or more data files (optional)
  4. Alternative simulator xml files (optional)
  5. Other files, e.g., a documenting pdf (optional)

You can structure the directory as you please but make sure it contains at least the simulator xml and a dataset or executable.

Simulator file

If you want to create a surrogate model (metamodel) for your own problem you will first have to write a simple simulator XML file. You can use one of the existing simulator XML files (from one of the examples) as a guide. The simulator xml file should have the same name and capitalization as the project directory (except for the .xml extension). You can then edit this file to suit your particular problem (see also Simulator configuration).

Then just place any datasets, Matlab scripts, ... into that directory. For requirements on the structure of the dataset or signature of the executable/script please see Interfacing with the toolbox.

Having written your simulator XML file and provided the datasets/executables you now just need to change default.xml so it uses your problem (<Simulator> tag). For information on this see Running#Running different examples.