• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Creating Flight Plans from Timetable Data

Status
Not open for further replies.

gadgets

Resource contributor
Messages
9,388
Country
ca-britishcolumbia
AIFP provides a feature for reading airline schedule data and creating AI flight plans from it. The feature is initiated from the Files / Open Timetable Data File (*.txt) when the FP Editor is in view. It requires that the data be in columnar format, so some preprocessing on your part is likely required.

When using this feature, be aware that FlightSim requires that AI flight plans be circular, that is, the flight plan terminates at the airport from which the first leg originates. Airline schedules data, which are likely to include only revenue flights, have no such constraint. "Deadhead" flights for maintenance or aircraft repositioning will be missing from the data. But, those "deadhead" flight must be taken into account to make the data "circular". Consequently, it is unlikely that airline schedule data is directly convertible into a AI flight plans.

Once AIFP reads the timetable, the first check it makes is to ensure that there is the same number of arrivals and departures from each airport. If any mismatches are detected, a list of "offending" airports is generated.

It's up to you to resolve these discrepancies - probably by adding "closing" flights. Until you do, there's nothing more AIFP can do with the data.

Don
 
In the manual, it states that AIFP can create these deadhead flights automatically. Page 23: "check the "Deadhead Closure" box". Is this no longer true?

I have another question - in earlier eras, flights were often multiple-stop flights (often called "bus stop" flights). These flights (all with the same flight number) should be flown by the same aircraft in almost all cases. Would it be possible to add two extra choices to this feature? The first is a checkbox - "Have same plane fly all flights with single flight number", and the second would be "Time Limit" for that search? For example, if I checked the first box and entered 90 into the Time Limit, AIFP would look ahead 90 minutes for flights leaving that airport with the same flight number as the previous flight leg for that aircraft. If it found that, it would assign that leg instead of the next leg departing that airport.

This would really help the realism of traffic packages from earlier eras.

Thanks for your consideration,
 
Hi, Tom
In the manual, it states that AIFP can create these deadhead flights automatically. Page 23: "check the "Deadhead Closure" box". Is this no longer true?
Yes, this is still true, but it refers to closing flight plans created by AIFP when AIFP cannot find a leg to close the flight plan from among the remaining unhandled legs.

The issue to which I was responding earlier was, in effect, a situation where the source flight plan resulted in more aircraft arriving at an airport than were departing, or vice versa. Without looking at the code, It's possible AIFP could handle such situations as well. But, I didn't attempt it because, with such errors in the source data, AIFP could never hope to recreate the intended scenario.

For example, if I checked the first box and entered 90 into the Time Limit, AIFP would look ahead 90 minutes for flights leaving that airport with the same flight number as the previous flight leg for that aircraft. If it found that, it would assign that leg instead of the next leg departing that airport.
I'd rather not introduce another mode of operation. But, it should not be a big deal to give preference to flight numbers within the specified time period - something I should have considered during the initial development.

My difficulty in responding quickly is that I will be away from my development system from late next week until early May and I already have a number of "loose ends" I'm trying to "tie-up" before I leave. I'll try and get to it, but don't hold your breath.

Don
 
Tom, Development Release 2.2 11(e) available from http://stuff4fs.com contains a feature that SHOULD do what you want. Since I don't have timetable data to test the addition, I have only been able to confirm that I don't seem to have done any harm.

I have added a textbox in the Mode area of the dialog into which to enter the maximum number of minutes after the previous arrival in which to look for a matching flight number. If that number is 0 or blank, operation is unchanged.

Please check it out and let me know.

Don
 
Hi,

I can't really tell if it is working or not. The problem I'm having with the timetable to flight plan feature is that (leaving the new box blank) for my test plan it generates 67 flight plans (and thus 67 aircraft flying around), while the MRAI Compiler creates only 15 flight plans. It also mis-assigns certain flights (for example it takes my DC-8 flight and gives it to a DC-6). But the DC-8 flight is compiled correctly, though. :)

My test file is in MRAI Compiler format (it is Aeronaves de Mexico 1962):

AM;100;MMMX;MMGL;0845;1010;1234567;DC6
AM;100;MMGL;MMCL;1040;1120;1234567;DC6
AM;100;MMCL;MMCN;1150;1255;1234567;DC6
AM;100;MMCN;MMHO;1325;1410;1234567;DC6
AM;100;MMHO;KTUS;1445;1600;1234567;DC6
AM;101;KTUS;MMHO;1000;1115;1234567;DC6
AM;101;MMHO;MMCN;1200;1245;1234567;DC6
AM;101;MMCN;MMCL;1315;1420;1234567;DC6
AM;101;MMCL;MMGL;1450;1740;1234567;DC6
AM;101;MMGL;MMMX;1810;1935;1234567;DC6
AM;102;MMMX;MMLO;0700;0810;13;DC6
AM;102;MMLO;MMMZ;0825;0855;13;DC6
AM;102;MMMZ;MMLP;0920;1035;13;DC6
AM;102;MMLP;MMTJ;1100;1355;13;DC6
AM;102;MMTJ;KLAX;1430;1525;13;DC6
AM;103;KLAX;MMTJ;1000;1055;24;DC6
AM;103;MMTJ;MMLP;1130;1425;24;DC6
AM;103;MMLP;MMMZ;1450;1605;24;DC6
AM;103;MMMZ;MMLO;1630;1900;24;DC6
AM;103;MMLO;MMMX;1915;2025;24;DC6
AM;104;MMMX;MMSP;0615;0745;135;DC3
AM;104;MMSP;MMDO;0800;0935;135;DC3
AM;104;MMDO;MMMZ;0950;0955;135;DC3
AM;104;MMMZ;MMCL;1010;1105;135;DC3
AM;104;MMCL;MMLM;1140;1235;135;DC3
AM;104;MMLM;MMCN;1250;1345;135;DC3
AM;104;MMCN;MMGM;1415;1455;135;DC3
AM;104;MMGM;MMHO;1510;1550;135;DC3
AM;104;MMHO;MMNG;1605;1710;135;DC3
AM;105;MMNG;MMHO;1030;1135;246;DC3
AM;105;MMHO;MMCN;1201;1240;246;DC3
AM;105;MMCN;MMGM;1255;1335;246;DC3
AM;105;MMGM;MMLM;1350;1445;246;DC3
AM;105;MMLM;MMCL;1500;1555;246;DC3
AM;105;MMCL;MMMZ;1625;1720;246;DC3
AM;105;MMMZ;MMDO;1735;1945;246;DC3
AM;105;MMDO;MMSP;2000;2140;246;DC3
AM;105;MMSP;MMMX;2155;2330;246;DC3
AM;108;MMMX;MMLO;0700;0810;6;DC6
AM;108;MMLO;MMMZ;0825;0855;6;DC6
AM;108;MMMZ;MMLP;0920;1035;6;DC6
AM;108;MMLP;MMTJ;1100;1355;6;DC6
AM;109;MMTJ;MMLP;1500;1755;6;DC6
AM;109;MMLP;MMMZ;1820;1935;6;DC6
AM;109;MMMZ;MMLO;2000;2250;6;DC6
AM;109;MMLO;MMMX;2305;0015;6;DC6
AM;111;MMTJ;MMGL;1430;1915;1234567;BRT
AM;111;MMGL;MMMX;1945;2100;1234567;BRT
AM;112;MMMX;MMGL;0800;0915;1234567;BRT
AM;112;MMGL;MMTJ;0945;1220;1234567;BRT
AM;116;MMLP;MMCL;1000;1125;7;DC3
AM;117;MMCL;MMLP;1440;1605;7;DC3
AM;118;MMLP;MMMZ;1700;1845;246;DC3
AM;119;MMMZ;MMLP;1900;2045;246;DC3
AM;120;MMMX;MMAA;0615;0715;57;DC6
AM;120;MMAA;MMLP;0745;1020;57;DC6
AM;120;MMLP;KLAX;1050;1415;57;DC6
AM;121;KLAX;MMLP;1515;1840;57;DC6
AM;121;MMLP;MMAA;1910;2345;57;DC6
AM;121;MMAA;MMMX;0015;0125;16;DC6
AM;122;MMLP;MMLT;1010;1115;135;DC3
AM;122;MMLT;MM0S;1130;1220;135;DC3
AM;122;MM0S;MMGM;1235;1320;135;DC3
AM;122;MMGM;MMHO;1335;1415;135;DC3
AM;122;MMHO;MMTJ;1435;1735;135;DC3
AM;123;MMTJ;MMHO;0840;1140;246;DC3
AM;123;MMHO;MMGM;1155;1235;246;DC3
AM;123;MMGM;MM0S;1250;1335;246;DC3
AM;123;MM0S;MMLT;1350;1440;246;DC3
AM;123;MMLT;MMLP;1455;1600;246;DC3
AM;200;MMMX;MMTC;0730;0940;1234567;DC6
AM;200;MMTC;MMCU;1010;1120;1234567;DC6
AM;200;MMCU;MMCS;1150;1245;1234567;DC6
AM;201;MMCS;MMCU;1430;1525;1234567;DC6
AM;201;MMCU;MMTC;1555;1705;1234567;DC6
AM;201;MMTC;MMMX;1735;1950;1234567;DC6
AM;205;MMCU;MMCG;1200;1315;135;DC3
AM;205;MMCG;MMCA;1330;1330;135;DC3
AM;205;MMCA;MMNG;1345;1410;135;DC3
AM;205;MMNG;MMML;1425;1515;135;DC3
AM;205;MMML;MMTJ;1530;1615;135;DC3
AM;206;MMTJ;MMML;0700;0745;246;DC3
AM;206;MMML;MMNG;0800;1050;246;DC3
AM;206;MMNG;MMCA;1105;1130;246;DC3
AM;206;MMCA;MMCG;1145;1345;246;DC3
AM;206;MMCG;MMCU;1400;1515;246;DC3
AM;208;MMMX;MMLO;0800;0925;135;DC3
AM;208;MMLO;MMSP;0940;1025;135;DC3
AM;208;MMSP;MMIO;1040;1210;135;DC3
AM;208;MMIO;MMMV;1225;1310;135;DC3
AM;208;MMMV;MMPG;1325;1450;135;DC3
AM;209;MMPG;MMMV;0800;0925;246;DC3
AM;209;MMMV;MMIO;0940;1025;246;DC3
AM;209;MMIO;MMSP;1040;1210;246;DC3
AM;209;MMSP;MMLO;1225;1310;246;DC3
AM;209;MMLO;MMMX;1325;1450;246;DC3
AM;210;MMMX;MMCV;0900;1115;123456;DC3
AM;211;MMCV;MMMX;1145;1355;123456;DC3
AM;214;MMMX;MMAA;0630;0730;246;DC6
AM;214;MMAA;MMGL;0800;0930;246;DC6
AM;214;MMGL;MMMY;1000;1150;246;DC6
AM;214;MMMY;KSAT;1230;1345;246;DC6
AM;215;KSAT;MMMY;1615;1730;357;DC6
AM;215;MMMY;MMGL;1830;2020;357;DC6
AM;215;MMGL;MMAA;2050;2220;357;DC6
AM;215;MMAA;MMMX;2250;0001;357;DC6
AM;216;MMMZ;MMTC;0800;1015;357;DC6
AM;216;MMTC;MMMY;1045;1145;357;DC6
AM;216;MMMY;KSAT;1230;1345;357;DC6
AM;217;KSAT;MMMY;1615;1730;246;DC6
AM;217;MMMY;MMTC;1815;1915;246;DC6
AM;217;MMTC;MMMZ;1945;2000;246;DC6
AM;220;MMMX;MMMA;1230;1420;1234567;DC6
AM;221;MMMA;MMMX;1530;1720;1234567;DC6
AM;300;MMAA;MMMX;0630;0730;1234567;DC6
AM;301;MMMX;MMAA;0930;1030;1234567;DC6
AM;302;MMAA;MMMX;1115;1215;1234567;DC6
AM;303;MMMX;MMAA;1330;1430;1234567;DC6
AM;304;MMAA;MMMX;1515;1615;1234567;DC6
AM;305;MMMX;MMAA;1700;1800;1234567;DC6
AM;306;MMAA;MMMX;1830;1940;1234567;DC6
AM;307;MMMX;MMAA;2030;2140;1234567;DC6
AM;308;MMAA;MMMX;2210;2320;1234567;DC6
AM;309;MMMX;MMAA;2200;2310;1234567;DC6
AM;311;MMMX;MMZH;0830;0955;136;DC3
AM;312;MMZH;MMMX;1030;1155;136;DC3
AM;400;MMMX;KJFK;0930;1520;1234567;DC8
AM;401;KJFK;MMMX;1800;2006;1234567;DC8

The resulting DC-8 flight plan: (AC#4 is a DC-6; the DC-8 is AC#6) - I did assign "DC8" to my installed DC-8 (and AIFP complains that the DC-8 is unused in the flight plan set)

AC#4,HL144,1%,Week,IFR,0/15:30,0/20:20,070,F,0400,KJFK,0/23:00,1/02:06,060,F,0401,MMMX,1/15:30,1/20:20,090,F,0400,KJFK,1/23:00,2/02:06,100,F,0401,MMMX,2/15:30,2/20:20,070,F,0400,KJFK,2/23:00,3/02:06,100,F,0401,MMMX,3/15:30,3/20:20,090,F,0400,KJFK,3/23:00,4/02:06,060,F,0401,MMMX,4/15:30,4/20:20,070,F,0400,KJFK,4/23:00,5/02:06,080,F,0401,MMMX,5/15:30,5/20:20,070,F,0400,KJFK,5/23:00,6/02:06,060,F,0401,MMMX,6/15:30,6/20:20,070,F,0400,KJFK,6/23:00,0/02:06,060,F,0401,MMMX

It did not assign any flights to AC#5 or AC#6 - I added two DC-3's and two DC-6's to the aircraft list (old and new liveries). But it appears it ignored them and assigned all flights to AC#'s 1 through 4 (the number of aircraft types listed in my text file).

Thanks,
 
Last edited:
Hi again,

With Fewest Plans checked, I can lower that number to 37 plans, much better than the 67 above. But still more than 15 produced by the MRAI compiler.

I think I have found my problem. Is there a way to make AIFP accept wait times less than 20 minutes? I did uncheck the Minimum Time and ETD Preset values in the Flight Plans menu, and also tried setting both of those to 1 minute. I didn't get any change.

An example:

Here is my test file, much simplified from the one above:

AM;102;MMMX;MMLO;0700;0810;1;DC6
AM;102;MMLO;MMMZ;0825;0855;1;DC6
AM;102;MMMZ;MMLP;0920;1035;1;DC6
AM;102;MMLP;MMTJ;1100;1355;1;DC6
AM;102;MMTJ;KLAX;1430;1525;1;DC6
AM;103;KLAX;MMTJ;1000;1055;2;DC6
AM;103;MMTJ;MMLP;1130;1425;2;DC6
AM;103;MMLP;MMMZ;1450;1605;2;DC6
AM;103;MMMZ;MMLO;1630;1900;2;DC6
AM;103;MMLO;MMMX;1915;2025;2;DC6

It's a flight from MMMX to KLAX - up one day, and back the next. This should be able to be flown by one aircraft, but the first and last wait periods are only 15 minutes. The rest are all over 20 minutes.

Here is the resulting flight plan (Fewest Plans checked):

//FSXDAYS=FALSE
AC#1,HL144,1%,Week,IFR,1/13:00,1/14:10,100,R,0102,MMLO,3/01:15,3/02:25,090,R,0103,MMMX
AC#1,HL144,1%,Week,IFR,1/14:25,1/15:55,080,R,0102,MMMZ,1/16:20,1/18:35,100,R,0102,MMLP,1/19:00,1/21:55,080,R,0102,MMTJ,1/22:30,1/23:25,060,R,0102,KLAX,2/18:00,2/18:55,050,R,0103,MMTJ,2/19:30,2/22:25,050,R,0103,MMLP,2/22:50,2/23:05,070,R,0103,MMMZ,2/23:30,3/01:00,070,R,0103,MMLO

As you can see AIFP would not accept a 15 minute wait and instead scheduled another plane to fly the first and last legs, many hours apart.

There are many local service airlines that have stops as short as 2 minutes, and I need to compile such schedules. Yes I know that this can cause inaccurate flights, but it actually works pretty well with the lower traffic levels and smaller airports used for such short stops. At larger airports stops are usually 20 minutes or longer.

So if the compiler would honor the Minimum Time value I set in the Flight Plans menu, that would fix this problem. Your current value of 20 minutes used by the compiler is the default value in that menu item, so it would all work out the same unless that value is manually changed.

Thanks,
 
PS. I thought I would wait on the aircraft assignment problem for later - one thing at a time. :)
 
When creating flight plans from timetable data, AIFP tries sit times from 15 min to 45 minutes in one minute intervals to find the minimum sit time that generates the least number of flight plans. It does not look at the Flight Plan menu values (as you've already discovered.) Changing this approach would be a lot of work. What I may be able to do, however, is ignore sit-time if there's an entry in the FN Priority files.

As for aircraft assignment, what would be very helpful, Tom, is if you send me the aircraft.cfg files for the aircraft you assign and a screenshot or other listing of your assignments of aircraft to timetable aircraft type.

Unless these turn out to be very simple issues to resolve, I afraid they will be relegated to "when I'm bored" over the coming weeks.

Also, when comparing the relative number of flight plans generated by AIFP and MRAI, please consider that MRAI doesn't enforce minimum sit-time (which is a key consideration in AIFP) and so will almost always generate fewer FPs than AIFP.

Don
 
Don, I really apologize - setting the ETD value *does work*. When I changed it to 1 minute the first time, it didn't change anything. But when I tried it again it reduced the total number of flights from 37 down to 18, closer to the 15 from the MRAI Compiler. The minimum wait time has then been reduced from 20 minutes down to 15 minutes. Turns out I picked a test flight plan with a 15 minute minimum wait time, so that matches your programmed minimum. But I must set the ETD menu item to 15 minutes or below to get that 15 minute minimum wait time. As you explain in your post above, I can't set it any lower due to how it is programmed. I understand that now. That's unfortunate for some of my plans.

BTW, you *can* set the minimum set time in the MRAI Compiler - I just set it to the minimum wait time for the multi stop flights in the plans. It can be as low as you like; the default is 15 minutes.
 
Last edited:
Here is the screen shot of my aircraft listing. You can see I have 2 DC-3's and 2 DC-6's listed. They were assigned to the DC3 and DC6 types (manually) via the dialog box that popped up after I loaded the plans file I posted above. As you can see AIFP only assigned 4 aircraft types in my flight plan listing on the left. Type 1 and type 2 are correct - Britannia and DC-3 (although it only used type 2 for all the DC-3 plans, not types 2 and 3). But the plans assigned to type 3 should actually be assigned to types 4 and 5, and the plan assigned to type 4 should be assigned to type 6.

aifp_aircraft_list.jpg

And I've also attached the aircraft.cfg files for the 6 aircraft in the list (4 aircraft types, the DC-3 and DC-6 have two liveries each).

Hope this helps,
 

Attachments

Last edited:
PS. As you can see many of my aircraft.cfg file entries don't have reg numbers entered into them; they aren't needed by the AI programs I have used in the past. If we can work this out I'll add them as I need to for these compiles.
 
Oh, and one more thing. I don't see any obvious difference with 90 minutes entered into the new box in the Mode section or nothing entered, but I'm still working on that analysis.
 
I outputted file sets for the large plan set posted above and the resulting TTools flight plans were identical, whether I set the Mode box to 90 minutes or left it blank. Whether AIFP *could* have made any changes and still come up with valid flight plans I'm not sure yet, but it doesn't appear to be keeping multi-stop flights together.

Thanks for your help,
 
Here is the screen shot of my aircraft listing. You can see I have 2 DC-3's and 2 DC-6's listed.
What I was really after is the cross referencing you assigned between aircraft type in the timetable and aircraft title in AIFP. If you didn't make those assignments, AIFP will attempt to match based on data in the aircraft.cfg files - but it will struggle.

BTW, you *can* set the minimum set time in the MRAI Compiler - I just set it to the minimum wait time for the multi stop flights in the plans. It can be as low as you like; the default is 15 minutes.
I've not worked with that compiler very much. But, I do recall working with another user when I was developing the feature and finding that the MRAI compiler put together flight plans that had aircraft popping in and out of gates. In any case, I have intentionally avoided studying the MRAI compiler. I someone likes what it does, they should use it.

As you can see many of my aircraft.cfg file entries don't have reg numbers entered into them;
Reg numbers play no role in the creation of FPs. Those entries simply "parrot" what's in the aircraft.cfg file.

Oh, and one more thing. I don't see any obvious difference with 90 minutes entered into the new box in the Mode section or nothing entered, but I'm still working on that analysis.
At the moment, the 90 minutes you enter only "activates" AFTER the minimum sit time is satisfied. So, AIFP will only "wait" for a leg with the same FN. If the timetable sit-times are generally short, I wouldn't expect much difference.

I'll try to finish before I leave.

Don
 
Hi,

Sorry, I guess I wasn't clear. Upon loading the plans file AIFP first pops up a box that says that the following aircraft cannot be found, and it lists all the aircraft types in the plans file (BRT, DC3, DC6, and DC8). I click Continue. Then a box pops up asking me to assign aircraft to these aircraft types. I then manually assign the BRT to my AI Bristol Britannia Aeronaves de Mexico (click the Add button and browse to the plane in the list), and assign the DC3 to two aircraft, my AI DC-3 Aeronaves de Mexico and my AI DC-3 Aeronaves de Mexico 1962 (old and new liveries). AIFP lets me select more than one plane for a given type. I continue with the other two types the same way, and click Continue. Then AIFP displays the Flight Plan Editor as it appears in the image above. It lists 6 aircraft in the aircraft list, but uses only 4 in the flight plans.

My assignments:

BRT: AI Bristol Britannia Aeronaves de Mexico
DC3: AI DC-3 Aeronaves de Mexico and AI DC-3 Aeronaves de Mexico 1962
DC6: AI DC-6 Aeronaves de Mexico and AI DC-6 Aeronaves de Mexico 1962
DC8: AI DC-8-52 Aeronaves de Mexico

These are all listed in the aircraft.cfg files I sent. If you need to find them just search for amx, the parking code.

I do use the MRAI Compiler (obviously), but I really want a compiler that will give a high priority to keeping multiple stop flights together. I once tried to edit the source code from MRAI, but quickly found out I wasn't a C programmer. :)

Hope this helps,
 
Thanks. It was those assignments I was after,. Now I can precisely repeat your tests.

Don
 
Hi,

I've compared the MRAI Compiler results with AIFP, and it's actually very close. The DC-8, Britannia, and DC-6 schedules are almost identical, with minor differences. They both use the same number of aircraft to cover the flights. The difference is in the DC-3 plans, where AIFP uses three more aircraft. I think there is a time zone error that is causing much of that. When I load the plan for the first DC-3, I get this screen:

aifp_MMML.jpg


As you can see, everything looks good until the highlighted leg (line #10). At this point, a flight between Tijuana and Mexicali (88 NM apart, and in the same time zone) suddenly takes over a day to complete. This problem continues through the week, so the plane only flies one leg per day. When I click on Mexicali, it states that the time zone is UTC -6 (as you can see in the image), when it should be UTC -8 (which is what Tijuana displays when I click that airport).

It doesn't appear to be a problem in my plans file, since you can see that the flight looks normal in that file:

AM;206;MMTJ;MMML;0700;0745;246;DC3

Just a normal 45 minute flight.

Hope this helps,
 
AIFP includes a Timezone Editor (though, in thus case, its probably easier to edit timezone.dat and timezone_Base.dat by hand) Fixing the time zone error should also fix the Flight Plan problem.

Don
 
Status
Not open for further replies.
Back
Top