更新 providers
This commit is contained in:
33
src/heurams/kernel/algorithms/base.py
Normal file
33
src/heurams/kernel/algorithms/base.py
Normal file
@@ -0,0 +1,33 @@
|
||||
import heurams.services.timer as timer
|
||||
from typing import TypedDict
|
||||
|
||||
class BaseAlgorithm:
|
||||
algo_name = "BaseAlgorithm"
|
||||
|
||||
class AlgodataDict(TypedDict):
|
||||
efactor: float
|
||||
real_rept: int
|
||||
rept: int
|
||||
interval: int
|
||||
last_date: int
|
||||
next_date: int
|
||||
is_activated: int
|
||||
last_modify: float
|
||||
|
||||
defaults = {
|
||||
'real_rept': 0,
|
||||
'rept': 0,
|
||||
'interval': 0,
|
||||
'last_date': 0,
|
||||
'next_date': 0,
|
||||
'is_activated': 0,
|
||||
'last_modify': timer.get_timestamp()
|
||||
}
|
||||
|
||||
@classmethod
|
||||
def revisor(cls, algodata: dict, feedback: int = 5, is_new_activation: bool = False):
|
||||
pass
|
||||
|
||||
@classmethod
|
||||
def is_due(cls, algodata):
|
||||
return 1
|
||||
Reference in New Issue
Block a user