zhanghaijun 3 anni fa
parent
commit
6c6e0d8d49

+ 11 - 0
issue/20231003.txt

@@ -0,0 +1,11 @@
+1、PM文件导入,图层问题,导入到了0图层。(偶发的)  待测试
+2、(修改完成)PM优化,弹框,未选择线路,不能点击优化按钮。
+3、PM优化,添加10s加载动画。 10s前可以手动关闭优化过程。 
+4、(修改完成)ZDM坡度 预期 *100。
+5、(修改完成)ZDM 坡长应为两个变坡点间的距离,而不是两边变坡点间直线的长度。
+6、ZDM比例调整 10.0 => 1.0
+7、ZDM添加坡度坡长。
+8、(修改完成)para.ini文件,打开工程和新建工程 复制一份para.ini保证项目中的使用。
+
+10、dxf导入时毫无反应,地形不能导入;之前20M以内的等一会还能导入,现在导入直接没反应
+	15m加载完毕,电脑很卡。

+ 61 - 0
project/para.ini

@@ -0,0 +1,61 @@
+[parameter]
+batch_sizes=2
+learning_rate0=6e-4
+learning_rate1=6e-3
+iteration_times=5
+discount_factor=0.8
+d_k=100
+forward_step=5
+range_p=30
+range_g=2
+range_k=50
+d_line=20
+range_c=300
+range_v=5000
+range_e=0
+
+[cost]
+beam0=70000
+beam1=80000
+bridge_pier=300000
+tunnel0=72800
+tunnel1=11800
+tunnel2=132000
+tunnel_entrance=390000
+railway_tracks=9300
+road_right_fee=75
+filling_cost=36
+excavation_cost=36
+arable_land_occupation=95.1
+house_demolition=10
+farmland_layer_name=sensitive_area
+demolition_layer_name=sensitive_area
+replace_railway_by_bridge=0
+
+[standard]
+design_speed=250
+minimum_curve_radius=3500
+minimum_circular_length=200
+minimal_longitudinal_length=900
+maximum_gradient=20
+maximum_slope_difference=18
+maximum_bridge_height=100
+maximum_tunnel_length=12000
+filling_height_lbb=10
+digging_deep_ltb=15
+minimum_transition_curve_length=120
+minimum_clip_line_length=200
+minimum_radius_of_convex_vertical_curve=20000
+minimum_radius_of_concave_vertical_curve=20000
+minimum_length_of_vertical_curve=25
+
+[ecology]
+water_pollution=5
+noise_and_vibration=10
+cultural_heritage_protection=25
+destruction_wildlife=20
+original_natural=60
+traffic_network=90
+fields_woods=20
+air_pollution=5
+house_demolition=40

+ 6 - 2
scripts/Common/FileZDM.js

@@ -38,6 +38,7 @@ FileZDM.prototype.applyOperation = function () {
   //             7,0,"Standard",RS.VAlignTop,RS.HAlignLeft,false,false,0);
   EAction.handleUserMessage("ZDM-40: " + formatDateTime());
   //绘制坡道及竖曲线,1为坡道,2为竖曲线
+  var c = 0;
   for (var i = 0; i < this.newEntityData.length - 1; i++) {
     var TempLineData = new Array();
     TempLineData.push([this.newEntityData[i][0], this.newEntityData[i][1]]);
@@ -48,8 +49,10 @@ FileZDM.prototype.applyOperation = function () {
       var pdAngle = (this.newEntityData[i + 1][1] - this.newEntityData[i][1]) / (this.newEntityData[i + 1][0] - this.newEntityData[i][0]);
       // 计算长度
       var pdLen = sqrt((this.newEntityData[i + 1][1] - this.newEntityData[i][1]) * (this.newEntityData[i + 1][1] - this.newEntityData[i][1]) + (this.newEntityData[i + 1][0] - this.newEntityData[i][0]) * (this.newEntityData[i + 1][0] - this.newEntityData[i][0]));
-      addSimpleTextToView((round(pdAngle * 1000) / 1000).toString(), [(this.newEntityData[i + 1][0] + this.newEntityData[i][0]) / 2 - 2, (this.newEntityData[i + 1][1] + this.newEntityData[i][1]) / 2 + 9], 7, rad2deg(pdAngle), "Standard", RS.VAlignTop, RS.HAlignLeft, false, false, 0);
-      addSimpleTextToView((round(pdLen * 1000) / 1000).toString(), [(this.newEntityData[i + 1][0] + this.newEntityData[i][0]) / 2 - 2, (this.newEntityData[i + 1][1] + this.newEntityData[i][1]) / 2 - 2], 7, rad2deg(pdAngle), "Standard", RS.VAlignTop, RS.HAlignLeft, false, false, 0);
+      addSimpleTextToView((round(pdAngle * 100 * 1000) / 1000).toString(), [(this.newEntityData[i + 1][0] + this.newEntityData[i][0]) / 2 - 2, (this.newEntityData[i + 1][1] + this.newEntityData[i][1]) / 2 + 9], 7, rad2deg(pdAngle), "Standard", RS.VAlignTop, RS.HAlignLeft, false, false, 0);
+      addSimpleTextToView((round(this.csvCoor[c+1][0]-this.csvCoor[c][0])).toString(), [(this.newEntityData[i + 1][0] + this.newEntityData[i][0]) / 2 - 2, (this.newEntityData[i + 1][1] + this.newEntityData[i][1]) / 2 - 2], 7, rad2deg(pdAngle), "Standard", RS.VAlignTop, RS.HAlignLeft, false, false, 0);
+      c++;
+      // addSimpleTextToView((round(pdLen * 1000) / 1000).toString(), [(this.newEntityData[i + 1][0] + this.newEntityData[i][0]) / 2 - 2, (this.newEntityData[i + 1][1] + this.newEntityData[i][1]) / 2 - 2], 7, rad2deg(pdAngle), "Standard", RS.VAlignTop, RS.HAlignLeft, false, false, 0);
     } else if (this.newEntityData[i][2] == 2) {
       addPolylinetoView(TempLineData, false, false, 0, SQXColor);
     }
@@ -258,6 +261,7 @@ FileZDM.prototype.applySlope = function (startPoint, space) {
   var lastPoint = undefined;
   for (var i = 0; i < this.newFZEntityData.length; i += 3) {
     if (i + 1 < this.newFZEntityData.length && this.newFZEntityData[i + 1][2] == 2) {
+      addLineToView([lastPoint[0], lastPoint[1]], [startPoint[0], startPoint[1]], 0);
       if (lastPoint && this.newFZEntityData[i + 1][1] > lastPoint[1]) {
         addLineToView([lastPoint[0], startPoint[1] - space], [this.newFZEntityData[i + 1][0], startPoint[1]], 0);
       } else if (lastPoint) {

+ 15 - 10
scripts/File/OpenProject/OpenProject.js

@@ -47,17 +47,22 @@ OpenProject.prototype.beginEvent = function() {
         return;
     }
     var selectDir = fileDialog.selectedFiles();
+    var projectPath = selectDir[0];
     // 所选工程为xxx
-    // EAction.handleUserMessage("select project is: " + selectDir[0]);
-    QMessageBox.information(
-        appWin,
-        qsTr("提示"),
-        qsTr("选择的工程为:" + selectDir[0])
-    );
-    RSettings.setValue("OpenProject/Current", selectDir[0]);
+    // EAction.handleUserMessage("select project is: " + projectPath);
+    QMessageBox.information(appWin, qsTr("提示"), qsTr("选择的工程为:" + projectPath));
+    RSettings.setValue("OpenProject/Current", projectPath);
     RSettings.setValue("OpenDisplayFile/PMFile", "");
     RSettings.setValue("OpenDisplayFile/ZDMFile", "");
 
+    // 拷贝参数配置文件
+    var srcFilePath = OpenProject.includeBasePath + "/para.ini";
+    var dstFilePath = projectPath + "/para.ini";
+    var paraFile = new QFile(dstFilePath);
+    if(!paraFile.exists()){
+      QFile.copy(srcFilePath, dstFilePath);
+    }
+
     var di1 = getAssignDocumentInterface(1);
     var document1 = getAssignDocument(1);
     var ids = document1.queryAllEntities();
@@ -91,8 +96,8 @@ OpenProject.prototype.beginEvent = function() {
     var label = dialog.findChild("label");
     var pjDir = OpenProject.includeBasePath + "/../../../project";
     EAction.handleUserMessage(pjDir);
-    var dir = new QDir(pjDir);
-    if(!dir.exists())
+    var paraFile = new QDir(pjDir);
+    if(!paraFile.exists())
     {
         QMessageBox.critical(appWin,qsTr("错误"),qsTr("文件夹找不到"));
         return;
@@ -100,7 +105,7 @@ OpenProject.prototype.beginEvent = function() {
     //--2 获取当前路径下所有的文件夹名字
     var filterFlags = makeQDirFilters(QDir.Dirs | QDir.NoDotAndDotDot);
     var sortFlags = makeQDirSortFlags(QDir.NoSort);
-    var names = dir.entryList(filterFlags, sortFlags);
+    var names = paraFile.entryList(filterFlags, sortFlags);
     for(var i = 0; i < names.length; i++){
         listWidget.addItem(names[i]);
     }

+ 61 - 0
scripts/File/OpenProject/para.ini

@@ -0,0 +1,61 @@
+[parameter]
+batch_sizes=2
+learning_rate0=6e-4
+learning_rate1=6e-3
+iteration_times=5
+discount_factor=0.8
+d_k=100
+forward_step=5
+range_p=30
+range_g=2
+range_k=50
+d_line=20
+range_c=300
+range_v=5000
+range_e=0
+
+[cost]
+beam0=70000
+beam1=80000
+bridge_pier=300000
+tunnel0=72800
+tunnel1=11800
+tunnel2=132000
+tunnel_entrance=390000
+railway_tracks=9300
+road_right_fee=75
+filling_cost=36
+excavation_cost=36
+arable_land_occupation=95.1
+house_demolition=10
+farmland_layer_name=sensitive_area
+demolition_layer_name=sensitive_area
+replace_railway_by_bridge=0
+
+[standard]
+design_speed=250
+minimum_curve_radius=3500
+minimum_circular_length=200
+minimal_longitudinal_length=900
+maximum_gradient=20
+maximum_slope_difference=18
+maximum_bridge_height=100
+maximum_tunnel_length=12000
+filling_height_lbb=10
+digging_deep_ltb=15
+minimum_transition_curve_length=120
+minimum_clip_line_length=200
+minimum_radius_of_convex_vertical_curve=20000
+minimum_radius_of_concave_vertical_curve=20000
+minimum_length_of_vertical_curve=25
+
+[ecology]
+water_pollution=5
+noise_and_vibration=10
+cultural_heritage_protection=25
+destruction_wildlife=20
+original_natural=60
+traffic_network=90
+fields_woods=20
+air_pollution=5
+house_demolition=40

+ 3 - 0
scripts/Optimize/PMOptimize/PMOptimize.js

@@ -53,6 +53,9 @@ PMOptimize.prototype.beginEvent = function () {
       }
       this.pms.push(pmList[i]);
     }
+    if(this.pms.length == 0) {
+      opBtn.setEnabled(false);
+    }
     for (var i = 0; i < this.pms.length; i++) {
       var pmFile = new QRadioButton(this.pms[i], pmWidget);
       pmFile.setGeometry(50, 25 + 40 * i, 1200, 40);

+ 3 - 1
scripts/Optimize/SetArguments/SetArguments.js

@@ -163,7 +163,9 @@ SetArguments.prototype.optimizeClicked = function() {
     this.btngrp2.addButton(zdmFile, i);
     zdmFile.clicked.connect(this,this.zdmClicked);
   }
-
+  if(this.pms.length == 0 && this.zdms.length == 0) {
+    opBtn.setEnabled(false);
+  }
   if (!this.selectLineDialog.exec()) {
     EAction.handleUserMessage("clicked~");
     destr(this.selectLineDialog);

+ 3 - 0
scripts/Optimize/ZDMOptimize/ZDMOptimize.js

@@ -37,6 +37,9 @@ ZDMOptimize.prototype.beginEvent = function () {
     }
     this.zdms.push(zdmList[i]);
   }
+  if(this.zdms.length == 0) {
+    opBtn.setEnabled(false);
+  }
   for (var i = 0; i < this.zdms.length; i++) {
     var zdmFile = new QRadioButton(this.zdms[i], zdmWidget);
     zdmFile.setGeometry(50, 25 + 40 * i, 1200, 40);