Alpha India Group

Alpha India Group => AIG AI Manager => AIG Software => AIM - Suggestions => Topic started by: RayP on May 13, 2019, 11:39:28 AM

Title: Merge multiple BGLs into a single one.
Post by: RayP on May 13, 2019, 11:39:28 AM
AIG is a brilliant addition to P3D. I have now dumped UT Live which I only bought six months ago.

Back when I had FSX I used MyTraffic Pro. The problem was aircraft would be spawned at gates hours before they were due to depart and this had the result of blocking lots of gates so I had nowhere to park after landing.

To get around that problem I installed a freeware program called RemoveAiSleepers. This has a simple interface where the user enters a distance for Ai to be removed and a time limit beyond which Ai aircraft would be removed. So if you enter 75mins and aircraft with a departure time greater than that would be removed. That had two benefits. 1) More gates and 2) fps increased as there were fewer Ai.

Now to my suggestion.The problem with that program with AIG is it takes a very long time to read through all the BGLs. If those could be merged into a single one that would mean RAiT would run far more effectively.

And chance that BGLs could be merged please? Would that help loading times too? I have noticed P3D does take quite a while to load now.
Title: Re: Merge multiple BGLs into a single one.
Post by: johanfrc on May 13, 2019, 11:53:10 AM
I won't change the loading time for FS. It will still be the same time, because it has to read through a lot of data in one file compared to the same amount of data, but in many files.

So no benefit regarding loading time.

No idea about the program you are talking about. I have never heard about it, so I can't say if it will be better for that program or not.
Title: Re: Merge multiple BGLs into a single one.
Post by: Kaiii3 on May 13, 2019, 12:22:14 PM
BGL merge is already added in 0.9
Title: Re: Merge multiple BGLs into a single one.
Post by: RayP on May 13, 2019, 12:25:10 PM
Quote from: Kaiii3 on May 13, 2019, 12:22:14 PM
BGL merge is already added in 0.9

Excellent, thanks. Could you describe the actions to merge them?
Title: Re: Merge multiple BGLs into a single one.
Post by: RayP on May 13, 2019, 12:28:15 PM
Quote from: johanfrc on May 13, 2019, 11:53:10 AM
I won't change the loading time for FS. It will still be the same time, because it has to read through a lot of data in one file compared to the same amount of data, but in many files.

So no benefit regarding loading time.

No idea about the program you are talking about. I have never heard about it, so I can't say if it will be better for that program or not.

The author is Lorby. One of his freeware programs. You may be using one of his others - Addon Organiser. Even if loading times aren't reduced RAiT will run more efficiently. Why have aircraft sitting at gates for hours?
Title: Re: Merge multiple BGLs into a single one.
Post by: RayP on May 14, 2019, 01:06:53 PM
Having looked at the various options in AIG v0.9.0.3 I am not sure what to choose to merge the many BGLs into a single one.

Can someone help please?
Title: Re: Merge multiple BGLs into a single one.
Post by: Kaiii3 on May 14, 2019, 02:22:10 PM
Menu -> Flightplan -> Merge

But I just checked the code and found a line that can cause some problems. If you want to use it in the current Version (.3) please make a backup of the BGLs before merging them. The next Version .4 will be a safer to use.
Title: Re: Merge multiple BGLs into a single one.
Post by: Dave YVRATC on May 14, 2019, 03:36:50 PM
 Of course, it's all up to you Ray what you want to do with your sim, but there's are a couple things to know. Merging bgl's won't decrease load times in any way, the increase in load time is from the sheer number of AI aircraft that you now have. Second, the reason why you had so many dormant aircraft in MyTraffic was only because of the very poor flightplans which weren't optimized in any way. The AIG schedules will not do this, the aircraft will only sit at the gates for as long as they would in the real world.
If you wanted to use a program to remove traffic to help boost frames etc, there was a good one available that you would set your departure and arrival airports as well as your desired target frame rate and it would then remove AI from airports other than from where you are operating in and out of. The problem is I just don't remember the name of it, but I'm sure someone here would know it.
Title: Re: Merge multiple BGLs into a single one.
Post by: RayP on May 14, 2019, 03:59:03 PM
@Kaiii3, thanks, I'll wait for an update when you're more confident in the code.

Dave, it's just something I want to try and compare with what I have now. I'm testing koala's Ai Companion and can see aircraft listed at SFO that don't depart for a few hours. RemoveAiSleepers would get rid of those freeing up some gates.

I'm not worried about performance. I have a i7-8086K at 4.7Ghz, 32Mb RAM, 1080Ti running at 4K and even with a couple of hundred Ai fps is in the 30s at most complex airports.

But RAiS doesn't seem to work very well with multiple BGLs which is why I wanted to merge them.
Title: Re: Merge multiple BGLs into a single one.
Post by: Dave YVRATC on May 14, 2019, 04:26:04 PM
 I just tried it out and RemoveAiSleepers worked fine on my end with approx 1100 traffic files stored in multiple folders. My other point here is that you are looking to remove aircraft that are supposed to be there. It's not like MyTraffic or UTL where you have a highly unrealistic number of aircraft sitting dormant. The traffic that would actually get tossed by this program would be the freighters, GA and military, the ones that are supposed to sit for longer periods which are imo some of best parts about having a good AI setup.
Title: Re: Merge multiple BGLs into a single one.
Post by: RayP on May 14, 2019, 09:13:53 PM
Okay, understood. I found it quite slow to remove them. Strange. I'll reconsider if I will do it, thanks.
Title: Re: Merge multiple BGLs into a single one.
Post by: RayP on May 15, 2019, 10:34:55 AM
Quote from: Kaiii3 on May 14, 2019, 02:22:10 PM
Menu -> Flightplan -> Merge

But I just checked the code and found a line that can cause some problems. If you want to use it in the current Version (.3) please make a backup of the BGLs before merging them. The next Version .4 will be a safer to use.

Kaiii3, I just tried that out of curiosity and it presented me with another window with another Merge button. I pressed it and within a couple of seconds that window closed and AIG disappeared off the screen. Checking Event Viewer it crashed citing KERNELBASE.dll. So I shall leave well alone until a later version.
Title: Re: Merge multiple BGLs into a single one.
Post by: Kaiii3 on May 15, 2019, 11:21:20 AM
Yes would be better. Can you post the Windows Log
Title: Re: Merge multiple BGLs into a single one.
Post by: Dimon on May 15, 2019, 01:54:37 PM
What is the point of merging traffic files after all? I still remember this function was available in FS2004 when Thomas Molitor released his brilliant AITM, but I have never understand its practical purpose.
Title: Re: Merge multiple BGLs into a single one.
Post by: Kaiii3 on May 15, 2019, 02:05:34 PM
Quote from: Dimon on May 15, 2019, 01:54:37 PM
What is the point of merging traffic files after all? I still remember this function was available in FS2004 when Thomas Molitor released his brilliant AITM, but I have never understand its practical purpose.

I am using it to merge the FPs containing only a single BJJ to a big BBJ pack in my sim, to reduce the filesize
Title: Re: Merge multiple BGLs into a single one.
Post by: RayP on May 15, 2019, 04:05:09 PM
Sorry Kaiii3, missed your earlier request. Will post shortly.

Here it is...

Log Name:      Application
Source:        Application Error
Date:          15/05/2019 11:30:50
Event ID:      1000
Task Category: (100)
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      CHILLBLAST
Description:
Faulting application name: AIGTech - AI Manager.exe, version: 0.9.0.3, time stamp: 0x5cd6cb25
Faulting module name: KERNELBASE.dll, version: 10.0.17763.404, time stamp: 0x2528b630
Exception code: 0xe0434352
Fault offset: 0x0000000000039129
Faulting process ID: 0x14b0
Faulting application start time: 0x01d50b08f7e7689d
Faulting application path: C:\AIG_AIManager\AIGTech - AI Manager.exe
Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll
Report ID: 32e59af8-3cad-44d4-a34b-20a57b5890a8
Faulting package full name:
Faulting package-relative application ID:
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Application Error" />
    <EventID Qualifiers="0">1000</EventID>
    <Level>2</Level>
    <Task>100</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2019-05-15T10:30:50.797028000Z" />
    <EventRecordID>19539</EventRecordID>
    <Channel>Application</Channel>
    <Computer>CHILLBLAST</Computer>
    <Security />
  </System>
  <EventData>
    <Data>AIGTech - AI Manager.exe</Data>
    <Data>0.9.0.3</Data>
    <Data>5cd6cb25</Data>
    <Data>KERNELBASE.dll</Data>
    <Data>10.0.17763.404</Data>
    <Data>2528b630</Data>
    <Data>e0434352</Data>
    <Data>0000000000039129</Data>
    <Data>14b0</Data>
    <Data>01d50b08f7e7689d</Data>
    <Data>C:\AIG_AIManager\AIGTech - AI Manager.exe</Data>
    <Data>C:\WINDOWS\System32\KERNELBASE.dll</Data>
    <Data>32e59af8-3cad-44d4-a34b-20a57b5890a8</Data>
    <Data>
    </Data>
    <Data>
    </Data>
  </EventData>
</Event>
Title: Re: Merge multiple BGLs into a single one.
Post by: Kaiii3 on May 15, 2019, 04:38:47 PM
there must be a second entry at the same time, plase post that as well
Title: Re: Merge multiple BGLs into a single one.
Post by: RayP on May 15, 2019, 04:46:10 PM
Here you are..

Log Name:      Application
Source:        .NET Runtime
Date:          15/05/2019 11:30:50
Event ID:      1026
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      CHILLBLAST
Description:
Application: AIGTech - AI Manager.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ArgumentOutOfRangeException
   at System.ThrowHelper.ThrowArgumentOutOfRangeException(System.ExceptionArgument, System.ExceptionResource)
   at AIGTech.AIManager.Controller.AIManagerController.mergeFlightplans(System.Collections.Generic.List`1<AIGTech.AIManager.Classes.InstalledFlightplans.InstalledFlightplan>)
   at AIGTech.AIManager.View.Pages.Fligthtplans.MergeFlightplansPage.Button_Click(System.Object, System.Windows.RoutedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
   at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
   at System.Windows.Controls.Primitives.ButtonBase.OnClick()
   at System.Windows.Controls.Button.OnClick()
   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(System.Windows.Input.MouseButtonEventArgs)
   at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
   at System.Windows.UIElement.ReRaiseEventAs(System.Windows.DependencyObject, System.Windows.RoutedEventArgs, System.Windows.RoutedEvent)
   at System.Windows.UIElement.OnMouseUpThunk(System.Object, System.Windows.Input.MouseButtonEventArgs)
   at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
   at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
   at System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(System.Windows.Input.InputEventArgs)
   at System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr, System.Windows.Input.InputMode, Int32, System.Windows.Input.RawMouseActions, Int32, Int32, Int32)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr, MS.Internal.Interop.WindowMessage, IntPtr, IntPtr, Boolean ByRef)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
   at System.Windows.Application.RunDispatcher(System.Object)
   at System.Windows.Application.RunInternal(System.Windows.Window)
   at AIGTech.AIManager.App.Main()


Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name=".NET Runtime" />
    <EventID Qualifiers="0">1026</EventID>
    <Level>2</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2019-05-15T10:30:50.701284300Z" />
    <EventRecordID>19538</EventRecordID>
    <Channel>Application</Channel>
    <Computer>CHILLBLAST</Computer>
    <Security />
  </System>
  <EventData>
    <Data>Application: AIGTech - AI Manager.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ArgumentOutOfRangeException
   at System.ThrowHelper.ThrowArgumentOutOfRangeException(System.ExceptionArgument, System.ExceptionResource)
   at AIGTech.AIManager.Controller.AIManagerController.mergeFlightplans(System.Collections.Generic.List`1&lt;AIGTech.AIManager.Classes.InstalledFlightplans.InstalledFlightplan&gt;)
   at AIGTech.AIManager.View.Pages.Fligthtplans.MergeFlightplansPage.Button_Click(System.Object, System.Windows.RoutedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
   at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
   at System.Windows.Controls.Primitives.ButtonBase.OnClick()
   at System.Windows.Controls.Button.OnClick()
   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(System.Windows.Input.MouseButtonEventArgs)
   at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
   at System.Windows.UIElement.ReRaiseEventAs(System.Windows.DependencyObject, System.Windows.RoutedEventArgs, System.Windows.RoutedEvent)
   at System.Windows.UIElement.OnMouseUpThunk(System.Object, System.Windows.Input.MouseButtonEventArgs)
   at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
   at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
   at System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(System.Windows.Input.InputEventArgs)
   at System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr, System.Windows.Input.InputMode, Int32, System.Windows.Input.RawMouseActions, Int32, Int32, Int32)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr, MS.Internal.Interop.WindowMessage, IntPtr, IntPtr, Boolean ByRef)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
   at System.Windows.Application.RunDispatcher(System.Object)
   at System.Windows.Application.RunInternal(System.Windows.Window)
   at AIGTech.AIManager.App.Main()

</Data>
  </EventData>
</Event>
Title: Re: Merge multiple BGLs into a single one.
Post by: Kaiii3 on May 15, 2019, 04:49:18 PM
thanks