Electrical-Age / ElectricalAge

Electrical Age (ELN) is a Minecraft Mod offering the ability to perform large-scale in-game electrical simulations.
https://electrical-age.net/
Other
211 stars 97 forks source link

Signal Processor rs() issue? #395

Closed BlayZett closed 8 years ago

BlayZett commented 8 years ago

The Signal Processor's rs() function appears to have an issue. In this test setup, I have two 200V turbines attached to a battery bank (the bank has 8 50V life-oriented batteries), a 200V economic light bulb, and their own active coolers. I also have two electrical probes, the first of which is set to send a 100% signal at 190 volts and a 0% signal at 210 volts. The second is set to send a 100% signal at 900 watts and a 0% signal at 1100 watts. My goal is to set it up so that it turns on completely when the voltage signal is below 25% and off completely when it is above 75%. I also want the wattage signal to modify it so that the nominal wattage is obtained. This is the equation I used:

B*rs(C>0.75,C<0.25)

The power signal is connected to B and the voltage signal is connected to C. However, regardless of the value of C, the latch remains 0. I tested the function alone and it still didn't work, while simply typing B did work, making me believe that something is wrong with the function.

Screenshots:

2016-01-29_22 33 04 2016-01-29_22 33 09 2016-01-29_22 33 21 2016-01-29_22 33 24 2016-01-29_22 33 28 2016-01-29_22 33 39

Dolu1990 commented 8 years ago

Hi,

It's strange, i can't reproduce the bug

There is a testbench :

image

left => sin(ramp(5)_PI_2)_0.5+0.5 right => C_rs(B > 0.75,B < 0.25)

Could you send the map :) ?

BlayZett commented 8 years ago

Here is a link to the map in a .zip file.

This is not the exact same setup, but it is on the same map in the same area. The issue is still present. I would like you to know a few important things. The first is that this map is normally hosted on a personal 1.7.10 Forge server, on which I have disabled explosions in Eln.cfg. The second is that the server and myself are using a few other mods which I will list now:

[1.7.10]bspkrsCore-universal-6.16 CodeChickenLib-1.7.10-1.1.3.138-universal [1.7.10]Treecapitator-universal-2.0.4 CodeChickenCore-1.7.10-1.0.7.47-universal DurabilityShow-1.7.10-1.2.0 ElectricalAge_BETA-1.10_r50 InventoryTweaks-1.58-147 journeymap-1.7.10-5.1.3-unlimited NotEnoughItems-1.7.10-1.0.5.120-universal OpenComputers-MC1.7.10-1.5.21.41-universal OptiFine_1.7.10_HD_U_C1 Waila-1.5.10_1.7.10 worldedit-forge-mc1.7.10-6.0-beta-01

These mods are running on Forge 1.7.10 - 10.13.4.1558.

Dolu1990 commented 8 years ago

I have try your map, and on my computer all is working fine (without other mods, ect) Basicly to have this network working, you just need to inverse the voltage probe values. The first argument of the rs function is to clear, the second is to set. actualy this regulation loop (in the map) has a inverted ("wrong") logic.

Could you try it on your computer ?

BlayZett commented 8 years ago

Upon (even more) thoroughly thinking over the equation just now, I realized it is backwards, despite my best efforts to get it right. My apologies for the trouble, but thank you for taking a look at the issue. You're a fantastic person making a fantastic mod. ;)

P.S. If you would like, I can try to help improve the English grammar in your mod, I really love it and would like to support it in any way possible.

metc commented 8 years ago

@BlayZett None of us are native English speakers, so your help is very welcome:

  1. We now use Transifex as translation platform. Here is the English lang source file, you can edit it as required.
  2. You could also review the content of the mod website or the Readme file.

Of course, you can also contribute to the source code of the mod. Thanks for your help!