Skip to content

Commit

Permalink
Power off a network in case it losses its local buffer. (AppliedEnerg…
Browse files Browse the repository at this point in the history
…istics#3703)

This better indicates power issue with dynamic consumption like
extracting/inserting items into a network. E.g. the terminals will
shutdown, no light/channel/etc indicators.

Due to the networks trying to extract from the largest possible energy
storage first, the network buffer will be used as last option after
energy cells or controllers.

Potentially needs evaluation in case of adhoc networks with a high
transfer rate locally. Increasing the local buffer might be an idea or
have it scale with the amount of local gridnodes. As long as it does not
invalidates energy cells.
  • Loading branch information
yueh committed Sep 2, 2018
1 parent b1ac0ad commit fdcba13
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/java/appeng/me/cache/EnergyGridCache.java
Expand Up @@ -678,6 +678,12 @@ private void removeCurrentAEPower( double amount )
{
EnergyGridCache.this.myGrid.postEvent( new MENetworkPowerStorage( this, PowerEventType.REQUEST_POWER ) );
}

if( this.stored < 0.01 )
{
EnergyGridCache.this.ticksSinceHasPowerChange = 0;
EnergyGridCache.this.publicPowerState( false, EnergyGridCache.this.myGrid );
}
}
}
}

0 comments on commit fdcba13

Please sign in to comment.