更新车辆长度
This commit is contained in:
parent
c07ca22d29
commit
3553cb17ec
@ -1052,13 +1052,13 @@ public class DefaultVehicleController
|
||||
case LENGTH_RESPECTED:
|
||||
// Free resources allocated for executed commands, but keep as many as needed for the
|
||||
// vehicle's current length.
|
||||
long vehicleLeghtRadius = 3700 / 2; //车辆长度半径
|
||||
BoundingBox boundingBox = commAdapter.getProcessModel().getBoundingBox().withLength(vehicleLeghtRadius); //长度有问题
|
||||
BoundingBox boundingBox = commAdapter.getProcessModel().getBoundingBox(); //长度有问题
|
||||
long length = boundingBox.getLength() / 2; //车辆长度半径
|
||||
int freeableResourceSetCount
|
||||
= ResourceMath.freeableResourceSetCount(
|
||||
SplitResources.from(allocatedResources, Set.of(currentVehiclePosition))
|
||||
.getResourcesPassed(),
|
||||
boundingBox.getLength()
|
||||
length
|
||||
);
|
||||
for (int i = 0; i < freeableResourceSetCount; i++) {
|
||||
Set<TCSResource<?>> oldResources = allocatedResources.poll();
|
||||
|
@ -78,8 +78,8 @@ virtualvehicle.commandQueueCapacity = 2
|
||||
virtualvehicle.rechargeOperation = CHARGE
|
||||
virtualvehicle.rechargePercentagePerSecond = 1.0
|
||||
virtualvehicle.simulationTimeFactor = 1.0
|
||||
virtualvehicle.vehicleLengthLoaded = 1000
|
||||
virtualvehicle.vehicleLengthUnloaded = 1000
|
||||
virtualvehicle.vehicleLengthLoaded = 3700
|
||||
virtualvehicle.vehicleLengthUnloaded = 3700
|
||||
virtualvehicle.chargingStrategyName = threshold_charging_strategy
|
||||
virtualvehicle.energyDrainRatePerSecond = 10.0
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user