Git Product home page Git Product logo

sudhan-bhattarai / cvrptw_milp Goto Github PK

View Code? Open in Web Editor NEW
70.0 3.0 21.0 444 KB

Solving a Capacitated Vehicle Routing Problem with time windows constraints (CVRPTW) with Mixed Integer Linear Programming (MILP) in python-gurobi API.

Python 100.00%
vehicle-routing-problem time-windows python3 gurobipy optimization tsp mtsp mvrp mixed-integer-programming linear-programming capacity python-gurobi-api

cvrptw_milp's Issues

report some gurobipy.GurobiError: Element 0 of a double array is Nan or Inf.

C:\ProgramData\Anaconda3\envs\nilmtk-env\python.exe C:/Users/19002/Desktop/CVRPTW-Python-Gurobi/CVRPTW.py
Node X Y Demand Profit Et Lt St
0 1 82 76 NaN NaN NaN NaN NaN
1 2 96 44 19.0 20.0 10.0 11.0 30.0
2 3 50 5 21.0 32.0 13.0 15.0 15.0
3 4 49 8 6.0 11.0 11.0 12.0 15.0
4 5 13 7 19.0 23.0 16.0 17.0 30.0
5 6 29 89 7.0 6.0 9.0 13.0 20.0
6 7 58 30 12.0 18.0 14.0 16.0 15.0
7 8 84 39 16.0 21.0 10.0 14.0 60.0
8 9 14 24 6.0 11.0 13.0 14.0 15.0
9 10 2 39 16.0 20.0 16.0 17.0 30.0
Using license file C:\WINDOWS\system32\gurobi\gurobi.lic
Academic license - for non-commercial use only
Traceback (most recent call last):
File "C:/Users/19002/Desktop/CVRPTW-Python-Gurobi/CVRPTW.py", line 88, in
m.addConstr(z[i+1] >= (z[j+1] + st[j+1] + dist_matrix[j+1, i+1])*(x[j+1,i+1])) ## taking distance from one node to other as travelling time in minutes between those nodes
File "model.pxi", line 3247, in gurobipy.Model.addConstr
File "model.pxi", line 3158, in gurobipy.Model.__addConstr
gurobipy.GurobiError: Element 0 of a double array is Nan or Inf.

Process finished with exit code 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.