Add "NOT" operator in Train Schedules

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
XYZT
Inserter
Inserter
Posts: 28
Joined: Fri Jun 07, 2019 3:40 pm
Contact:

Add "NOT" operator in Train Schedules

Post by XYZT »

TL;DR
Add "NOT" operator to train schedules
What ?
Currently we have the AND and OR operators in train schedules. With a NOT operator on wait conditions for trains, we can have functional completeness.

This is present in an indirect manner for some wait conditions: There is an explicit "Passenger not present" wait condition, Circuit conditions can be negated by using a corresponding relational operator. The same is true for Item Count and Fluid Count conditions which also have relational operators.

However, a not operator would provide a direct way to set the following types of conditions:
  1. NOT Full Cargo Inventory / Empty Cargo Inventory
  2. NOT X seconds of Inactivity
  3. NOT X seconds passed
There is no meaningful reason why these types of waiting conditions should not be allowed. Adding a NOT operator would properly complete the set of waiting conditions for trains.

User avatar
5thHorseman
Smart Inserter
Smart Inserter
Posts: 1193
Joined: Fri Jun 10, 2016 11:21 pm
Contact:

Re: Add "NOT" operator in Train Schedules

Post by 5thHorseman »

NOT Full Cargo Inventory / Empty Cargo Inventory
So you want the train to leave the station at any point where the inventory is not full? So either it leaves immediately, or when an item is taken out of it? Same with Empty only the other way around. What's the use case?

NOT X seconds of Inactivity
So if your seconds of inactivity is below X, leave the station. AKA leave immediately.

NOT X seconds passed
Same as above.

I don't see use cases here, just ways to set the options to things that nobody would want.

XYZT
Inserter
Inserter
Posts: 28
Joined: Fri Jun 07, 2019 3:40 pm
Contact:

Re: Add "NOT" operator in Train Schedules

Post by XYZT »

"NOT full cargo inventory" can be used to prevent a train from leaving an unloading station if nothing was unloaded. This is useful in setups where you aren't trying to completely unload a train but have a clocked rail system where it stays at the unloader for X seconds and then moves on even if it isn't completely empty. For example: "[45 seconds passed] AND [NOT Full Cargo Inventory]"

"NOT empty cargo inventory" can be used for the corresponding case with loading stations.

"NOT X seconds passed" can be used in rail systems where you have a different set of waiting conditions depending on how long it has been. For example, [NOT 45 seconds passed AND some circuit condition] OR [45 seconds passed AND some other circuit condition].

"NOT X seconds of inactivity" can be used similarly.

---

Your response is patronizing and lacks imagination. Just because you can't think of a way someone might use a feature is not a reason to argue against the feature from being implemented. New innovative designs can develop over time as paradigms shift and people have had the time to play with new features.

Just because YOU wouldn't use any of these in your builds doesn't mean there aren't uses. Factorio should never be a game designed with a "I want players to design the way I want them to" philosophy.

posila
Factorio Staff
Factorio Staff
Posts: 5202
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Add "NOT" operator in Train Schedules

Post by posila »

XYZT wrote:
Fri Jul 24, 2020 7:44 am
Your response is patronizing and lacks imagination. Just because you can't think of a way someone might use a feature is not a reason to argue against the feature from being implemented. New innovative designs can develop over time as paradigms shift and people have had the time to play with new features.

Just because YOU wouldn't use any of these in your builds doesn't mean there aren't uses. Factorio should never be a game designed with a "I want players to design the way I want them to" philosophy.
If other people fail to imagine why a feature would be useful, it's possible a developer who will skim through the idea pitch will fail to do so too.

Reason for community to argue against a feature they don't find interesting or useful, could be to prevent us from spending development and maintenance time on features they don't want, so we can spend it on features they do want instead. It's simple as that.

User avatar
ickputzdirwech
Filter Inserter
Filter Inserter
Posts: 768
Joined: Sun May 07, 2017 10:16 am
Contact:

Re: Add "NOT" operator in Train Schedules

Post by ickputzdirwech »

XYZT wrote:
Fri Jul 24, 2020 7:44 am
"NOT full cargo inventory" can be used to prevent a train from leaving an unloading station if nothing was unloaded. This is useful in setups where you aren't trying to completely unload a train but have a clocked rail system where it stays at the unloader for X seconds and then moves on even if it isn't completely empty. For example: "[45 seconds passed] AND [NOT Full Cargo Inventory]"

"NOT empty cargo inventory" can be used for the corresponding case with loading stations.
Hope I understand you correctly, but I think this can already be done with the cargo inventory setting. Just calculate how many items fit in the train (eg. 4000) and set that number as item count: [45 seconds passed] AND [Item count < 4000]

For "NOT empty cargo inventory" just set it to be [item count > 0]

This becomes more complicated if you want to transport different items after each other and unmanageable if you want to transport different items at the same time, but I just wouldn't recommend that. Do you have any other use cases for this part of your suggestion?
XYZT wrote:
Fri Jul 24, 2020 7:44 am
"NOT X seconds passed" can be used in rail systems where you have a different set of waiting conditions depending on how long it has been. For example, [NOT 45 seconds passed AND some circuit condition] OR [45 seconds passed AND some other circuit condition].
Again I think this can already be done. This time by making a clock with the circuit network and integrating it in the circuit condition. This would be much more complicated though.

I still think this is a valid suggestion. Especially the second part would make some things easier to set up. To make it less confusing maybe instead of "NOT" introduce the > and < operators for the time settings. But I can also understand people who think that there are more important thinks to work on.
Mods: Shortcuts for 1.1, ick's Sea Block, ick's vanilla tweaks
Tools: Atom language pack
Text quickly seems cold and unfriendly. Be careful how you write and interpret what others have written.
- A reminder for me and all who read what I write

Post Reply

Return to “Ideas and Suggestions”