Skip to content

yxian29/Linear-Road-Benchmark-Data-Generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Linear Road Benchmark Data Generator

This is an auto provisioning script to help set up the environment to run the linear road benchmark data generator.

Prerequisite

$ sudo apt-get install puppet
  • Install puppet modules.
$ puppet module install puppetlabs-postgresql
$ puppet module install meltwater-cpan
$ sudo apt-get install vagrant
  • Install vagrant plugin.
$ vagrant plugin install vagrant-digitalocean
$ vagrant plugin install vagrant-puppet-install

How to run the simulation?

  • After Git cloning the repository to you local. Go to /vagrant folder.
  • Create a RSA Key Pair.
$ ssh-keygen -t rsa
Enter file in which to save the key (/home/<username>/.ssh/id_rsa): do-office

..* The name of the file must match 'override.ssh.private_key_path' in Vagrantfile

  • Add an enviornment variable to store access token.
$ sudo gedit ~/.bashrc

..* Add the following line

export DIGITALOCEAN_TOK=******************* (paste the access token obtained from Digital Ocean)
  • Provisioning with Digital Ocean. Modify the Vagrantfile in /vagrant folder if necessary.
  config.vm.provider :digital_ocean do |provider, override|
    override.ssh.private_key_path = './do-office'
    override.vm.box = 'digital_ocean'
    override.vm.box_url = 'https://github.com/smdahlen/vagrant-digitalocean/raw/master/box/digital_ocean.box'
    override.puppet_install.puppet_version = "3.7.2"
    provider.token= ENV['DIGITALOCEAN_TOK']
    # Configurable parameters depending which droplet you want to create 
    provider.image = "ubuntu-14-04-x64"
    provider.region = "nyc1"
    provider.size = "1gb"
  end
  • Boot up the environment.
$ vagrant up
  • Login to the VM with
$ vagrant ssh

. Then run

$ cd opt
$ ./run mitsim.config

How to config LRB?

  • Modify the mitsim.config in the local /vagrant/data folder.
directoryforoutput=/opt/data
databasename=hellolrb
databaseusername=vagrant
databasepassword=hellopwd
numberofexpressways=0.5

Where is the result?

MITSIM output will be in the folder designated as directoryforoutput in mistsim.config. Three output file: cardatapoints.out, historical-tolls.out, maxCarid.out

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published