About
=====

This program generates inputs for the 505.mcf SPEC2017 benchmark.  It simulates
a city and uses a common bus-route designing technique to radiate bus routes
from a central location. The program uses a circadian cycle to generate more
routes at prime times in the day accounting for increased number or
commuters. To create a city map, it starts with a perfect fully connected
grid.  Then it eliminates intersections from the grid and all the associated
edges connecting the eliminated point with other points to simulate parks and
larger squares in a city. It then create roads that travel diagonally across
the city. Such connections are similar to major diagonal avenues such as the
ones found in Washinton DC.There are also considerations to reduce
overlapping routes such as adding increased cost to the A* algorithm when
calculating the path for bus routes.


Configuration
=============

The program is designed to run after build without any changes to the
configuration. There is also a template configuration file provides. This
template can be regenerated using the -g flag. The default file (default.cfg) 
contains an explanation of all tunable parameters.


Author
======

* Dylan Ashely	-- Python Prototype
* Marcus Karpoff  -- C++ Implementation
* Nelson Amaral   -- Project Supervisor

Build instructions
==================
make
----

* ``` make ```							Builds the program
* ``` DEBUG=TRUE ```				Turns on debugging flags
* ``` USEPAR=NO ```					Turns off parellization (Parellization is enabled if not set)
* ``` NUM_THREADS=<NUM> ```	Set the number of theads for the parellization to use (set to 5 if not set)
* ``` make clean ```				Removes all generated files

Run instructions
================
Base Command
------------
``` ./mcf_gen [options] ```

optional arguments
------------------
* ``` -t, --test_file=FILE ```			Store testcase in FILE
* ``` -c, --city_file=FILE ```			Store a visual representation of the city in FILE
* ``` -i, --icfg_file=FILE ```			Load the configuration of the city from FILE
* ``` -o, --ocfg_file=FILE ```			Store the configuration of the city in FILE
* ``` -g, --gen_template[=FILE]	```	Generates a default config file
* ``` -h ```												Print Help information

Requirements
============

This software was built and tested using g++ version 5.3.0 and c++14. The 
software is NOT compatible with older versions of c++.

