A-SW Hub / Repositories
Local Gitea · READ ONLY
← 저장소 Repositories
REPOSITORY

ontariotech/task-allocation Private

[참조 MVP] 다중 농기계 작업 배분 A-SW — 농기계 용량을 고려해 작업구역을 예상 완료시간이 최소가 되도록 배분합니다.

https://git.agrithing.ai/ontariotech/task-allocation.git
7 commits
1 items · main
·/ tests/test_component.py
python · 606 B · fb2821d Download
from __future__ import annotationsimport jsonimport unittestfrom pathlib import Pathfrom asw_component import executeROOT = Path(__file__).resolve().parents[1]class ComponentTest(unittest.TestCase):    def test_reference_scenario(self):        payload = json.loads((ROOT / "examples/input.json").read_text(encoding="utf-8"))        result = execute(payload)        self.assertEqual(len(result["allocations"]), 2)        self.assertEqual(sum(len(a["tasks"]) for a in result["allocations"]), 3)        self.assertLessEqual(result["makespan"], 5)if __name__ == "__main__":    unittest.main()