vissim信号控制器接口sc interface.pdf
VISSIMSignalControllerDLLInterfaceLK2007-01-23
ThisdocumentdescribeshowexternalcontrollerscanbeconnectedtoVISSIMthroughthe
newDLLinterface(availablesinceVISSIM4.10)tobeusedduringsimulationand/ortest
runs.
Introduction
Signalcontrollers(SCs)oftype“FixedTime”and“VAS”aresimulatedwithinVISSIM.All
otherSCsareexternalandeachonehasaprogramfileassignedtoit.Ifthisprogramfileisan
*.exetheoldDDEinterfaceisusedandoneinstanceofthis*.exeisstartedforeachSCusing
itduringasimulationrun.Iftheprogramfileisa*.dll,however,thenewDLLinterfaceis
used.Thismeansthatthe*.dllisloadedonlyonceforasimulationrunandhastohandlethe
controllerlogicanddataforallSCsthatitisassignedto.
Thecontrollerfrequency(usually1/s)defineshowmanycontrollertimesteps(passesthrough
thecontrollerlogic)musttakeplacepersimulationsecond.Itissetbytheexternalcontroller
duringtheinitializationsequence.ThesimulationresolutioninVISSIM(simulationtime
stepspersimulationsecond)mustbeamultipleofthecontrollerfrequency.Other
combinationsofvaluescauserun-timeerrors.(Example:Ifthesimulationresolutionis10and
thecontrollerfrequencyis2,VISSIMsimulates5simulationtimestepsbetweentwopasses
throughthecontrollerlogic.)
IneachcontrollertimestepVISSIMcontactsallcontrollerDLLsatofthecurrent
simulationtimestep.First,thecurrentsignalizationstatesanddetectordataofallSCsare
passedtotherespectiveDLLs.Second,theDLLsareaskedtocalculatenewdesiredsignal
stateswhicharesubsequentlypassedbacktoVISSIM.Dependingonparameterssetbythe
controllerlogic,eitherth