This application assigns shipment destinations to drivers to maximize the total suitability score (SS), based on predefined algorithms. It's built with Node.js and TypeScript.
Follow these instructions to get the project up and running on your local machine for development and testing purposes.
First, clone the repository to your local machine. Then, navigate to the project directory and install all require dependencies:
npm install
To run the unit tests for the application, execute:
npm test
To run the unit tests for the application, execute:
npm start <path-to-destinations-file> <path-to-drivers-file>
Make sure to replace and with the paths to your actual input files. The first file should contain a list of shipment destination addresses, new line delimited. The second file should contain a list of driver names, also new line delimited.
There is an example shipping destination and drivers file that is included to make sure your setup is correct and use as a model while building out your own input files.
npm start example_destinations.txt example_drivers.txt
If you would like detailed output that includes each driver's pairing suitability score, you can run the application in debug mode:
npm run start:debug -- <path-to-destinations-file> <path-to-drivers-file>
- Destinations File: A text file where each line contains a single shipment destination address. Please take a look at example_destinations.txt for an example.
- Drivers File: A text file where each line contains a single driver's name. Please take a look at example_drivers.txt for an example.