Jump to content
The simFlight Network Forums

AI Traffic and the limiter


Recommended Posts

Hello,

I have recently tried using the Traffic limiter within FSUIPC in FSX.  FSUIPC is the latest version currently in your downloads section, V4.966c.  

In FSX Acceleration, I am having two issues, probably related.  Firstly, When I use a Lua routine to read the total number of aircraft from offset 0x025c, I believe it reads the number of aircraft at that moment correctly.  However, this is not updated; subsequent reads show the same value, and event.offset never picks up a change. This is the same whether the traffic limiter is on or off.

When I start FSX at EGLL with Traffic limiter off, TrafficLimit=0 in the ini file, offset 0x025c shows 331 aircraft and this remains static whereas Traffic Toolbox fromthe SDK shows 336 and this number fluctuates by a couple, presumably as aircraft enter and leave the reality bubble.  If I turn on the traffic limiter by setting it to 150 using offset 0x86e0, the figures reduce.  Offset 0x025c shows 150 and this remains static but Traffic Toolbox shows 229 and again this fluctuates slightly. 

With FSX Steam Edition, the limiter works as I expect.  Using the same airport, the same aircraft, the same AI settings and the same traffic files,with the limiter off in the ini file; offset 0x025c shows around 330 and fluctuates, always one lower than Traffic toolbox. Using the same Lua routines, I set traffic limiter to 150, offset 0x025c shows 150 and Traffic toolbox shows 151.

As I say, FSX SE works as I expect, whereas Acceleration does not show an accurate number of aircraft, and although it appears to delete some AI aircraft, it does not reduce the number to the selected figure, nor does it maintain a constant number of AI aircraft.

I have seen a report similar to this, but it was reported fixed, I believe in V4.959n.  Am i suffering from a similar problem, am I doing something wrong, or is it expected SE will work differently to Acceleration?

Thank you for your help.

Link to comment
Share on other sites

2 hours ago, papps said:

In FSX Acceleration, I am having two issues, probably related.  Firstly, When I use a Lua routine to read the total number of aircraft from offset 0x025c, I believe it reads the number of aircraft at that moment correctly.  However, this is not updated; subsequent reads show the same value, and event.offset never picks up a change. This is the same whether the traffic limiter is on or off.

That sounds like FSUIPC's traffic information is not being updated. Can you try using TrafficLook (the Additional Program in the thread in Download Links above). It reads trafficfrom FSUIPC, not from FS, and displays what it gets withing a set TCAS range.

And please show me the FSUIPC log file. If needed I can provide options you can use to get more information.

2 hours ago, papps said:

With FSX Steam Edition, the limiter works as I expect.  Using the same airport, the same aircraft, the same AI settings and the same traffic files,with the limiter off in the ini file; offset 0x025c shows around 330 and fluctuates, always one lower than Traffic toolbox. Using the same Lua routines, I set traffic limiter to 150, offset 0x025c shows 150 and Traffic toolbox shows 151.

Traffic Toolbox includes the User aircraft in the count, whereas FSUIPC assumes that is not controlled by AI (Artificial Intelligence) but by Real Intelligence! ;-)

Without more information I can't really help further. I ALWAYS need the log, for any support question or problem. However, the code is identical in this area in FSUIPC between FSX-SE and FSX-ACC, so it is a bit of a mystery. Do you have the same add-ons in both, the same settings in FSUIPC's INI file?

Oh, also you started off by saying

"I have recently tried using the Traffic limiter within FSUIPC in FSX", but from what you say the Traffic Limiter has nothing to do with it. It is just that SimConnect stops providing AI updates. So, any other changes recently, or have you only just taken such an interest in the traffic?

Pete

 

Link to comment
Share on other sites

Hello Pete,

Thank you for your response.

Previously I had been using AirTrafficManager to manage AI Traffic, and this still appears to work.  My steam version is almost identical to my acceleration version and I checked the two ini files.  One difference is that I use AES in Acceleration and indeed had NewDeleteVehiclesForAES=Yes in the in file for Acceleration.  In Steam this was NewDeleteVehiclesForAES=No.

When I changed NewDeleteVehiclesForAES to No, Acceleration  works in the same way as Steam and the values are correct.  It is this setting that is causing my problem.

I attach the FSUIPC log file as requested, but I do not know how to run TrafficLook.  If this is still needed, can you point me to the instructions for this.

Thank you.

FSUIPC4.log

Link to comment
Share on other sites

3 hours ago, papps said:

When I changed NewDeleteVehiclesForAES to No, Acceleration  works in the same way as Steam and the values are correct.  It is this setting that is causing my problem.

Ah, that's interesting. Thank you. I'll take a look, and fix that in the next update.

3 hours ago, papps said:

but I do not know how to run TrafficLook.  If this is still needed, can you point me to the instructions for this.

There are no instructions! It really doesn't need any! Not ALL programs need instructions!

You just put it in a convenient folder and run it. It provides a window which you can move and size and which displays the traffic FSUIPC is receiving and placing into its TCAS tables. Just run it an play with it. It is just a free demo.

You can select Ground or Air traffic (Air has a range defaulted to 40nm but adjustable in FSUIPC options dialogue). Currently ground has a range of 6nm if you are in the air (but that will be changed), or 3nm if you are no the ground.

You can run the program twice, selecting Air on one and Ground in the other. Traffic is updated once per second. You can print, move the columns around and sort them just like in any other windows tables.e.g Explorer)

It isn't mysterious. Didn't you even try running it? You'll see what I mean then!

Pete

 

Link to comment
Share on other sites

15 hours ago, Pete Dowson said:

Ah, that's interesting. Thank you. I'll take a look, and fix that in the next update.

Thank you.  I look forward to the next update.

 

15 hours ago, Pete Dowson said:

Didn't you even try running it? You'll see what I mean then!

Actually, I did and that was why I asked the question.  When I run TrafficLook, the program executes, but there is no UI.  In task manager, I can see the process, but it does not appear in the applications list.  I have just tried again to make sure I was not going mad, and the same happens.  Usually I try most things before I ask.  Oh well!

Thanks again.

Phil.

Link to comment
Share on other sites

16 minutes ago, papps said:

Actually, I did and that was why I asked the question.  When I run TrafficLook, the program executes, but there is no UI.  In task manager, I can see the process, but it does not appear in the applications list.  I have just tried again to make sure I was not going mad, and the same happens.

That's weird. It remembers the last position and size for the Window, so look in its folder for a "TrafficLook.ini" file. Open that in notepad or other text editor and see what Windows coordinates and sizes it has somehow got set. Mine are:

[Window]
Airborne=[687,85,697,800]
Ground=[139,88,548,800]


Try setting them to something to suit your screen. The numbers are top left x and y, then width and height. If in doubt 0, 0, 600, 800 are a safe bet.

Don't understand why it isn't in the Applications list. It is a straight-forward Windows application, nothing complicated.

19 hours ago, papps said:

When I changed NewDeleteVehiclesForAES to No, Acceleration  works in the same way as Steam and the values are correct.  It is this setting that is causing my problem.

Can you try FSUIPC 4.699j, changing that parameter back, please? I can't test it here, not having any FSX-MS installations any more. Keep your current FSUIPC4.DLL safe, and just copy this one into the FSX modules folder.

Pete

 

Link to comment
Share on other sites

Hello Pete,

I have tried the new version, but unfortunately it hasn't made much difference.  The Traffic count is now updated, but is around 7 below that shown in Traffic Toolbox.  When the limiter is applied, I used 150, the count of AI is unchanged in both 0x025c and Traffic Toolbox.

I can still not get Trafficlook to work.  There was no ini so I created it but still no UI.

Thanks,

Phil

Link to comment
Share on other sites

2 hours ago, papps said:

I can still not get Trafficlook to work.  There was no ini so I created it but still no UI.

If there's no INI then it never actually gets to run, which would explain it. Something (virus checker?) is blocking it.

2 hours ago, papps said:

I have tried the new version, but unfortunately it hasn't made much difference.  The Traffic count is now updated, but is around 7 below that shown in Traffic Toolbox.

That's very odd. It either gets traffic or it doesn't. The count always matches here (apart from the user aircraft being counted in the explorer). The "DeleteVehicles" parameter is now most certainly NOT a factor, it plays no part in this apart from deleting vehicles IF AES is running (is it?). I don't think Traffic Explorer counts vehicles in any case.

2 hours ago, papps said:

When the limiter is applied, I used 150, the count of AI is unchanged in both 0x025c and Traffic Toolbox.

Unchanged from what? The limiter won't limit if there's no reason too.

A log file would be useful, please.

Pete

 

Link to comment
Share on other sites

Hello Pete,

I appreciate your help with this.

12 hours ago, Pete Dowson said:

apart from deleting vehicles IF AES is running (is it?)

Yes,AES is active as I am testing this at Heathrow, where I have a lot of traffic; however, as the engines are running in this scenario, the AES fleet has not appeared.  I can test at a default airport where AES is not active if that helps.  

12 hours ago, Pete Dowson said:

Unchanged from what? The limiter won't limit if there's no reason too.

Sorry, I did not make this clear.  In my tests, that I have repeated this morning to get accurate figures, Traffic toolbox is showing around 330 aircraft, fluctuating between 329 and 338.  Offset 0x025c is reporting between 316 and 327.  I have a Lua routine that displays this figure when the offset changes, but this is sometimes a few seconds behind the change shown in traffic toolbox.  When I set Max AI (it is zero in the ini) using offset 0x86e2, the traffic does not reduce to the 150 requested. I cannot attach a file as it tells me I can only upload 10.24kb but the file is only 7k; does it include my previous upload?

I have also tested this by setting TrafficLimit=150 in the ini file.  When loading, and after a few minutes, there are in excess of 330 aircraft as shown in traffic toolbox.  

As for trafficlook, I have tried this with AV off and there is no difference.  I agree, there must be something stopping it running.  I will investigate this further.

I hope this information is of use.  If you need anything more, I will try and provide it.

Thanks again,

Phil.

Link to comment
Share on other sites

2 hours ago, papps said:

I cannot attach a file as it tells me I can only upload 10.24kb but the file is only 7k; does it include my previous upload?

Always ZIP files. Text files compress very well.

2 hours ago, papps said:

I tried, and it seems I can attach a file to another post, so here is the FSUIPC log file from me previous test.

Ok, I'll take a look, but I must say that all the things you say makes me very suspicious of your system.

[LATER]

All the log shows is lots of Lua files being loaded and run, and the session being closed down just 46 seconds after FSUIPC was ready to do anything. Not sure what you expected me to make of it.

Pete

 

Link to comment
Share on other sites

Okay .. the DeleteVehicles action is making no difference! I'm using MyTraffic6 with the traffic sliders near max but my limit to to 250. And at Heathrow, a very busy aircraft, that's what it stays at -- agreed by Traffic Explorer (+1) and my own VAS display lua, which also shows the current Traffic count (this little display Lua is available in two versions, one for the FS PC and one for WideFS, in the Lua plug-in examples in your FSUIPC Documents subfolder).

So, sorry. Apart from the fix in the 'j' version to allow traffic scanning with the New DeleteVehiclesForAES parameters active (a silly error which must have been there a while!), I can see nothing wrong. How it counts 7 below the Explorer makes no sense.

The lack of effect of the limiter is different though. Maybe the deletion isn't working. That relies on a function in the sim. In order to find out if that is going wrong, please add these lines to the [General] section of your FSUIPC4.INI file:

Debug=Please
LogExtras=x100

and set the Traffic Limit please, so it logs it when loading.

See if the limit isn't working, then shut down and show me the log.

Also please tell me what traffic add-on you are using. Or is it default?

Pete

 

Link to comment
Share on other sites

Hello Pete,

This time I have removed all my Lua, added lines to the ini that you requested.  The TrafficLimit=150 option remains in the ini..  I started FSX and loaded the same scenario as the previous tests.  After the flight loaded, I started Traffic Toolbox, this showed 151 aircraft, as expected with the TrafficLimit at 150.  However, over the next short while, this figure steadily increased to 169 never decreasing.  I have stopped the flight and attach the log file for you.

The AI I am using is a mixture of JF Traffic360 and some plans, including BA, from AIG compiled with AIFP3.

Thank you for the time you are spending on this.

Phil

FSUIPC-Log.zip

Link to comment
Share on other sites

Hello Pete,

I thought I'd try the 'j' version in Steam edition; I'm not sure if it should work.  However, it exhibits identical issues to FSX Acceleration.  That is, it limits AI at the start of the session, but not afterwards - AI increases in the same way.  The 'c' version in Steam limits AI to the value set by trafficlimit throughout the session.

I am not sure if this is useful information or not, but I include it in case.

Back to TrafficLook, I had an older version, V1.551, that I had downloaded previously but don't seem to have run.  This version runs fine on my system.  For the record, I am running Windows 7 Professional 64bit SP1.

Regards,

Phil

Link to comment
Share on other sites

15 hours ago, papps said:

This time I have removed all my Lua, added lines to the ini that you requested.  The TrafficLimit=150 option remains in the ini..  I started FSX and loaded the same scenario as the previous tests.  After the flight loaded, I started Traffic Toolbox, this showed 151 aircraft, as expected with the TrafficLimit at 150.  However, over the next short while, this figure steadily increased to 169 never decreasing.

The limit isn't applied unlessthe frame rate descreases below your chosen value. Have you set that in the INI file? If it is defaulted to zero then the limit applies always, irrespective of frame rate, Perhasp I need to see your INI file, or at least the limiter section.

I always have my desired frame rate set. Maybe that's the difference?

13 hours ago, papps said:

I thought I'd try the 'j' version in Steam edition; I'm not sure if it should work.  However, it exhibits identical issues to FSX Acceleration.

Okay, then it must be to do with the parameters in the INI as it works fine here in FSX-SE (and P3D). Let me see those and I'll try the same here.

13 hours ago, papps said:

Back to TrafficLook, I had an older version, V1.551, that I had downloaded previously but don't seem to have run.  This version runs fine on my system.  For the record, I am running Windows 7 Professional 64bit SP1.

As am I. There's been no substantial change in TrafficLook for years. The only recent change was to add the distance to the nearest aircraft(even if not in TCAS range) to the title bar. I've no idea why that doesn't run on your system. Does it even create an INI file? Is their any error entry for it in the Windows Event Viewer?

I looked at the log. Something strange is evident:

   715545 Sim stopped: average frame rate for last 134 secs = 7.8 fps
   716747 === Closing session: waiting for DLLStop to be called ...


whereas unless the AI traffic gathering is explicity stopped by an INI file parameter, it should have a summary line for traffic at every "Sim stopped" entry, so::

   229243 Sim stopped: average frame rate for last 118 secs = 20.2 fps
   229243    Max AI traffic was 251 aircraft (Deleted 375)
   236372 === Closing session: waiting for DLLStop to be called ...


also, similar information also appears in the final summary. Yours shows:

   725389 *** FSUIPC log file being closed
Minimum frame rate was 6.9 fps, Maximum was 8.9 fps
Minimum available memory recorded was 32768Mb
Average frame rate for running time of 134 secs = 7.8 fps
G3D fix: Passes 29189, Null pointers 0, Bad pointers 0, Separate instances 0
Memory managed: 8 Allocs, 8 Freed
********* FSUIPC Log file closed ***********


whereas unless traffic data was turned off it would show:

   179324 *** FSUIPC log file being closed
Minimum frame rate was 13.1 fps, Maximum was 17.0 fps
Minimum available memory recorded was 2379Mb
Average frame rate for running time of 17 secs = 11.5 fps
Maximum AI traffic for session was 596 aircraft
Memory managed: 86 Allocs, 85 Freed
********* FSUIPC Log file closed ***********


again, with the "Maximum AI traffic line.

So, somehow the flag in FSUIPC's memory telling it to not collect AI Trafic data is getting set. There's no other way. I definitely need to see your INI file, please!

So, I can only think this flag somehow being set (corrupted in fact, as it is only set once, during initialisation). This would also explain why the FSUIPC count stops, and the traffic limiter stops. That must happen at the EXACT moment the flag is cleared. I have to nail that moment somehow and see what event is related to it. As a start I'll log it if it changes -- expect a revised test version. But I'd like to see your INI file first, please.

Pete

 

Link to comment
Share on other sites

Hello Pete,

Thanks for the comprehensive reply.

2 hours ago, Pete Dowson said:

The limit isn't applied unlessthe frame rate descreases below your chosen value. Have you set that in the INI file? If it is defaulted to zero then the limit applies always, irrespective of frame rate, Perhasp I need to see your INI file, or at least the limiter section.

I always have my desired frame rate set. Maybe that's the difference?

Yes, I understand, but as you will have seen, my frame rate is very low, and I have the target set to 0 in FSUIPC.ini.  I attach the ini as requested.  So yes, there is a difference here.  I had left the values at the default (except for TrafficLimit) as I did not want to confuse matters more.

 

2 hours ago, Pete Dowson said:

whereas unless the AI traffic gathering is explicity stopped by an INI file parameter, it should have a summary line for traffic at every "Sim stopped" entry, so::

   229243 Sim stopped: average frame rate for last 118 secs = 20.2 fps
   229243    Max AI traffic was 251 aircraft (Deleted 375)
   236372 === Closing session: waiting for DLLStop to be called ...

Yes, I have seen this previously.

 

2 hours ago, Pete Dowson said:

So, I can only think this flag somehow being set (corrupted in fact, as it is only set once, during initialisation). This would also explain why the FSUIPC count stops, and the traffic limiter stops. That must happen at the EXACT moment the flag is cleared. I have to nail that moment somehow and see what event is related to it. As a start I'll log it if it changes -- expect a revised test version. But I'd like to see your INI file first, please.

That seems logical, but I do not understand why!  I attach the ini as requested.

Thanks,

Phil

FSUIPC-ini.zip

Link to comment
Share on other sites

34 minutes ago, papps said:

That seems logical, but I do not understand why!  I attach the ini as requested.

Nor I, and the INI is no help -- it is fine, quite normal.

It must be something corrupting that flag. I'm working out how to log it when it happens so we can see if there's anything specific going on at that time.

Pete

 

Link to comment
Share on other sites

Hello Pete,

I have been reviewing the problems I am having. I know you have removed the issue with NewDeleteVehiclesforAES in the code for AI limiting, but I feel this parameter must be involved in some way.

My reasoning is based on my experiences as follows:

1. Version 4.966c worked in Steam as expected, where AES is not available.
2. In Acceleration, V4.966c worked as expected when NewDeleteVehiclesforAES=No.  However, when NewDeleteVehiclesforAES=Yes, AI is not culled.
3. Version 4.966j works identically in both Steam and Acceleration. It culls AI at the start according to the ini trafficlimit parameter, but does not continue to cull AI if targetFPS is 0 or the actual FPS is below the target.
4. The "Max AI traffic was 251 aircraft (Deleted 375)" type message does not appear in the log for V4.966j; but in 4.966c it does in Steam and Acceleration when NewDeleteVehiclesforAES=No but not when NewDeleteVehiclesforAES=Yes.

I considered your comment about corruption of the flag for culling, but this seems unlikely, as I have tested the two versions in steam and Acceleration and the results are always the same regardless of aircraft or location.  I have removed all modules from the dll.xml and exe.xml (except FSUIPC and Traffic toolbox) and all sceneries other than the default sceneries and my traffic files and tested with the MS B737 and I receive identical results.

In writing this,I realise I need to test with only the MS Traffic. I suppose it may be possible that a traffic file, plan, or aircraft may stall the culling process. I will try that this evening unless you feel it is a waste of time.

 

Update.

I have just tested V4.966j with default scenery, traffic and B737.  As the traffic levels are lower, I set Traffic limit to 20 and left TargetFPS at 0.  On loading, Traffic was 20 as reported by Traffic toolbox and 0x025c.  After running for 5 minutes or so, TrafficToolbox showed 27 and 0x025c reported 15.

Regards,

Phil

Link to comment
Share on other sites

6 hours ago, papps said:

2. In Acceleration, V4.966c worked as expected when NewDeleteVehiclesforAES=No.  However, when NewDeleteVehiclesforAES=Yes, AI is not culled.

More than that, it isn't even read for TCAs applications.

6 hours ago, papps said:

3. Version 4.966j works identically in both Steam and Acceleration. It culls AI at the start according to the ini trafficlimit parameter, but does not continue to cull AI if targetFPS is 0 or the actual FPS is below the target.

It does not cull in any case if the FPS is above a non-zero target.

6 hours ago, papps said:

I considered your comment about corruption of the flag for culling, but this seems unlikely, as I have tested the two versions in steam and Acceleration and the results are always the same regardless of aircraft or location.

You say that, but every single symptom points that way. the only thing determining whether than message occurs at the end is that flag. nothing else.

6 hours ago, papps said:

I have just tested V4.966j with default scenery, traffic and B737.  As the traffic levels are lower, I set Traffic limit to 20 and left TargetFPS at 0.  On loading, Traffic was 20 as reported by Traffic toolbox and 0x025c.  After running for 5 minutes or so, TrafficToolbox showed 27 and 0x025c reported 15.

We didn't expect anything to change in the j version. Please write to me at petedowson@btconnect.com and I'll send you the k version, which is only changed in that there is logging when that flag changes. If it doesn't I'd be surprised, but much more puzzled.

If it does get set non-zero, the log with show the actual value, which would normally only be 0 (normal) or 1 (no AI). The value written to it could be a useful clue too.

Pete

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.