Jump to content

Photo

Bug or Feature? route-splitting

- - - - -

  • Please log in to reply
9 replies to this topic

#1
AeroLinear

AeroLinear

    Senior Member

  • Member
  • 400 posts
  • WLM ID:foreignis@yahoo.com
  • AIM Screen Name:ForeignWas
Some of you may know what I'm talking about just from the title. However, since I just coined the term (as far as I know) I'll elaborate.

It is possible to cover more "ground" than is physically possible for one plane in AE.

For example: Put an A333 on a flight from Asia the the US. Then, put the A333 on extremely short routes on each end. Third, close the longhaul route. Voila! you can now make medium-ranged flights on 2 ends of the planet with one plane.

Now there are two ways to abuse this "feature" to my knowledge. One is to do what I said above and split one plane between two of your hubs without actually having to fly the plane inbetween. The other is to hold gates. I'll explain.

Airline A buys 10 gates at the following airports: LGA, JFK, DCA, IAD, TPA, MCO, FLL, MIA, MDW, ORD.

Now, normally a beech might be able to connect around 1/2 to 2/3 of these gates. However, if I follow the following instructions I can make a beech fly to cover every gate and have probably half my flight time left.

Action

1. Create Route: LGA-JFK
2. Create Route: JFK-DCA
3. Create Route: DCA-IAD

4. Close Route: JFK-DCA

5. Create Route: IAD-TPA
6. Create Route: TPA-MCO

7. Close Route: IAD-TPA

8. Create Route: TPA-FLL
9. Create Route: FLL-MIA

10. Close Route: TPA-FLL

11. Create Route: LGA-ORD
12. Create Route: ORD-MDW

13. Close Route: LGA-ORD

So, we are left with LGA-JFK, DCA-IAD, TPA-MCO, MIA-FLL, and ORD-MDW.

The plane flies 5 separate routes, taking a fraction of the time needed to traverse the country to complete the routes. You could take it a few steps further and cover around 20 sub-100nm city pairs around the world.

The question: should we consider this a bug or a feature? Is this ok to use to my advantage? Obviously it's not possible in real life, but neither are a lot of things in AE.

EDIT: I guess I should recommend a solution also.

It's a simple connectivity problem. So, take each route for the plane and assign it a number whenever an airline closes a route BEFORE the closing is actually done.

So, if we have LGA-JFK, JFK-DCA, DCA-IAD and we want to close JFK-DCA:

LGA: 1
JFK: 2
DCA: 3
IAD: 4

The condition of whether or not you may close an airport rests on whether or not all the remaining pairs of numbers are connected. So, to put it into human terms, here are our routes:

1-2
2-3
3-4

If we want to close 2-3, we must check to see if 1-2 and 3-4 are connected. They obviously aren't, since they don't share any number. It gets more complicated, though. Say we had 5 routes.

1-2
2-3
1-4
3-6

Now say we want to close 2-3. This would sever the connection between 1-2 and 3-6. So, we need an algorithm to solve the problem. As with most algorithms, there are multiple solutions, some generally more efficient than others, some more suitable to certain situations. Since we can be generally sure that no plane will fly more than, say, 25 individual routes, efficiency isn't really a factor. So, if we create a two-dimensional array to store "connected" flights, our job becomes easy.

We take every route except the the one requesting to be closed. For each route, we take each number, see if either one (or both) are in the first array. If both are, we take no action. If 1 is, we add the other to the array. If neither are, we check the next array, etc. If we find no matches, we create a new array element and place the new connection into the new array. At the end of our algorithm, if we have all the remaining cities in one array element, then we have continuity. Otherwise, we have a split and cannot close the route.

Here's the code:

//$connections is structured as an array of arrays, the inner array elements being [0]=city1 & [1]=city2

//num_cities() would be a function written simply to count the number of cities a plane "touches". The code here is not clear since I do not know the database, but it is part of the algorithm so I included just a function call.

//$continue is the boolean variable that tells us whether or not the "close" operation is in fact permissable.

$num=num_cities();

foreach($connections as $connection)
{
if (!$routesarray)
{
$routesarray=array($connection);
}
else
{
foreach ($routesarray as $node)
{
if (!in_array($connection[0], $node) OR !in_array($connection[1], $node))
{
if (in_array($connection[0], $node))
{
$node=array_merge($node, array($connection[1]));
}
else if (in_array($connection[1], $node))
{
$node=array_merge($node, array($connection[0]));
}
else
{
array_merge($routes_array, $connection);
}
}
}
}
}

foreach ($routesarray as $node)
{
if(size($node)==$num)
{
$continue=true;
}
}

Now, we can just use our variable $continue to check for connectivity. Throw this thing into a function and you can make a call like "if(flights_connect($routelistminusroutetoremove))" to check for connectivity.
-Dave, CEO of:
Posted ImagePosted Image
AID: 7106

Numero Uno en San Francisco, Las Vegas, y ahora Los Angeles!

#2
Timsher

Timsher

    Just a ling

  • Member
  • 573 posts
  • WLM ID:Timsher@gmail.com
  • Yahoo ID:Timsher19
Definately a bug, not the way the game is meant to be played. If this was meant to happen, there would be a option to do it without the workaround you mentioned.
Posted Image

#3
Cretian

Cretian

    Senior Member

  • Member
  • 165 posts
  • Skype Name:Cretian
Wow smart you figured that out :P
Posted Imagehttp://www.freewebs....retian/IVAO.bmp
Posted Image
Fleet
19x Boeing 737-900
7x Boeing 757-300
3x Boeing 757-200
2x Airbus A330-300

HUB: Brussels Int.

ID: 12446

#4
StephenM

StephenM

    Senior Member

  • Member
  • 987 posts
  • WLM ID:srkm@eircom.net
  • Website:http://www.airlinemogul.com
How bored are you? :P Very well described anyway in great detail. I might chat to you on MSN about it later on. :D
Aer Solas

#5
drv4truk

drv4truk

    AE Winner

  • Veteran
  • 2,273 posts
It is a known bug brought up a long time ago. Some people use it while others do not. You don't really think one B19 could hold 25+/- gates in varying spots around Europe without route-splitting do you?
Posted ImagePosted Image

#6
AeroLinear

AeroLinear

    Senior Member

  • Member
  • 400 posts
  • WLM ID:foreignis@yahoo.com
  • AIM Screen Name:ForeignWas
oh i'm aware it could, but you can effectively double that number by route-splitting, therefore halfing your aircraft costs.
-Dave, CEO of:
Posted ImagePosted Image
AID: 7106

Numero Uno en San Francisco, Las Vegas, y ahora Los Angeles!

#7
drv4truk

drv4truk

    AE Winner

  • Veteran
  • 2,273 posts
That was the point. The B19 would never have made it in hours traveling through every single airport. So, by setting up a few routes first and then deleting some segments, you can then continue on creating split-routes until you have held gates at all 25 airports.
Posted ImagePosted Image

#8
WingsOTWorld

WingsOTWorld

    MEMBER 4EVA!

  • Member
  • 822 posts
Nothing new here...it just became more obvious to those who didn't know...but the code is nice :P
Posted Image
Posted ImagePosted Image

Aircraft Owned: ATR-72s, Saabs, EMB-195LRs, A319s, 1 Q400, and A330s
ANA-The Pinnacle of Japanese Aviation (Kickin off at ORD) -An ACE Alliance Member / エイス アラヤンス メンバー全日空
ID#:10917

#9
AeroLinear

AeroLinear

    Senior Member

  • Member
  • 400 posts
  • WLM ID:foreignis@yahoo.com
  • AIM Screen Name:ForeignWas

That was the point. The B19 would never have made it in hours traveling through every single airport. So, by setting up a few routes first and then deleting some segments, you can then continue on creating split-routes until you have held gates at all 25 airports.



oh i misread, thought you meant a B19 could do that anyway (which it could come close :P ) but yes i think we agree whatever it could do normally, with route-splitting it can do double

Nothing new here...it just became more obvious to those who didn't know...but the code is nice :-P


I wasn't sure if it had been mentioned or not, but I don't care really :D Maybe 1 in 100 "bug reports" offer any solution, so I've decided to start giving mine whenever I think of one. The goal is to shave some time off of dev for V3 (even though I don't plan on playing it) and to be a helper instead of a whiner. I'm not sure how many people are actively working on designing the functionality for V3 code-wise and database-wise, but from experience I know it can be tough working alone and outside ideas are almost always welcome.
-Dave, CEO of:
Posted ImagePosted Image
AID: 7106

Numero Uno en San Francisco, Las Vegas, y ahora Los Angeles!

#10
WingsOTWorld

WingsOTWorld

    MEMBER 4EVA!

  • Member
  • 822 posts
I think the only folks working on V3...when they can...are 737MMA, TW, and Miller. A very small group. I'm sure they can use your help.
Posted Image
Posted ImagePosted Image

Aircraft Owned: ATR-72s, Saabs, EMB-195LRs, A319s, 1 Q400, and A330s
ANA-The Pinnacle of Japanese Aviation (Kickin off at ORD) -An ACE Alliance Member / エイス アラヤンス メンバー全日空
ID#:10917




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users