Elaborate on the constraints part and start with a formal specification

This commit is contained in:
Lol3rrr
2026-03-27 14:49:20 +01:00
parent 065cfbb230
commit 171245850d
2 changed files with 34 additions and 5 deletions

View File

@@ -84,12 +84,41 @@ For example an inserter will perform an intersection, because it can only accept
But a belt will perform a union, because might have constraints coming from inserters taking from them and downstream belts so the items can take either path. But a belt will perform a union, because might have constraints coming from inserters taking from them and downstream belts so the items can take either path.
Basically the constraints for every edge will be combined using an intersection with the constraints of the node itself, and then all downstream edge constraints will be combined using a union to form the final upstream constraint. Basically the constraints for every edge will be combined using an intersection with the constraints of the node itself, and then all downstream edge constraints will be combined using a union to form the final upstream constraint.
JOIN Operator: used to combine multiple "or" constraints, for example for combining downstream constraints. ### Notation
This is done by adding all the limits for items together. $c = (l, I, IL) \text{, with}$
- $l \in \mathbb{Q} \text{, the total throughput limit}$
- $I = \text{A set of items} \text{, the set of items 'used' by the constraint}$
- $IL = I \mapsto \mathbb{Q} \text{, the limit for each item}$
CHAIN Operator: used to combine multiple "and" constraints. ### JOIN Operator $\bigcup$
Combines multiple constraints in a logical or kind of fashion.
### Representation Given $c_1 = (l_1, I_1, IL_1), c_2 = (l_2, I_2, IL_2)$
Then $c = \bigcup \\{c_1, c_2\\} = (l, I, IL)$ with
- $l = max \\{ l_1, l_2 \\}$
- $I = I_1 \cup I_2$
- $IL(i) = \begin{cases}
IL_1(i) + IL_2(i) & \text{, if } i \in I_1 \land i \in I_2 \\\\
IL_1(i) & \text{, if } i \in I_1 \land i \notin I_2 \\\\
IL_2(i) & \text{, if } i \notin I_1 \land i \in I_2 \\\\
0 & \text{else}
\end{cases}$
### CHAIN Operator $\bigcap$
Used to combine multiple constraints in a logical and kind of fashion
Given $c_1 = (l_1, I_1, IL_1), c_2 = (l_2, I_2, IL_2)$
Then $c = \bigcap \\{c_1, c_2\\} = (l, I, IL)$ with
- $l = min \\{ l_1, l_2 \\}$
- $I = I_1 \cap I_2$
- $IL(i) = \begin{cases}
min \\{IL_1(i), IL_2(i)\\} & \text{, if } i \in I_1 \land i \in I_2 \\\\
0 & \text{else}
\end{cases}$
### Graphical Representation
A tree with 3 levels, each doing something different A tree with 3 levels, each doing something different
The lowest level, selects by item. The lowest level, selects by item.

View File

@@ -47,4 +47,4 @@ theme = "toggle" # options: {light, dark, auto, toggle}
toc = true toc = true
comments = false comments = false
codeblock = true codeblock = true
latex = true