Refactored DpMatrices
partial multi opt