From c59ce449f371c55af47bd15e3e0753c168fe406b Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期二, 25 十一月 2025 08:57:35 +0800
Subject: [PATCH] 最新版本541200007
---
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/JkSketchServiceImpl.java | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/JkSketchServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/JkSketchServiceImpl.java
index 80f8c95..93a8f1c 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/JkSketchServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/JkSketchServiceImpl.java
@@ -509,16 +509,16 @@
@Async
public void startUpdateLineAsync(JkSketch model) {
try {
- int maxnum =100;
+ int maxnum =100,distance = 500;
try {
maxnum = Integer.parseInt(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.JK_PLAN_MAX_CLUSTER).getCode());
+ distance = Integer.parseInt(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.JK_PLAN_DISTANCECLUSTER).getCode());
}catch (Exception e){
-
}
List<JkSketchCustomer> allCustomerList = model.getCustomerList();
//涓ゅ叕閲屽唴鏁版嵁瀹㈡埛鍚堝苟
// List<SketchCateModel> customerList =Clustering.clusterPoints(allCustomerList,1000);
- List<SketchCateModel> customerList = new ClusterCustomKMeans().clusterPoints(allCustomerList,maxnum,500);
+ List<SketchCateModel> customerList = new ClusterCustomKMeans().clusterPoints(allCustomerList,maxnum,distance);
List<JkLine> lineList = model.getLineList();
TspSolver.DataModel dataModel = new TspSolver.DataModel();
int vehicleNumber1 = lineList.size();//绾胯矾鏁伴噺
@@ -651,11 +651,11 @@
if(customerList == null ||customerList.size() ==0){
throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"璇ョ嚎璺鎴蜂俊鎭负绌猴紝涓嶆弧瓒充紭鍖栨潯浠讹紒");
}
- int maxnum =100;
+ int maxnum =100,distance = 500;
try {
maxnum = Integer.parseInt(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.JK_PLAN_MAX_CLUSTER).getCode());
+ distance = Integer.parseInt(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.JK_PLAN_DISTANCECLUSTER).getCode());
}catch (Exception e){
-
}
int totalNum = 0;
for(JkSketchLine line : lineList){
@@ -674,7 +674,7 @@
//閫愪釜璺嚎浼樺寲
List<JkSketchCustomer> allCustomerListParam = line.getCustomerList() ;
// List<SketchCateModel> customerListParam = Clustering.clusterPoints(allCustomerListParam,1000);
- List<SketchCateModel> customerListParam = new ClusterCustomKMeans().clusterPoints(allCustomerListParam,maxnum,500);
+ List<SketchCateModel> customerListParam = new ClusterCustomKMeans().clusterPoints(allCustomerListParam,maxnum,distance);
TspSolver.DataModel dataModel = new TspSolver.DataModel();
int vehicleNumber1 = 1;//绾胯矾鏁伴噺
long[] vehicleCapacities1=new long[]{line.getMaxOrder()};//姣忚締杞︾殑鏈�澶ц鍗曢噺闄愬埗
--
Gitblit v1.9.3