train schedule condition: outer AND support
Moderator: ickputzdirwech
train schedule condition: outer AND support
Hi.
We have an outer OR in a train schedule condition. But we also need a support for outer AND. If i need something like this in a departure condition - (C1 || C2 || C3) && C4, then i need to transform it to (C1 && C4) || (C2 && C4) || (C3 && C4) which looks ugly and hard to read.
Outer AND feature allow to not to transform a complex condition to an even more complex and ugly to read condition.
Example:
Condition:
(red < 100 OR green < 100 OR blue < 100 OR gray < 100 OR pink < 100 OR yellow < 100 OR white < 100) AND 30s passed
Must be transformed to:
(red < 100 AND 30s passed) OR (green < 100 AND 30s passed) OR (blue < 100 AND 30s passed) OR (gray < 100 AND 30s passed) OR (pink < 100 AND 30s passed) OR (yellow < 100 AND 30s passed) OR (white < 100 AND 30s passed)
We have an outer OR in a train schedule condition. But we also need a support for outer AND. If i need something like this in a departure condition - (C1 || C2 || C3) && C4, then i need to transform it to (C1 && C4) || (C2 && C4) || (C3 && C4) which looks ugly and hard to read.
Outer AND feature allow to not to transform a complex condition to an even more complex and ugly to read condition.
Example:
Condition:
(red < 100 OR green < 100 OR blue < 100 OR gray < 100 OR pink < 100 OR yellow < 100 OR white < 100) AND 30s passed
Must be transformed to:
(red < 100 AND 30s passed) OR (green < 100 AND 30s passed) OR (blue < 100 AND 30s passed) OR (gray < 100 AND 30s passed) OR (pink < 100 AND 30s passed) OR (yellow < 100 AND 30s passed) OR (white < 100 AND 30s passed)
Last edited by oleg4f on Mon Dec 07, 2020 11:40 am, edited 1 time in total.
Re: train schedule condition: outer AND support
And why do you need that?
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Re: train schedule condition: outer AND support
I think the why is clear, isnt it?
To dont have to transform a complex condition to an even more complex and ugly to read condition.
The question for me is more, do I have to create such complex condition for trains? How would it be possible gui-wise, etc.?
I remember that it was a topic some time ago and was rejected bc too much effort or sth? Cant search properly atm.
Re: train schedule condition: outer AND support
An example from my actual base: A train supplies the science packs to my lab cluster. The train shall fetch new science packs when/if one of the colors is below a certain threshold AND a certain time has passed. The later term prevents immediate departure when the last run did not fetch enough packs i.e. production is blocked or to slow. In that case immediate departure is futile.
The actual condition is:
(red < 100 AND 30s passed) OR (green < 100 AND 30s passed) OR (blue < 100 AND 30s passed) OR (gray < 100 AND 30s passed) OR (pink < 100 AND 30s passed) OR (yellow < 100 AND 30s passed) OR (white < 100 AND 30s passed)
Is is PITA to setup and even more PITA when I want to change the timeout. An "outer AND" would simplify it to:
(red < 100 OR green < 100 OR blue < 100 OR gray < 100 OR pink < 100 OR yellow < 100 OR white < 100) AND 30s passed
The actual condition is:
(red < 100 AND 30s passed) OR (green < 100 AND 30s passed) OR (blue < 100 AND 30s passed) OR (gray < 100 AND 30s passed) OR (pink < 100 AND 30s passed) OR (yellow < 100 AND 30s passed) OR (white < 100 AND 30s passed)
Is is PITA to setup and even more PITA when I want to change the timeout. An "outer AND" would simplify it to:
(red < 100 OR green < 100 OR blue < 100 OR gray < 100 OR pink < 100 OR yellow < 100 OR white < 100) AND 30s passed
Last edited by asheiduk on Sat Dec 05, 2020 10:01 am, edited 1 time in total.
Author of: Factorio Blueprint Decoder
Re: train schedule condition: outer AND support
Yes, please.
Re: train schedule condition: outer AND support
Hm. This is obvious and jodokus31 already answered this:
To dont have to transform a complex condition to an even more complex and ugly to read condition.
I have a case exactly like asheiduk wrote:
(MANY_OR) AND TIME passed
But factorio doesn't allow to write outer AND, thus i transform this expression to ugly:
(AND) OR (AND) OR ....
And when i need just to change time value i need to change it in many places. This is uncomfortable and whole expression looks ugly and hard to read.
Re: train schedule condition: outer AND support
I beleive what is being implied is the template is not being followed.
To aid the developers, that template helps to quickly assess what areas the suggestion covers, the reasoning behind it, and additionally, any problems/impact that may be foreseen. The last point usually comes from replies by others.
That said, I do agree with the request, but may I also suggest you format the OP correctly too?
Re: train schedule condition: outer AND support
The problem - Using @asheiduk's example, the train stop schedule looks like this:
It uses excessive amounts of screen space, and would require a lot of scrolling to be able to scan any subsequent schedules.
If the operator buttons were able to be dragged left and right to sort the order of operation in combination with the automated parenthesis, this suggestion could be realised.
The result would look like this:
This uses far less space, and is far easier to read in my opinion.
It uses excessive amounts of screen space, and would require a lot of scrolling to be able to scan any subsequent schedules.
If the operator buttons were able to be dragged left and right to sort the order of operation in combination with the automated parenthesis, this suggestion could be realised.
The result would look like this:
This uses far less space, and is far easier to read in my opinion.
Re: train schedule condition: outer AND support
Ok, I understood now, but when I’m asking for the why, I do that because I cannot imagine for what use case this could be used. What’s for you obvious is for others something I never thought about.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Re: train schedule condition: outer AND support
Note that in my example "red", "green", ... do not refer to the color-signals but to the science packs of the mentioned color. Sorry for being not precise enough.
Author of: Factorio Blueprint Decoder
Re: train schedule condition: outer AND support
Hehh, yes I thought it might have been, but only after I'd mocked it up. The actual signals don't really matter after all.
Do the images help?
Seriously though, although an extreme example is presented, the omission of having AND as the primary qualifier is both puzzling, and annoying at times. The workaround is to reduce the logic in combinators at the station, but that is abstract, not necessarily understood by all players, and a duplication of resources for every station stop with the same/similar conditions.
My feeling is this is an oversight, not a deliberate implementation.
Re: train schedule condition: outer AND support
No, you’re right, it makes sense to have “brackets” to set calculation priorities.
But I’m quite sure, that this issue has a low priority, because it is so from the start of the current scheduler. So it might be a high effort to change it, combined with low game play value (I need to ask why this is needed).
But I’m quite sure, that this issue has a low priority, because it is so from the start of the current scheduler. So it might be a high effort to change it, combined with low game play value (I need to ask why this is needed).
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Re: train schedule condition: outer AND support
i write the request according to this link. Here:
"which looks ugly and hard to read."
i specified why this is needed - to make life easier and easy to read/use of schedule. It obvious that need to transform every expression to DNF doesn't make life easier. Thanks for more detailed examples to others interested in this improvement .
Done.That said, I do agree with the request, but may I also suggest you format the OP correctly too?
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: train schedule condition: outer AND support
+1
Ye, know, i don't want to be rude but the implication of that sentence is that anything you personally don't understand has "low game play value". Seriously? You shouldn't use your own playstyle as an argument for what is and is not important. To anyone who's remotely familiar with predicate logic the @OPs intention is so blatantly obvious that it's rather suprising that this *isn't* already possible.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Re: train schedule condition: outer AND support
is it not possible to do this with the logic-thingys already in the game....
And the last one should hand out then only one signal (to Station, or a rail signal)
And the last one should hand out then only one signal (to Station, or a rail signal)
Re: train schedule condition: outer AND support
I know it's tripped me up before. It's possible to transform them, but I actively resent having to do it. I get enough of that with Skyrim's CK, which *also* has the issue of OR precedence. It works and I imagine it was implemented like that in both cases because it is a minimal way to give access to the full logic.eradicator wrote: ↑Mon Dec 07, 2020 12:08 pm +1
Ye, know, i don't want to be rude but the implication of that sentence is that anything you personally don't understand has "low game play value". Seriously? You shouldn't use your own playstyle as an argument for what is and is not important. To anyone who's remotely familiar with predicate logic the @OPs intention is so blatantly obvious that it's rather suprising that this *isn't* already possible.
Re: train schedule condition: outer AND support
I don't talk about nest OR or nest AND. No. imho, outer AND will be enough. And i don't think that this important improvement is so hard to implement .