How would i retrieve the vehtype from the detector what would be the code for it

vehicle_status_2=dets_1_1_2.get('AttValue', 'VehNo');

5 Comments

This looks like it might be code related to VISSIM; see for example Appendix O: VISSIM COM Interface Program in MATLAB, at https://anthony-claretonwutalobi.com/wp-content/uploads/2022/05/DEVELOPMENT_OF_INTELLIGENT_VEHICLE_PEDES.pdf
Thanks for the manual it's really useful. But in my case I want to detect the Vehicle type from the detector only and that is my main concern. So if you can share the code or if you can guide me then it would be really helpful because in this manual as well they are just using Multi attributes
Dets=vnet.Detectors; dets_1_1_2=Dets.ItemByKey(6) means the 6th number detector which I have put for my second phase for the first intersection for first signal controller Now I want to retrieve the VehType from the detector part how do I do it Please help I have literally spent 12 days on this asking everyone
I wonder if what you want is AttValue 'VehicleClass' ?

Sign in to comment.

Answers (1)

Hi @Raj,
In the VISSIM manual, I found that the abbreviation used for the name of vehicle type as an attribute/parameter is "VehTypeName." You could try fetching the attribute value for this abbreviation or similar abbreviations ("VehType") that are referred to in the other manuals attached by @Walter Roberson.
vehicle_type = dets_1_1_2.get('AttValue', 'VehTypeName');
vehicle_type = dets_1_1_2.get('AttValue', 'VehType');
To refer to the VISSIM manual, you can check out this link: https://www.dot.ny.gov/main/roundabouts/files/manual_vissim_410.pdf

Tags

Asked:

Raj
on 14 Nov 2024

Answered:

on 11 Dec 2024

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!