pyHarm.StopCriterion.ABCStopCriterion

Classes

ABCStopCriterion

Abstract class for the stopping criterion. Any stopping criterion code

Module Contents

class pyHarm.StopCriterion.ABCStopCriterion.ABCStopCriterion(bounds: list[float, float], ds_min: float, **kwargs)

Bases: abc.ABC

Abstract class for the stopping criterion. Any stopping criterion code shall inherit from this class.

Parameters:
  • bounds (list[float, float]) – A list of upper and lower bounds.

  • ds_min – The minimum step size.

  • **kwargs – Additional keyword arguments.

Raises:
  • NotImplementedError – If the subclass lacks the factory_keyword class attribute.

  • TypeError – If the factory_keyword is not a string value.

default_timeout
property factory_keyword: str
Abstractmethod:

Returns: str: keyword that is used to call the creation of this class in the system factory.

puls_inf
puls_sup
epsilon_bounds
bound_inf
bound_sup
ds_min
timeout_status
timeout_value
T0
_convert_to_sec(timeout_str: str) float
is_timeout_exceeded() bool

Check if the current time has exceeded the timeout period.

Returns:

True if current time is over the timeout period, False otherwise.

Return type:

bool

abstractmethod getStopCriterionStatus(sol: pyHarm.Solver.SystemSolution, sollist: list, **kwargs) bool

Abstract method to get the stop criterion status.

Parameters:
  • sol (SystemSolution) – A SystemSolution object.

  • sollist (list) – A list of solutions.

  • **kwargs – Additional keyword arguments.

Raises:

None.