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

ValueError: All matrices must have the same intervals on example notebook #6

Open
chris-aeviator opened this issue Mar 27, 2024 · 0 comments

Comments

@chris-aeviator
Copy link

the task Example 3 fails


/lib/python3.11/site-packages/factryengine/scheduler/heuristic_solver/task_allocator.py:62, in TaskAllocator.allocate_task(self, resource_windows_dict, assignments, constraints, task_duration)
     60 # add constraints to allocated windows
     61 if constraints and assignments:
---> 62     constraints_matrix_trimmed = Matrix.trim_end(
     63         original_matrix=constraints_matrix, trim_matrix=solution_matrix
     64     )
     65     allocated_windows.update(
     66         self._get_resource_intervals(
     67             matrix=constraints_matrix_trimmed,
     68         )
     69     )
     71 return allocated_windows

/lib/python3.11/site-packages/factryengine/scheduler/heuristic_solver/matrix.py:62, in Matrix.trim_end(cls, original_matrix, trim_matrix)
     59 # Check if intervals are the same
     61 if not np.array_equal(new_intervals, trim_matrix.intervals):
---> 62     raise ValueError("All matrices must have the same intervals")
     64 return cls(
     65     resource_ids=original_matrix.resource_ids,
     66     intervals=new_intervals,
   (...)
     69     ],
     70 )

ValueError: All matrices must have the same intervals

```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant