RFTools

RFTools

74M Downloads

Bug..? Endergenic generator inconsistent.

sniarb opened this issue ยท 32 comments

commented

I've been extensively testing endergenic generator designs the last few days and I LOVE the idea behind them, but I have become very frustrated at the apparent buggyness and inconsistence in RF/t.

What I mean is: I create a generator using only RFtools (generators, injectors, and logic gates) and MFR RedNet cables for redstone signals. I test the generator and it works great - 22k RF/t. I then reload my world and test it again without a single change and it is only generating 7-8k RF/t and is losing pearls like mad. I break all of the generator blocks and replace them in exactly the same fashion and its back up to 15k RF/t! Then I break all the ender monitors and replace them (again, exactly the way they were) and the system runs at 20k RF/t. At first I thought this might be due to RedNet Cable problems, but others have experienced similar inexplicable inconsistencies with using only vanilla redstone and red alloy wire, so the error must be in the RFtools blocks. I don't have the expertise to find the root of this problem, but its a very real issue. A system that relies on strict and rapid redstone ticks should be capable of handling such precise signalling, and it appears as though they are currently not. I honestly believe that endergenic generators are the most underappreciated power generation method, and the complexity should remain, but uncontrollable and crippling inconsistencies will only further deter people from using it.

Sorry for the block of text, I wanted to be as thorough in my reported observations as possible because I have no way of critiquing code or solving the problem in any other sort of manner. Hope this post is at least somewhat helpful! Thanks for the amazing mod!

commented

I'm seeing this too but have a few more specifics. In infinity latest version I'm running four setups with four generators each with Minefactory PRC to control it. 2 are in a single chunk, 2 barely cross a border. All are chunk loaded by the same loader and in each I've had ender varied monitors get stuck continuously outputting Redstone signal. The monitors are set to "pearl arrived" and breaking them and replacing fixes it.

It'll work fine for quite a while but it seems that each day I have to break one to three of the 16 monitors.

commented

Thanks for that info. I did already suspect that there was an issue with these ender monitors. In any case I have plans to make stability improvements to the entire endergenic powergen system

commented

I would like to second the above observations, running RFtools 4.0.1n573. It's exactly the same problem - perfect generation prior to world unloading, and sudden timing issues upon reload. I verified that it's within one chunk, too.

commented

Is the entire setup in a single chunk? I have sometimes seen problems when parts of the generator are in different chunks because the chunks don't always load at the same time.

commented

It is entirely in the same chunk, I even rebuilt the same model in another chunk again to be sure and a simple relog caused generation to drop from 20k RF/t before a relog to 10k afterwards. Breaking and replacing the ender monitors fixed this, and even increased generation to 22k RF/t. I am stumped as to the cause of this.

commented

This problem stil persists for the 1.10.2 builds.

commented

yes the timings change from load to load. Sometimes it looks like it has some rounding errors (i.e wrench says distance 4 ticks, in "real" its everything between 2-4 ticks ...). those generators are completly not deterministic and therefor unusable ๐Ÿ‘Ž

commented

I wouldn't say they are unusable as they are used a lot by many people. You just have to be careful with how you time them. And the rounding errors cannot happen. The 4 tick distance is constant.

Also if you keep a chunk constant after building a generator (i.e. don't add new blocks or stuff) then it will not change anymore

commented

Thats my test setup here:

gen

Wrench says distances between 1-6: 4 ticks
every generator has a "charge" sequencer in front of it, and a "pearl arrived" monitor to fire it at once to the next generator

Ive set the charge sequences so, that the pearl arrives at tick 10: The distance resulting from these sequencers are:

  • 1 -> 2: 3 Ticks (wrong)
  • 2 -> 3: 4 Ticks (yay correct!)
  • 3 -> 4: 3 Ticks (wrong)
  • 4 -> 5: 3 Ticks (wrong)
  • 5 -> 6: 2 Ticks (wtf! on some world loads its 3 ticks here ...)
  • 6 -> 1: 2 Ticks (wtf!)

(the 0 generator is only to inject the pearl to make the loop easier)

The "loop" time are 29 ticks like that. after 58 (2*29) ticks, the timer in the top fires again.

Like that, the loop works for 4-5 rounds, after that, the pearl is 1-2 ticks slower (or sometimes faster ...) "last pearl arrived at tick 9" / "last pearl arrived at tick 11". the maximum I had were 7 rounds, after that, the timing's completly get killed. "pearl arrived while idle", mostly at generator 4. It looks like after a while the distance got increased there.

commented

1 -> 2: 3 Ticks (wrong)

Why is that wrong? I mean what are you basing that on?

Anyway, one thing to realize is that in a chunk tile entities tick in a deterministic but semi-random order. i.e. when you have a monitor to tick when a pearl arrives there are two possibilities:

  • The endergenic ticks before the monitor ticks. In this scenario the pearl arrives, the monitor gets notified and when the monitor processes its tick in the same 'tick' it will immediatelly perform its action
  • The endergenic ticks after the monitor ticks. In this scenario when the pearl arrives the monitor will not know it yet because the endergenic did't tick yet and so has not had a chance to process this. So in this scenario the monitor will only emit a redstone signal one tick later

The problem is that I have no control over the order that these blocks tick (although I have some ideas on how I could try to stabilize this) and this order can change depending on various circumstances. i.e. placing another block in the same chunk can cause this order to change

commented

Why is that wrong? I mean what are you basing that on?+

I'm basing that on the fact that the wrench tells me "4 ticks".

The problem is that I have no control over the order that these blocks tick

So you tell me you know it's completly non deterministic. ;-)

commented

It is deterministic. I mean, once it is stable (and you don't touch the chunk anymore) it will remain stable.

Also you can get an endergenic to be stable by making your redstone circuits to account for these problems. i.e. by adding a safety margin to the monitors or using rftools control for more advanced timing solutions you can get it to work even if the timings change

commented

I do have some plans to revisit this and I'll see if I can come up with some system to overcome the problem with the tileentities ticking in a uncontrollable order

commented

I gave up. I put one setup in the center of a chunk in the end, nothing but the setup is in the chunk. Nothing else is loaded around me. Worked perfectly. Reloaded game, every gen still said arrived at 10 but was losing more rf than generating. Reloaded game again, pearl kept dropping at the second gen saying not enough power. Another reload, works again. Gah!

commented

I'm going to give up too. Made everything work fine, 2.5+ KRF/t each generator, 20s+ record time with only one Pearl after 4 hours trying to figure out a good system. Reloaded the world, boom, doom's day started, cataclysm happening. Tick's are all screwed, Ender Pearls are destroyed in less than two seconds and no power being generated :/
I know it'll be hard to fix this if you do it, so good luck.

EDIT: I will try some stuff tomorrow, but for today that's enough.
EDIT 2: Tried everything I could, I don't care anymore, it doesn't work. Sad to see that I will have to use other stuff for energy when this was such a cool concept, tough...
I have given up too.

commented

I've been playing with the Endergenic generators on FTB Beyond recently, while I don't share everyone's neuroticism with trying to optimize random tick chaos I have found these things to be a little off. For example these two setups (which fall entirely within their own chunks and have Identical settings for each sequencer Ender monitor and the timer) had the issue of one working immediately and the other not working at all until I exited and restarted the server. The design is one I found while looking for simpler designs than the one Direwolf20 made in his modspotlight. This one isn't perfect but a good portion of the time the pearls are landing on tick 10 and firing almost immediately.
endergenic testing 001

commented

What version of RFTools?

commented

The most recent one being distributed with FTB Beyond over the curse client. I downloaded Beyond about a week or two ago. It's a private server with just me and my fiance but the settings and configs are all default.
modlist partial 001

commented

That's strange. Are you really sure they have exactly the same settings? Can you double check everything. I have no explanation otherwise

commented

Short answer: Yes I am sure they are identical.

Long answer:
I rebuilt and triple checked them while trying to get it to work. After I rebooted the server they both worked about as well as I figure they should. They are powering the Builder block quarry and Void resource miner like a boss. I built the generators off this guy's design:
http://forum.craftersland.net/topic/10815-rftools-endergenic-generator-designed-by-me/

Most iterations of the pearls go around for about 5-10 seconds before the random loss. I watched one go for almost 30 seconds.

In the picture the failing generator was in the setup on the left at the top of the diamond, the first generator to get the toss after the injection, while I was tinkering around I decoupled the generators and paired them one at a time. (From here out I will refer to generators as Gen 1,2,3,4 with Gen 1 being the Injected generator)

Pairing Gen 1 to Gen 2: Gen 1 fires to Gen 2, One probe read Gen 2 as not enough power to hold pearl.
Paring Gen 2 to Gen 3: pearl fired from Gen 1, Fired from Gen 2, and died in Gen 3
Pairing Gen 3 to Gen 4: Gen 1 through 3 fire successfully and the pearl died in Gen 4
Pairing Gen 4 to Gen 1: Gen 1 Fires to Gen 2 One probe read pearl received while idle.

After the rebuild this test repeated the results, so I rebooted the server. when I loaded back in and gave the injectors some pearls they both fired in continuous loops with the normal random losses.
I figured it was something to do with the server but I figured I'd go looking to see if anyone had similar problems.

I found it more interesting than frustrating (because I have an endless stream of pearls coming from the woot farm) but, It's after midnight for me now though so I'll have to run more tests tomorrow. I'll see if I can figure out how my video recording software works and put anything interesting I find on youtube. I'll link you to testing videos when they go up if you'd like.

commented

To Mizuna, is that still case with recent versions of RFTools?

commented

Super sad about this to be honest. Probably the coolest idea for power gen from any mod, but the fact that on a SMP server with the chunks loaded I can relog and my 47k design needs to be manually reset is making it less worth it. I could just use a big reactor, but that's so boring by comparison.

commented

@McJty we're still experiencing this on 5.92 (minecraft 1.10.2). I suspect the sequencers change ticking order and it stops working.

commented

I also spent some considerable time on Endergenics now.

I can confirm that there are random timing problems. Sometimes, when copying a design, you are able to fix it by adjusting the timings. This is alarmingly strange, as the setup becomes perfect again by doing this, even though you just technically and mathematically "broke it". I get the ender monitor ticking problem, but I encounter these "shifts" even in the sequences that do not rely on them (during the first pass through).

I have tested ~15 designs. I see no differences between variants, although I mostly used 1 tick distance setups with 12 generators. I consistently get better results in the "Redstone ready"-preset creative world I used to design them - I never got one to work by exact copying in any world I actually play. From all of the tested ones, only one survived multiple reloads and a copy. It is a 10-2 design, and it's not even within a single chunk. It does not keep a consistent error, but it isn't entirely crippled. I guess larger delays have more tolerance, as expected.

2018-11-30_22 31 47

I would also like to note that I tried both EnderIO redstone conduits and vanilla redstone. No difference surprisingly, as long as chunk boundaries are not crossed. I also tried using RFTools wireless redstone only. I only did this twice, but I couldn't see any changes.

Honestly, I have no good suggestions either. If any aspect of the timing would be simplified (moved into the generator), the whole setup becomes trivial. I believe the current idea is excellent, but unusable. Of course they can be built and ran, but I find them to be flat-out too unreliable.

commented

And the entire setup is in a single chunk?

commented

The problem still exists on 1.12.2 with rftools version 7.55.

commented

Same version as shadoxxhd. My setup is within a single chunk and is experiencing the same problems. Replacing the sequencers solves the issue until the next server restart.
And of course now that I've commented, I can no longer recreate the issue. Everything is fine apparently.

commented

Same here on 7.55/1.12.2 in the Exoria modpack. Using the dirt simple vanilla redstone + 4 gen compact setup from the various wikis and the entire thing is located in a single chunk.

It works at first but after a world reload it seems to stop working. So far, picking up the blocks and placing them back down and re-linking the generators seems to fix it but I've yet to reload often enough to know how often a working setup stops working or whether popping and replacing the blocks fixes it 100% of the time.

Edit: It seems to happen 100% of the time on reloads and (at least in my particular case) it appears that the outside sequencers of the build have to be popped and placed back down for the system to start working correctly again.

commented

Is it possible to change the timing margin for error so that when dealing with errant systems/issues that we are able to "tweak" a little bit better by changing the numbs on charge time etc.

commented

I think a good solution to this problem would have to alter how endergenic generators work, but maybe something similar could be achieved. If the generators were running on their own "private ticking", as in RFTools would control all the timings entirely, it would make sure the system is consistent even in all kinds of weird Minecraft behaviors. Something like controlling the delays inside the generator could work as @KFAFSP suggested (as far as I understood). But maybe something even nicer could be done.

What if the timing was programmed by the user similarly to the current redstone way, but only using RFTools building blocks that are not meant to be "imperative" like redstone is, but instead only declaring an execution graph? By that I mean: the generators could analyze the built system, and instead of running it, it could just know via theoretical analysis that the design is sound and simply output the power (while making the player believe it is being ran of course). That way it does not depend on unreliable factors and can be infinitely precise (and is very server-friendly as a nice side effect).

commented

Emitting pearls only on even ticks and recieving them only on uneven ones would resolve the problem, but slow down everything by a factor of 2.

Alternatively, every time a generator received a pearl, its update method could be called again - as long as the order or the update() calls doesn't impact the logic, everything should work fine.

commented

Hopefully maybe resolved when this is looked into #854 closing in preference of it