encountered the usual "too many items and not enough belts" in factorio and solved it with a bit of Verilog

always @(posedge update) begin
science_x_delta <= science_x_in + science_x_out * -1;
science_x_mem <= science_x_mem + science_x_delta;
end

Follow

@whitequark

You can add a piece of belt that reports its contents and have the thing converge even if someone surreptitiously adds/removes stuff from the belt. (Add something that's morally equivalent to `science_x_mem <= (1-eps)*science_x_mem + eps*belt_length/sensor_belt_length*belt_sensor_report)`.)

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.