The International Simutrans Forum


Author Topic: [Feature] catenary upgrade should take care of constraints  (Read 314 times)

0 Members and 1 Guest are viewing this topic.

Offline Freahk

  • Devotee
  • *
  • Posts: 1419
  • Languages: DE, EN
[Feature] catenary upgrade should take care of constraints
« on: January 09, 2020, 03:10:29 PM »
Currently, upgrading from one catenary type to another often requires destructing the old catenary and building a new one afterward and can quickly break routes if you are not careful as one can currently override some electrification types with another one that features less permissive constraints.

Instead of only considering the maximum speed, the catenary upgrade algorithm should allow an upgrade if the existing electrifications permissive constraints are a subset of the new electrifications permissive constraints. If both are the same (does never happen in Pak128.Britain but maybe it does in other paksets), the maximum speed should decide which one is better.

In addition it would be nice if one could force-upgrade catenaries using ctrl, which was requested in here,19415.0.html

Another useful addition would be allowing multiple electrifications at the same tile, so one does not have to explicitly take care of combined electrification sections, however, this is not part of this suggestion and I won't start a feature request for this as I expect it not to be worth the effort.

The current suggestion here means, taking Pak128.Britain-ex as an example:
fourth rail can't upgrade
third rail can upgrade to
 - fourth rail
 - third rail+DC catenary
 - third rail+AC catenary
DC catenary can upgrade to
 - third rail+DC catenary
AC catenary can upgrade to
 - third rail+AC catenary
third rail+DC catenary can't upgrade
third rail+AC catenary can't upgrade

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Administrator
  • *
  • Posts: 20685
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: [Feature] catenary upgrade should take care of constraints
« Reply #1 on: January 13, 2020, 10:34:49 PM »
I have now modified the code such that it is possible to replace any way object with any other way object. No use of CTRL is necessary.