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/a6752e13a8af44c1e19eebe8e421720a2bfdb7fa
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

Reply via email to