Skip to content

Commit

Permalink
Fix bug causing matrix dimension mismatch in state expansion when cus…
Browse files Browse the repository at this point in the history
…tom constraints are used.
  • Loading branch information
Munsky committed Oct 22, 2024
1 parent 776bd1a commit d71de53
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/+ssit/@FspMatrixTerm/FspMatrixTerm.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d71de53

Please sign in to comment.