Page 1 of 1

[Rseding91] Burner Equipment Power production 50% expected

Posted: Thu May 11, 2017 1:55 pm
by Ranakastrasz
I am only getting 480kW out of this, instead of the expected 960kW.
I suspect some kind of hidden 50% thing related to something boiler 50% efficiency something, but I really don't know.

Does not appear to effect the vanilla fusion reactor, or Solar Panels.
Using this on an armor-item to check ontick.
Getting only 480,000 instead of 960,000 as expected.

Code: Select all

if (armor.valid_for_read) then
					local grid = armor.grid
					if (grid ~= nil) and (grid.valid) then -- Check for grid existence.
						if (game.tick % 60) == 0 then
							local energy = grid.available_in_batteries
							globalPrint(grid.available_in_batteries - modularArmor.energyData.lastEnergy)
							modularArmor.energyData.lastEnergy = energy
						
						end
                    else
                    end
                else
                end

Code: Select all

  {
    type = "generator-equipment",
    name = "fusion-reactor-equipment",
    sprite =
    {
      filename = "__base__/graphics/equipment/fusion-reactor-equipment.png",
      width = 128,
      height = 128,
      priority = "medium"
    },
    shape =
    {
      width = 4,
      height = 4,
      type = "full"
    },
	burner =
	{
	  fuel_category = "nuclear",
	  effectivity = 1.00,
	  fuel_inventory_size = 1,
	  burnt_inventory_size = 1
	},
    energy_source =
    {
      type = "electric",
      usage_priority = "primary-output"
    },
		
	power = "960kW",
	categories = {"armor"},
  },

To test, Start game with both mods enabled.
Use tech and recipe cheats.

Craft modular armor.
Install burner generator. fill with fuel.
Install battery.

Observe power change per second as debug message. Is 50,000 instead of 100,000.

Re: [Rseding91] Burner Equipment Power production 50% expected

Posted: Thu May 11, 2017 5:56 pm
by Rseding91
The reason it's only transferring half of what you expect is you need to is because the transfer speed is limited to the "power" value of the generator equipment prototype. If you double that (you have 100kW) it will generate at twice the rate.

The efficiency is the efficiency you set in the burner definition (you gave 1) so either way you get the same energy but it just generates faster.

Re: [Rseding91] Burner Equipment Power production 50% expected

Posted: Thu May 11, 2017 8:44 pm
by Ranakastrasz
Uhm, I have it set to 100, and it transfers at a rate of 50. I am not sure I understand your explanation.

The other one is set to 960, and transfers/produces at a rate of 480.

Hence I am pretty sure this IS a bug.

Re: [Rseding91] Burner Equipment Power production 50% expected

Posted: Thu May 11, 2017 10:07 pm
by Rseding91
You set it to 100kW and are reading energy in Joules.

Re: [Rseding91] Burner Equipment Power production 50% expected

Posted: Thu May 11, 2017 10:58 pm
by Ranakastrasz
Yes, I set it to 100kw. Not really, I am reading the change over 60 ticks, which means it is in Watts. 60 ticks is a second. I measured the change over 60 ticks, so it is joules per second. one joule per second is a watt.
Hence, 1000 Watts is a Kilowatt.
Hence, 100 Kilowatts should be printing out a constant stream of 100,000, and not 50,000

Hence, 100Kw should be 100,000, not 50,000
And 960Kw should print 960,000 not 480,000

I am pretty sure I didn't screw up with my display script, since it gives exactly 10,000 for solar panels during the day and 750,000 for Fusion reactor, if I don't enable my mod. However, if I try it with burner equipment that is running, (And I made sure it had fuel and everything) it produces precicely 50% of the value the tooltip claims it should. It takes twice as long to charge, produce half as much, etc, etc.

Re: [Rseding91] Burner Equipment Power production 50% expected

Posted: Thu May 11, 2017 11:34 pm
by StoneLegion
Rseding91 I think the bug is related to steam boilers? Hes adding in a fission reactors, etc with fuel. But they seem to output 50% of the power. I think it might be releated to how the boiler works not sure if it's a bug with the API or just the mod. But yeah it seems to be a boiler thing.

Re: [Rseding91] Burner Equipment Power production 50% expected

Posted: Fri May 12, 2017 1:33 am
by Rseding91
Ahhh... I see what's happening.The burner transfers the full amount (which is what I was looking at) but it only does it every other tick if transferring the energy fills up the generator equipment.

It's fixed now for 0.15.11.

Re: [Rseding91] Burner Equipment Power production 50% expected

Posted: Fri May 12, 2017 1:35 am
by Ranakastrasz
Oh!.
So it has a hidden internal power buffer which has capacity equal to one tick of production. First tick, it produces, but since it didn't have power at the start of the tick, it sends nothing. Then, second tick, it sends everything, but since it was full at the start of the tick it doesn't produce.

Am I close?


Thanks for the fix.

Re: [Rseding91] Burner Equipment Power production 50% expected

Posted: Fri May 12, 2017 2:00 am
by StoneLegion
Glad to hear it! Thanks.