MA计算逻辑修改,取移动授权距离最近的作为结束
修改列车EB更新制动力问题
This commit is contained in:
parent
2a6b0bebe1
commit
8d217cfae1
@ -381,8 +381,9 @@ public class MaService {
|
|||||||
boolean right = train.isRight();
|
boolean right = train.isRight();
|
||||||
Ma ma = null;
|
Ma ma = null;
|
||||||
boolean front = false;
|
boolean front = false;
|
||||||
|
int iterMax = 50;
|
||||||
Section section = tailPosition.getSection();
|
Section section = tailPosition.getSection();
|
||||||
for (int i = 0; i < 50 && section != null; i++) {
|
for (int i = 0, j = 0; i < iterMax && j < 3 && section != null; i++) {
|
||||||
if (section.equals(headPosition.getSection())) {
|
if (section.equals(headPosition.getSection())) {
|
||||||
front = true;
|
front = true;
|
||||||
}
|
}
|
||||||
@ -433,7 +434,14 @@ public class MaService {
|
|||||||
}
|
}
|
||||||
section = next;
|
section = next;
|
||||||
if (ma != null) {
|
if (ma != null) {
|
||||||
break;
|
if (ma.distanceToEoa <= 0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (j == 0) {
|
||||||
|
j = 1;
|
||||||
|
} else {
|
||||||
|
j++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ma;
|
return ma;
|
||||||
|
@ -687,6 +687,7 @@ public class VirtualRealityTrain extends VirtualRealityDevice {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.fk = Math.min(fk, getCurrentFkMax());
|
this.fk = Math.min(fk, getCurrentFkMax());
|
||||||
|
|
||||||
this.fb = Math.min(fb, getCurrentFbMax());
|
this.fb = Math.min(fb, getCurrentFbMax());
|
||||||
if (fk > 0) {
|
if (fk > 0) {
|
||||||
this.tbControl = TrainTBControl.TRACTION;
|
this.tbControl = TrainTBControl.TRACTION;
|
||||||
@ -1053,7 +1054,8 @@ public class VirtualRealityTrain extends VirtualRealityDevice {
|
|||||||
* 设置紧急制动的功率和制动力
|
* 设置紧急制动的功率和制动力
|
||||||
*/
|
*/
|
||||||
public void emergencyBreak() {
|
public void emergencyBreak() {
|
||||||
enforceUpdateTBForce(0, 350);
|
this.fk = 0;
|
||||||
|
this.fb = 350;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isInTheStandArea() {
|
public boolean isInTheStandArea() {
|
||||||
|
Loading…
Reference in New Issue
Block a user