Line data Source code
1 : #include "Dynamic/Vehicle.hpp" 2 : 3 : #include "Dynamic/Env/TAZ.hpp" 4 : #include "Dynamic/Policy/Policy.hpp" 5 : 6 : using namespace std; 7 : using namespace Dynamic; 8 : 9 0 : Vehicle::Vehicle( 10 : ID id_, 11 : Time depart_, 12 : Env::TAZ &fromTAZ_, 13 : Env::TAZ &toTAZ_, 14 : shared_ptr<Policy> policy_ 15 0 : ): 16 : id(id_), 17 : depart(depart_), 18 : fromTAZ(fromTAZ_), 19 : toTAZ(toTAZ_), 20 0 : policy(policy_) {} 21 : 22 0 : Env::Lane &Vehicle::pickInitialLane(Env::Env &env) { 23 0 : return policy->pickInitialLane(*this, env); 24 : } 25 : 26 0 : bool Vehicle::operator==(const Vehicle &other) const { 27 0 : return id == other.id; 28 : }