Distribution Ratio

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Distribution Ratio

Porag
Hi

When I am printing the DistributionTransaction in the broker handler I am getting 0 for KWh in my local games.

For example, I have the below code:

double dtcharge = dt.getCharge();
double dtKWh = dt.getKWh();
System.out.println("Distribution tx: $" + dtcharge + " KWh " + dtKWh);

And I am getting this in the console:
Distribution tx: $-865.9 KWh 0.0

Why am I getting 0 when I call getKWh()? Is this a bug?

Thanks in advance
Porag
Reply | Threaded
Open this post in threaded view
|

Re: Distribution Ratio

j.e.collins
Hello, Porag -
Porag wrote
When I am printing the DistributionTransaction in the broker handler I am getting 0 for KWh in my local games.
This is because the kWh is not computed when the Distribution Utility is not configured to charge for energy transport. Starting in 2016, the DU no longer charges for energy transport, but rather a fixed amount per customer (more for large customers) and an amount for contributions to demand peaks, assessed once/week.

See Section 7 of the game spec for details on this.

Hope this helps.

John