how to manage two modules by TraCI

444 views
Skip to first unread message

Er. Arun Kumar

unread,
Jun 16, 2012, 1:12:05 PM6/16/12
to omn...@googlegroups.com
I am using two different modules in my project, mobile tower and vehicles.
I want to control the behavior of these two modules using TraCI simultaneously. How can I do so ?

I am using OMNet++, Veins and SUMO simulators.

In my project I want to control the movement of vehicle node in OMNet++ by the movement of vehicle in SUMO and the behavior of tower in SUMO by the signal provided by OMNet++ according to the calculation done in OMNet++.

Kindly help me out by providing your guidance.

Regards,
Arun

Sagar Pareek

unread,
Jun 16, 2012, 1:16:35 PM6/16/12
to omn...@googlegroups.com
You only need vehicles to be managed by TraCI scenario. Mix this module with RSU's and channel control will automatically adjust both the modules.


--
Sent from the OMNeT++ mailing list. To configure your membership,
visit http://groups.google.com/group/omnetpp



--
KIND REGARDS --
SAGAR PAREEK
COMPUTER SCIENCE AND ENGINEERING
NIT ALLAHABAD

Er. Arun Kumar

unread,
Jun 16, 2012, 1:22:26 PM6/16/12
to omn...@googlegroups.com
Not only the vehicular motion in SUMO but I want to control the traffic light signal in SUMO by the use of TraCI .All the calculations are done in OMNet++ modules and then the information need to be transferred to SUMO.

I do need to transfer information about both the modules between SUMO and OMNeT++ using TraCI.
How to do it?

Sagar Pareek

unread,
Jun 16, 2012, 1:56:53 PM6/16/12
to omn...@googlegroups.com
Then you have to change it by yourself ..

Er. Arun Kumar

unread,
Jun 16, 2012, 2:03:15 PM6/16/12
to omn...@googlegroups.com
@Sagar
Can you please elaborate ? Where and what to change?

Sagar Pareek

unread,
Jun 16, 2012, 2:16:11 PM6/16/12
to omn...@googlegroups.com
You have to see te code how TraCI is handling one module. Then you have to develop your own new handler.
For more detail ask Christoph Sommer sir. He can give you much better help

Christoph Sommer

unread,
Jun 17, 2012, 2:34:46 AM6/17/12
to omn...@googlegroups.com
Er. Arun Kumar wrote:
> I want to control the traffic light signal in SUMO by the use of TraCI

Simple commands for this (like commandSetTrafficLightProgram) are
already implemented in TraCIScenariomanager. If you need more complex
control over traffic lights, you can build on those.

For calling methods of the TraCIScenarioManager, you will need a pointer
to the instance in your simulation. You should be able to get a pointer
by using the TraCIScenarioManagerAccess class (see the TraCIMobility
class for an example).


Cheers,

Christoph

--
Dr.-Ing. Christoph Sommer
Institute of Computer Science
University of Innsbruck, Austria
Phone: +43 512 507-96835 / Fax: -9888
http://ccs.uibk.ac.at/~sommer/

Er. Arun Kumar

unread,
Jun 17, 2012, 2:55:27 AM6/17/12
to omn...@googlegroups.com
@ Christoph

Sir, I am thankful to you for your precious advise but still I have some questions.

1. I want to set traffic light state as well as, ask the car's position simultaneously from SUMO. for this purpose I want to use TraCI. I want to set the parameters of traffic light and car in TraCI single packet. so that SUMO can use the same at once.
Can I sent control parameter for traffic light and ask position of car in a single TraCI packet. ? How will SUMO reply to OMNeT++ ? How to interprate the packet replied by SUMO in OMNeT++?
What to code and where to code for it?
Where can I find tutorial or example related to it?
If i need to code my own traciScenarioManager file then please help by telling how to do so?

Regards,
Arun



Er. Arun Kumar

unread,
Jun 17, 2012, 8:53:24 AM6/17/12
to omn...@googlegroups.com
@Christoph

Sir ,
I have a question.
Is it possible to send traffic light packet at one time and car packet at another with TraCI from OMNeT++ to SUMO.

If yes, then how to do it ?what to write in the code and where ?

Regards,
Arun

Christoph Sommer

unread,
Jun 18, 2012, 1:29:50 PM6/18/12
to omn...@googlegroups.com
Er. Arun Kumar wrote:
> I want to set the parameters of traffic light and car in TraCI single
> packet. so that SUMO can use the same at once.

You can do that (a complete reference of TraCI can be found online [1]),
but it is highly unnecessary.

Other than the way you are probably used to, discrete event simulations
have a very different notion of time: "simulation time" will only
advance with events that happen *in* the simulation.

This is explained in much more detail (and much better than I ever
could) in [2] or any other book on simulation.


Best,

Christoph


[1] http://sourceforge.net/apps/mediawiki/sumo/index.php?title=TraCI
[2] Averill M. Law and W. David Kelton, Simulation, Modeling and
Analysis, ed. 3rd, Singapore, McGraw-Hill Book Co, 2000.

muntaser salman

unread,
Apr 3, 2016, 2:37:42 PM4/3/16
to OMNeT++ Users
i am also interested in this topic
if you made any progress please inform me...
Reply all
Reply to author
Forward
0 new messages