Installing SUMO on Mac OS X Mavericks.

SUMO is an open source, highly portable, microscopic and continuous road traffic simulation package designed to handle large road networks.

It has ready made binaries for Linux and Windows but for Mac you have to build it on your own.

Here you are the steps that work on Mavericks (10.9.4).

  1. Install Xcode:
    Download the latest version of Xcode from the Apple developer website or get it using the Mac App Store.
  2. Install xcode command line tools:
    Once you have Xcode installed, open a terminal and run the command xcode-select --install.
  3. Install XQuartz
  4. Link XQuartz
    Run following command in the terminal:
    sudo ln -s /opt/X11/ /usr/X11
  5. Install brew then run the command:
    brew install xerces-c proj gdal
  6. Download fox-1.6.49.tag.gz
    1. Extract it, go inside the extracted folder
    2. Run the following command to configure:
      CPPFLAGS=”-I/usr/X11/include -I/usr/X11/include/freetype2″ LDFLAGS=”-L/usr/X11/lib” ./configure –with-x –with-xft –with-opengl –x-includes=/usr/X11/include –x-libraries=/usr/X11/lib
      Check the following outputs from the configure output:
      checking for OpenGL support… yes
      checking GL/glu.h usability… yes
      checking GL/glu.h presence… yes
      checking for GL/glu.h… yes
      checking GL/gl.h usability… yes
      checking GL/gl.h presence… yes
      checking for GL/gl.h… yes
    3. Run command: make
    4. Run command: make install
  7. Build Sumo
    1. Download sumo-all-0.21.0.tar.gz , extract it, go inside the folder and then use command:
      CPPFLAGS=”$CPPFLAGS -I/usr/local/include/python2.7 -I/usr/local/include -I/usr/X11/include -I/usr/X11/include/freetype2″ LDFLAGS=”$LDFLAGS -lpython2.7 -L/usr/local/lib -L/usr/X11/lib” ./configure –x-includes=/usr/X11/include –x-libraries=/usr/X11/lib –with-python –enable-messages
    2. Note: its configured it with python support, you can exclude that if you don’t need.
    3. Use Command make -j4 && make install
    4. Run sumo or sumo-gui
  8. Enjoy

Credits: Md Mahbubur Rasheed


Measure twice then Cut!

This is what carpenters do before they cut wood, they double check (test) their measures twice (before its too late and wood is cut and can’t be joint back).

You also need to do this double checking (testing) for everything you do, this includes: code you write, projects you deliver, blog you author, … (before its tool late).