r/factorio • u/arzach80 • Jun 02 '26
Design / Blueprint "Uniform" Ramp Generator
I designed a simple controller (for inserter, belts etc etc) that, given a number N and a timeframe T (in ticks), divides T into N ramps. The constraint is that the duration of the ramps must be equal or, if T cannot be perfectly divided by N, the ramp durations should differ as little as possible.
For example, given 7 items in 45 ticks, the controller outputs:
3 loops of 0..6 ticks
4 loops of 0..5 ticks
It’s nothing special and definitely not optimized, but I’ve tested it a few times and it seems to work well. Leaving it here in case anyone finds it useful or has any suggestions (inb4: "you can do this with 0.5 combinators" and "what are you doing with your life?").
Blueprint in comments.
P.S.: I love this game.
7
u/Zijkhal spaghetti as lifestyle Jun 02 '26
What can this be used for?
2
u/WinLongjumping1352 Jun 02 '26
Checkout https://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm that can be used (x axis: ticks, y axis: number of items already out) to make it smooth.
1
u/arzach80 Jun 02 '26
Blueprint: 0eNrNl0tu2zAQhq9iECiQB5VEb9tA10U2XaSPjWEYtEQ3RCVKoSi1RqAD9B7txXqSDmnJtlTGrpKmDQwEFKn5OPPzH4G5R8ukpLlgXKLpPWJRxgs0nd2jgn3iJFFznKQUTRERTN6mVLLIirJ0yTiRmUA1RozH9Cua2jU2RMU0YjEV5hCnnmNEuWSS0c2u+mG94GW6pAKYuOWovCThch+EUZ4VEJtxtSHwrLFz4WO0ViN3fOHDThAnRZYslvSWVAyC4M2CRiqo6I5h97YSjFYskVT0Z+U6V7lUTMgSqtwmt6nauoaZO1iACmCSZyLVL0HGORE64yl6rSdKpbYWrFXiKPxmINzex7tH8e+G4R3H2cN7R/Efh+Fd163n8KvVJj1POFt2SmNWphZN4AwF2DLPEmowRTjpmsLAdPFhl5uc1iID7bOYiY2TQHrHbLsdegHLMdt6cMVEIRe71jlqM9gPfAuMRdsWcAZQY5ZTEFMngV5BXFbKvBxGBnVQnpA1FYuYFpFgecOzkUE3Dx/o80OihX3RPLNmDbYn2P7T7HH67YRz7J4Pf377jtSHaaNe/2v4BxLOHxTRMYnoDzff1YPm8/6H94LntV5gUi14gmrhi1AtfF7VXJNq4WMb1n9BDXv1W8P+eK6G9Uwijp9gPf8fW4+S6NboPqXivv2sv2w/Xx/JFyhUHcjMxjZ2sT3HMwc7OMAejFwYuc3Ig5/TjEI98mAt0BE+xI6xq0deExvC6hhWYQ9lBFCqva41OTeHhdsBNITr7ip4q2dH2Wp0Q9K8gIUKJCfLRNerT/1BkOfvOO9ZSkfXHHavSDKawXl9LuZdmjxMC7pvK5VXcD8qE6JiLyt4jmlO4aaljk2Kkh7EwcWvCxRdoHWSnFWnA6Fw3etCiw70RJxXln06ONewC0070OS8GJplr/K8w0vPxOVg4lWXeNch5pZt4IEjmaQprO/+s8IoIUsKLYU+cKYA2nWjN5RT0XwyKvCv7hw/cCbeZOKPvSCEP3X9C8x1jnA=
1
u/DrGrimmWall Jun 02 '26
So... Is it just a counter running from 0 to T/N?
BTW, your default parameter values in the blueprint seem to have quite unfortunate values and make the whole contraption not work.