生成一些随机的高斯坐标,我注意到TSP解算器返回了可怕的解决方案,但是它也一次又一次地为相同的输入返回相同的可怕解决方案。 鉴于此代码: import numpy
import math
from ortools.constraint_solver import pywrapcp
from ortools.constraint_solver import routing_enums_pb2
One of the samples for the Google or-tools is a solver for the n-queens problem.在底部它说实施可以通过增加约束求解器的对称性破坏约束来改善。 环顾互联网,I found the symmetry breaking constraints for the n-queens problem,但我不能为我的生活弄清楚如何将这
我试图按照https://developers.google.com/optimization/introduction/installing.html#windows_binary的说明操作,以便我可以在我的C#应用程序中使用or-tools。 我卡在make all一步。我在开发人员命令提示符,但这个命令的意思是: 'make' is not recognized as an intern
用下面的代码的问题是: 即使我只有10个地点交付和一个仓库设置在位置0,在这个例子中,车辆1, 2,3,4似乎有他们在地点10,11,12,13的仓库。这些位置不存在。我拥有的10个数字从0到9。 在另一方面业务逻辑似乎是OK: 我孤立离开车厂我得到预期的结果的成本和要回它(价值10)的一个:104.城市之间只有4次不包括仓库。 这是Google or-tools中的错误吗? public sta