MCPcopy Create free account
hub / github.com/pyfa-org/Pyfa / simulateCap

Method simulateCap

eos/saveddata/fit.py:1491–1501  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1489 return drains, capUsed, capAdded
1490
1491 def simulateCap(self):
1492 drains, self.__capUsed, self.__capRecharge = self.__generateDrain()
1493 self.__capRecharge += self.calculateCapRecharge()
1494 sim = self.__runCapSim(drains=drains)
1495 if sim is not None:
1496 capState = (sim.cap_stable_low + sim.cap_stable_high) / (2 * sim.capacitorCapacity)
1497 self.__capStable = capState > 0
1498 self.__capState = min(100, capState * 100) if self.__capStable else sim.t / 1000.0
1499 else:
1500 self.__capStable = True
1501 self.__capState = 100
1502
1503 def getCapSimData(self, startingCap):
1504 if startingCap not in self.__savedCapSimData:

Callers 4

capStableMethod · 0.95
capStateMethod · 0.95
capUsedMethod · 0.95
capRechargeMethod · 0.95

Calls 3

__generateDrainMethod · 0.95
calculateCapRechargeMethod · 0.95
__runCapSimMethod · 0.95

Tested by

no test coverage detected