Implement safety checker that calculates the needs by ensuring that ``max_claim[i][j] - alloc_table[i][j] <= avail[j]``
(self)
| 74 | ) |
| 75 | |
| 76 | def __need(self) -> list[list[int]]: |
| 77 | """ |
| 78 | Implement safety checker that calculates the needs by ensuring that |
| 79 | ``max_claim[i][j] - alloc_table[i][j] <= avail[j]`` |
| 80 | """ |
| 81 | return [ |
| 82 | list(np.array(self.__maximum_claim_table[i]) - np.array(allocated_resource)) |
| 83 | for i, allocated_resource in enumerate(self.__allocated_resources_table) |
| 84 | ] |
| 85 | |
| 86 | def __need_index_manager(self) -> dict[int, list[int]]: |
| 87 | """ |
no outgoing calls
no test coverage detected