MAULIT-PyPA-Package 1.0.0
MAULIT Script Package
Requires Python: >=3.7

# MAULIT (MWL Attachment Utilization Lookup & Insight Tool) 

----
## Overview

----
The goal of this repository is to provide a guide for setting up MAULIT on personal desktops, and encourage usage through the division. 
We also included the project overview, objectives, and endgame plans for further development. 
Suggestions and questions can be directed towards:

Nathan Fogg: fogg_nathan_r1@cat.com

Anne deCastro (2022 Summer Intern): adecastr@umich.edu


## Project Overview

---
### What is MAULIT?
MAULIT is a lookup and analysis tool that runs on a Python script. 
MAULIT takes in arrangements numbers and pulls machine serial numbers and RWA data on all of those machines from a Snowflake database.
From the MAULIT PAN search tool, users can also look for arrangement numbers given machine model and arrangement category (such as: "lights"). The PAN search tool integrates directly with
MAULIT to pull the serial numbers and run the analysis. The final result is a generated report configured by the user. The user can pair groups of
arrangements to find overlap in the serial numbers. Additionally, the user can select what RWA data they would like analyzed (such as: dealer location, or sale date). MAULIT 
runs the analysis and find the count for every category and group/item. It also generates graphical reports along with the raw RWA data which are stored in an output excel file.

Example results are shown in the following figure (note: some figures are cut off):

![excel1](Images/excel1.png)

### Motivation and Background
_Background_

Information on S/N for Arrangement and reliability and warranty analysis (RWA) is used to make data driven decisions. For instance:
	Certain arrangements may only sell with groups of other arrangements in
	specific regions, industries, years, etc. 
From that information, engineers determine if it is time/cost effective to develop solutions for a given arrangement.      

_Manual Process (without MAULIT)_

In order to run the analysis the user must implement the following procedure (assuming the arrangement numbers are known):

For each arrangement:
1. Pull S/N for arrangement data from [CPI/BIQ website](https://qrwb.ecorp.cat.com/cpi/AnalysisTools/Analysis_Tools.cfm?tool=Arrangement) and export to csv
2. Find unique SN and copy from each data set
3. Pull RWA data from [QRWB website](https://qrwb.ecorp.cat.com/qrqm/dashboard/Dashboard.cfm?view=Dealer&metric=DPU&rwa=Y) (adding column for dealer country) and export to excel file

Use pivot tables to find overlap between groups for each group and generate reports

**Time to completion: approx. 1 hour** – not typically doable in a meeting

This also assumes the user knows all the desired arrangement numbers to analyze. If they don't they must go through the process of searching through
PAN files or PRWB. This can take a few hours to complete.

_Automated Process (with MAULIT)_

With MAULIT a user follows the following procedure to perform the same analysis:

Version 1 (arrangement numbers are known): 
1. Fill out an input file with all the arrangement numbers and part names to analyze
2. Run script and fill out GUI with the number of groups and groupings, and desired reports
3. Output: graphical reports and excel file with table values

Version 2 (arrangement numbers are _not_ known): 
1. Run script and search PAN files from GUI for arrangements given a category (such as: "light")
2. Return all light arrangement options and descriptions. Select desired arrangements
3. Fill out GUI with the number of groups and groupings, and desired reports
4. Output: graphical reports and excel file with table values

**Time to completion: < 5 min** – mostly automated process and can run during a meeting

### Multi-Generational Plan
In its current state MAULIT has two versions as previously outlined. Both versions require a manual setup procedure as they are hosted locally on the users desktop.
We hope to eventually host MAULIT on a CAT website (such as QRWB). That way, the user only needs to enter their CWS credentials and the website independently connects to the datasource.

_MAULIT MGP:_

![mgp](Images/mgp.png)