fix: 改进代码

This commit is contained in:
2026-01-04 04:46:19 +08:00
parent c585c79e73
commit 65486794b7
34 changed files with 87 additions and 1570 deletions

View File

@@ -3,6 +3,7 @@ import heurams.kernel.particles as pt
from heurams.services.textproc import truncate
from pathlib import Path
import time
repo = repolib.Repo.create_from_repodir(Path("./test_repo"))
alist = list()
print(repo.ident_index)
@@ -17,38 +18,39 @@ for i in repo.ident_index:
input()
a = pt.Atom(n, e, repo.orbitic_data)
alist.append(a)
#e.activate()
#e.revisor(5, True)
# e.activate()
# e.revisor(5, True)
print(repr(a))
# print(repr(e))
print(repo)
input()
import heurams.kernel.reactor as rt
ph: rt.Phaser = rt.Phaser(alist)
print(ph)
pr: rt.Procession = ph.current_procession() # type: ignore
pr: rt.Procession = ph.current_procession() # type: ignore
print(pr)
pr.forward()
print(pr)
pr.forward() # 如果过界了?
print(pr) # 静默设置状态 无报错
pr.forward() # 如果过界了?
print(pr) # 静默设置状态 无报错
pr.forward()
print(pr)
pr = ph.current_procession() # type: ignore # 下一个队列
pr = ph.current_procession() # type: ignore # 下一个队列
print(pr)
pr.forward()
print(pr)
pr.append() # 如果记忆失败了?
pr.append() # 如果记忆失败了?
print(pr)
pr.forward()
pr.append() # 如果记忆失败了?
pr.append() # 如果记忆失败了?
pr.append() # 如果记忆失败了?
pr.append() # 如果记忆失败了?
pr.append() # 如果记忆失败了?
pr.append() # 如果记忆失败了?
pr.append() # 如果记忆失败了?
pr.append() # 如果记忆失败了?
pr.append() # 如果记忆失败了?
pr.append() # 如果记忆失败了?
# 重复项目只会占据一个车尾
print(pr)
pr.forward()
print(pr)
pr = ph.current_procession() # type: ignore
pr = ph.current_procession() # type: ignore
print(pr)