`
shaojiashuai123456
  • 浏览: 256647 次
  • 性别: Icon_minigender_1
  • 来自: 吉林
社区版块
存档分类
最新评论
文章列表
车辆管理     有限车辆         位置:VehicleFleetManagerImpl.java         主要是实现了车辆的获取,锁定和放回功能     无限车辆         位置:InfiniteVehicles.java         主要实现车辆的获取
    时间窗策略 约束判断      位置:VehicleDependentTimeWindowConstraints.java      流程 1.获取插入位置后一个服务点的最晚到达时间,对于结束点,直接使用车辆的最晚到达时间就行 2. 插入的服务点,插入位置的前后服务点都需要小于 最晚到达时间 3.如果插入的服务点最晚时间<插入点前的最早处理时间,则不合法 4.计算在新车辆下原来的状态是否能满足要求,也就是前节点+前节点到后节点的时间<后节点允许的最晚到达时间 5.如果插入的服务几点最早时间>插入点后的最晚到达时间,则不合法 6. 推演插入后新节 ...
import tensorflow as tf import numpy as np import matplotlib.pyplot as plt rng = np.random   # Parameters learning_rate = 0.01 training_epochs = 1000 display_step = 50 batch_size = 10   # Training Data train_X = np.asarray([3.3,4.4,5.5,6.71,6.93,4.168,9.779,6.182,7.59,2.167,             ...
#**********************回归损失 import matplotlib.pyplot as plt import tensorflow as tf from tensorflow.python.framework import ops ops.reset_default_graph()   sess = tf.Session()   # Various Predicted X-values x_vals = tf.linspace(-1., 1., 500) # Create our target of zero target = ...
import tensorflow as tf import numpy as np import matplotlib.pyplot as plt rng = np.random     # Parameters learning_rate = 0.01 training_epochs = 1000 display_step = 50 batch_size = 10   # Training Data train_X = np.asarray([3.3,4.4,5.5,6.71,6.93,4.168,9.779,6.182,7.59,2.167,     ...
jsprit的策略: (1)ruin (破坏) a.随机破坏 (RuinRadom.java) , 随机删除路径上的节点 b.最差破坏 (RuinWorst.java) , 选取代价最大的n个节点 c.聚类破坏(RuinClusters.java) 通过ruin/DBSCANCluster.java计算聚类距离, 逻辑:循环10次,对于一个路线,选集选择2个节点,查看距离,计算平均距离和最小距离,距离半径=(平均距离-最小距离)*(0.5+random(0,1)) , 聚类某辆车的节点,删除某个聚类所有节点 注意:Jsprit.java中对 聚类策略 进行了jobneighborh ...
          jsprit 的主要处理结构,jsprit是一个开源的解决VRP(车辆路径问题)问题的工具,其中主要使用的是Ruin And Rebuild算法。         车辆信息: 车辆类型,costParameter 车辆花费参数 容量限制 起终点坐标 最早出发时间 最晚到达时间 是否回到终点 特性,如 冷场等          服务节点: 容量需求 服务时间窗 服务时长 特性需求 节点位置 节点编号 节点优先级(1-10),默认是2,用来在计算中优先插入优先级高的   algorithm: problem输入的参数 ruin和r ...

jsprit代价计算

  总方案计算 private SolutionCostCalculator getObjectiveFunction(final VehicleRoutingProblem vrp, final double maxCosts) { if (objectiveFunction != null) return objectiveFunction; SolutionCostCalculator solutionCostCalculator = new SolutionCostCalculator() { @Override pub ...

jsprit学习笔记

转载:https://my.oschina.net/u/3173942/blog/1572842 jsprit简介 jsprit是一个开源的解决VRP(车辆路径问题)问题的工具,其中主要使用的是Ruin And Rebuild算法。 基本概念 jsprit中包含几个基本的概念,包括车辆,车辆类型等,以及他们能挂载的诸多属性。  jsprit的结果(solution)结构如图  Ruin And Rebuild流程

分支定界法

 
#include <stdio.h> #include <string> #include <iostream> #include <algorithm> #include <iterator> #include <cstdlib> #include <queue> #include "bb_algorithm.h" namespace bb { BranchBound::BranchBound(TspGraph& graph, std::vect ...
原文链接:https://blog.csdn.net/x454045816/article/details/108744637一、算法介绍         蚁群算法,最早是1992年由Marco Dorigo在他的博士论文中提出的,是一种通过模拟自然界蚂蚁寻径的行为,提出的一种全新的模拟进化算法。据昆虫学家的观察和研究发现,生物世界中的蚂蚁有能力在没有任何可见提示下找到从其巢穴到食物源的最短路径,并能随环境的变化而变化,适应性地搜索新的路径,产生新的选择。这是因为蚂蚁在寻找路径时会在路径上释放一种特殊的分泌物——信息素,使得一定范围内的其他蚂蚁能够觉察并影响它们以后的寻径行为。当一些路径上通 ...
from crontab import CronTab import os,sys #crontab操作 class CrontabUpdate(object): def __init__(self, username='admin'): self._user = username # 创建当前用户的crontab,当然也可以创建其他用户的,但得有足够权限 self.cron = CronTab(user=self._user) ''' eg. cmmand_line : py ...
    #ifndef _COMMON_SINGLETON_H_ #define _COMMON_SINGLETON_H_      template<typename T> class Singleton { public:     template<typename... Args>     static T* Instance(Args&& ...args)     {         if (m_pInstance == nullptr)         {             m_pInstance = new ...
                       tornaodo 实现文件上传   页面主要代码 <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gbk" /> <link type="text/css" rel="stylesheet" href="/static/main ...

python pandas

import sys from pandas import Series,DataFrame import pandas as pd import numpy as np import matplotlib.pyplot as plt from sklearn import preprocessing plt.rcParams['font.sans-serif']=['SimHei'] #用来正常显示中文标签 plt.rcParams['axes.unicode_minus']=False #用来正常显示负号 data = pd.read_csv("./trai ...
Global site tag (gtag.js) - Google Analytics