From d71de5356ee8feef2f35df7bcc3e18b01f7fd5c8 Mon Sep 17 00:00:00 2001 From: Munsky Date: Tue, 22 Oct 2024 11:32:19 -0600 Subject: [PATCH] Fix bug causing matrix dimension mismatch in state expansion when custom constraints are used. --- src/+ssit/@FspMatrixTerm/FspMatrixTerm.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/+ssit/@FspMatrixTerm/FspMatrixTerm.m b/src/+ssit/@FspMatrixTerm/FspMatrixTerm.m index d26a3ba..9eb2e64 100644 --- a/src/+ssit/@FspMatrixTerm/FspMatrixTerm.m +++ b/src/+ssit/@FspMatrixTerm/FspMatrixTerm.m @@ -304,9 +304,9 @@ k = 1; for c = 1:state_set.numConstraints ninsert = nnz(state_set.outboundTransitions(:, c + state_set.numConstraints*(ireaction-1))); - isinks(k:k+ninsert-1) = n_states + c; - jsinks(k:k+ninsert-1) = find(state_set.outboundTransitions(:,c + state_set.numConstraints*(ireaction-1))); - aijsinks(k:k+ninsert-1) = prop_val(jsinks(k:k+ninsert-1))./n_constrs_failed(jsinks(k:k+ninsert-1)); + isinks(k:k+ninsert-1,1) = n_states + c; + jsinks(k:k+ninsert-1,1) = find(state_set.outboundTransitions(:,c + state_set.numConstraints*(ireaction-1))); + aijsinks(k:k+ninsert-1,1) = prop_val(jsinks(k:k+ninsert-1))./n_constrs_failed(jsinks(k:k+ninsert-1)); k = k + ninsert; end