Difference between revisions of "Simulator configuration"

From SUMOwiki
Jump to navigationJump to search
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
This configuration file specifies how the SUMO Toolbox should interface with your simulation code (= the [[simulator]]).  
+
This configuration file specifies how the SUMO Toolbox should interface with your simulation code (= the [[simulator]]). It defines:
  
Writing such a file is very easy, simply use one of the files in the <code>examples/</code> subdirectory as an example.
+
* the number, name, and range of inputs
 +
* the number, name, and type (complex or real values) of outputs
 +
* available data files and type (scattered or gridded)
 +
* location of the executable or script that implements the problem
 +
 
 +
The only time you would deal with this file is if you are planning to [[Adding an example|model your own problem]].  Writing such a file is very easy, simply use one of the existing examples to guide you.  For example, if you just want to model some scattered data (i.e., you only have a flat text file) your simulator file will simply contain the names of the inputs, outputs, and the location of your data file.  In this case you can use the ''Abalone'' example as a template. 
 +
 
 +
Two important remarks:
 +
# Remember that your data must be in the format SUMO expects, or else you will get errors.  See the [[Interfacing_with_the_toolbox]] page for more information.
 +
# If your inputs are NOT scaled between [-1 1] then you MUST specify 'minimum' and 'maximum' attributes for your inputs in the simulator file.  For example, if you have 2 inputs with custom ranges your inputs section of the simulator file would look like this:
 +
 
 +
<source lang="xml">
 +
<InputParameters>
 +
  <Parameter name="age" type="real" minimum="0" maximum="23"/>
 +
  <Parameter name="waterTemp" type="real" minimum="-10" maximum="100"/>
 +
</InputParameters>
 +
</source>

Latest revision as of 23:01, 2 September 2009

This configuration file specifies how the SUMO Toolbox should interface with your simulation code (= the simulator). It defines:

  • the number, name, and range of inputs
  • the number, name, and type (complex or real values) of outputs
  • available data files and type (scattered or gridded)
  • location of the executable or script that implements the problem

The only time you would deal with this file is if you are planning to model your own problem. Writing such a file is very easy, simply use one of the existing examples to guide you. For example, if you just want to model some scattered data (i.e., you only have a flat text file) your simulator file will simply contain the names of the inputs, outputs, and the location of your data file. In this case you can use the Abalone example as a template.

Two important remarks:

  1. Remember that your data must be in the format SUMO expects, or else you will get errors. See the Interfacing_with_the_toolbox page for more information.
  2. If your inputs are NOT scaled between [-1 1] then you MUST specify 'minimum' and 'maximum' attributes for your inputs in the simulator file. For example, if you have 2 inputs with custom ranges your inputs section of the simulator file would look like this:
<InputParameters>
   <Parameter name="age" type="real" minimum="0" maximum="23"/>
   <Parameter name="waterTemp" type="real" minimum="-10" maximum="100"/>
</InputParameters>