Skip to content

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

@chris-aeviator

Description

@chris-aeviator

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

```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions