Hi There,
I have vehicles with varying speeds. I tried to add dynamic costs to each vehicle being created by doing:
VehicleTypeImpl vehicleType = VehicleTypeImpl.Builder.newInstance("Semi-truck")
.addCapacityDimension(0, capacity)
.setMaxVelocity(getMetersPerSecond(maxSpeed))
.setCostPerTransportTime(50.0 / vehicleSpeed)
.setCostPerDistance(50.0 / vehicleSpeed)
.setCostPerServiceTime(1.0)
.setCostPerWaitingTime(1.0)
.build();
Vehicle Default speed is 50KM/hr
, so the costs are 1
. Vehicle speeds can be in between 50 to 100 km/hr
Additionally I have a cost matrix that has the default speed set to 50km/hr
. I am thinking that this overrides the dynamic speeds. Just Looking for advice on how to implement these varying speeds with the cost matrix or there is a better way to go about this
Thanks!