/dports/cad/sumo/sumo-1.2.0/src/mesosim/ |
H A D | MELoop.cpp | 93 if (toSegment->hasSpaceFor(veh, leaveTime) && (ignoreLink || veh->mayProceed())) { in changeSegment() 102 veh->setSegment(myEdges2FirstSegments[veh->getEdge()->getNumericalID()]); in changeSegment() 112 MELoop::checkCar(MEVehicle* veh) { in checkCar() argument 130 } else if (toSegment->hasSpaceFor(veh, leaveTime) && !veh->mayProceed()) { in checkCar() 141 addLeaderCar(veh, onSegment->getLink(veh)); in checkCar() 190 getSegmentForEdge(*veh->getEdge())->addReminders(veh); in teleportVehicle() 199 myLeaderCars[veh->getEventTime()].push_back(veh); in addLeaderCar() 200 setApproaching(veh, link); in addLeaderCar() 207 link->setApproaching(veh, veh->getEventTime() + (link->getState() == LINKSTATE_ALLWAY_STOP ? in setApproaching() 209 veh->getSpeed(), veh->getSpeed(), true, in setApproaching() [all …]
|
H A D | MESegment.cpp | 304 … for (std::vector<MEVehicle*>::const_reverse_iterator veh = k->rbegin(); veh != k->rend(); ++veh) { in getMeanSpeed() local 322 for (std::vector<MEVehicle*>::const_iterator veh = k->begin(); veh != k->end(); ++veh) { in writeVehicles() local 419 … << " isOpen=" << link->opened(veh->getEventTime(), veh->getSpeed(), veh->estimateLeaveSpeed(link), in isOpen() 439 || link->opened(veh->getEventTime(), veh->getSpeed(), veh->estimateLeaveSpeed(link), in isOpen() 475 if (veh->isStopped()) { in send() 506 addReminders(veh); in receive() 513 const double maxSpeedOnEdge = veh->getEdge()->getVehicleMaxSpeed(veh); in receive() 538 newLeader = veh; in receive() 562 addReminders(veh); in receive() 564 veh->onDepart(); in receive() [all …]
|
/dports/science/chrono/chrono-7.0.1/src/demos/python/vehicle/ |
H A D | demo_VEH_TwoCars.py | 20 import pychrono.vehicle as veh namespace 35 terrain = veh.RigidTerrain(sys) 45 hmmwv_1 = veh.HMMWV_Reduced(sys) 48 hmmwv_1.SetDriveType(veh.DrivelineTypeWV_RWD) 49 hmmwv_1.SetTireType(veh.TireModelType_RIGID) 57 driver_data_1 = veh.vector_Entry([veh.DataDriverEntry(0.0, 0.0, 0.0, 0.0), 67 hmmwv_2 = veh.HMMWV_Reduced(sys) 70 hmmwv_2.SetDriveType(veh.DrivelineTypeWV_RWD) 71 hmmwv_2.SetTireType(veh.TireModelType_RIGID) 79 driver_data_2 = veh.vector_Entry([veh.DataDriverEntry(0.0, 0.0, 0.0, 0.0), [all …]
|
H A D | demo_VEH_TrailerJSON.py | 2 import pychrono.vehicle as veh namespace 21 vehicle.SetChassisVisualizationType(veh.VisualizationType_MESH) 24 vehicle.SetWheelVisualizationType(veh.VisualizationType_MESH) 28 tireL = veh.TMeasyTire(vehicle_tire_file) 30 tireR = veh.TMeasyTire(vehicle_tire_file) 34 powertrain = veh.SimpleMapPowertrain(vehicle_powertrain_file) 46 tireL = veh.TMeasyTire(trailer_tire_file) 48 tireR = veh.TMeasyTire(trailer_tire_file) 63 driver = veh.ChIrrGuiDriver(app) 116 veh.SetDataPath(chrono.GetChronoDataPath() + 'vehicle/') [all …]
|
H A D | demo_VEH_M113.py | 23 import pychrono.vehicle as veh namespace 37 vehicle = veh.M113_Vehicle(False, 39 veh.DrivelineTypeTV_BDS, 40 veh.BrakeType_SIMPLE, 42 veh.CollisionType_NONE) 62 terrain = veh.RigidTerrain(vehicle.GetSystem()) 95 driver = veh.ChIrrGuiDriver(app) 111 shoe_forces_left = veh.TerrainForces(vehicle.GetNumTrackShoes(veh.LEFT)) 112 shoe_forces_right = veh.TerrainForces(vehicle.GetNumTrackShoes(veh.RIGHT)) 157 veh.SetDataPath(chrono.GetChronoDataPath() + 'vehicle/') [all …]
|
H A D | demo_VEH_WheeledJSON.py | 2 import pychrono.vehicle as veh namespace 18 vehicle = veh.WheeledVehicle(vehicle_file, chrono.ChContactMethod_NSC) 24 vehicle.SetWheelVisualizationType(veh.VisualizationType_NONE) 27 terrain = veh.RigidTerrain(vehicle.GetSystem(), rigidterrain_file) 30 powertrain = veh.SimplePowertrain(simplepowertrain_file) 35 tireL = veh.RigidTire(rigidtire_file) 37 tireR = veh.RigidTire(rigidtire_file) 49 driver = veh.ChIrrGuiDriver(app) 114 veh.SetDataPath(chrono.GetChronoDataPath() + 'vehicle/') 117 vehicle_file = veh.GetDataFile('hmmwv/vehicle/HMMWV_Vehicle.json') [all …]
|
H A D | demo_VEH_DeformableSoil.py | 19 import pychrono.vehicle as veh namespace 36 Kc_ = veh.doublep_value(Kc) 37 n_ = veh.doublep_value(n) 38 coh_ = veh.doublep_value(coh) 41 K_ = veh.doublep_value(K) 42 R_ = veh.doublep_value(R) 62 veh.doublep_assign(Kc, Kc_) 63 veh.doublep_assign(n, n_) 64 veh.doublep_assign(coh, coh_) 67 veh.doublep_assign(K, K_) [all …]
|
/dports/cad/sumo/sumo-1.2.0/src/microsim/devices/ |
H A D | MSDevice_BTsender.cpp | 87 sVehicles[veh.getID()] = new VehicleInformation(veh.getID()); in notifyEnter() 88 sVehicles[veh.getID()]->route.push_back(veh.getEdge()); in notifyEnter() 91 sVehicles[veh.getID()]->amOnNet = true; in notifyEnter() 94 sVehicles[veh.getID()]->route.push_back(veh.getEdge()); in notifyEnter() 96 const MSVehicle& v = static_cast<MSVehicle&>(veh); in notifyEnter() 97 …sVehicles[veh.getID()]->updates.push_back(VehicleState(veh.getSpeed(), veh.getPosition(), v.getLan… in notifyEnter() 108 const MSVehicle& v = static_cast<MSVehicle&>(veh); in notifyMove() 124 …sVehicles[veh.getID()]->updates.push_back(VehicleState(veh.getSpeed(), veh.getPosition(), v.getLan… in notifyLeave() 126 sVehicles[veh.getID()]->amOnNet = false; in notifyLeave() 129 sVehicles[veh.getID()]->amOnNet = false; in notifyLeave() [all …]
|
/dports/cad/sumo/sumo-1.2.0/src/libsumo/ |
H A D | Vehicle.cpp | 85 return veh->isOnRoad() || veh->isParking() || veh->wasRemoteControlled(); in isVisible() 116 return isVisible(veh) ? veh->getSpeed() : INVALID_DOUBLE_VALUE; in getSpeed() 160 return veh->isOnRoad() ? veh->getSlope() : INVALID_DOUBLE_VALUE; in getSlope() 167 return isVisible(veh) ? veh->getLane()->getEdge().getID() : ""; in getRoadID() 174 return veh->isOnRoad() ? veh->getLane()->getID() : ""; in getLaneID() 501 … distance = veh->getRoute().getDistanceBetween(veh->getDepartPos(), veh->getPositionOnLane(), in getDistance() 553 return veh->getLane()->getVehicleMaxSpeed(veh); in getAllowedSpeed() 1166 … veh->getRoute().getEdges(), (int)(veh->getCurrentRouteEdge() - veh->getRoute().begin()), 1172 …speed, veh->getRoute().getEdges(), veh->getRoutePosition(), veh->getLane(), veh->getPositionOnLane… 1504 veh->getLane()->removeVehicle(veh, n); [all …]
|
/dports/cad/sumo/sumo-1.2.0/src/microsim/output/ |
H A D | MSE3Collector.cpp | 71 …const double posOnLane = veh.getBackPositionOnLane(enteredLane) + veh.getVehicleType().getLength(); in notifyEnter() 207 const double oldSpeed = veh.getPreviousSpeed(); in notifyMove() 262 myCollector.myEnteredContainer.erase(&veh); in notifyLeave() 318 if (!vehicleApplies(veh)) { in enter() 335 if (veh.getSpeed() < myHaltingSpeedThreshold) { in enter() 347 myEnteredContainer[&veh] = v; in enter() 353 if (!vehicleApplies(veh)) { in leaveFront() 368 if (!vehicleApplies(veh)) { in leave() 388 myEnteredContainer.erase(&veh); in leave() 502 myCurrentMeanSpeed += veh->getSpeed(); in detectorUpdate() [all …]
|
H A D | MSStopOut.cpp | 65 assert(veh != 0); in stopStarted() 66 if (myStopped.count(veh) != 0) { in stopStarted() 67 WRITE_WARNING("Vehicle '" + veh->getID() + "' stops on edge '" + veh->getEdge()->getID() in stopStarted() 72 myStopped[veh] = stopInfo; in stopStarted() 78 if (veh->hasDeparted()) { in loadedPersons() 85 myStopped[veh].unloadedPersons += n; in unloadedPersons() 100 assert(veh != 0); in stopEnded() 101 if (myStopped.count(veh) == 0) { in stopEnded() 102 WRITE_WARNING("Vehicle '" + veh->getID() + "' ends stop on edge '" + veh->getEdge()->getID() in stopEnded() 110 StopInfo& si = myStopped[veh]; in stopEnded() [all …]
|
H A D | MSEmissionExport.cpp | 46 const SUMOVehicle* veh = it->second; in write() local 47 const MSVehicle* microVeh = dynamic_cast<const MSVehicle*>(veh); in write() 48 if (veh->isOnRoad()) { in write() 49 std::string fclass = veh->getVehicleType().getID(); in write() 51 … PollutantsInterface::computeAll(veh->getVehicleType().getEmissionClass(), veh->getSpeed(), veh->g… in write() 52 …of.openTag("vehicle").writeAttr("id", veh->getID()).writeAttr("eclass", PollutantsInterface::getNa… in write() 55 …ttr("noise", HelpersHarmonoise::computeNoise(veh->getVehicleType().getEmissionClass(), veh->getSpe… in write() 56 of.writeAttr("route", veh->getRoute().getID()).writeAttr("type", fclass); in write() 61 of.writeAttr("pos", veh->getPositionOnLane()).writeAttr("speed", veh->getSpeed()); in write() 62 …teAttr("angle", GeomHelper::naviDegree(veh->getAngle())).writeAttr("x", veh->getPosition().x()).wr… in write()
|
H A D | MSInstantInductLoop.cpp | 62 MSInstantInductLoop::notifyMove(SUMOTrafficObject& veh, double oldPos, in notifyMove() argument 64 if (!vehicleApplies(veh)) { in notifyMove() 72 const double oldSpeed = veh.getPreviousSpeed(); in notifyMove() 82 write("enter", entryTime, veh, enterSpeed); in notifyMove() 84 myEntryTimes[&veh] = entryTime; in notifyMove() 86 const double newBackPos = newPos - veh.getVehicleType().getLength(); in notifyMove() 87 const double oldBackPos = oldPos - veh.getVehicleType().getLength(); in notifyMove() 101 write("stay", SIMTIME, veh, newSpeed); in notifyMove() 112 "type", veh.getVehicleType().getID()); in write() 127 std::map<SUMOTrafficObject*, double>::iterator i = myEntryTimes.find(&veh); in notifyLeave() [all …]
|
/dports/cad/sumo/sumo-1.2.0/tools/simpla/ |
H A D | _platoonmanager.py | 198 veh.state.speed = self._subscriptionResults[veh.getID()][tc.VAR_SPEED] 199 veh.state.edgeID = self._subscriptionResults[veh.getID()][tc.VAR_ROAD_ID] 200 veh.state.laneID = self._subscriptionResults[veh.getID()][tc.VAR_LANE_ID] 201 veh.state.laneIX = self._subscriptionResults[veh.getID()][tc.VAR_LANE_INDEX] 202 veh.state.leaderInfo = traci.vehicle.getLeader(veh.getID(), self._catchupDist) 208 if veh.state.leader is None or veh.state.leader.getID() != veh.state.leaderInfo[0]: 210 veh.state.leader = self._connectedVehicles[veh.state.leaderInfo[0]] 246 toRemove[veh.getPlatoon().getID()].append(veh) 291 self._platoons[veh.getPlatoon().getID()] = veh.getPlatoon() 345 pltn.getID(), str([veh.getID() for veh in pltn.getVehicles()]), [all …]
|
/dports/cad/sumo/sumo-1.2.0/src/microsim/cfmodels/ |
H A D | MSCFModel_CC.h | 90 virtual double finalizeSpeed(MSVehicle* const veh, double vPos) const; 132 virtual double freeSpeed(const MSVehicle* const veh, double speed, double seen, 135 virtual double maxNextSpeed(double speed, const MSVehicle* const veh) const; 177 double getCACCConstantSpacing(const MSVehicle* veh) const; 230 void switchOnACC(const MSVehicle* veh, double ccDesiredSpeed) const; 238 enum Plexe::ACTIVE_CONTROLLER getActiveController(const MSVehicle* veh) const; 259 double getACCAcceleration(const MSVehicle* veh) const; 271 void recomputeParameters(const MSVehicle* veh) const; 278 void resetConsensus(const MSVehicle* veh) const; 281 void performAutoLaneChange(MSVehicle* const veh) const; [all …]
|
H A D | MSCFModel_CC.cpp | 131 libsumo::Vehicle::changeLane(veh->getID(), veh->getLaneIndex() + 1, 0); in performAutoLaneChange() 154 libsumo::Vehicle::changeLane(veh->getID(), veh->getLaneIndex() - 1, 1); in performAutoLaneChange() 176 veh->processNextStop(vPos); in finalizeSpeed() 179 veh->setChosenSpeedFactor(vars->ccDesiredSpeed / veh->getLane()->getSpeedLimit()); in finalizeSpeed() 183 performAutoLaneChange(veh); in finalizeSpeed() 216 UNUSED_PARAMETER(veh); in insertionFollowSpeed() 611 speed = veh->getSpeed(); in getVehicleInformation() 886 buf << veh->getSpeed() << veh->getAcceleration() << in getParameter() 918 route = &veh->getRoute(); in getParameter() 939 route = &veh->getRoute(); in getParameter() [all …]
|
H A D | MSCFModel_IDM.cpp | 50 MSCFModel_IDM::finalizeSpeed(MSVehicle* const veh, double vPos) const { in finalizeSpeed() argument 51 const double vNext = MSCFModel::finalizeSpeed(veh, vPos); in finalizeSpeed() 53 VehicleVariables* vars = (VehicleVariables*)veh->getCarFollowVariables(); in finalizeSpeed() 54 …vars->levelOfService += (vNext / veh->getLane()->getVehicleMaxSpeed(veh) - vars->levelOfService) /… in finalizeSpeed() 63 gDebugFlag1 = veh->isSelected(); in followSpeed() 65 return _v(veh, gap2pred, speed, predSpeed, veh->getLane()->getVehicleMaxSpeed(veh)); in followSpeed() 88 double result = _v(veh, gap, speed, 0, veh->getLane()->getVehicleMaxSpeed(veh)); in stopSpeed() 103 MSCFModel_IDM::interactionGap(const MSVehicle* const veh, double vL) const { in interactionGap() argument 107 …const double acc = myAccel * (1. - pow(veh->getSpeed() / veh->getLane()->getVehicleMaxSpeed(veh), … in interactionGap() 108 const double vNext = veh->getSpeed() + acc; in interactionGap() [all …]
|
/dports/cad/sumo/sumo-1.2.0/src/microsim/ |
H A D | MSInsertionControl.cpp | 72 myAllVeh.add(veh); in add() 125 for (veh = myPendingEmits.begin(); veh != myPendingEmits.end(); veh++) { in emitVehicles() 143 if (veh->isOnRoad()) { in tryInsert() 159 myAbortedEmits.erase(veh); in tryInsert() 179 for (veh = myPendingEmits.begin(); veh != myPendingEmits.end(); veh++) { in checkCandidates() 273 myAbortedEmits.insert(veh); in descheduleDeparture() 280 myAllVeh.remove(veh); in alreadyDeparted() 288 for (veh = myPendingEmits.begin(); veh != myPendingEmits.end();) { in clearPendingVehicles() 291 veh = myPendingEmits.erase(veh); in clearPendingVehicles() 293 ++veh; in clearPendingVehicles() [all …]
|
H A D | MSVehicleTransfer.cpp | 58 if (veh->isParking()) { in add() 65 if (veh->succEdge(1) == nullptr) { in add() 72 veh->enterLaneAtMove(veh->succEdge(1)->getLanes()[0], true); in add() 74 myVehicles.push_back(VehicleInformation(t, veh, -1, veh->isParking())); in add() 79 MSVehicleTransfer::remove(MSVehicle* veh) { in remove() argument 82 if (i->myVeh == veh) { in remove() 84 veh->getLane()->removeParking(veh); in remove() 214 if (veh == nullptr) { in loadState() 222 parkingLane->addParking(veh); in loadState() 223 veh->setTentativeLaneAndPosition(parkingLane, veh->getPositionOnLane()); in loadState() [all …]
|
H A D | MSLane.cpp | 257 for (VehCont::iterator veh = myVehicles.begin(); veh != myVehicles.end(); ++veh) { in addMoveReminder() local 1009 const double speed = veh->hasDeparted() ? veh->getSpeed() : getDepartSpeed(*veh, dummy); in forceVehicleInsertion() 1116 if (veh != ego && veh->getPositionOnLane(this) <= maxPos in getFirstVehicleInformation() 1175 for (; veh != myVehicles.rend(); ++veh) { in planMovements() 1288 for (AnyVehicleIterator veh = anyVehiclesBegin(); veh != anyVehiclesEnd(); ++veh) { in detectCollisions() local 1343 for (AnyVehicleIterator veh = anyVehiclesBegin(); veh != anyVehiclesEnd(); ++veh) { in detectCollisions() local 1377 for (AnyVehicleIterator veh = anyVehiclesBegin(); veh != anyVehiclesEnd(); ++veh) { in detectCollisions() local 1762 if (!veh->isStopped() && veh->getLane() == this) { in executeMovements() 3071 if (veh != ego && veh->getPositionOnLane(this) < egoPos) { in getFollowersOnConsecutive() 3239 result.addLeader(veh, seen, veh->getLatOffset(this)); in getLeadersOnConsecutive() [all …]
|
/dports/games/cataclysm-dda-tiles/Cataclysm-DDA-0.F/tests/ |
H A D | vehicle_ramp_test.cpp | 101 vehicle &veh = *veh_ptr; in ramp_transition_angled() local 107 veh.engine_on = true; in ramp_transition_angled() 121 veh.cruise_velocity = 0; in ramp_transition_angled() 122 veh.velocity = 0; in ramp_transition_angled() 133 while( veh.engine_on && veh.safe_velocity() > 0 && cycles < 10 ) { in ramp_transition_angled() 217 test_ramp( veh, 59 ); 223 test_ramp( veh, 60 ); 229 test_ramp( veh, 61 ); 246 vehicle &veh = *veh_ptr; in level_out() local 252 veh.engine_on = true; in level_out() [all …]
|
H A D | vehicle_efficiency_test.cpp | 183 vehicle &veh = *veh_ptr; in test_efficiency() local 191 veh.close( vp.part_index() ); in test_efficiency() 194 veh.refresh_insides(); in test_efficiency() 200 veh.check_falling_or_floating(); in test_efficiency() 201 REQUIRE( !veh.is_in_water() ); in test_efficiency() 210 veh.engine_on = true; in test_efficiency() 225 while( veh.engine_on && veh.safe_velocity() > 0 && cycles_left > 0 ) { in test_efficiency() 228 veh.idle( true ); in test_efficiency() 230 REQUIRE( !veh.skidding ); in test_efficiency() 249 veh.velocity = 0; in test_efficiency() [all …]
|
/dports/games/cataclysm-dda/Cataclysm-DDA-0.F/tests/ |
H A D | vehicle_ramp_test.cpp | 101 vehicle &veh = *veh_ptr; in ramp_transition_angled() local 107 veh.engine_on = true; in ramp_transition_angled() 121 veh.cruise_velocity = 0; in ramp_transition_angled() 122 veh.velocity = 0; in ramp_transition_angled() 133 while( veh.engine_on && veh.safe_velocity() > 0 && cycles < 10 ) { in ramp_transition_angled() 217 test_ramp( veh, 59 ); 223 test_ramp( veh, 60 ); 229 test_ramp( veh, 61 ); 246 vehicle &veh = *veh_ptr; in level_out() local 252 veh.engine_on = true; in level_out() [all …]
|
H A D | vehicle_efficiency_test.cpp | 183 vehicle &veh = *veh_ptr; in test_efficiency() local 191 veh.close( vp.part_index() ); in test_efficiency() 194 veh.refresh_insides(); in test_efficiency() 200 veh.check_falling_or_floating(); in test_efficiency() 201 REQUIRE( !veh.is_in_water() ); in test_efficiency() 210 veh.engine_on = true; in test_efficiency() 225 while( veh.engine_on && veh.safe_velocity() > 0 && cycles_left > 0 ) { in test_efficiency() 228 veh.idle( true ); in test_efficiency() 230 REQUIRE( !veh.skidding ); in test_efficiency() 249 veh.velocity = 0; in test_efficiency() [all …]
|
/dports/cad/sumo/sumo-1.2.0/src/microsim/trigger/ |
H A D | MSTriggeredRerouter.cpp | 60 #define DEBUGCOND (veh.isSelected()) 365 if (!vehicleApplies(veh)) { in notifyEnter() 378 …if (myTimeThreshold > 0 && MAX2(veh.getWaitingTime(), veh.getAccumulatedWaitingTime()) < myTimeThr… in notifyEnter() 387 const MSRoute& route = veh.getRoute(); in notifyEnter() 391 …veh.getID() << " check rerouter " << getID() << " lane=" << veh.getLane()->getID() << " edge=" << … in notifyEnter() 418 ConstMSEdgeVector prevEdges(veh.getCurrentRouteEdge(), veh.getRoute().end()); in notifyEnter() 459 newEdge = veh.getEdge(); in notifyEnter() 467 newEdge = veh.getEdge(); in notifyEnter() 478 newEdge = veh.getEdge(); in notifyEnter() 488 veh.getEdge(), newEdge, &veh, MSNet::getInstance()->getCurrentTimeStep(), edges); in notifyEnter() [all …]
|