Bid

data class Bid(val vehicle: FleetVehicle, val value: Double, val note: String? = null, val zonesToEnter: Int? = null)(source)

A vehicle's offer.

Lower is better. That convention has to be stated somewhere and this is the place: a bid is a cost the vehicle is quoting, not a fitness it is claiming, so distance, completion time and remaining charge all point the same way without any policy having to negate anything.

The note is for the modeller, not for the mechanism -- nothing reads it. It exists so that a study comparing bidding rules can record why a vehicle offered what it did, which is otherwise lost the moment the auction closes.

The zonesToEnter settles a tie between equal values under lowestBidByName: of two vehicles quoting the same distance, the one with fewer is in front of the other. A bid policy fills it from FleetVehicle.zonesToEnter.

Constructors

Link copied to clipboard
constructor(vehicle: FleetVehicle, value: Double, note: String? = null, zonesToEnter: Int? = null)

Properties

Link copied to clipboard
val note: String?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard