MEXCLP#
The Maximum Expected Coverage Location Problem (MEXCLP) can be used to distribute ambulances over bases.
Running MEXCLP.py#
You can run the script by using the command line. To run the script on the command line, first move to your local ELASPY folder and then run the following:
python elaspy/mexclp/MEXCLP.py
or, depending on your Python installation:
python3 elaspy/mexclp/MEXCLP.py
Tip
If you run into problems using the PULP_CBC_CMD solver, you can do the following:
Activate the ELASPY environment in the command line.
Use the following command to remove pulp from the environment:
conda remove pulp
Re-install pulp by using the following command:
pip install 'pulp==2.7.0'
Done! The
PULP_CBC_CMDshould now work.
Input#
The script requires several data sets and parameters to work. The parameters are explained in the API, and the data sets that are required are NODES_FILE, BASE_LOCATIONS_FILE and TRAVEL_TIMES_FILE.
Output#
The script provides the solved model in an .lp format and also a csv file with the number of ambulances stationed at the postal codes (i.e., nodes). Both named according to the variable RESULTS_FILE. The table below provides an example of such an output file. In the example, two ambulances have their base at node 1, one ambulance at node 5 and three ambulances at node 3. The script also provides some prints with information about the optimization.
Postal code  | 
number of ambulances  | 
|---|---|
1  | 
2  | 
5  | 
1  | 
3  | 
3  |