File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44import requests
55from visuals import create_visuals
66
7- # from visuals import create_visuals
8-
97# Read the input from stdin.
10- input = nextmv .load_local ()
8+ input = nextmv .load ()
119
1210options = nextmv .Options (
1311 nextmv .Parameter (
2018vroom_api_url = f"https://api.verso-optim.com/vrp/v1/solve?api_key={ VROOM_API_KEY } "
2119headers = {"Content-Type" : "application/json" }
2220
21+ # Call VROOM API to solve the problem
2322try :
2423 response = requests .post (vroom_api_url , headers = headers , json = input .data )
2524 response .raise_for_status ()
3130
3231solution = vroom_result if vroom_result else None
3332
34- #######
35-
33+ # Create visuals with geojson for each route
3634assets = create_visuals (solution )
3735
38- # pull summary of solution into statistics
36+ # Pull summary of solution into Nextmvstatistics
3937summary = solution .get ("summary" , {})
4038
41- # extract polylines and convert to geojson so we can view the map
42-
4339# Write output and statistics.
4440output = nextmv .Output (
4541 solution = solution ,
You can’t perform that action at this time.
0 commit comments