########  CONTENT

CURRENT FOLDER:
The current folder containts the files implementing the solution framework designed in the scope of
 this Master Thesis. The description of this framework is available in the corresponding dissertation.


FOLDER 'benchmarks':
This folder contains the instances on which the application was tested. These instances are grouped
in subfolders corresponding to the Class of instance they belong.


FOLDER 'output':
This folder contains log files of our application. You can find information about the processing of
 the Events, the generation of new plans, the size of the pool, the current population of the pool...


FOLDER 'Solver':
This folder contains the files of the library used as Offline Solver. This library was developed by
Michael Saint-Guillain from Université Catholique de Louvain <michael.saint@uclouvain.be>.


FOLDER 'Scripts':
This folder contains different scripts used to take the measures for the experiments shown in the
 attached dissertation.




########  INSTALLATION

/!\gcc 5.4.0 or newer must be installed./!\

To build this project, simply run the command 'make' in this directory. 


########  RUN APPLICATION:

Once the project build the program can be run for any test instance in the 'benchmarks' directory,
 by using the command:

Usage:./main instance_file METHOD IMPROVING-STRATEGY APPROACH TIME-STEP PG TIME/PLAN INIT-POOL-SIZE MAXPLANS ACTUAL-REQUEST-PREFERED HALF-FLEET

METHOD(-m):
	0: MPA 
	1: MSA
IMPROVING-STRATEGY(-i):
	0: SIMPLE_MSA
	1: RELOCATION_STRATEGY
	2: WAITING_STRATEGY
APPROACH(-a):
	c: CONSENSUS    r: REGRETS
TIME-STEP (-ts) AND TIME/PLAN(-tp): a double number of seconds
PG (-g): number of plan generators (<5)
INIT-POOL-SIZE(-ip): an int number of plans at initialization 
MAXPLANS(-mp): an int number for maximal size of the pool 
ACTUAL-REQUEST-PREFERED(-arp):
	0: sampled requests considered equal to actual requests,
	1: actual requests considered more important.
HALF-FLEET(-hf):
	0: if the complete fleet should be used for the instance,
	1: if only one half of the fleet should be used.

For example, the command :

'./main benchmarks/class1/0-100-rc101-1 -m 1 -i 2 -a r -ts 2 -tp 1 -g 2 -ip 2 -mp 10 -arp 1 -hf 1'

executes MSA using the regret approach, with the Waiting improving strategy and a preference for
actual requests, for the test instance '0-100-rc101-1' located in directory 'benchmarks/class1/'.

this command also defines: 2 seconds per time step, a maximum of 1 second to optimize a plan,
			   2 plan generators, 2 initial plans, a maximum size of 10 for the pool
			   and only a half fleet will be used.

You can also use the files in the 'scripts' folder to execute the program by running the command:
'./scritps/basicScript2.sh'

These scripts must be run from the current directory. We strongly advise to use the 'basicScript.sh'
 and 'Class5script.sh' as they use the latest version of the parameters for the program.


To follow the evolution of MPA or MSA when the program is running, run a command that output a given
file in real time and give ans an argument one the log files located in the './output/' directory.
On Linux systems, the command 'tail -f filename' can be used.

