-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
giordano2020 #11
Merged
Merged
giordano2020 #11
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ChrisRackauckas
added a commit
that referenced
this pull request
Jan 30, 2023
I grabbed from #11. Looks reasonable enough to start writing the sensitivity analysis parts
xcur=[200 20 1 2 0]'/60000000;
x=xcur;
L=[-r1(1)+alpha(1)+x(2)/x(1)*beta(1)+x(3)/x(1)*gamma(1)+x(4)/x(1)*delta(1);
x(1)/x(2)*epsilon(1)-r2(1);
x(1)/x(3)*zeta(1)-r3(1);
x(2)/x(4)*eta(1)+x(3)/x(4)*theta(1)-r4(1); 0];
SUScur=(60000000-200-20-1-2)/60000000;
GU=0;
MO=7/60000000;
GUD=0;
GUDvac=0;
currentcases=0;
%%%%%%%%%%%% simulation
for k=1:N_measures-1
for i=(T_measures(k)-1)/T_camp+1:(T_measures(k+1)-1)/T_camp
vacc(i)=vac(k);
if trigger==1
vacc(i)=max([(1-currentcases*60)*VACC(i,vvv) 0]);
%vacc(i)=max([(phi-currentcases*60*phi)*vac(k)/phi 0]);
end
if giuseppe==1
vacc(i)=VACC(i,vvv);
end
if phiaffine==0
SUS=SUScur-T_camp*SUScur*(CS(k,:)*xcur+vacc(i)); %\phi*S
else
SUS=SUScur-T_camp*SUScur*(CS(k,:)*xcur)-T_camp*vacc(i);% \phi
end
x=xcur+T_camp*(FF(:,:,k)+b*SUScur*CS(k,:))*xcur;
L=inv(diag(xcur))*(FF(:,:,k)+b*SUScur*CS(k,:))*xcur;
I(i)=x(1);
D(i)=x(2);
A(i)=x(3);
R(i)=x(4);
T(i)=x(5);
S(i)=SUS;
NP(i)=epsilon(k)*I(i)+(theta(k)+mu(k))*A(i);
R0cur(i)=R0(k);
q(i)=alpha(k)+beta(k)*D(i)/I(i)+gamma(k)*A(i)/I(i)+delta(k)*R(i)/I(i);
r1cur(i)=r1(k);
YS(i)=CS(k,:)*x;
if phiaffine==0
YH(i)=CH(k,:)*x+vacc(i)*SUScur; %\phi*S
YHDvac(i)=CHdiag(k,:)*x+vacc(i)*SUScur;
else
YH(i)=CH(k,:)*x+vacc(i); %phi
YHDvac(i)=CHdiag(k,:)*x+vacc(i);
end
YHD(i)=CHdiag(k,:)*x;
YE(i)=CE(k,:)*x;
GU=GU+T_camp*YH(i);
GUD=GUD+T_camp*YHD(i);
GUDvac=GUDvac+T_camp*YHDvac(i);
MO=MO+T_camp*YE(i);
H(i)=GU;
HD(i)=GUD;
HDvac(i)=GUDvac;
E(i)=MO;
SUScur=SUS;
xcur=x;
currentcases=R(i)+T(i)+D(i);
LI(i)=L(1);
LD(i)=L(2);
LA(i)=L(3);
LR(i)=L(4);
LT(i)=L(5);
REFF(i)=(alpha(k)+beta(k)*x(2)/x(1)+gamma(k)*x(3)/x(1)+delta(k)*x(4)/x(1))*SUS/r1(k);
REFFcur(i)=(alpha(k)+beta(k)*x(2)/x(1)+gamma(k)*x(3)/x(1)+delta(k)*x(4)/x(1))/r1(k);
end
end this is from simulation.m in the V model. if you squint really hard you can sort of see a model |
not sure what i did, but this model does show us peaking at 50 days with ~50 % of the populatiuon. this is a lot more sane than the first model |
@ChrisRackauckas ready |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@paulflang
dont merge
this script requires SciML/SBMLToolkit.jl#108