Difference between revisions of "Installation"

From SUMOwiki
Line 5: Line 5:
   
 
=== Toolbox ===
 
=== Toolbox ===
Unzip the toolbox zip file to a directory somewhere on your harddisk, the full path of the SUMO toolbox will be referred to as the toolbox root.
+
Unzip the toolbox zip file to a directory somewhere on your harddisk, the full path of the SUMO toolbox (including installation directory) will be referred to as the toolbox root directory.
   
 
* <installation directory>
 
* <installation directory>
Line 21: Line 21:
 
=== Extension pack ===
 
=== Extension pack ===
   
To install the extension pack, download the zip, place it in your toolbox installation directory and unzip it there. The files should be placed in the correct directories.
+
To install the extension pack, download the zip file, and unzip it in your toolbox root directory. The files should be placed in the correct directories.
   
== Installation from Source ==
+
== Optional: Installation from Source ==
   
For a minimal system you will have to compile at least the java files. Instructions depend on your operating system.
+
For a minimal system you will have to compile at least the java files, if you start from the source files. Instructions depend on your operating system.
  +
Note that all java files are already compiled in the toolbox zip file.
   
 
=== Linux/Unix/OSX ===
 
=== Linux/Unix/OSX ===
Line 45: Line 46:
 
# Compiling SVM libraries:
 
# Compiling SVM libraries:
 
## In order to use the [http://www.esat.kuleuven.be/sista/lssvmlab/ LS-SVM] backend, you will have to compile the LS-SVM mex files (it will work if you dont but you will get a lot of debug output).
 
## In order to use the [http://www.esat.kuleuven.be/sista/lssvmlab/ LS-SVM] backend, you will have to compile the LS-SVM mex files (it will work if you dont but you will get a lot of debug output).
## This can be done using the built-in LCC compiler of matlab, by calling 'makeLSSVM' from the Matlab command prompt. This will only work if the toolbox is already in the Matlab path . If this is not the case, refer to the Binary Installation section for more information.
+
## This can be done using the built-in LCC compiler of matlab, by calling 'makeLSSVM' from the Matlab command prompt. This will only work if the toolbox is already in the Matlab path. If this is not the case, refer to the Binary Installation section for more information.
 
# Compiling ANN libraries:
 
# Compiling ANN libraries:
 
## In order to use the [http://leenissen.dk/fann/ FANN] backend, you will have to compile the FANN library and mex files.
 
## In order to use the [http://leenissen.dk/fann/ FANN] backend, you will have to compile the FANN library and mex files.
Line 52: Line 53:
 
== Setup ==
 
== Setup ==
 
Starting the toolbox is very easy, all you basically have to do is run startup.m in Matlab under the toolbox installation directory.
 
Starting the toolbox is very easy, all you basically have to do is run startup.m in Matlab under the toolbox installation directory.
 
=== Macintosh OSX ===
 
Follow the instructions for Windows, although the Unix/Linux instructions will work as well.
 
   
 
=== Linux/Unix ===
 
=== Linux/Unix ===
 
Navigate to the toolbox installation directory and start matlab there '''OR''' start matlab, once in matlab navigate to the toolbox installation directory and run 'startup.m'.
 
Navigate to the toolbox installation directory and start matlab there '''OR''' start matlab, once in matlab navigate to the toolbox installation directory and run 'startup.m'.
  +
  +
=== Macintosh OSX ===
  +
Follow the instructions for Windows, although the Linux/Unix instructions will work as well.
   
 
=== Windows ===
 
=== Windows ===
Line 64: Line 65:
 
''Side Note:'' if you '''dont''' want to run the toolbox in its own directory you will need to make sure Matlab will be able to find the source files for the toolbox regardless of path. This can be accomplished as follows:
 
''Side Note:'' if you '''dont''' want to run the toolbox in its own directory you will need to make sure Matlab will be able to find the source files for the toolbox regardless of path. This can be accomplished as follows:
   
# Copy startup.m (found in the toolbox root directory), to the work directory of Matlab (e.g.: C:\Program files\MATLAB\R2006b\work)
+
# Copy startup.m (found in the toolbox root directory), to the work directory of Matlab (e.g.: C:\Program files\MATLAB\R2007a\work)
 
# Open startup.m (This file will be executed automatically whenever Matlab boots)
 
# Open startup.m (This file will be executed automatically whenever Matlab boots)
 
# Edit the path so that it points to the toolbox root directory (i.e., where you unzipped the toolbox).
 
# Edit the path so that it points to the toolbox root directory (i.e., where you unzipped the toolbox).

Revision as of 22:48, 4 April 2008

Introduction

This page will walk you through the toolbox installation. Please refer to the system requirements first. See the downloading section on how to download the toolbox.

Basic Installation

Toolbox

Unzip the toolbox zip file to a directory somewhere on your harddisk, the full path of the SUMO toolbox (including installation directory) will be referred to as the toolbox root directory.

  • <installation directory>
    • bin/ : binaries, executable scripts, ...
    • config/ : configuration files, location of default.xml
    • doc/ : some documentation
    • doc/apidoc : Javadoc and other api docs
    • lib/ : required libraries (eg: dom4j)
    • output/ : all output will be placed here, including your logfile
    • src/ : all source code
    • src/c : C/C++ code for example simulators
    • src/matlab/examples : matlab example simulator scripts
    • examples/  : example simulator xml files (you can test with these problems)

Extension pack

To install the extension pack, download the zip file, and unzip it in your toolbox root directory. The files should be placed in the correct directories.

Optional: Installation from Source

For a minimal system you will have to compile at least the java files, if you start from the source files. Instructions depend on your operating system. Note that all java files are already compiled in the toolbox zip file.

Linux/Unix/OSX

  1. Ensure you have the following environment variables set:
    1. MATLABDIR=/path/to/your/matlab/installation
    2. JAVA_HOME=/path/to/your/SDK/installation
  2. Go to toolbox root directory and type 'make'. This will build everything for you (java files, C/C++ files, SVM libraries, binaries for the txt datasets, ...). If you only want to build the java stuff simply 'make java' (or run 'ant') in the toolbox root.

Windows

  1. Compiling java:
    1. it is advised you do this using Eclipse. Run Eclipse, and import the build.xml file.
    2. Set the output directory to <SUMO-toolbox-installation-dir>/bin/java (see project->properties->Build Path). Once this is done eclipse will automatically compile the java files for you and place them into the right directory.

Note: if you get errors about a missing jmi.jar, you can find this jar file in <your matlab directory>/java/jar

  1. Compiling C/C++ codes (examples):
    1. You will have to do this on your own using a C/C++ compiler of your choice: Dev-c++/Visual Studio/...
  2. Compiling SVM libraries:
    1. In order to use the LS-SVM backend, you will have to compile the LS-SVM mex files (it will work if you dont but you will get a lot of debug output).
    2. This can be done using the built-in LCC compiler of matlab, by calling 'makeLSSVM' from the Matlab command prompt. This will only work if the toolbox is already in the Matlab path. If this is not the case, refer to the Binary Installation section for more information.
  3. Compiling ANN libraries:
    1. In order to use the FANN backend, you will have to compile the FANN library and mex files.
    2. So far nobody has yet got it to work under Windows, but dont let that stop you.

Setup

Starting the toolbox is very easy, all you basically have to do is run startup.m in Matlab under the toolbox installation directory.

Linux/Unix

Navigate to the toolbox installation directory and start matlab there OR start matlab, once in matlab navigate to the toolbox installation directory and run 'startup.m'.

Macintosh OSX

Follow the instructions for Windows, although the Linux/Unix instructions will work as well.

Windows

Start matlab, once in matlab navigate to the toolbox installation directory and run 'startup.m'

Side Note: if you dont want to run the toolbox in its own directory you will need to make sure Matlab will be able to find the source files for the toolbox regardless of path. This can be accomplished as follows:

  1. Copy startup.m (found in the toolbox root directory), to the work directory of Matlab (e.g.: C:\Program files\MATLAB\R2007a\work)
  2. Open startup.m (This file will be executed automatically whenever Matlab boots)
  3. Edit the path so that it points to the toolbox root directory (i.e., where you unzipped the toolbox).
  4. Reboot Matlab.

Test run

  1. Make sure that you are in the toolbox root directory and you have run 'startup.m' (see above)
  2. Type 'go' and press enter.
  3. The toolbox will start to model the Academic2DTwice simulator. This simulator has 2 inputs and 2 outputs, and will be modeled using Rational functions, scored using crossvalidation, and samples selected using the gradient sample selection method.
  4. To see the exact settings used open config/default.xml. Feel free to edit this file and play around with the different options.

The examples directory contains many example simulators that you can use to test the toolbox with. See the configuration section on information about the possible options.

Problems

See the reporting problems page.