vrptw.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:vrptw-pgss-2016 作者: conwayje 项目源码 文件源码
def plot_for_truck(k):
  global depot, customers
  n = len(customers)
  x = [element.x for element in customers[1:]]
  y = [element.y for element in customers[1:]]
  plt.scatter(x, y)
  plt.scatter(depot.x, depot.y, c="r")


  truck = trucks[k]
  x2 = []
  y2 = []

  x2.append( depot.x )
  y2.append( depot.y )
  cs = truck.ordered_customers
  for c in cs:
    x2.append( c.x )
    y2.append( c.y )

  x2.append( depot.x )
  y2.append( depot.y )

  colors = ["b","g","r","c","m","k"]

  ipdb.set_trace()

  plt.plot(x2, y2, c=colors[k], linewidth=3)

  # plt.show()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号