1 Star 1 Fork 3

Secure_DisOpt&Cont/基于交替方向乘子法的VRPTW问题分解模式

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
paraVRP.py 1.05 KB
一键复制 编辑 原始数据 按行查看 历史
Xinli_Shi 提交于 2023-05-11 04:46 . a commit
# coding=gb18030
import xlrd
import numpy
from read_input import *
from datetime import datetime
class ParaVRP:
def __init__(self):
self.input_file = ".\\P-VRP\\P-n16-k8.vrp"
self.g_node_dict = {}
self.g_link_dict = {}
self.number_of_vehicles = 8
self.rho = 1
self.origin_node = -1
self.destination_node = -1
def initParams(self):
self.g_node_dict, self.g_link_dict = g_ReadInputData(self)
# with open(self.output_result_file, "w")as f:
# now = datetime.now()
# writer = csv.writer(f, delimiter=",", lineterminator='\n')
# writer.writerow(['start time = {: %X}\n'.format(now)])
# writer.writerow(["obj", "cols", "cuts", "x_solution", "y_solution", "time"])
# with open(self.output_result_file2, "w")as f:
# now = datetime.now()
# writer = csv.writer(f, delimiter=",", lineterminator='\n')
# writer.writerow(['start time = {: %X}\n'.format(now)])
# writer.writerow(["Iteration", "ub", "lb", "Time"])
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/Secure_DisOpt/admm-VRPTW.git
git@gitee.com:Secure_DisOpt/admm-VRPTW.git
Secure_DisOpt
admm-VRPTW
基于交替方向乘子法的VRPTW问题分解模式
master

搜索帮助