Hello, a couple of points: - if you suspect that the socket communication and python stuff are slowing you down you could switch to libsumo (http://sumo.dlr.de/wiki/Libsumo). It should be fairly easy to test this out since it uses the same api - if you need to extend the API or the sumo core it would be good to discuss this with the sumo team before you start implementing. Discussing the architecture beforehand raises the chances that your code can be included with the default release - there is no documentation that would fit the kind of extension you would probably need. If you come to me with a plan I can give you some pointers at where to look
regards, Jakob 2018-03-21 17:13 GMT+01:00 Beck, Yokhanan Z. <[email protected]> : > Alright, I’ve now got some pretty feature-full functionality in TraCI (via > the Python interface), but it runs rather slowly... largely because of > Python, the server-client message passing, and the limited functionality > TraCI offers (which requires workarounds). > > Therefore, I would like to transition it over to a C++ extension instead. > > Is there a good place to start on learning SUMO's code structure, and how > to write extensions for SUMO? > > I’ve looked around the wiki and have been able to find almost nothing -- > though it's quite possible I've simply missed something obvious! > > Are there examples I could work from? > > So far I’ve just been trying to reverse engineer the code on my own to > figure out how and where to put stuff, but without a guide of some sort > it’s proving difficult. > > > Thanks! > Yokhanan > > > -----Original Message----- > From: Michael Behrisch [mailto:[email protected]] > Sent: Monday, January 29, 2018 3:27 PM > To: Beck, Yokhanan Z. <[email protected]>; Sumo project User > discussions <[email protected]> > Subject: Re: [sumo-user] Jaywalking > > Hi Yokhanan, > > Am 29.01.2018 um 20:09 schrieb Beck, Yokhanan Z.: > > However, I have been unable to figure out how to access these neighbors > from either traci or sumolib: > > > > net = sumolib.net.readNet(net_file) > > # ... > > ped_road = traci.person.getRoadID(ped_id) > > try: > > edge = net.getEdge(ped_road) > > except KeyError: > > edge = None > > if edge is not None: > > inner_lane = edge.getLane(edge.getLaneNumber() - 1) > > > > At this point I can't actually figure out how to access the "neigh" > attribute. Reading through the NetReader class in sumolib/net/__init__.py, > it seems that the attribute is not actually read in by sumolib..? > > You are right it wasn't. I just fixed that. You may either download a > nightly snapshot tomorrow or apply the changes yourself, see > https://github.com/DLR-TS/sumo/commit/a6752e13a8af44c1e19eebe8e42172 > 0a2bfdb7fa > I did not test it, so please speak up if something does not work as > expected. > > Best regards, > Michael > > > _______________________________________________ > sumo-user mailing list > [email protected] > To change your delivery options, retrieve your password, or unsubscribe > from this list, visit > https://dev.eclipse.org/mailman/listinfo/sumo-user >
_______________________________________________ sumo-user mailing list [email protected] To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/sumo-user
