12/28/2023 0 Comments Belt balancer factorioIf possible, outflow densities are increased to achieve this. At each iteration, we check for junctions where inflow is greater than outflow (due to the conditions in the previous sentence, the opposite situation cannot happen) and adjust them in order to achieve conservation and equal outflow. At each iteration, we only increase $\rho$ and decrease $v$ the iterative values are always lower (respectively upper) bounds on the correct values. When I have time, I will hopefully add a more precise mathematical description of the conditions that are applied in the algorithm in order to achieve conservation.īriefly: we initially set $\rho=0$ and $v=1$ everywhere except at the boundaries. It turns out to be much more complicated than I expected to satisfy this condition at each junction in a way consistent with how splitters work, and that is reflected in the code below. The flux of items along a belt is given by the product $\rho v$, and we require that the flux going into a junction be equal to the flux coming out. The main condition to be satisfied is conservation at each junction. For the purposes of testing UTU, we are only interested in setting these values to zero or one, but more general values will work with the algorithm below. The inflow upstream is specified by the density $\rho_$ at the right edge of the domain. Clearly, we can only have $v<1$ if $\rho=1$ this is a state in which the belt is fully loaded and there is not enough outflow downstream. The value $v=1$ is the normal belt speed, and $\rho=1$ is the maximum capacity of a belt. The state of a belt tile is represented by a density $0 \le \rho \le 1$ and a velocity $0 \le v \le 1$. Note that some balancers used in practice contain loops and could not be represented by our model without an infinite length belt. In the model, we imagine each belt flowing from left to right along coordinate direction $x$ and each junction uniting two belts at the left edge of a given tile. I refer to splitters as junctions, since that's how they really function.Įach belt is composed of unit length segments, referred to in the game as tiles. I will quote some of the notebook here for those who don't wish to follow the link. Examples are given in this Jupyter notebook, along with a Python implementation of an iterative algorithm for computing the flow for any set of belts and splitters. There exist UTU balancers for 3, 4, and 5 belts, and likely for any number of belts.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |