MauveCloud / Ic2ExpReactorPlanner

A planner for nuclear reactors in the popular Minecraft mod IndustrialCraft2 Experimental.
GNU General Public License v2.0
179 stars 30 forks source link

Some suggestions for the reactor planner #33

Closed KrisBigK closed 5 years ago

KrisBigK commented 5 years ago

I'm not sure if I am supposed to make the suggestion here or on the IC2 forum. Since there is less people here, I'll post it here.

Simulation:

Components:

Pulse Configuration:

Component list:

Component automation:

Finished:

Postponed:

MauveCloud commented 5 years ago

I'll look into these some more later, but answer a few now:

I'm not sure if I am supposed to make the suggestion here or on the IC2 forum. Since there is less people here, I'll post it here.

I'm not picky about that, either way works.

3.remove "Reactor took %d seconds to cool down." and "Other components took %d seconds to cool down (as much as they would)."if the reactor will explode mid-cycle

I thought I had already set things up so those lines wouldn't show up for an exploding reactor, but apparently not. I'll investigate.

7.add graphs that shows the following: -a. the reactor temperature -b. total vent/cell/condensator cooling -c. reactor heat buildup -d. EU/heat output -e. Used cooling and unused cooling -f. excess cooling/heating -g received/vented heat (for a single component) -h durability of a component

Showing graphs in the simulator is a bit too advanced to be worth the effort, but I've thought about generating CSV data per reactor tick for each component, which could then be imported into spreadsheet software for further analysis.

9.add an option for using GT recipes since it is different on some components

iirc, only the neutron reflector is different (using beryllium instead of copper), unless you want to get into the GT circuit recipes (which is a whole other can of worms), so it doesn't seem worthwhile.

18.read an external Bundle.properties or add support for different languages for people who don't speak English

i18n support is already somewhat implemented - I just need people to send me translations.

20.add a warning message when a obsolete component is in the design

afaik, none of the components that can be selected in this planner are obsolete, even in MC 1.12.2. The only way an obsolete component can be involved is if a code from Talonius's planner is used, and I'm pretty sure there's already a warning message if an obsolete component from a Talonius planner code is detected.

KrisBigK commented 5 years ago

I'll look into these some more later, but answer a few now

I don't mind about it as long as you read them all :-)

3.remove "Reactor took %d seconds to cool down." and "Other components took %d seconds to cool down (as much as they would)."if the reactor will explode mid-cycle I thought I had already set things up so those lines wouldn't show up for an exploding reactor, but apparently not. I'll investigate.

2302130C0D0C0D0C1303030C0D0C0D0C0D0C030C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C For example, this reactor will explode at 289 seconds, and those lines still show up. I think that is because the core heat exchangers won't melt before the explosion, and they can be cooled down.

18.read an external Bundle.properties or add support for different languages for people who don't speak English i18n support is already somewhat implemented - I just need people to send me translations.

You could add that into your post. Also, the planner is already out of its beta period.

20.add a warning message when a obsolete component is in the design afaik, none of the components that can be selected in this planner are obsolete, even in MC 1.12.2. The only way an obsolete component can be involved is if a code from Talonius's planner is used, and I'm pretty sure there's already a warning message if an obsolete component from a Talonius planner code is detected.

My fault that I didn't see line 330 in Ic2ExpReactorPlanner\Reactor.class.

KrisBigK commented 5 years ago

I found a translated Chinese version of your planner here. I hope that would help.

KrisBigK commented 5 years ago

another suggestion: 21.add a option for pulsed automation: try every single possible combination of on/off duration within a certain range (excluding 0) that can be set by the user, and then output all combinations that won't explode in the Simulation section. Order it from high output to low output, maybe?

EDIT: from now on I'll just add my suggestions directly to the first comment, and adding them to the task list.

MauveCloud commented 5 years ago

Okay, now I will try to go through your list and answer things a bit more thoroughly:

Simulation: 3.remove "Reactor took %d seconds to cool down." and "Other components took %d seconds to cool down (as much as they would)."if the reactor will explode mid-cycle

As far as I can tell, this only remained for the "Simple Cycle" simulation, but I've committed a fix for that. I haven't made a new binary yet, because I plan to implement some of these other suggestions first.

1.add "average heat/EU output before any vents are broken" 2.add "efficiency before any vents are broken" 4.add "total vent/cell/condensator cooling before any vents/cell are broken"

Okay, should be simple enough to output a summary the first time a component breaks. I don't see a lot of point in being picky about which type of component got broken.

5.add options to select which lines of information to show because sometimes people are just focused on certain lines of information

I'm not entirely sure this is worth doing. I'll keep it in mind, but low priority.

6.add "explosion power of the reactor" for a exploding reactor

I've committed an implementation of this. A few things to note, however: A. The default IC2.ini limits reactor explosion power to 45, even though the theoretical maximum "raw" explosion power is 442 (which can be achieved by putting in 54 quad rods, it doesn't matter whether they're uranium, mox, thorium, or naquadah) B. The reactor vessel blocks of a fluid reactor have a blast resistance of 90, which is triple that of cobblestone and half that of reinforced stone, potentially acting as partial containment for an exploding reactor. C. In the 1.7.10 builds of IC2, a fluid reactor at or above 85% max temp can potentially replace reactor vessel blocks with flowing lava (though not the redstone ports, access hatches, or fluid ports), causing it to suddenly become an EU reactor mid-cycle (since the outer shell is incomplete). I don't think this can happen in 1.12.2, because the pressure vessel blocks now have tile entities, which the lava replacement code checks for. D. Setting the reactor explosion power limit to 0 (or less) in IC2.ini will prevent any of the external heat-threshold effects from happening.

24.add "minimum initial temperature" for MOX fluid reactors so that when starting with at least the temperature shown, a proper design will not go down 50% heat 25.add "maximum initial temperature" (for the reactor not to exceed 85% heat) for pulsed MOX fluid reactors

I'm leery of adding these, because A. testing repeatedly to find a good range of initial temperature could take annoyingly long, and B. this is pushing the limits of the scope of the project - the idea of the planner is to allow players to check their designs for safety, outputs, efficiency, etc., not to allow them to automatically refine and optimize their designs like this. However, I'll be happy to add a report of how long it takes for the reactor to dip below 50% heat for the first time, which should be a helpful indicator of how good the initial temperature choice was.

26.add "average excess heating" for pulsed reactors 27.add "(average) excess cooling (before burning vents)" for MOX (fluid) reactors

I'm not sure this even makes sense. "excess cooling" is cooling capacity from vents that never gets used, so I fail to see the point of trying to average it.

30.add "reactor minimum temperature before cooldown"

This should be simple enough to add. Edit: Looking at the code, this would be redundant - the reactor min/max temperature are calculated and displayed before handling the cooldown (which is only applicable for a "Simple Cycle" simulation).

Materials: 8.add an option to order the materials by how much one costs,descent/ascent and in alphabetical order 39.divide advanced alloy further down into iron, tin, and bronze(copper and tin) when not using GT recipes

I don't see much point in adding advanced options for the materials list. If other players express interest in this, I might revisit it.

Components: 10.show "Please select a component to see it's information" or "Please run a simulation to see it's information" or something similar instead of being empty

Committed.

11.show how much heat a fuel rod generates and its efficiency

I'll look into having the info button for a fuel rod show the heat/eu generated. However, the efficiency is calculated for the reactor as a whole (especially when it's a fluid reactor), and would be less useful to show on an individual fuel rod.

12.show how much heat and efficiency is being increased for a reflector

I'm not certain how easily this can be calculated per reflector, but I'll investigate.

Pulse Configuration: 14.set the default value of on-pulse duration to 5,000,000 in case some people accidentally selected the pulsed cycle 15.set the default value of Suspend/resume when reactor temp >= to 101,800 for the same reason. This is the reactor heat capacity when the reactor is full of heat-capacity reactor plating.

Committed.

16.hide this section when the Simulation style is set to simple cycle

I think disabling the tab would be safer than temporarily removing it, but I'll look into this.

21.add a option for pulsed automation: try every single possible combination of on/off duration within a certain range (excluding 0) that can be set by the user, and then output all combinations that won't explode in the Simulation section.

I am unlikely to add this, for reasons described above in response to your similar suggestion about the initial temperature. However, if I were to add it, I think I'd make it a separate simulation style, maybe called "Find Safe Pulses" that would output safe on/off durations and not bother checking for HU or EU output or efficiency or anything like that. Note that it would be a waste to show (or test) "all" combinations - each "on" duration within the range would have a minimum "off" duration, e.g. if 9 seconds on and 5 seconds off is safe, then so is any longer "off" duration.

22.add an option to cancel pulsed automation mid-way

This will be complicated enough to get right that I'll save it for later, but why only on pulsed automation? I hope I can do this for all simulation types.

31.add an option for the reactor to not pause when changing the fuel rod(s)

I think technically you can do this already by setting the pause time to zero. However, that's not realistic - whatever automation mod you use will have to detect the depleted rod(s) before it can replace them, and I'm pretty sure that will mean there's at least one reactor tick with no active fuel rods.

Component list:

  1. move this section to between "Component" and "Pulse Configuration"

I can see the logic of wanting "Component list" next to "Component", but I think instead I'll move "Component" to the right to achieve that, and move the materials tab to the right end.

Component automation: 23.add a setting to set default replacement threshold and reactor pause, since it is annoying sometimes to simulate a highly-automated reactor with a lot of component automation needing to be adjusted. The replacement threshold should have adjustable independent default values for different components.

I'll look into this, I just haven't figured out the UI for it yet.

Misc: 19.save a history of recent changes to an external file and allow revert to previous versions to make it easier 28.add "running cost" section 29.add support to simulate mutiple reactors at once (like "Sheet 1,2,3" in excel) without the need of opening mutiple planners 32.add a select function so that the component automation/initial heat can be set as a whole and when selected component change, they all change 33.add a option to hide the "a" and "i" squares and the rectangle on top of each component slot 34.add the support for middle-clicking components 35.make the tabs re-arrangeable 36.add an option to hide/show GT components and pop a warning when a design contains GT components when they are hidden

Most of these would be much more trouble to implement than they're worth. "Running cost" is much less relevant than it used to be - see this post: https://forum.industrial-craft.net/thread/8966-official-new-reactors-design-thread/?postID=174981#post174981

37.make the reactor code contain the following configurations so that people don't have to set those again when copying someone's design a.whether it is a EU/fluid reactor (1 digit) b.the initial heat of the design (5 digits in hex, since the maximum heat possible is 101,800) c.simulation style (1 digit) d.using reactor coolant injector? (1 digit) e.things in pulse configuration f.things in component automation 38.add a way to compress the code since the over 100 digit string is quite long. Use Huffman coding or Arithmetic coding and then turn the binary string (may be ~400 digits long)into a hex string (vice versa), maybe?

This might be worth looking into, but not exactly top priority.

MauveCloud commented 5 years ago

18.read an external Bundle.properties or add support for different languages for people who don't speak English i18n support is already somewhat implemented - I just need people to send me translations. You could add that into your post. Also, the planner is already out of its beta period.

Based on "amount of testing", I'm not entirely certain it should be out of beta period. However, based on "time since beta announced" and "version numbering", it definitely is, so I've edited my post to reflect that.

I found a translated Chinese version of your planner here. I hope that would help.

I took a peek at this, and noticed a few things: A. They directly edited Bundle.properties instead of adding one with a locale code appended before the file extension, so I'll have to figure out the correct naming for the China-specific properties file. B. Some of the entries were not translated, which might mean there are legacy values in there that are no longer used and can be removed. C. My Bundle.properties file is kind of a mess, with some key names automatically generated by the NetBeans GUI editor, some manually named, and a mixture of camel case, underscores, and escaped spaces. I should find some time to get this organized before adding anything to the forum post about wanting translations.

KrisBigK commented 5 years ago

I've committed an implementation of this. A few things to note, however: A. The default IC2.ini limits reactor explosion power to 45, even though the theoretical maximum "raw" explosion power is 442 (which can be achieved by putting in 54 quad rods, it doesn't matter whether they're uranium, mox, thorium, or naquadah) B. The reactor vessel blocks of a fluid reactor have a blast resistance of 90, which is triple that of cobblestone and half that of reinforced stone, potentially acting as partial containment for an exploding reactor. C. In the 1.7.10 builds of IC2, a fluid reactor at or above 85% max temp can potentially replace reactor vessel blocks with flowing lava (though not the redstone ports, access hatches, or fluid ports), causing it to suddenly become an EU reactor mid-cycle (since the outer shell is incomplete). I don't think this can happen in 1.12.2, because the pressure vessel blocks now have tile entities, which the lava replacement code checks for. D. Setting the reactor explosion power limit to 0 (or less) in IC2.ini will prevent any of the external heat-threshold effects from happening.

A. maybe display it as "maximum reactor explosion power"? B. I think it should be the explosion power 1 block outside the reactor pressure vessel. C. I don't see any relations between this and the explosion power.

because A. testing repeatedly to find a good range of initial temperature could take annoyingly long. B. this is pushing the limits of the scope of the project - the idea of the planner is to allow players to check their designs for safety, outputs, efficiency, etc., not to allow them to automatically refine and optimize their designs like this

A. I don't think so. The temperatures shouldn't take that long to figure out since (my idea is that) the temperatures can be tested in units of 1000, then 100, then 10, and then 1. That should make it a lot faster. B. I'm glad to know about that.

I'll be happy to add a report of how long it takes for the reactor to dip below 50% heat for the first time, which should be a helpful indicator of how good the initial temperature choice was.

That is a great idea.

26.add "average excess heating" for pulsed reactors 27.add "(average) excess cooling (before burning vents)" for MOX (fluid) reactors I'm not sure this even makes sense. "excess cooling" is cooling capacity from vents that never gets used, so I fail to see the point of trying to average it.

I don't think that I have a same understanding of what "excess cooling" is. I think it is heat generated subtracted by total cooling.

30.add "reactor minimum temperature before cooldown" This should be simple enough to add. Edit: Looking at the code, this would be redundant

00230C0A140D0C140D2306230C0D0C0D0C1400230C0D0C0D0C0D0C000C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D14000C000C0A140D0C0A runs 9 secs on and 5 secs off ,initial heat of 6600 This example, again. According to the planner, it has a minimum temperature of 0. However, it is clear that its minimum temperature is far higher than 0 before cooldown.

11.show how much heat a fuel rod generates and its efficiency However, the efficiency is calculated for the reactor as a whole (especially when it's a fluid reactor), and would be less useful to show on an individual fuel rod.

This can be useful for analyzing the individual fuel rods, such as which fuel rod has the lowest efficiency, etc.

21.add a option for pulsed automation: try every single possible combination of on/off duration within a certain range (excluding 0) that can be set by the user, and then output all combinations that won't explode in the Simulation section. I am unlikely to add this ... e.g. if 9 seconds on and 5 seconds off is safe, then so is any longer "off" duration.

That is up to you. Too long on/off durations will cause the reactor to generate too much heat so that it will explode.

22.add an option to cancel pulsed automation mid-way This will be complicated enough to get right that I'll save it for later, but why only on pulsed automation? I hope I can do this for all simulation types.

On my computer with an intel i7-6700 CPU it takes about 15 seconds to simulate a proper designed reactor using pulsed automation. The longest time took for other types is under 0.5 secs, making doing so almost useless.

31.add an option for the reactor to not pause when changing the fuel rod(s) I think technically you can do this already by setting the pause time to zero. However, that's not realistic - whatever automation mod you use will have to detect the depleted rod(s) before it can replace them

I tried to set the pause time to 0, but it seems that it still stopped when changing the fuel rods. And, that is realistic. A hopper filter with a dropper connected to it can do the trick without the need of other mods. Check the save file in my bug report 2506 for more details.

A. They directly edited Bundle.properties instead of adding one with a locale code appended before the file extension, so I'll have to figure out the correct naming for the China-specific properties file.

It should be zh_cn for simplified Chinese and zh_tw for traditional Chinese. I got that from options.txt when using the languages. The translated version looks like simplified Chinese to me.

MauveCloud commented 5 years ago

This example, again. According to the planner, it has a minimum temperature of 0. However, it is clear that its minimum temperature is far higher than 0 before cooldown.

Okay, it seems we have a semantic issue - my concept of "cooldown" is a period after all output (EU or HU) has stopped, and only the Simple Cycle simulation actually handles that specifically. It looks like what you want is the min/max/average temperature as soon as the fuel rods have depleted (at least when there are any - technically a fluid reactor can operate by venting heat from coolant cells that could have been heated in a separate reactor - I seem to recall someone came up with a multi-reactor design for that). I can add that.

I tried to set the pause time to 0, but it seems that it still stopped when changing the fuel rods. And, that is realistic. A hopper filter with a dropper connected to it can do the trick without the need of other mods. Check the save file in my bug report 2506 for more details.

Really? Looking at https://github.com/MauveCloud/Ic2ExpReactorPlanner/blob/master/src/Ic2ExpReactorPlanner/AutomationSimulator.java#L231 the simulation shouldn't stop when changing the fuel rod if its pause time is set to 0. If that failed, I'm not sure how to fix it.

It should be zh_cn for simplified Chinese and zh_tw for traditional Chinese. I got that from options.txt when using the languages. The translated version looks like simplified Chinese to me.

Actually, I did a bit more looking into Java i18n, and as far as I can the resource bundle will want "Bundle_zh_CN.properties" or "Bundle_zh_TW.properties" as the filename (note the case sensitivity). Based on the top-level domain of the site you linked (.cn), I figured it would be the first. Also, I notice in the page source, there is a ChineseTraditional.js, but commented out, which goes along with your idea that it's simplified Chinese (I would not be able to tell which it is just by looking at the characters).

I don't think that I have a same understanding of what "excess cooling" is. I think it is heat generated subtracted by total cooling.

Perhaps this post will help you understand the concepts behind the addition of the excess cooling display: https://forum.industrial-craft.net/thread/10998-ic2-experimental-reactor-planner/?postID=184130#post184130

MauveCloud commented 5 years ago

On my computer with an intel i7-6700 CPU it takes about 15 seconds to simulate a proper designed reactor using pulsed automation. The longest time took for other types is under 0.5 secs, making doing so almost useless.

Actually, once I add CSV output, enabling it may bog down all simulation types, and it might not seem so useless then. Come to think of it, I might also need to add a setting for total ticks to simulate in pulsed automation, since a 5-million line CSV file might be impractical for spreadsheet software to import.

KrisBigK commented 5 years ago

the simulation shouldn't stop when changing the fuel rod if its pause time is set to 0. If that failed, I'm not sure how to fix it

It did stop for some reason. It has 249 secs of inactive time. 1 2 3

Actually, once I add CSV output, enabling it may bog down all simulation types

Add a warning before enabling it, I guess?

Come to think of it, I might also need to add a setting for total ticks to simulate in pulsed automation, since a 5-million line CSV file might be impractical for spreadsheet software to import.

I agree with you.

MauveCloud commented 5 years ago

It did stop for some reason. It has 249 secs of inactive time.

Okay, I figured out what happened here - https://github.com/MauveCloud/Ic2ExpReactorPlanner/blob/master/src/Ic2ExpReactorPlanner/ReactorPlannerFrame.java#L998 ends up dropping the automation settings. :( So at the moment it doesn't matter whether the pause is set to 0 or 10 seconds in the GUI, that design will still show 249 seconds of inactive time. Perhaps getting the automation settings etc. into the code will be more important than I thought, but it won't be easy (or quick).

KrisBigK commented 5 years ago

This example, again. According to the planner, it has a minimum temperature of 0. However, it is clear that its minimum temperature is far higher than 0 before cooldown. Okay, it seems we have a semantic issue - my concept of "cooldown" is a period after all output (EU or HU) has stopped, and only the Simple Cycle simulation actually handles that specifically.

Isn't "cooldown" the period when heat production is stopped (i.e. the fuel rod isn't running) and the vents still vent heat?

So at the moment it doesn't matter whether the pause is set to 0 or 10 seconds in the GUI, that design will still show 249 seconds of inactive time.

Even lowering the replacement threshold to lower than 20000 still can't solve this problem. The problem is also reflected by the total EU output. A number lower than 500,000,000 (5 20 5,000,000) means the reactor must be stopped for a while mid-way.

MauveCloud commented 5 years ago

32.add a select function so that the component automation/initial heat can be set as a whole and when selected component change, they all change

I've added a way to pre-specify these details when placing components, which I hope will suffice.

33.add a option to hide the "a" and "i" squares and the rectangle on top of each component slot

I don't understand why you'd want this - the "a" and "i" squares are important for automation configuration and component information respectively, and the rectangle above potentially changes color to indicate that the component may need some sort of attention after a reactor cycle (e.g. it will break before the cycle ends)

34.add the support for middle-clicking components

You mean to copy the stack, like the in-game controls? I think it's probably for the best that the planner controls aren't too much like the Minecraft game controls.

35.make the tabs re-arrangeable

As far as I can tell, the standard JTabbedPane doesn't support this, and I don't consider this worth making or finding a special class to handle it.

37.make the reactor code contain the following configurations so that people don't have to set those again when copying someone's design a.whether it is a EU/fluid reactor (1 digit) b.the initial heat of the design (5 digits in hex, since the maximum heat possible is 101,800) c.simulation style (1 digit) d.using reactor coolant injector? (1 digit) e.things in pulse configuration f.things in component automation

I've actually added these now.

38.add a way to compress the code since the over 100 digit string is quite long. Use Huffman coding or Arithmetic coding and then turn the binary string (may be ~400 digits long)into a hex string (vice versa), maybe?

From what I can find, arbitrary compression like Huffman is generally not worthwhile unless the data is over 1000 characters, because of the need to include a "dictionary" to allow decompressing the data. In case you hadn't noticed, the existing code is already partly hexadecimal and partly base-36. Theoretically, I could squeeze it into a BigInteger, use bit-shifts or remainder operations to get the data back out (I think that would be a variant of Arithmetic coding), and output in Base64 (with some sort of prefix to distinguish it from an old-style code or a Talonius code). However, maintaining the Java code to handle that would be a huge hassle.

I've implemented what I'm going to for now, so I'm closing this issue. If there are still enhancements you feel strongly about, please open separate issues for them.

KrisBigK commented 5 years ago

33.add a option to hide the "a" and "i" squares and the rectangle on top of each component slot I don't understand why you'd want this - the "a" and "i" squares are important for automation configuration and component information respectively

a. I want it to look more like the in-game reactor GUI. b. It takes too much time when trying to select a component with the tab key when these things are there.

I know the function of those on top of each component although I still don't understand the exact meaning of the colors except red. IIRC, the Talonius simulator displays the colors in the background of each component slot, and that's something I like, so I thought, why wouldn't you do that in the first place? Then I thought It might be due to a technical problem, so I've not suggested that.

34.add the support for middle-clicking components You mean to copy the stack, like the in-game controls? I think it's probably for the best that the planner controls aren't too much like the Minecraft game controls.

What I thought is that middle-clicking a component selects a component, instead of copying a stack. There isn't much controls in the planner anyways. Why do you think that the controls need to be not too similar?

38.add a way to compress the code since the over 100 digit string is quite long. Use Huffman coding or Arithmetic coding and then turn the binary string (may be ~400 digits long)into a hex string (vice versa), maybe? From what I can find, arbitrary compression like Huffman is generally not worthwhile unless the data is over 1000 characters, because of the need to include a "dictionary" to allow decompressing the data. In case you hadn't noticed, the existing code is already partly hexadecimal and partly base-36. Theoretically, I could squeeze it into a BigInteger, use bit-shifts or remainder operations to get the data back out (I think that would be a variant of Arithmetic coding), and output in Base64 (with some sort of prefix to distinguish it from an old-style code or a Talonius code). However, maintaining the Java code to handle that would be a huge hassle.

I can understand the complexity of compressing and de-compressing, and it is good to know more about compression. Therefore I can go without it since that only saves me for about two seconds or so copying a shorter code.

If there are still enhancements you feel strongly about, please open separate issues for them.

What about small enhancements? Do I put it here or open a new issue?

MauveCloud commented 5 years ago

I know the function of those on top of each component although I still don't understand the exact meaning of the colors except red. IIRC, the Talonius simulator displays the colors in the background of each component slot, and that's something I like, so I thought, why wouldn't you do that in the first place? Then I thought It might be due to a technical problem, so I've not suggested that.

Originally, it did show the color in the background of each component, but SpwnX pointed out a flaw with that (see https://forum.industrial-craft.net/thread/10998-ic2-experimental-reactor-planner/?postID=190270#post190270 ). Edit: perhaps I should add tooltips to those panels when the color is set, provided I can remember (or figure out) what they mean again - it has been a few years since I set that up.

It takes too much time when trying to select a component with the tab key when these things are there.

😮 I had not anticipated anyone using keyboard controls to navigate the reactor grid. Could you please clarify what advantage you expect this to have? Edit: whatever your reasoning for doing that, I found I could just call setFocusable(false) on those buttons, and the tab key would skip over them without having to hide them.

I've been avoiding adding any configuration that isn't part of the design of a reactor (and thus wouldn't make sense to embed in the reactor code), but perhaps it's time to relax that restriction.

What I thought is that middle-clicking a component selects a component, instead of copying a stack. There isn't much controls in the planner anyways. Why do you think that the controls need to be not too similar?

😕 I was probably just being paranoid about the Minecraft terms of use and users potentially suspecting me of copying code. However, I think I should provide an alternative to allow users who don't have a middle mouse button (e.g. Mac users) to get the same effect.

I understand the complexity of compressing and de-compressing, and it is good to know more about compression. Therefore I can go without it since that only saves me for about two seconds or so copying a shorter code.

Actually, I'm second-guessing myself about this now. IDK if you've looked at the source for Reactor.getCode(), but it's not really all that simple or expandable - it's a mix of hexadecimal, base 36, and some special delimiters and indicator codes. Also, the current hex codes allow for up to 255 component types before needing to be changed, which is probably overkill - even with a couple of add-ons in the works to add more, I doubt the count will get that high. I also need to check whether GTCE still includes reactor components. (edit: it does not; in fact, GTCE seems completely severed from IC2, rather than just no longer requiring it)

I think I might tentatively add functions for my BigInteger and Base64 idea, and compare the code before making a final decision.

MauveCloud commented 5 years ago

Isn't "cooldown" the period when heat production is stopped (i.e. the fuel rod isn't running) and the vents still vent heat?

Considering that a fluid reactor still outputs HU if the vents are venting heat, I don't think that definition works, plus it would include when the reactor is switched off (such as during the off pulse of a pulsed reactor) - do you really want to see things like the reactor minimum temperature at the beginning of the first off pulse? However, if you're comparing with the old planner, I think it had a somewhat different definition, which might help a little with this other idea you had:

21.add a option for pulsed automation: try every single possible combination of on/off duration within a certain range (excluding 0) that can be set by the user, and then output all combinations that won't explode in the Simulation section.

As far as I can tell (with limited testing), the old planner seems to show a "Generation time" based on how long it will take before either a component breaks or the reactor hits 85% heat (at which point it would start spawning fire and lava) - or "Full cycle" if neither will happen within a reactor cycle, and a "Cooldown time" based on how long it would take for the components (and reactor) to recover completely if stopped right at that point. I imagine this is what players previously used for figuring out pulse settings (or at least a starting point).

The currently-released planner can show the first (though less intuitively, the time to lava temperature and time to first component break (if applicable) are listed separately). The un-released build of the planner can show the second by setting the maximum reactor ticks to that time (or perhaps 1 second less), while the currently-released planner would require setting the on pulse to that time, the off time really high, and looking at CSV data.

KrisBigK commented 5 years ago

and a "Cooldown time" based on how long it would take for the components (and reactor) to recover completely if stopped right at that point. I imagine this is what players previously used for figuring out pulse settings (or at least a starting point).

The principle is the same, and I created a equation for it. 0B230B0A140D0C0A122306230C0D0C0D0C0D0B230C0D0C0D0C0D0C0B0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D140A140D0C0A140D0C0A|fpn4mo|n5|f2 When designing this pulsed MOX fluid reactor, (I'm going to assume that this is the most complex reactor without automation), I first find out that it generates 896 heat, and then I calculated that it has a factor of 128, and then I tried to design a vent design that also has a factor of 128 so that on/off pulse time can be small integers in the following equation that I use to calculate on/off cycle

(heat generation per sec) (on pulse time) =< ("effective" vent cooling per sec) [(on pulse time) + (off pulse time)]