It is All about Traffic, and Programming
Search
Archives
0 visitors online now
0 guests, 0 members

Lane Closure Utility for VISSIM 5.40 (32bit and 64bit)

This post has already been read 8408 times!

The “Lane Closure Utility” is a hobby tool I developed when I was a graduate student 5 years ago.  It utilizes VISSIM COM interface to dynamically close or open any lane of any link at any time,  during the simulation.

The tool can be pretty handy for modelling lane closure (You Bet!),  incidents,  evacuation contraflow, work zones etc.

Interestingly,  over the years PTV didn’t bother to implement this “dynamic lane closure” as its default feature.  Once you specify a lane closure at the beginning,  it will be literally a lane closure throughout the entire simulation period.  This “limitation” might be awkward sometimes,  if you do not mean to close the lane for the entire simulation period,  but just want to close the lane at certain point,  and re-open it at a later time during the simulation.

Since VISSIM does not provide a convenient off-the-shelf solution for this type of situation,  there have been surprisingly quite some VISSIM users,  including university faculties, graduate students,  traffic engineers contacted me for accessing this utility,  to use in their engineering projects,  research dissertations and others.

As of today,  the latest VISSIM version available to North American users is 5.40 (SP3).   I just updated this small utility to be compatible with this latest VISSIM 5.4 version.  Because PTV won’t change VISSIM COM Lib’s GUID with its service packs,    the utility should work with all service packs of the same major version.

The updated lane closure utility can be downloaded from the following link:

vissim54-lcu-x86-x64

A small tutorial:

LCU Tutorial

The utility is built both as 32 bit and 64 bit programs, to work with respective VISSIM 32 bit or 64bit.  The download package includes a little demo and a quick video tutorial (you might need to install tscc CODEC to play the video, though).

The following is the snapshot of the user interface.

To set the schedule of a lane closure event,  click “New” under “LCU File Items”.  You will see the following

A lane closure event is defined as an ensemble of the following elements:

Scheduled Time, in seconds counted from the simulation start time;
Event Type: Lane Closure, or Lane Open;
Link ID;
Lane ID;
Affected Vehicle Class List.

This boils down to the following lane closure configuration file:

20-LaneClose-1-1-2-10-20-
40-LaneClose-1-2-2-20-10-
60-LaneOpen-1-2-2-10-20-
1000-LaneOpen-1-1-2-10-20-

Essentially, the above configuration says:

at time 20 seconds,   close Lane 1 of Link 1 to Vehicle Class 10 and Vehicle Class 20
at time 40 seconds,   close Lane 2 of Link 1 to Vehicle Class 10 and Vehicle Class 20
at time 60 seconds,   open  Lane 2 of Link 1 to Vehicle Class 10 and Vehicle Class 20
at time 1000 seconds, open  Lane 1 of Link 1 to Vehicle Class 10 and Vehicle Class 20

After specifying the schedule,  load the VISSIM network file and click “Run VISSIM”, then VISSIM will be launched.  You can control the simulation speed by sliding the “Simulation Speed” track bar. That is all.  After all,  it is a very simple tool anyway.  If you find it useful or interesting,  or just sucks,  please don’t hesitate to drop me a “thank you” message or tell me “it stinks” or whatever.

This post has already been read 8408 times!

26 Responses to Lane Closure Utility for VISSIM 5.40 (32bit and 64bit)

  • Hi there!

    This utility seems useful, but here's another approach.
    (beforehand please note that I am no VISSIM expert)

    Last year I had a (commercial) assignment of creating a simulation for a city arterial. On this road we have a lot of 'illegal parking activity'. I'm talking about lorries dropping their daily delivery by stopping in front of their destination in the middle of the traffic flow.
    I wanted to put this 'phenomenon' into the model and I think the same method could be used to simulate emergency stops or something similar.
    I created parking lots the size of a single car (lorry) on the traffic lanes, in front of the stores we mapped out in the area. Then I added a separate input to the network with the vehicle group 'illegal parking'. These vwhicles were assigned to the parking lots mentioned above.
    The lorries stopped at their illegal parking places, and the traffic was flowing around them very nice 🙂

    Another good point with this method that you can assign dwell time distributions to it as well as 'operating hours'.

    And also there's no need for an external utility to run this type of 'closure'. 🙂

    Although I don't need this tool I'd also like to say thank you to recognize your work here 🙂

  • to grazzt: Yes your approach is the right one, to model this type of "double parking" behavior (i.e., a loading/unloading truck, or lorry, as you called it :-), occupying a moving lane hence blocking the traffic behind it) – it is quite commonly seen in New York City as well.

    Lane closure is a must in some situation, for example, contra-flow during an emergency evacuation.

  • (I'm still the one above just forgot to update my name on the Blogger profile)

    Oh, I see 🙂 I think only 'emergency stops' caught my attention.

    I have nothing against having a handy little utility operating VISSIM, I also wrote one when it was needed. And it's very nice of you to share this one.
    Just playing with the idea to solve the problem within VISSIM. 🙂 It's better when you don't need to worry about different versions and deployment.

    Maybe the developers thought that this kind of lane closure might be implemented by timed routing decisions, partial and/or dynamic routes (I'm not sure about the later as I had no need to use them before).
    Managing these over VAP is also possible but maybe that's not for the ones who really need the LCU tool anyway 😉

  • Hi,

    I have been trying to implement this lane closure utility for use in my simulations. However i only have acces to the student version at this moment in time.WHen i try to initiatie this utility, it opens up just fine. However when i want to launch VISSIM, it does not do anything. None of the code starts to appear in the bottom black box, and vissim does not start up.

    Do you have any idea how i can fix this? Because i am really interested in closing down lanes in my simulation, and it needs to be time based.

    • HI Gyasi,

      Do you have COM enabled in your version of VISSIM? Also what is the version of VISSIM you are using? The compatible version should be 5.40

      Basically the logic is simple. You can implement it yourself using Excel based COM.
      – Wuping Xin

      • I think i made an error with my last reply, so this might be posted double, of so, my excuses.

        Anyway.

        I think i found out what the problem was, in my student version (5.40) the COM interface is disabled, not allowing me to run your utility. Maybe if i explain my problem you know of another way i could receive the same results.

        What I’m trying to simulate is a blockade/stopped vehicle on a freeay lane (which i simulate simply by letting a car park on the freeway) and the actions that are taken afterwards. i.e. decreasing the allowed speed limit, and closing of the lane. Now i have been fiddling around a bit with the lane closure with enabling routing at a certain time and introducing singals to simulate lane closure. I have tested this against lane closure (the problem is i cant make it time dependant, hence your utility) and have noticed that lane closure gives more realistic simulations compared to routing decisions and singals).

        But again, thanks for your fast reply!

        With Regards,
        Gyasi Johnson

  • Hi Wupin,

    I have been trying to download the LCU tool but to no avail. When I click on the link, it shows a bunch of unreadable characters
    and nothing about the download or installation. Can you please verify if the posted link is active?

    Thanks
    Sampson

  • Hi Wunping,

    Thanks for taking time to update this utility tool. However, I am unable to see any lane closures happening. I double checked the link numbers, lane number and vehicle class but it does not seem to do the closure. Any thoughts? I am currently using 5.4-07.

    Thanks!

  • Hi Wuping – In addition, I just wanted to mention that I am using an external controller to run the simulation. Is that affecting the utility by any chance? The example file that you provided works perfectly as expected but the file that I have is not responsive to lane closures. Please let me know if you have any advice or comments.

    Thanks!
    Nithin

    • Hi Nithin,
      If you invoke VISSIM from another program first, then the LCU won’t work. In other words, for it to work, LCU must be the sole COM client of VISSIM (as COM automation server).

      Wuping

      • Hi Wuping,

        Is there a way to customize the evaluation files options and the simulation configurations (resolutions and speed) while using the tool? As of now, it just unchecks all evaluations. Please let me know. Thanks!

        • Nithin – it doesn’t touch the evaluation file options or simulation resolution and speed……

  • Hi W.X,
    I have been using your lcu tool. Thanks for making it available. However, anytime i define a lane close event,
    the simulation stops at the exact time I defined for the lane to be closed. For example if I define lane 1 of
    link to be closed at time 500 seconds, the simulation will stop running at that time. Any insight will be much
    appreciated.

    Sampson

  • Hi Wupin,

    I have a question about the lane configuration order. According to your tutorial, 20-LaneClose-1-1-2-10-20- means:
    at time 20 s close lane 1 of link 1 to vehicle class 10 and vehicle class 20. The question is, what is the meaning of the
    digit “2” in front of the vehicle class 10.

    Additionally, the configuration order as shown in the lcu tool itself contains the heading “NumVehCls”. Does that refer to
    number of vehicles? Or it is the same as “VehClass”?

    Thanks
    Sampson

    • oh… it is the “number of vehicle classes” for which you wish to close the target link. For the line you put, it has two vehicle classes, i.e., 10 and 20.

  • Dear Wuping Xin,

    After trying to solve my problem the other way, I found that your program still would offer the best results for my research. The problem however is that with my version of VISSIM i still can not get it working.

    You stated earlier that writing the specific code in a COM interface was pretty easy. As I have absolutely zero experience with Visual Basic I was wondering what the basic code was for the lane closures.

    If you do not want to share the information online you can send me an email (GyasiJohnson@gmail.com) Or if you are reluctant to share the information at all, I can also understand.

    With Regards,
    Gyasi Johnson

    • Sure – no problem. I can send you the source code of the program so you can use it as a starting point. Only it was written in Delphi. But the logic is similar. …. wait…. I just would need a formal request letter (email) from you with your words that you wouldn’t share the code with others without my knowledge. Also you if you have some publication based on the work, you would duly acknowledge the work. That is it.

      Best wish with you research!

  • I couldnt find your email on this blog, so i googled it. I have sent the email to xinxx007@umn.edu, I hope that it is the correct email adress, if not, could you provide me the correct email adress so that I can resend it.

    Thanks in advanced!

    With regards,
    Gyasi Johnson

  • Hi Wuping,

    Your program is so awesome and thanks for developing and sharing it!

    I have a question on the output file of VISSIM, is there a way to output the data collection and travel time (as did in the evaluation tab) while running your program?

    Thank you,
    Ziwei

    • Hi Ziwei – you just need to set up the output setting (data collection, travel time etc.) as you would normally do and save the setting with the network inp file. VISSIM will handle that automatically. The tool has nothing to do with it.

      • Thanks, I was new to VISSIM and was not familiar with the evaluation settings, now the problem is fixed, thanks again!

  • Is there a way to close just a portion of a link for a specified time – let’s say – close 0.5 mile of a 1mile link (to simulate incidents or something) without splitting the link into 3 different links. For now I’m using a stationary vehicle of that length to do the trick.

    • Using a stalled vehicle to emulate an incident is the right way (or a common way) to emulate an INCIDENT. That is not lane closure, which close the entire LANE completely. If you want to emulate lane closure, you have to do a lane closure.

      These 2 situation have completely different driver behaviors.

      Do you want an incident, OR a lance closure?

  • I am using VISSIM 5.40. When I hit Run VISSIM, after loading the LCU file and the network, nothing happens. I would appreciate any solution to the problem.

    On the License menu, the box beside the COM interface is checked. That means the VISSIM I am using is COM-enabled, If I am not wrong.

    • You should match the 32bit or 64bit version of VISSIM to 32bit or 64bit of the tool.

  • Hi Wuping
    I have been trying hard to model the dynamic lane closure using VISSIM COM. However, there is something wrong and I couldn’t write the correct code in VBA. The COM manual doesn’t describe these things in detailed. Would you kindly help me writing the correct code. I will really appreciate you help. I tried to open the VISSIM files but was unable to do that. I am using quite old version 5.30.

    many thanks.

Leave a Reply

Your email address will not be published. Required fields are marked *