加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
task_specific_params.py 1.54 KB
一键复制 编辑 原始数据 按行查看 历史
Reza 提交于 2018-11-28 18:46 . fixed config for vrp10
from collections import namedtuple
# task specific params
TaskTSP = namedtuple('TaskTSP', ['task_name',
'input_dim',
'n_nodes',
'decode_len'])
TaskVRP = namedtuple('TaskVRP', ['task_name',
'input_dim',
'n_nodes' ,
'n_cust',
'decode_len',
'capacity',
'demand_max'])
task_lst = {}
# TSP10
tsp10 = TaskTSP(task_name = 'tsp',
input_dim=2,
n_nodes = 10,
decode_len=10)
task_lst['tsp10'] = tsp10
# TSP20
tsp20 = TaskTSP(task_name = 'tsp',
input_dim=2,
n_nodes = 20,
decode_len=20)
task_lst['tsp20'] = tsp20
# TSP50
tsp50 = TaskTSP(task_name = 'tsp',
input_dim=2,
n_nodes = 50,
decode_len=50)
task_lst['tsp50'] = tsp50
# TSP100
tsp100 = TaskTSP(task_name = 'tsp',
input_dim=2,
n_nodes = 100,
decode_len=100)
task_lst['tsp100'] = tsp100
# VRP10
vrp10 = TaskVRP(task_name = 'vrp',
input_dim=3,
n_nodes=11,
n_cust = 10,
decode_len=16,
capacity=20,
demand_max=9)
task_lst['vrp10'] = vrp10
# VRP20
vrp20 = TaskVRP(task_name = 'vrp',
input_dim=3,
n_nodes=21,
n_cust = 20,
decode_len=30,
capacity=30,
demand_max=9)
task_lst['vrp20'] = vrp20
# VRP50
vrp50 = TaskVRP(task_name = 'vrp',
input_dim=3,
n_nodes=51,
n_cust = 50,
decode_len=70,
capacity=40,
demand_max=9)
task_lst['vrp50'] = vrp50
# VRP100
vrp100 = TaskVRP(task_name = 'vrp',
input_dim=3,
n_nodes=101,
n_cust = 100,
decode_len=140,
capacity=50,
demand_max=9)
task_lst['vrp100'] = vrp100
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化