
Transcription
TraCI4MAtlab: Re-engineering thePython implementation of theTraCI interfaceMsc. Jorge EspinosaEngr. Andrés F. Acosta Gil
Outline Moycot Context TraCI4Matlab Re-engineering approach Reverse engineering sub-process Forward engineering sub-process Results ConclusionsSUMO2014 - Modeling Mobility with Open DataMay 15 16, 2014 - Berlin-Adlershof, Germany
MOYCOT?Urban Traffic Modelling and Control for Medellin cityDevelop urban traffic models that describe the interactionbetween the different actors involved in the vehicular traffic(people, vehicles and articulated), which are useful for thedevelopment of strategies, and urban traffic control in a frameof reference multimodal (transport ways interacting eachother).SUMO2014 - Modeling Mobility with Open DataMay 15 16, 2014 - Berlin-Adlershof, Germany
Medellin Medellín - Colombia: An innovative and sustainability-oriented city. Host of the World Urban Forum 2014.SUMO2014 - Modeling Mobility with Open DataMay 15 16, 2014 - Berlin-Adlershof, Germany
Medellin (cont.) Awards: Most Innovative City , Sustainable Transport , Urban Design. Integrated, multi-modal transportation system.SUMO2014 - Modeling Mobility with Open DataMay 15 16, 2014 - Berlin-Adlershof, Germany
MOYCOT Project Modelling and control of urban traffic in the city of Medellín(MOYCOT) project: “To identify and propose strategies for coordination of traffic lights based onoptimization that allow a better use of the road infrastructure and controllingurban traffic, considering the interaction among different availabletransportation modes” “Develop a simulation tool of multimodal traffic from the proposed models, tovalidate the generated monitoring strategies and control in this project.”SUMO2014 - Modeling Mobility with Open DataMay 15 16, 2014 - Berlin-Adlershof, Germany
Why SUMO Benchmark study. The decision took in to account aspects asreliability, performance, source code, and extensibility. Chosen simulation platform: SUMO (Simulation of Urban Mobility)SUMO2014 - Modeling Mobility with Open DataMay 15 16, 2014 - Berlin-Adlershof, Germany
Why SUMO
Software Traffic Simulator BenchmarkSoftware Traffic Simulator BenchmarkJ. L. Pereira and R. J. Rossetti, “An integrated architecture for autonomous vehicles simulation,”In Proceedings of the 27th Annual ACM Symposium on Applied Computing, 2012, pp. 286–292.
Optimization and SimulationSUMO is the rigth tool for urbantraffic simulation.Matlab is used vastly in engineeringscientific research[1]SUMO2014 - Modeling Mobility with Open DataMay 15 16, 2014 - Berlin-Adlershof, Germany Open SoruceExtensibilityItegration capabilitiesMicroscopic SimulatorAllow large Scale SimulationsPerformance High Level Language Highly Graphical capabilities Integrate MathematicalFunctions Rapid Protoyping Plenty of toolboxes IDE Highly Integrable Parallel Processing
Problem ?They didn t talk to each otherSUMO2014 - Modeling Mobility with Open DataMay 15 16, 2014 - Berlin-Adlershof, Germany
TraCI4Matlab Implementation of the TraCI protocol for Matlab based on the Pythonimplementation. Approaches Translate the subject implementation Use an automated tool Re-engineeringSUMO2014 - Modeling Mobility with Open DataMay 15 16, 2014 - Berlin-Adlershof, Germany
TraCI4Matlab Re-engineeringSUMO2014 - Modeling Mobility with Open DataMay 15 16, 2014 - Berlin-Adlershof, Germany
TraCI4Matlab Reverse engineering sub-process Packages and namespacestracitracisumo objectconstantsDeploymentSUMO2014 - Modeling Mobility with Open Datasumo objectconstantsDependencyMay 15 16, 2014 - Berlin-Adlershof, Germany
TraCI4Matlab Reverse engineering sub-process Modules’ attributes and methodssumo object utility -RETURN VALUE FUNC: Dict subscriptionResults: SubscriptionResults-getUniversal(varID: Int, objectID) getIDList(): String subscribe(objectID: String, varIDs: List, begin: Int, end: Int) getSubscriptionResults(objectID: String) subscribeContext(objectID: String, domain: Int, dist: Double, varIDs: List, begin: Int, end: Int) getContestSubscriptionResults(objectID: String)SUMO2014 - Modeling Mobility with Open DataMay 15 16, 2014 - Berlin-Adlershof, Germany
TraCI4Matlab Reverse engineering sub-process Dynamic behaviorSUMO2014 - Modeling Mobility with Open DataMay 15 16, 2014 - Berlin-Adlershof, Germany
TraCI4Matlab Forward engineering sub-process Problem: Differences between Python and MatlabPythonMatlabPackages and modules createnamespacesOnly packages createnamespacesClasses, functions andvariables can be associated tonamespacesOnly classes and functions canbe associated to namespaces Solution: Use global variables and a new class with constant attributesSUMO2014 - Modeling Mobility with Open DataMay 15 16, 2014 - Berlin-Adlershof, Germany
TraCI4Matlab Forward engineering sub-process Packages and namespacestraciRETURN VALUE FUNCtraciconstantssumo objectRETURN VALUE FUNCDeploymentSUMO2014 - Modeling Mobility with Open Datasumo objectconstantsDependencyMay 15 16, 2014 - Berlin-Adlershof, Germany
TraCI4Matlab Forward engineering sub-process Global variables utility GlobalVariables message connections14SubscriptionResults-results: Dict-contextResults: Dict-valueFunc: Dict create SubscriptionResults(valueFunc: Function)-parse(varID: Int, data) raises FatalTraciError reset() add(refID: String, varID: Int, data) get(refID: String): Dict addContext(refID: String, domain: Int, objID: String, varID: Int, data) getContext(refID: String): DictSUMO2014 - Modeling Mobility with Open DataMay 15 16, 2014 - Berlin-Adlershof, Germany
Results DEMO TraCI4Matlab was released on 24th December of 2013 under the BSDlicense. It is free software and is available for the community atMatlab Central[14], or as part of the SUMO contributed tools sinceSUMO 0.20.0.SUMO2014 - Modeling Mobility with Open DataMay 15 16, 2014 - Berlin-Adlershof, Germany
ResultsThe single intersection scenario used in the MOYCOT project to obtainparameters needed for MPC traffic lights controller.SUMO2014 - Modeling Mobility with Open DataMay 15 16, 2014 - Berlin-Adlershof, Germany
ResultsData obtained in the north-south edge using TraCI4Matlab:(a) Number of vehicles entering the edge, (b) Length of the queue on each lane in vehicles.SUMO2014 - Modeling Mobility with Open DataMay 15 16, 2014 - Berlin-Adlershof, Germany
Conclusions We could integrate SUMO and Matlab, and perform simulations in atransparent way. During this process static and dynamic models related to thearchitectural and component design were obtained that can be usedto implement TraCI in any object-oriented programming language. There are some performance Issues that could be study to improvetime simulations evaluations. There were found some issues related to the socket implementationof Matlab. Issues related to package visibility on Matlab.SUMO2014 - Modeling Mobility with Open DataMay 15 16, 2014 - Berlin-Adlershof, Germany
Acknowledgement This work was supported by Proyecto Colciencias 111856934640contrato 941-2012: Modelamiento y Control de tráfico urbano en laciudad de Medellín. Convocatoria 569.SUMO2014 - Modeling Mobility with Open DataMay 15 16, 2014 - Berlin-Adlershof, Germany
Man Bouncing Question Mark Towards Doctor - Artist: Art GlazerSUMO2014 - Modeling Mobility with Open DataMay 15 16, 2014 - Berlin-Adlershof, Germany
SUMO2014 - Modeling Mobility with Open Data May 15 16, 2014 - Berlin-Adlershof, Germany . SUMO2014 - Modeling Mobility with Open Data May 15 16, 2014 - Berlin-Adlershof, Germany . We could integrate SUMO and Matlab, and perform simulations in a transparent way. During this process static and dynamic models related to the