Skip to content

Commit

Permalink
Merge pull request #20 from Iroy30/update_to_22.12
Browse files Browse the repository at this point in the history
Update to 22.12
  • Loading branch information
anandhkb authored Dec 15, 2022
2 parents ed5ab08 + 738a975 commit 235177e
Show file tree
Hide file tree
Showing 23 changed files with 71 additions and 63 deletions.
2 changes: 1 addition & 1 deletion cloud-scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ There are two ways to repair this:
$ export SERVER_TYPE=both # or jupyter, or api
$ helm list -n cuopt-server
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
nvidia-cuopt-chart cuopt-server 1 2022-09-19 14:11:45.677689124 +0000 UTC deployed cuopt-22.10.1 22.10.1
nvidia-cuopt-chart cuopt-server 1 2022-09-19 14:11:45.677689124 +0000 UTC deployed cuopt-22.12.0 22.12.0
$ helm uninstall nvidia-cuopt-chart -n cuopt-server
$ scripts/cuopt-helm.sh
$ scripts/wait-cuopt.sh
Expand Down
6 changes: 3 additions & 3 deletions cloud-scripts/build-cuopt-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ fi

if command -v helm &> /dev/null; then
echo helm installed, checking API_KEY
rm -f /tmp/cuopt-22.10.1.tgz
helm fetch https://helm.ngc.nvidia.com/nvidia/cuopt/charts/cuopt-22.10.1.tgz --username='$oauthtoken' --password=$API_KEY -d /tmp
rm -f /tmp/cuopt-22.12.0.tgz
helm fetch https://helm.ngc.nvidia.com/nvidia/cuopt/charts/cuopt-22.12.0.tgz --username='$oauthtoken' --password=$API_KEY -d /tmp
if [ "$?" -eq 0 ]; then
rm -f /tmp/cuopt-22.10.1.tgz
rm -f /tmp/cuopt-22.12.0.tgz
echo API_KEY is valid
else
echo Failed to download cuopt helm chart, API_KEY is invalid. Please try again with a valid NGC api key.
Expand Down
2 changes: 1 addition & 1 deletion cloud-scripts/scripts/cuopt-helm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
NAMESPACE=cuopt-server
kubectl create namespace $NAMESPACE

helm fetch https://helm.ngc.nvidia.com/nvidia/cuopt/charts/cuopt-22.10.1.tgz --username='$oauthtoken' --password=$API_KEY --untar
helm fetch https://helm.ngc.nvidia.com/nvidia/cuopt/charts/cuopt-22.12.0.tgz --username='$oauthtoken' --password=$API_KEY --untar

case $SERVER_TYPE in
"jupyter")
Expand Down
2 changes: 1 addition & 1 deletion docker-utilities/utilities/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from nvcr.io/nvidia/cuopt/cuopt:22.10.01
from nvcr.io/nvidia/cuopt/cuopt:22.12

COPY requirements.txt .
RUN conda run -n cuopt conda install --file requirements.txt -y
2 changes: 1 addition & 1 deletion docker-utilities/utilities/run_cuopt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ detached=False
detached_log=
jupyterserver=True
requirements=
image=nvcr.io/nvidia/cuopt/cuopt:22.10.01
image=nvcr.io/nvidia/cuopt/cuopt:22.12
localdir=
have_realpath=$(command -v realpath)

Expand Down
2 changes: 1 addition & 1 deletion docker-utilities/utilities/run_server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.

image=nvcr.io/nvidia/cuopt/cuopt:22.10.01
image=nvcr.io/nvidia/cuopt/cuopt:22.12
detached=False
detached_log=

Expand Down
4 changes: 2 additions & 2 deletions notebooks/routing/microservice/cost_matrix_creation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@
},
{
"cell_type": "markdown",
"id": "2dd04f7c",
"id": "745930d2",
"metadata": {},
"source": [
"_____\n",
Expand Down Expand Up @@ -429,7 +429,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.13"
"version": "3.9.15"
},
"vscode": {
"interpreter": {
Expand Down
8 changes: 4 additions & 4 deletions notebooks/routing/microservice/cpdptw-reoptmization.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
" if \"cost_matrices\" in data:\n",
" if not update:\n",
" resp = requests.post(\n",
" url + \"add_cost_matrix\", params=data_params, json={\"cost_matrix\": data[\"cost_matrices\"]}\n",
" url + \"set_cost_matrix\", params=data_params, json={\"cost_matrix\": data[\"cost_matrices\"]}\n",
" )\n",
" else:\n",
" resp = requests.put(\n",
Expand All @@ -112,7 +112,7 @@
" if \"transit_time_matrices\" in data:\n",
" if not update:\n",
" resp = requests.post(\n",
" url + \"add_travel_time_matrix\", params=data_params, json={\"cost_matrix\": data[\"transit_time_matrices\"]}\n",
" url + \"set_travel_time_matrix\", params=data_params, json={\"cost_matrix\": data[\"transit_time_matrices\"]}\n",
" )\n",
" else:\n",
" resp = requests.put(\n",
Expand Down Expand Up @@ -824,7 +824,7 @@
},
{
"cell_type": "markdown",
"id": "c16bb860",
"id": "f989f957",
"metadata": {},
"source": [
"_____\n",
Expand Down Expand Up @@ -870,7 +870,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.13"
"version": "3.9.15"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@
},
{
"cell_type": "markdown",
"id": "234158a4",
"id": "2668327f",
"metadata": {},
"source": [
"_____\n",
Expand Down Expand Up @@ -597,7 +597,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.13"
"version": "3.9.15"
},
"vscode": {
"interpreter": {
Expand Down
6 changes: 3 additions & 3 deletions notebooks/routing/microservice/cvrp_daily_deliveries.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@
"\n",
"# Set the cost matrix\n",
"response_set = requests.post(\n",
" url + \"add_cost_matrix\", params=data_params, json=cost_data\n",
" url + \"set_cost_matrix\", params=data_params, json=cost_data\n",
")\n",
"assert response_set.status_code == 200\n"
]
Expand Down Expand Up @@ -393,7 +393,7 @@
},
{
"cell_type": "markdown",
"id": "705703c6",
"id": "97b987b2",
"metadata": {},
"source": [
"_____\n",
Expand Down Expand Up @@ -439,7 +439,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.13"
"version": "3.9.15"
},
"vscode": {
"interpreter": {
Expand Down
8 changes: 4 additions & 4 deletions notebooks/routing/microservice/cvrpstw_priority_routing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@
"data_params = {\"return_data_state\": False}\n",
"cost_data = {\"cost_matrix\": {0: business_metric_cost_matrix}}\n",
"response_set = requests.post(\n",
" url + \"add_cost_matrix\", params=data_params, json=cost_data\n",
" url + \"set_cost_matrix\", params=data_params, json=cost_data\n",
")\n",
"assert response_set.status_code == 200"
]
Expand All @@ -255,7 +255,7 @@
"# set the secondary constraint checking time matrix\n",
"time_data = {\"cost_matrix\": {0: constraint_checking_time_matrix}}\n",
"response_set = requests.post(\n",
" url + \"add_travel_time_matrix\", params=data_params, json=time_data\n",
" url + \"set_travel_time_matrix\", params=data_params, json=time_data\n",
")\n",
"assert response_set.status_code == 200"
]
Expand Down Expand Up @@ -489,7 +489,7 @@
},
{
"cell_type": "markdown",
"id": "ed8fca62",
"id": "38bc3217",
"metadata": {},
"source": [
"_____\n",
Expand Down Expand Up @@ -535,7 +535,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.13"
"version": "3.9.15"
},
"vscode": {
"interpreter": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
"data_params = {\"return_data_state\": False}\n",
"cost_data = {\"cost_matrix\": {0: cost_matrix.values.tolist()}}\n",
"response_set = requests.post(\n",
" url + \"add_cost_matrix\", params=data_params, json=cost_data\n",
" url + \"set_cost_matrix\", params=data_params, json=cost_data\n",
")\n",
"assert response_set.status_code == 200"
]
Expand Down Expand Up @@ -403,7 +403,7 @@
},
{
"cell_type": "markdown",
"id": "15192c4a",
"id": "dc94ab34",
"metadata": {},
"source": [
"_____\n",
Expand Down Expand Up @@ -449,7 +449,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.13"
"version": "3.9.15"
},
"vscode": {
"interpreter": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@
"data_params = {\"return_data_state\": False}\n",
"cost_data = {\"cost_matrix\": {0: time_matrix}}\n",
"response_set = requests.post(\n",
" url + \"add_cost_matrix\", params=data_params, json=cost_data\n",
" url + \"set_cost_matrix\", params=data_params, json=cost_data\n",
")\n",
"assert response_set.status_code == 200"
]
Expand Down Expand Up @@ -398,7 +398,7 @@
},
{
"cell_type": "markdown",
"id": "a1550796",
"id": "47eb4eed",
"metadata": {},
"source": [
"_____\n",
Expand Down Expand Up @@ -444,7 +444,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.13"
"version": "3.9.15"
},
"vscode": {
"interpreter": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.


import matplotlib.pyplot as plt
import matplotlib.font_manager as fm
import pandas as pd
Expand Down
18 changes: 8 additions & 10 deletions notebooks/routing/python/README.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,40 @@
# cuOpt Notebooks

A collection of Jupyter Notebooks that outline how cuOpt python API can be used to solve a wide variety of routing problems

These notebooks require a running NVIDIA cuOpt container availble from [NGC](https://catalog.ngc.nvidia.com/)
Contains a collection of Jupyter Notebooks that outline how cuOpt python API can be used to solve a wide variety of problems

## Summary
Each notebook represents an example use case for NVIDIA cuOpt. All notebooks demonstrate high level problem modeling leveraging the cuOpt DataModel and SolverSettings. In addition, each notebook covers additional cuOpt features listed below alongside notebook descriptions

- **[cost_matrix_creation.ipynb](cost_matrix_creation.ipynb) :** A notebook demonstrating how to build a cost matrix for various problem types
- **cost_matrix_creation.ipynb :** A notebook demonstrating how to build a cost matrix for various problem types
- *Additional Features:*
- WaypointMatrix
- Visualization

- **[cvrp_daily_deliveries.ipynb](cvrp_daily_deliveries.ipynb) :** A notebook demonstrating a simple delivery use case
- **cvrp_daily_deliveries.ipynb :** A notebook demonstrating a simple delivery use case
- *Additional Features:*
- Min Vehicles Constraint

- **[cvrptw_service_team_routing.ipynb](cvrptw_service_team_routing.ipynb) :** A notebook demonstrating service team routing using technicians with varied availability and skillset.
- **cvrptw_service_team_routing.ipynb :** A notebook demonstrating service team routing using technicians with varied availability and skillset.
- *Additional Features:*
- Multiple Capacity (and demand) Dimensions
- Vehicle Time Windows

- **[cvrpstw_priority_routing.ipynb](cvrpstw_priority_routing.ipynb) :** A notebook demonstrating routing of mixed priority orders
- **cvrpstw_priority_routing.ipynb :** A notebook demonstrating routing of mixed priority orders
- *Additional Features:*
- Secondary Cost Matrix
- Soft Time Windows
- Penalties

- **[cpdptw_intra-factory_transport.ipynb](cpdptw_intra-factory_transport.ipynb) :** A notebook demonstrating intra-factory routing modeled as a pickup and delivery problem
- **cpdptw_intra-factory_transport.ipynb :** A notebook demonstrating intra-factory routing modeled as a pickup and delivery problem
- *Additional Features:*
- Pickup and Deliver
- Order Locations
- Precedence Constraints
- WaypointMatrix

- **[cvrptw_benchmark_gehring_homberger.ipynb](cvrptw_benchmark_gehring_homberger.ipynb) :** A notebook demonstrating a benchmark run using a large academic problem instance.
- **cvrptw_benchmark_gehring_homberger.ipynb :** A notebook demonstrating a benchmark run using a large academic problem instance.

- **[pdptw_mixed_fleet.ipynb](pdptw_mixed_fleet.ipynb) :** A notebook demonstrating heterogenous fleet modeling for a pickup and delivery problem
- **pdptw_mixed_fleet.ipynb :** A notebook demonstrating heterogenous fleet modeling for a pickup and delivery problem
- *Additional Features:*
- Pickup and Deliver
- Order Locations
4 changes: 2 additions & 2 deletions notebooks/routing/python/cost_matrix_creation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@
},
{
"cell_type": "markdown",
"id": "02184bfe",
"id": "2bac6512",
"metadata": {},
"source": [
"_____\n",
Expand Down Expand Up @@ -429,7 +429,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.13"
"version": "3.9.15"
},
"vscode": {
"interpreter": {
Expand Down
7 changes: 4 additions & 3 deletions notebooks/routing/python/cpdptw_intra-factory_transport.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,8 @@
"order_service_time = cudf.concat([transport_order_data[\"pickup_service_time\"], transport_order_data[\"delivery_serivice_time\"]], ignore_index=True)\n",
"\n",
"# add time window constraints\n",
"data_model.set_order_time_windows(order_time_window_earliest, order_time_window_latest, order_service_time)\n",
"data_model.set_order_time_windows(order_time_window_earliest, order_time_window_latest)\n",
"data_model.set_order_service_times(order_service_time)\n",
"data_model.set_vehicle_time_windows(vehicle_earliest_time, vehicle_latest_time)"
]
},
Expand Down Expand Up @@ -541,7 +542,7 @@
},
{
"cell_type": "markdown",
"id": "34b4221c",
"id": "4cb94aa7",
"metadata": {},
"source": [
"_____\n",
Expand Down Expand Up @@ -590,7 +591,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.13"
"version": "3.9.15"
}
},
"nbformat": 4,
Expand Down
4 changes: 2 additions & 2 deletions notebooks/routing/python/cvrp_daily_deliveries.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@
},
{
"cell_type": "markdown",
"id": "07a30d4b",
"id": "a25c9d04",
"metadata": {},
"source": [
"_____\n",
Expand Down Expand Up @@ -360,7 +360,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.13"
"version": "3.9.15"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit 235177e

Please sign in to comment.