Академический Документы
Профессиональный Документы
Культура Документы
(devel-version.10.10)
Installation instructions for MITSIMLab under a Ubuntu 9.10. Commands that need to be typed at the console are perpended by a dollar sign ($).
2) Install PVM:
Go to: System > Administration > Synaptic Package Manager Mark pvm and libpvm3 for installation, and apply the changes.
3) This installation guide is valid for gcc version 4.4.1. If you have a newer version, some errors may
occur. To check your gcc version type:
$ gcc -version
4) Installation of packages from online repositories: g++, autoconf, automake, make, openmotiff, libxt-dev,
x11proto-print-dev, libxpm-dev , libXext-dev, patch, xmkmf, libxmu-dev:
$ sudo apt-get install g++ autoconf automake make libmotif3 libmotif-dev libxtdev x11proto-print-dev libxpm-dev libXext-dev patch xmkmf libxmu-dev
/home/username/
2) Untar the downloadeed file MITSIMLab.tar.gz and go to the new created folder /MITSIMLab
You should see the following directories/files: /bin which has two directories /ad and /linux (which contains the executables) GUI_libs.tar the archive that contains the installation files pvmprofile .pvm_hosts (hidden file, to see it type $ ls la) /view contains an example for application of MITSIMLab in /data/brunnsviken Manual.pdf the user manual for MITSIMLab and Road Network Editor (RNE) MITSIMLab_OSLicense_092005.pdf and OtherCopyrights.pdf
4) For this step you need to run the installation script a root by typing sudo before the command.
At the password prompt type in the root password when asked: 2
NOTE: If you ran into the "! You have to be root to run this script " error during the installation process, when running sudo -s ./Install you will have to edit the script ./Install, by typing:
$ sudo gedit ./Install
by
#!/bin/bash
Type to load the saved file and exit the user root:
2) Set the XENVIRONMENT and PATH variables to direct to the directory in which the executables are
present (/bin/Linux). This can be done by editing the .bashrc file in the directory of the user
$ gedit .bashrc
Save the file and exit the text editor. To load the saved file, type:
$source .bashrc
3) PVM facilitates communication between the packages MITSIMLab and TMS. After installing pvm, the
pvm_hosts file in the /MITSIMLab directory needs to be copied to the home folder:
$cp ~/MITSIMLab/.pvm_hosts ~/
$gedit ~/.pvm_hosts
4) The copied file must be edited. This can be done using a text editor:
The file will look something like:
#Configuration file used for starting PVM for SIMLAB programs localhost.localdomain ep=$SIMLAB_Linux wd=$SIMLAB_DAT
= "~/MITSIMLab/view/data/brunnsviken/Output"
MITSIM can be used in two modes: with and without traffic control and gives the option of being run with or without graphics also.
$ xmitsim m master.mitsim
To execute MITSIM alone (i.e. without traffic control), enter the following command:
$ mitsim m master.mitsim
or, without graphics: Complete the following steps to execute MITSIMLab (i.e. with traffic control):
$ rm fr /tmp/pvm*
$ pvm ~/.pvm_hosts
Execute PVM
$ conf
Verify that the host server has been added to the PVM repository by typing the following:
$ quit
$ xsmc m master.smc
4) MITSIMLabs graphical interface pops up on the screen. If executing MITSIM in standalone mode,
click on the red rectangle at the bottom right hand corner of the screen to start the simulation.
5) The MITSIMLab window disappears automatically at the end of the simulation. Change to the Output
directory to view MITSIMLabs output files. 5
Go into PVM
$ halt
Compiling instructions for MITSIMLab under Ubuntu 8.04, with g++ version 4.2.4. Commands that need to be typed at the console are perpended by a dollar sign ($). Commands with sudo requires the access the password to root user.
2) Install flex-old Notice: The default version of flex with Ubuntu 8.04 is flex (2.5.34-2.1) which will cause errors when compiling, make sure the flex version is flex 2.5.4. To check the version of flex:
$ flex --version
Install flex:
$ sudo apt-get install flex-old
3) Install libxtst-dev
$ sudo apt-get install libxtst-dev
4) Install pvm3 Download pvm3 package pvm3.4.6.tgz from http://www.netlib.org/pvm3/. Put the package under 6
/home/usrname folder.
$ tar zxvf pvm3.4.6.tgz $ gedit .bashrc
Add line
export PVM_ROOT=$HOME/pvm3
Add line
export OSTYPE=linux
4) Set compile paths If the folder is not located under /home/username, the compile path should be revised. Go to the view_8.04 folder.
Revise the paths to the paths you selected in the lines like:
BASE_DIR INSTALL_DIR =$(HOME)/view_8.04/simlab = /$(HOME)/view_8.04/bin/$(OSTYPE)_CL
2) Youll get the binaries in /view_8.04/simlab/bin/linux_CL, and you are ready to use your own binary to run the simulation.
2. complaining some friend class is not declared Solution: define the class outsid the definition branket Example: Origninal: Class A: 8
{ friend class B; friend class C; ..... } complaining class B and C are not declared.
Class A: { friend class B; friend class C; ...... } 3. /GRN/RN_BusSchedule.h:87: error: extra qualification RN_BusSchedule:: on member tripRoute Original: RN_BusRoute* RN_BusSchedule::tripRoute(); Change to: RN_BusRoute* tripRoute();
4. EOF was not declared in this scope Solution: add #include <cstdio>
Solution:
Download compatible versions of g++ and libstdc++ packages from http://packages.ubuntu.com/ Than do the following:
$ sudo dpkg i /path/to/g++.deb $ sudo dpkg i /path/to/libstdc++.deb $ sudo apt-get install -f
10