Skip to content

Commit

Permalink
opti202 initial push
Browse files Browse the repository at this point in the history
  • Loading branch information
yurchisin committed Nov 11, 2024
1 parent dcf4bf7 commit 9acb35a
Show file tree
Hide file tree
Showing 19 changed files with 10,982 additions and 0 deletions.
16 changes: 16 additions & 0 deletions optimization202/ESUPS_case_study/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
*.bak
*.idea/
*__pycache__/
*output/
*.lp
*.mps
*.log
*.sol
*log_files/
*.coverage
*htmlcov/
*.html
*.zip

# Jupyter Notebook
.ipynb_checkpoints
46 changes: 46 additions & 0 deletions optimization202/ESUPS_case_study/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Technician Assignment With Mathematical Optimization

## Problem
You are consulting for a telecom company that dispatches technicians to perform various tasks for customers,
ranging from equipment installations and setups to repairs. Considering various constraints such as:
- Technician availability
- Skillset matching
- Customer time window
- Service priority
- Start and return of technicians to the central depot
- Limited resources/vans

The goal is to decide:
- Which technicians are assigned to which customers and in what sequence?
- How to allocate the limited resources, ensuring each technician has access to a van?

We use a two-step solution approach, using Mathematical Optimization (MO) in both, to solve this problem.

## Repo Guide
- The first model is called _Technician Routing_ where we decide which technicians are assigned to which customers
and in what sequence. This model is described and solved in the [technician_routing](technician_routing.ipynb) notebook.
- The second model is called _Resource Assignment_ where we decide which technicians should be assigned to which vans.
This model is described and solved in the `resource_assignment` notebook.
- There are two versions of this notebook: a partial version ([resource_assignment](resource_assignment.ipynb))
that can be used for teaching, and one with the complete description, formulation, and the code ([resource_assignment_complete](resource_assignment_complete.ipynb)).
- The [data-Sce0.xlsx](data-Sce0.xlsx) is the input used for the _Technician Routing_ model.
- The [routes.csv](routes.csv) and [orders.csv](orders.csv) are the outputs of _Technician Routing_ model
and are used as inputs for the _Resource Assignment_ model. Of course, you can run the `technician_routing` notebook and
or even modify it as you please to get new results. Ensure the format of the output is similar
in case you like to use the `resource_assignment` notebook afterward.

The model size is intentionally small to ensure even those without access to a Gurobi license can run the model (check out [License Requirement](#license-requirement) section for more info about the license).

## Google Colab
If you like to access the notebooks in Google Colab, click:
- [technician_routing](https://colab.research.google.com/github/decision-spot/technician_assignment/blob/main/technician_routing.ipynb)
- [resource_assignment](https://colab.research.google.com/github/decision-spot/technician_assignment/blob/main/resource_assignment_complete.ipynb)

Note that you must sign in with a Google account to be able to run the code in Colab.

## License Requirement
The problem is modeled using Gurobi Python API. So, a Gurobi license is required to run this model.
If you don't have a license, you can request a free commercial evaluation license
or a free academic license [here](https://www.gurobi.com/downloads/).
The data used in the models is small enough to run the model with a Gurobi restricted license
(available via `pip install gurobi` as shown in the notebook).
Binary file added optimization202/Gurobi-Training-Opti-202.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added optimization202/Modeling_Session_1/MMdata.xlsx
Binary file not shown.
30 changes: 30 additions & 0 deletions optimization202/Modeling_Session_1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Opti 202 Day 1 Exercises

## Problems
We revisit a problem from modeling sessions in Opti 101 and 201. Given demand data produced by a hypothetical machine learning model, as well as transportation costs and production capacity, determine the optimal production and shipment of widgets from a set of production facilities to distribution locations that minimize cost.

We also take a deep dive into a nonlinear regression problem modeling **envyme kinetics**.


## Beware Spoilers!
We also put **completed** versions of the modeling notebook and the exercise in the repo. If you want to work through the notebooks without everything filled in make sure not to open the completed versions.


## Exercise Set 1 Notebook Links

[Google Colab Link - Exercise *without* answers](https://colab.research.google.com/github/Gurobi/modeling-examples/blob/master/optimization202/Modeling_Session_1/exercise_set1.ipynb)


[Google Colab Link - Exercise *with* answers](https://colab.research.google.com/github/Gurobi/modeling-examples/blob/master/optimization202/Modeling_Session_1/completed_exercise_set1.ipynb)


[Google Colab Link - Exercise *without* answers](https://colab.research.google.com/github/Gurobi/modeling-examples/blob/master/optimization202/Modeling_Session_1/nonlinear_regression_exercise.ipynb)


[Google Colab Link - Exercise *with* answers](https://colab.research.google.com/github/Gurobi/modeling-examples/blob/master/optimization202/Modeling_Session_1/completed_nonlinear_regression_exercise.ipynb)


----
For details on licensing or on running the notebooks, see the overview on [Modeling Examples](../../)

© Gurobi Optimization, LLC
Loading

0 comments on commit 9acb35a

Please sign in to comment.