Case - Optimizing Food Donation Delivery for Nonprofit Company
Solution Simulator (SoS)
SoS is an offline application created using CustomTkinter, a Python UI library (https://github.com/TomSchimansky/CustomTkinter).
The application is compatible with Windows and macOS* platforms.
Figure 1 shows the Home frame appearing after launching the application.
*On macOS put the app in quarantine platforms by running the following command in a terminal:
xattr -d com.apple.quarantine your/path/to/SoS/SoS_mac.app
Figure1: SoS Home Frame.
SoS needs three folders to be run: data, input and output.
Data
The data folder contains an Excel file named Data.xlsx with all the data required to model the Logica&Co problem. It includes:
a list of all soup kitchens' parameters (sheet Soup Kitchens);
a list of all local businesses' daily supplies (sheet Donations);
a list of all warehouses' parameters (sheet Warehouses);
a list of all sponsors' parameters (sheet Investments);
an origin-destination matrix of the distances from every warehouse to every local business (sheet Distances W-LB);
an origin-destination matrix of the distances from every local business to every soup kitchen (sheet Distances LB-S);
an origin-destination matrix of the distances from every soup kitchen to every warehouse (sheet Distances S-W);
a list of supplementary parameters and coefficients (sheet Additional Parameters).
A file named Data.txt, summarizing all data reported in Data.xlsx in a text file, can also be generated using a SoS command |Print|.
Input
The input folder contains solution-alike .txt files. To evaluate the quality of a proposed solution, this folder must be populated with the solution data by the users.
Output
The output folder is the target folder for the simulation reports. After a simulation, the output folder is automatically populated with a variable summary file and a report.
How to use SoS
The SoS allows users to gain insights into a solution and inspect the framework data. A Map frame provides a navigable map of all soup kitchens, local businesses and warehouses, and an Info frame summarizes the step-by-step procedure for running a simulation.
Within the Home frame, there are three command buttons:
|Print|: Print the model parameters in a file named Data.txt in the data folder. This file summarizes all model dimensions and parameters.
|Upload|: Upload, check and print the solution files inserted by the user in the input folder. If no errors are detected, a summary file Variables.txt is created and saved in the output folder, otherwise, a popup window with an error report appears.
|Run simulation|: Run a simulation using the uploaded input values. If the inputs produce a feasible solution, all revenues and costs are calculated in detail by day, month, and semester (total) and stored in a file named Report.txt in the output folder. If the inputs lead to an infeasible solution, a popup window with an error report appears; details on the violated constraints can be found in the Report.txt file.
They talk about us
Ottimizzazione sostenibile per gli sprechi alimentari (simai.eu)