see. the great problem with the endpoint rule is. there's no solid endpoint.
technically you can create routes at any point in the chain, so any determined endpoints would be in a constant flux depending on the routes generated. the game doesn't track specifically the order of the routes being created (thereby cannot base validity off of that) in a meaningful way. you can create X-Y; Y-Z; then create a few routes from X, then a few routes from Z... design flaw, i know. but. honestly, being faced with a huge process and changes to get multiworlds up and running, i'd like to figure out how to make it work without a drastic redesign... there's enough of those in process at the moment. -_-
If the endpoint can't be determined, then that's fine. The way I think of it, a plane that has a 1-frequency route from AP1 to AP2 as its only route has 0 endpoints. Yes, technically it does overnight at one of those airports, but the game doesn't care which. It's only when a plane ends up at an airport by an x.5 route that endpoints come into the picture.
Basically, a plane will have 0 endpoints until an x.5 route is created. At that point the airports on either end of that become endpoints. From then on, a plane can only fly x.5 routes from those endpoints.
Let's create a theoretical route structure for a plane to see how the process should work.
The plane's airline has AP1 and AP5 as bases.
Restricted airports: Plane cannot fly a x.5 route to/from this airport, unless it is to/from an endpoint. Once a plane has endpoints, all the non-endpoints become restricted airports.
Starting out: Plane has 0 endpoints.
Route 1: AP1 (1) AP2
- Plane still has no endpoints
- Resticted airports: None
Route 2: AP1 (0.5) AP3
- AP1 and AP3 become endpoints
- Plane has 2 endpoints (AP1, AP3)
- Restrcted aiports: AP2
Route 3: AP1 (0.5) AP4
- AP4 becomes an endpoint, replacing AP1
- Plane has 2 endpoints (AP3, AP4)
- Restrcted airports: AP1, AP2
Route 4: AP5 (0.5) AP4
- AP5 becomes an endpoint, replacing AP4
- Plane has 2 endpoints (AP3, AP5)
- Restricted airports: AP1, AP2, AP4
Route 5: AP5 (1) AP6
- Endpoints unchanged
- Plane has 2 endpoints (AP3, AP5)
- Restricted airports: AP1, AP2, AP4, AP6
Route 6: AP5 (1) AP2
- Endpoints unchanged
- Plane has 2 endpoints (AP3, AP5)
- Restricted airports: AP1, AP2, AP4, AP6
Route 7: AP5 (0.5) AP3
- AP3 and AP5 no longer endponts
- Plane has 0 endpoints
- No restricted airports
Route 8: AP1 (0.5) AP7
- AP1 and AP7 become endpoints
- Plane has 2 endpoints (AP1, AP7)
- Restricted airports: AP2, AP3, AP4, AP5, AP6
Route 9: AP5 (0.5) AP8
- Route disallowed because plane has 2 endpoints, and AP5 is not one of them.
So to sum up the plane's routes:
AP1 (1) AP2
AP1 (0.5) AP3
AP1 (0.5) AP4
AP5 (0.5) AP4
AP5 (1) AP6
AP5 (1) AP2
AP5 (0.5) AP3
AP1 (0.5) AP7
Possible route the plane takes (not the only possible one): AP1 -> AP2 -> AP1 -> AP4 -> AP5 -> AP6 -> AP5 -> AP2 -> AP5 -> AP3 -> AP1 -> AP7 (reverse the next day)
Now I'm not sure if that'll be any help, but I always found logical excersizes useful when coding.