diff --git a/Scripts/assignment/mock_assignment.py b/Scripts/assignment/mock_assignment.py index 2992eceb..b8edee69 100644 --- a/Scripts/assignment/mock_assignment.py +++ b/Scripts/assignment/mock_assignment.py @@ -157,10 +157,9 @@ def _get_matrices(self, Subtype (car_work/truck/inv_time/...) : numpy 2-d matrix Matrix of the specified type """ - matrix_list = [ass_class for ass_class in assignment_classes - if mtx_type in param.emme_matrices.get(ass_class, [])] with self.matrices.open( - mtx_type, self.name, transport_classes=matrix_list) as mtx: + mtx_type, self.name, transport_classes=[]) as mtx: + matrix_list = set(assignment_classes) & set(mtx.matrix_list) matrices = {mode: mtx[mode] for mode in matrix_list} for mode in matrices: if numpy.any(matrices[mode] > 1e10):