mamoniot / project-cybersyn

MIT License
47 stars 47 forks source link

Feature Request: Train size limits #156

Open zefir01 opened 1 week ago

zefir01 commented 1 week ago

Hi. I mainly use two types of stations: 4 large warehouses for a train of two wagons with one type of resource and several small boxes with several resources for a train with one wagon. The problem is that trains with one wagon can arrive at stations intended for two wagons. Taking or adding a resource only from the first two boxes, it create an imbalance of resources at the station. This leads to the fact that when a train with two wagons arrives after that, it cannot unload or load normally, because the resources or free space are only in some of the boxes that are available only for the first wagon.

I tried to solve the problem with additional station logic, but there are many stations, I did not find a simple solution to this problem. Separating short stations into a separate network is not an elegant solution to the problem, there are stations that must serve trains of both types, they are integrated with the logistics network and such a problem does not arise there, I would not like to build a complete copy of all network integrations for trains of the second type.

I would be very grateful for advice or implementation of a filter by train length.

MrDj200 commented 2 days ago

I would like to see this implemented as well. I tried to use the Priority signal, but it did not affect the trains behavior at all

Tetlanesh commented 2 days ago

This is a common request. Cybersyn does a good job of making sure a train can be serviced on a station but does not keep smaller train from entering bigger station if needed. Right now best solution is to separate trainsizes into subnetworks.

As for implementation of proper limits - we are accepting PR's :)

MrDj200 commented 2 days ago

Thanks to the newest update 2.0.3, I figured out my allow lists weren't working because I built the combinator before the inserters. Now everything seems to just work :)