Dear Andres, as your example demonstrates, the KraussPS model is overly simplistic in defining aMax. The value returned by getMaxAccel() serves the role of 'max typical acceleration' rather than 'maximum acceleration the engine can supply' and in this case the divergence in meaning is critical. Moreover, the value aMax should itself depend on current speed due to air drag. I've opened up a ticket http://sumo.dlr.de/trac.wsgi/ticket/2849
A simple solution would be to replace the line const SUMOReal aMax = MAX2(0., getMaxAccel() - gravity ....); with something like: const SUMOReal aMax = MAX2(0., getMaxAccel() - 0.5 * gravity ....); This assumes that drivers would typically use only half of their engine power on acceleration (and thus have reserves to handle inclines up to 32 degrees). It also improves the behavior when driving downhill. The current model accelerates like a roller-coaster while the proposed model actually uses the brakes somewhat to limit downhill acceleration. regards, Jakob 2017-02-06 23:52 GMT+01:00 Andres Felipe Acosta Gil <[email protected]>: > Dear SUMO community. > > We were testing the KraussPS model in cities with high road slope such as > Medellin and San Francisco. We imported the height data using GeoTiff, as > explained in > http://www.sumo.dlr.de/2014/Presentation_Keynote_Open% > 20data%202014_MarioKrumnow.pdf > and found that, using this model, vehicles get stuck in the simulation if > the road slope is > 15.2789°, having into account a default max accel of > 2.6 m/s2, as found in the maxNextSpeed method of the model: > > const SUMOReal gravity = 9.80665; > const SUMOReal aMax = MAX2(0., getMaxAccel() - gravity * > sin(DEG2RAD(veh->getSlope()))); > // assuming drag force is proportional to the square of speed > const SUMOReal vMax = sqrt(aMax / getMaxAccel()) * myType->getMaxSpeed(); > return MIN2(speed + (SUMOReal) ACCEL2SPEED(aMax), vMax); > > How can we fix this? > > -- > Andres Felipe Acosta Gil, MSc student - Software developer > Universidad Nacional de Colombia - Medellín > Facultad de Minas > Tel: +57 (4) 4255295 > Institutional e-mail: [email protected] > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > _______________________________________________ > sumo-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/sumo-user > ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ sumo-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sumo-user
