Hello, there is currently no method for loading additional files after the simulation is started. Extending TraCIServerAPI_InductionLoop would be your best course of action if you really need to add detectors at runTime. Otherwise I would advise a two-step procedure as suggested by Mario, regards, Jakob
2015-03-12 12:27 GMT+01:00 Mani Amoozadeh <[email protected]>: > > Thanks Mario, > > Yes, Unfortunately, it is better for us to create the loop detectors in > run-tim > e. > What I had in mind was to use the same technique for creating induction > loops i > n "MSActuatedTrafficLightLogic[1]" file: > > // Build the induct loop and set it into the container > std::string id = "TLS" + myID + "_" + myProgramID + > "_InductLoopOn_ > " + lane->getID(); > if (myInductLoops.find(lane) == myInductLoops.end()) { > myInductLoops[lane] = > dynamic_cast<MSInductLoop*>(nb.createIndu > ctLoop(id, lane, ilpos, false)); > assert(myInductLoops[lane] != 0); > if (myShowDetectors) { > > MSNet::getInstance()->getDetectorControl().add(SUMO_TAG_IND > UCTION_LOOP, myInductLoops[lane], "NULL", TIME2STEPS(300)); > } > > And modify the "TraCIServerAPI_InductionLoop" file so that it accepts > processSe > t commands. > I am not sure if I understand your solution. > I was wondering if we can feed the additional file to SUMO after loading > networ > k file. > > > - Mani > > > > > Hi Mani, > > is it really necessary to define the induction loop detectors at > runtime? I would suggest to do it in a preprocessing step. In a first > step you could load your network in Sumo and then use TraCI to iterate > through the network and find places where you can insert your detectors. > Afterwards you can export the locations together with some parameters > (id, freq etc.) to an additional file and you're ready. I think it's > possible to do all the steps in a batch procedure. > > regards > Mario > > > Am 12.03.2015 um 02:59 schrieb Mani Amoozadeh: > > Hi, > > > > Is there any TraCI command to create an induction loop? > > We need to create a loop detector through TraCI rather than defining it > > in the additional file. > > > > Thanks! > > > > - Mani > > > > > ----------------------------------------------------------------------------- > - > > Dive into the World of Parallel Programming The Go Parallel Website, > sponsore > d > > by Intel and developed in partnership with Slashdot Media, is your hub > for al > l > > things parallel software development, from weekly thought leadership > blogs to > > news, videos, case studies, tutorials and more. Take a look and join the > > conversation now. [2]http://goparallel.sourceforge.net/ > > _______________________________________________ > > sumo-user mailing list > > sumo-user@... > > [3]https://lists.sourceforge.net/lists/listinfo/sumo-user > > References > > 1. file://Buildtheinductloopandsetitintothecontainerstd/ > 2. http://goparallel.sourceforge.net/ > 3. https://lists.sourceforge.net/lists/listinfo/sumo-user > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming The Go Parallel Website, > sponsored > by Intel and developed in partnership with Slashdot Media, is your hub for > all > things parallel software development, from weekly thought leadership blogs > to > news, videos, case studies, tutorials and more. Take a look and join the > conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > sumo-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/sumo-user > ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ sumo-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sumo-user
