Sign in to follow this  
dukeav

Traffic Optimizer for FSX/P3D

Recommended Posts

AI traffic can be a FPS killer at even moderate settings. Many of us like to decent amount of traffic around, but this finally becomes a tussle between volume and FPS.

 

To help this situation I have written a program which automatically tries to manage the traffic. The logic is pretty simple, you give the program a target number of AI aircraft, by default 100. Every 60 seconds the program will check how many AI Aircraft are there and then it will delete AI Aircraft above this number. Aircraft farthest from your aircraft are deleted first, so traffic around you should remain largely unchanged. 

 

You can change the target number to your choice based upon your hardware.

 

Traffic Settings within FSX:

You should set the the traffic density in P3D to something which gives you decent traffic around you. For example I use MyTraffic, so I set the density to 35%, which I think reflects RW traffic. In my situation my FPS goes from ~12 to ~18 with this program in KJFK.

 

How to use:


Start FSX, let it come up fully

Start AirTrafficManager.exe

Enter the Departure and Dsetination ICAO codes (optional)

"Check" the "Auto Optimize" check-box

 

The first clean-up will happen 15 seconds after you check the check-box, and after 10-15 seconds of that you will notice your FPS increase.

 

I have not programmed in VB.Net for ages, so if you are going to try this out then you are a beta-tester :)

 

Notes:

1. This program runs separately from FSX so hopefully will not crash it.

2. If you get a message in the console saying unable to connect to FSX, please re-start AirTrafficManager.

3. Although the check for AI Aircraft is done every 60 seconds, the clean-up happens 15 seconds after the 60 seconds

4. The original program was for P3D, you can find the discussion thread here - http://forum.avsim.net/topic/451048-traffic-optimizer-for-p3d/

5. FSX version is not tested much as I mainly use P3D, and I created this version on request from FSX users

 

Requirements:

1. FSX SP2 / Acceleration

2. FSUIPC

 

Acknowledgements:

1. Uses the FSUIPC Client DLL for .NET by Paul Henty

2. Pete Dowson for pointing out the critical bug for SP2, Sesquashtoo / Ray Proudfoot and many other for testing and feedback in the P3D thread

  • Upvote 1

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Duke,

 

I haven't tried this version yet but have a couple of observations...

 

1) Can you provide a minimise button so the program can be moved off the desktop?

 

2) Some programs can detect if a flight plan is loaded in FSX and will then automatically load it into their interface. Active Sky Next is one. Rather than ask the user to provide 2 ICAOs maybe you could look at loading a plan even though you only use part of it.

 

Thanks!

Share this post


Link to post
Share on other sites

Tried it. Liked it. Thanks. And I agree with Ray, a minimize button would be nice.

 

Doug

Share this post


Link to post
Share on other sites

 

 


1) Can you provide a minimise button so the program can be moved off the desktop?

 

Ray and Doug right click on top and minimize...

Share this post


Link to post
Share on other sites

Ray and Doug right click on top and minimize...

 

Sheez.....so simple. Never would have thought of that.....Thanks.....

 

Doug

Share this post


Link to post
Share on other sites

This is a seriously good program - just flew very close to Heathrow en route from EGSS to EGJJ with the traffic set to 50 and got hardly any drop in FPS !

 

Couple this with Fibre Accelerator and no longer is London airspace the frame hog nightmare that it used to be !

 

My only comment would be a feature to save the settings to individual files for future use?

 

Many thanks

 

Gary

Share this post


Link to post
Share on other sites

 

AI traffic can be a FPS killer at even moderate settings. Many of us like to decent amount of traffic around, but this finally becomes a tussle between volume and FPS.
 
To help this situation I have written a program which automatically tries to manage the traffic. The logic is pretty simple, you give the program a target number of AI aircraft, by default 100. Every 60 seconds the program will check how many AI Aircraft are there and then it will delete AI Aircraft above this number. Aircraft farthest from your aircraft are deleted first, so traffic around you should remain largely unchanged. 
 
You can change the target number to your choice based upon your hardware.
 
Traffic Settings within FSX:
You should set the the traffic density in P3D to something which gives you decent traffic around you. For example I use MyTraffic, so I set the density to 35%, which I think reflects RW traffic. In my situation my FPS goes from ~12 to ~18 with this program in KJFK.
 
How to use:
Start FSX, let it come up fully
Start AirTrafficManager.exe
Enter the Departure and Dsetination ICAO codes (optional)
"Check" the "Auto Optimize" check-box
 
The first clean-up will happen 15 seconds after you check the check-box, and after 10-15 seconds of that you will notice your FPS increase.
 
I have not programmed in VB.Net for ages, so if you are going to try this out then you are a beta-tester :)
 
Notes:
1. This program runs separately from FSX so hopefully will not crash it.
2. If you get a message in the console saying unable to connect to FSX, please re-start AirTrafficManager.
3. Although the check for AI Aircraft is done every 60 seconds, the clean-up happens 15 seconds after the 60 seconds
4. The original program was for P3D, you can find the discussion thread here - http://forum.avsim.net/topic/451048-traffic-optimizer-for-p3d/
5. FSX version is not tested much as I mainly use P3D, and I created this version on request from FSX users
 
Requirements:
1. FSX SP2 / Acceleration
2. FSUIPC
 
Acknowledgements:
1. Uses the FSUIPC Client DLL for .NET by Paul Henty
2. Pete Dowson for pointing out the critical bug for SP2, Sesquashtoo / Ray Proudfoot and many other for testing and feedback in the P3D thread

 

 

Nice one useful,  but in case of UT2 not needed because the program does this already since the first release version ;-)

Share this post


Link to post
Share on other sites

Nice one useful,  but in case of UT2 not needed because the program does this already since the first release version ;-)

It does? I have used UT2 for years and never once seen AI be removed or added based on FSP.

 

Where are the settings in UT2 to set this up?

 

Is this in the UT2 documentation?

 

Yes, I monitor my AI traffic with Traffic Watch.

Share this post


Link to post
Share on other sites

It does? I have used UT2 for years and never once seen AI be removed or added based on FSP.

 

Where are the settings in UT2 to set this up?

 

Is this in the UT2 documentation?

 

Yes, I monitor my AI traffic with Traffic Watch.

 

Lol UT2 gui and then Utilities > In game settings, but my guess is you already new that Jim ;-)

Those settings are very useful for great performance and AI I don't fly without it....

 

There is even an option called target FPS....

 

From the manual ;-)

 

1.  Keyboard Shortcuts - All controls for Ultimate Traffic 2 inside of FSX can have keyboard shortcuts assigned to them.  To assign a new keyboard shortcut, highlight the desired field to change and press the key combination you would like to designate.  UT2 does NOT check to see if this is conflicting with any existing FSX shortcuts.

2.  Target FSX Frame Rate - If you computer is running slow at very busy airports, due to the amount of ai traffic being displayed, you can use this setting to allow UT2 to automatically adjust your traffic density to reach your performance goal.  Ultimate Traffic 2 will dynamically reduce the traffic density until it is able to achieve the desired frame rate.  When your frame rate in FSX goes above the target rate, UT2 will increase the traffic density, up to the max setting on the Traffic Options page, as long as it stays above the target frame rate.  The minimum setting available is 6 FPS.  Setting below this value will turn OFF the target frame rate option.

3.  Aircraft Spawn Options - In order to be able to control the injection of ai traffic specifically for your computer, you can use the spawn options.  You can set the max altitude that aircraft on the ground will be displayed, distance from your aircraft that ai traffic will be spawned on the ground, and the maximum number of aircraft to display, using these settings.  These settings can be useful in eliminating or reducing any 'pops' or 'pauses' that may occur in FSX while UT2 spawns aircraft.

Share this post


Link to post
Share on other sites

Duke,

 

Thanks for the tip about minimising. Having had some time to think about this program I'm wondering what the purpose of supplying the two ICAOs is.

 

Does it affect which Ai get deleted? That would be my guess. For example, if I set-up a flight from Heathrow to JFK then all those Ai well to the east of London would be the first to go since they will never be close to my route.

 

But those out to the west - even 100 miles away I might feel inclined to keep. After all, I'm sure most would agree you don't want to sanitise the route you're flying. And each few minutes when you check and remove those in excess of the user's target would you also prioritise those behind your aircraft rather than ahead?

 

Just a thought which I think would enhance your already excellent program.

Share this post


Link to post
Share on other sites

Lol UT2 gui and then Utilities > In game settings, but my guess is you already new that Jim ;-)

Those settings are very useful for great performance and AI I don't fly without it....

 

There is even an option called target FPS....

 

From the manual ;-)

 

1.  Keyboard Shortcuts - All controls for Ultimate Traffic 2 inside of FSX can have keyboard shortcuts assigned to them.  To assign a new keyboard shortcut, highlight the desired field to change and press the key combination you would like to designate.  UT2 does NOT check to see if this is conflicting with any existing FSX shortcuts.

2.  Target FSX Frame Rate - If you computer is running slow at very busy airports, due to the amount of ai traffic being displayed, you can use this setting to allow UT2 to automatically adjust your traffic density to reach your performance goal.  Ultimate Traffic 2 will dynamically reduce the traffic density until it is able to achieve the desired frame rate.  When your frame rate in FSX goes above the target rate, UT2 will increase the traffic density, up to the max setting on the Traffic Options page, as long as it stays above the target frame rate.  The minimum setting available is 6 FPS.  Setting below this value will turn OFF the target frame rate option.

3.  Aircraft Spawn Options - In order to be able to control the injection of ai traffic specifically for your computer, you can use the spawn options.  You can set the max altitude that aircraft on the ground will be displayed, distance from your aircraft that ai traffic will be spawned on the ground, and the maximum number of aircraft to display, using these settings.  These settings can be useful in eliminating or reducing any 'pops' or 'pauses' that may occur in FSX while UT2 spawns aircraft.

Andre,

 

No I truly didn't know! I will take a look.

Share this post


Link to post
Share on other sites

I'm wondering what the purpose of supplying the two ICAOs is.

 

Does it affect which Ai get deleted? That would be my guess. For example, if I set-up a flight from Heathrow to JFK then all those Ai well to the east of London would be the first to go since they will never be close to my route.

 

But those out to the west - even 100 miles away I might feel inclined to keep. After all, I'm sure most would agree you don't want to sanitise the route you're flying. And each few minutes when you check and remove those in excess of the user's target would you also prioritise those behind your aircraft rather than ahead?

 

Just a thought which I think would enhance your already excellent program.

Of course you're right, this would be lovely, but I fear that it will spoil the nice simplicity of the program.

 

To facilitate what you suggest, the program would need to know where airports are in the world in relation to your flying route; I don't think that's an entirely trivial task.

 

I'm really happy with Traffic Optimizer as is, expecially that it's not very resource intensive. :smile:

Share this post


Link to post
Share on other sites

Of course you're right, this would be lovely, but I fear that it will spoil the nice simplicity of the program.

 

However, I do think there is one improvement which should be relatively simple to implement. Instead of basing it on the route, or departure and destination, make it vary according to the frame rae.

 

The current frame rate can be read from SimConnect or FSUIPC, so that is no problem. I think ideally I would like to see a desired minimum frame rate, and minimum and maximum figures for the desired number of AI, with the program going down to the minimum if it sees a sustained reduction in frame rate below the minimum requested, but allowed to creep up to the maximum allowed AI if the frame rate is staying above the minimum set.

 

Regards

Pete

Share this post


Link to post
Share on other sites

Of course you're right, this would be lovely, but I fear that it will spoil the nice simplicity of the program.

 

To facilitate what you suggest, the program would need to know where airports are in the world in relation to your flying route; I don't think that's an entirely trivial task.

 

I'm really happy with Traffic Optimizer as is, expecially that it's not very resource intensive. :smile:

 

Point taken about the need to know the lat/lon of each airport. Not sure if MakeRunways produces such data but if it does that might help.

 

But I agree that you wouldn't want the program to become sluggish because that would reduce its attractiveness.

Share this post


Link to post
Share on other sites

Ray and Pete, I agree of course.

 

However, even in its current state it solves some problems quite nicely; like for example flying into (or out of) the biggest hubs of major metropolitan areas (London, NY et al.) with lots of airports and AI, you can tailor the situation so it doesn't affect traffic in your destination (or departure) airport, but still reduce total AI impact considerably.

 

Of course, in an ideal world we would be able to have as many (hyper-intelligent) AI objects in the bubble as desired, without any impact whatsoever on frames or VAS. :wink:

Share this post


Link to post
Share on other sites

 

 


Of course, in an ideal world we would be able to have as many (hyper-intelligent) AI objects in the bubble as desired, without any impact whatsoever on frames or VAS. :wink:

One day Penz... one day. :BigGrin:

Share this post


Link to post
Share on other sites

By entering the departure/destination ICAOs the program tries not to delete any AI at those airports or headed to those airports. 

 

For example, consider you are at your departure airport and taking time to get ready to depart or just watching traffic. I believe that AI coming to your Airport will first appear at the edge of the AI bubble, or at least that's how most of the incoming AI will appear. Without the departure airport optimization, these AI at the edge of the bubble will get deleted as its farthest from you. This behaviour will show up in heavily congested areas, not everywhere.

 

The result will be that over time, as you just sit at your airport, you will find no incoming traffic. With the departure optimization this gets fixed.

 

Similar logic for the destination airport. When you reach the destination, you want to see AI planes on ground as well as in air. If the destination optimization is not applied then as you approach the destination airport, the airport first comes inside the edge of the bubble and traffic starts getting generated there. But now because the destination airport is at the edge of the bubble, hence farthest from you, the program is most likely to pick traffic there for deletion. The destination optimization prevents these deletes, hence when you arrive you should see decent AI.

 

So that's the theory I applied.

 

Now I have noticed one issue, when starting from Philadelphia Intl and arriving at JFK, I found that traffic at JFK was half of what I expected (i.e. half of what I would see if I started from JFK), even though destination optimization was on. My guess is that the AI engine is not created AI traffic as we approach an Airport fast enough or in the right amount. This can't be fixed without injecting traffic. That's a bit too much, so it may remain so.

 

The heading question, lets say you are going from JFK to Heathrow. The AI bubble should be 100 miles in front of you and 100 miles behind. If I look at FligthAware for how much volume there can be in a 200 mile stretch and its very very low. If your AI target is set to a reasonable level like 50/100/150, this traffic will be preserved, since its within your limit. So I theorize that heading based optimization is not needed. 

 

The FPS question. In the other thread, someone mentioned that UT2 has FPS based optimization. My theory is was FPS base optimization is not feasible. FPS being a very dynamic variable and AI traffic creation is a much more sedate process. Why FPS vs AI creation is a problem? Consider this. You are flying towards JFK and looking straight ahead looking mostly at the sea. FPS is pretty stable. Now you decide to pan you view to Manhattan, and your FPS drips drastically because of scenery complexity. An FPS based target would in many such cases end up deleting substantial AI traffic. The problem is that we adjusted AI traffic down too much when scenery complexity was the cause and inevitable, Even FPS dips caused say, by switching views, would cause AI traffic to be deleted.

 

We might say that deletion was fine and expected, but the problem is now AI Traffic creation. AI traffic gets created very slowly and it would take much more time to restore traffic, when FPS has come back to good levels.

 

I think that's probably what happened in UT2 when users tried to use the FPS optimizer. At sudden dips in FPS, the AI traffic would vanish in large parts. I don't have UT2, but this what I read around.

 

Maybe a better FPS optimization is possible by using a long term FPS average as a guide...

Share this post


Link to post
Share on other sites

The FPS question. In the other thread, someone mentioned that UT2 has FPS based optimization. My theory is was FPS base optimization is not feasible. FPS being a very dynamic variable and AI traffic creation is a much more sedate process. Why FPS vs AI creation is a problem? Consider this. You are flying towards JFK and looking straight ahead looking mostly at the sea. FPS is pretty stable. Now you decide to pan you view to Manhattan, and your FPS drips drastically because of scenery complexity. An FPS based target would in many such cases end up deleting substantial AI traffic. The problem is that we adjusted AI traffic down too much when scenery complexity was the cause and inevitable, Even FPS dips caused say, by switching views, would cause AI traffic to be deleted.

 

We might say that deletion was fine and expected, but the problem is now AI Traffic creation. AI traffic gets created very slowly and it would take much more time to restore traffic, when FPS has come back to good levels.

 

I think that's probably what happened in UT2 when users tried to use the FPS optimizer. At sudden dips in FPS, the AI traffic would vanish in large parts. I don't have UT2, but this what I read around.

 

Maybe a better FPS optimization is possible by using a long term FPS average as a guide...

 

You clearly don't own UT2, but FPS is one of the settings...

Which I personally don't use but the other settings are great for performance and AI B)

I can adjust at which altitude the AI is visible and how many aircraft at what distance are injected into the sim....

So no need for an extra polling tool for me personally lol...

Hence I prefer a one stop solution with the settings in UT2 you can do it 3 dimensional and no interference with UT injecting traffic B)

 

For all the other traffic programs out there I can imagine it to be very useful, but for UT2 I don't see the extra benefit on the contrary...

Andre,

 

No I truly didn't know! I will take a look.

 

Your welcome Jim, was under the impression we old timers knew the options....

Share this post


Link to post
Share on other sites

You clearly don't own UT2, but FPS is one of the settings...

Which I personally don't use but the other settings are great for performance and AI B)

I can adjust at which altitude the AI is visible and how many aircraft at what distance are injected into the sim....

So no need for an extra polling tool for me personally lol...

Hence I prefer a one stop solution with the settings in UT2 you can do it 3 dimensional and no interference with UT injecting traffic B)

 

For all the other traffic programs out there I can imagine it to be very useful, but for UT2 I don't see the extra benefit on the contrary...

 

Your welcome Jim, was under the impression we old timers knew the options....

 

Ah, the reference of UT2 was in this thread itself.

 

This point is in reference to FPS based optimization question from Pete. You say you have not used it UT2. But why don't you try it and see how my theory goes?

 

I have never used UT2, I have just read around after your comments. I did compare UT2 with MyTraffic before I made the decision for MyTraffic a couple years back, though I don't recall why I chose one over the other.

Share this post


Link to post
Share on other sites

I played with AI and FPS settings in UT2. But there were reasons why I didn't like it overall and I'm not using it now. Also for what it matters UT2 has an unpleasant bug whereas AI traffic disappears when flying over the water expanse. Anyhow, UT2 is peripheral and I stopped using it a few years ago.

 

dukeav, I really like your idea and I always thought that some additional regulation of AI traffic in hubs would be very helpful for fps in certain situations.

 

Thanks,

Dirk.

Share this post


Link to post
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
Sign in to follow this