Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add comments to structurator #80

Merged
merged 8 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions sampo/scheduler/genetic/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def decode(work_index):
# declare current checkpoint index
ckpt_idx = 0
start_time = assigned_parent_time - 1
pred_start_time = start_time - 1
prev_start_time = start_time - 1

def work_scheduled(args) -> bool:
idx, (work_idx, node, worker_team, contractor, exec_time, work_spec) = args
Expand Down Expand Up @@ -209,13 +209,13 @@ def work_scheduled(args) -> bool:
while len(enumerated_works_remaining) > 0:
if ckpt_idx < len(work_timeline):
start_time = work_timeline[ckpt_idx]
if pred_start_time == start_time:
if prev_start_time == start_time:
ckpt_idx += 1
continue
if start_time.is_inf():
# break because schedule already contains Time.inf(), that is incorrect schedule
break
pred_start_time = start_time
prev_start_time = start_time
else:
start_time += 1

Expand Down
1 change: 0 additions & 1 deletion sampo/structurator/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from sampo.structurator.base import graph_restructuring, STAGE_SEP
from sampo.structurator.graph_insertion import graph_in_graph_insertion
from sampo.structurator.light_modifications import work_graph_ids_simplification
from sampo.structurator.base import graph_restructuring
Timotshak marked this conversation as resolved.
Show resolved Hide resolved
Loading
Loading