Skip to content

Commit

Permalink
Update handling of logical statements in propensities.
Browse files Browse the repository at this point in the history
  • Loading branch information
Munsky committed Feb 2, 2024
1 parent d936f30 commit a8add7a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/+ssit/@Propensity/Propensity.m
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@
n(3)=n(3)+1;
logicTerms.logX{n(3),1} = logE;
counter = counter+1;
logicTerms.logX{n(3),2} = ['logE',num2str(counter)];
logicTerms.logX{n(3),2} = ['logX',num2str(counter)];
stNew = strrep(stNew,logE,['(',logicTerms.logX{n(3),2},')']);
end
end
Expand Down Expand Up @@ -720,8 +720,8 @@
end
if isfield(logicTerms{i},'logX')
% state_dep = true;
for j=1:size(logicTerms.logX,1)
exprStr=strrep(exprStr,logicTerms{i}.logX{j,2},logicTerms.logX{j,1});
for j=1:size(logicTerms{i}.logX,1)
exprStr=strrep(exprStr,logicTerms{i}.logX{j,2},logicTerms{i}.logX{j,1});
end
end
if isfield(logicTerms{i},'logE')
Expand Down

0 comments on commit a8add7a

Please sign in to comment.