HolegPowerFlowContext.java 502 B

123456789101112131415161718192021
  1. package holeg;
  2. import holeg.model.Grid;
  3. import java.util.ArrayList;
  4. import java.util.List;
  5. public class HolegPowerFlowContext {
  6. public PowerFlowSettings settings = PowerFlowSettings.getDefault();
  7. public List<Grid> lastSolvedGrids = new ArrayList<>();
  8. public Thread solverJob;
  9. public float solverTimeMilliseconds;
  10. public void clearCache() {
  11. lastSolvedGrids.clear();
  12. }
  13. public boolean isSolving() {
  14. return solverJob != null && solverJob.isAlive();
  15. }
  16. }