This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Xarlas's profile picture

Big Reactors controll script

Started by Xarlas, 13 June 2014 - 06:04 PM
Xarlas #1
Posted 13 June 2014 - 08:04 PM
Here this is my automatic regulator for Big reactors.
it works just with passive cooled reactors and it just can regulate one reactor
Everything with a * can be configured at the beginning of the code
If the energy of the reactor is less than 30* % it Runs the Reactor at full speed until it has reached 30* %
If the Reactor has more than 90*% energy stored it will shut down (Cooldown) until it reached 70* % Energy
The reactor will be Automatically Regulated to Produce just as Much Energy as needed
But it will always Produce slightly more energy than needed (about 1 % more)
If you have an Very Big reactor and using very little Energy the Result may be more than 1 % off
In the config the Reactor can be configured not to be hotter than 1200* °C by setting the Variable useThemp to true
Also it the maximal speed can be configured (normal is 0) This is at which controll Level the Controll Rods are set (so if you set it to 100 the Reactor wont work)
Everything you can change in the Config has an explanation as comment behind it
Warning: if you change things you should know what they do!
If you dont understand what they are doing you dont need them


The Program will find the reactor automatically
You can also Connect 2 Monitors.
One will display "important" messages like it has reached 90 % and will now stop until 70 %
The other will display some Informations about the Reactor like how much it Produces etc
You can connect the Monitors and the Reactor with Modems.


When you first Run the Program it will make a Map of the Reactor meaning it will look at every Possible Regulation (all 100 %)
and Look How Much it Produces and how hot it is
and save them in the config at the Start of the Programm and set the Variable first run to false
If you change your reactor you have to set this to true so it can make a new Map for the new Reactor (for example if you make your reactor bigger or add coolants etc)
The creation of this map will take about 20 minutes
While the Creation of the Map the Monitor displaying Informations WILL lag (just one upadate all 10 seconds) !
Also make Sure that the Reactor has (enough) Fuel before Running it the First Time

http://www.directupl...ayjlx7u_png.htm

The Program does not need an advanced Computer

To download this Programm just Type
pastebin get gPGfx74h startup

The Code can be found at:
http://pastebin.com/gPGfx74h

BUT it WILL contain spelling mistakes
I dont care about spelling Mistakes in the code
Also my English isnt very good so it could be that not everything is Grammatically correct (comments)

Do NOT Republish as own work
If you want to use parts of this code for your own code:
Give Credits !
You can upload this again for specific reactors so that you can make the reactorMap in Creative Single Player and use it on a Server for Example
But you Must NOT remove or change the Credits at the end of the config !
But Remember if the Config of Big Reactors is Different so that the Reactor Produces a different amount of Power it wont Work as Expected

Changelog:
Release 1: Initial Release
Release 2 : Bugfix: Setting FirstRun to true after first Run not working
Edited on 15 June 2014 - 10:19 AM
ZedRange #2
Posted 20 August 2016 - 01:25 AM
Best control script by far!!


As stated, takes a while to setup since the 1-100rod RF/t test takes some time, BUT works on any size reactor without wasting any RF after the test, due to it matching RF/t generation vs the RF/t Draw.

All others i´ve tested so far simplistically put, has a "30% buffer = ON — 70% buffer = OFF" and takes no regard if my reactor produces 10,000RF/t which normally works fine, or 150,000RF/t and always wastes RF EVERY time after it is turned off due to residual heat:/

5/5


Felt i had to create an account just to make a comment on this amazing script:)