Skip to content

Commit 264a42a

Browse files
author
fabian.froehlich
committed
fixes for merge
1 parent 8e3f5d5 commit 264a42a

File tree

8 files changed

+28
-50
lines changed

8 files changed

+28
-50
lines changed

.gitignore

Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -49,32 +49,6 @@ index.html
4949

5050
AMICI.mlappinstall
5151

52-
examples/example_1/simulate_model_example_1.m
53-
54-
examples/example_2/simulate_model_example_2.m
55-
56-
examples/example_3/simulate_model_example_3.m
57-
58-
examples/example_4/simulate_model_example_4.m
59-
60-
examples/example_5/simulate_model_example_5.m
61-
62-
examples/example_6/simulate_model_example_6.m
63-
64-
examples/geneExpression/simulate_geneExpression.m
65-
66-
examples/example_1/html/*
67-
68-
examples/example_2/html/*
69-
70-
examples/example_3/html/*
71-
72-
examples/example_4/html/*
73-
74-
examples/example_5/html/*
75-
76-
examples/example_6/html/*
77-
7852
*.mat
7953

8054
mtoc/makeExampleDoc.m
@@ -170,3 +144,9 @@ examples/example_dirac_adjoint/dxdotdp_model_dirac_adjoint.m
170144
examples/example_adjoint/J_model_adjoint.m
171145

172146
examples/example_adjoint/dxdotdp_model_adjoint.m
147+
148+
examples/example_jakstat_adjoint_hvp/simulate_model_jakstat_adjoint_hvp.m
149+
150+
examples/example_dirac_adjoint_hessVecProd/simulate_model_dirac_adjoint_hessVecProd.m
151+
152+
examples/example_adjoint_hessian/simulate_model_adjoint_hessian.m

@amimodel/amimodel.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292

9393
% counter that allows enforcing of recompilation of models after
9494
% code changes
95-
compver = 16;
95+
compver = 18;
9696
end
9797

9898
properties ( GetAccess = 'public', SetAccess = 'public' )

@amimodel/makeEvents.m

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ function makeEvents( this )
200200
trigger{ievent} = sym(symchar);
201201
end
202202
end
203-
203+
204204
% update to prevent dirac functions.
205205
for ievent = 1:nevent
206206
dtriggerdt(ievent) = diff(trigger{ievent},sym('t')) + jacobian(trigger{ievent},this.sym.x)*this.sym.xdot(:);
@@ -242,23 +242,14 @@ function makeEvents( this )
242242

243243
this.event = amievent.empty();
244244

245-
246-
if(~isfield(this.sym,'Jz'))
247-
this.sym.Jz = sym(0);
248-
for iz = 1:length([this.event.z])
249-
this.sym.Jz = this.sym.Jz + sym(['log(2*pi*sigma_z_' num2str(iz) '^2) + ((z_' num2str(iz) '-mz_' num2str(iz) ')/sigma_z_' num2str(iz) ')^2']);
250-
end
251-
252245
% update events
253246
for ievent = 1:nevent
254-
this.event(ievent) = amievent(trigger{ievent},bolus{ievent}(:),z{ievent});
255-
% do not add a (:) after z{ievent} this will transform an
256-
% [ empty sym ] into Empty sym: 0-by-1 which will lead to a
257-
% zero entry if we apply [this.event.z]
258-
this.event(ievent) = this.event(ievent).setHflag(hflags(:,ievent));
259-
247+
this.event(ievent) = amievent(trigger{ievent},bolus{ievent}(:),z{ievent});
248+
% do not add a (:) after z{ievent} this will transform an
249+
% [ empty sym ] into Empty sym: 0-by-1 which will lead to a
250+
% zero entry if we apply [this.event.z]
251+
this.event(ievent) = this.event(ievent).setHflag(hflags(:,ievent));
260252
end
261-
262253
end
263254

264255
if(~isfield(this.sym,'sigma_z'))
@@ -271,7 +262,7 @@ function makeEvents( this )
271262
if(~isfield(this.sym,'Jz'))
272263
this.sym.Jz = sym(0);
273264
for iz = 1:length([this.event.z])
274-
this.sym.Jz = this.sym.Jz + sym(['log(2*pi*sdz_' num2str(iz) '^2) + ((z_' num2str(iz) '-mz_' num2str(iz) ')/sdz_' num2str(iz) ')^2']);
265+
this.sym.Jz = this.sym.Jz + sym(['log(2*pi*sigma_z_' num2str(iz) '^2) + ((z_' num2str(iz) '-mz_' num2str(iz) ')/sigma_z_' num2str(iz) ')^2']);
275266
end
276267
end
277268

examples/example_adjoint_hessian/simulate_model_adjoint_hessian.m

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
% simulate_model_adjoint_hessian.m is the matlab interface to the cvodes mex
22
% which simulates the ordinary differential equation and respective
33
% sensitivities according to user specifications.
4+
% this routine was generated using AMICI commit 8e3f5d50faeacd3f16d95839fea1182ef5417611 in branch stable in repo https://github.com/FFroehlich/AMICI.
45
%
56
% USAGE:
67
% ======
@@ -71,8 +72,8 @@
7172
% 1: Hermite (DEFAULT for problems without discontinuities)
7273
% 2: Polynomial (DEFAULT for problems with discontinuities)
7374
% .ordering ... online state reordering.
74-
% 0: AMD reordering
75-
% 1: COLAMD reordering (default)
75+
% 0: AMD reordering (default)
76+
% 1: COLAMD reordering
7677
% 2: natural reordering
7778
%
7879
% Outputs:
@@ -218,6 +219,7 @@
218219
sol.sx = bsxfun(@times,sol.sx,permute(theta(options_ami.sens_ind),[3,2,1])*log(10));
219220
sol.sy = bsxfun(@times,sol.sy,permute(theta(options_ami.sens_ind),[3,2,1])*log(10));
220221
sol.sz = bsxfun(@times,sol.sz,permute(theta(options_ami.sens_ind),[3,2,1])*log(10));
222+
sol.srz = bsxfun(@times,sol.srz,permute(theta(options_ami.sens_ind),[3,2,1])*log(10));
221223
sol.ssigmay = bsxfun(@times,sol.ssigmay,permute(theta(options_ami.sens_ind),[3,2,1])*log(10));
222224
sol.ssigmayz = bsxfun(@times,sol.ssigmaz,permute(theta(options_ami.sens_ind),[3,2,1])*log(10));
223225
end

examples/example_dirac_adjoint_hessVecProd/simulate_model_dirac_adjoint_hessVecProd.m

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
% simulate_model_dirac_adjoint_hessVecProd.m is the matlab interface to the cvodes mex
22
% which simulates the ordinary differential equation and respective
33
% sensitivities according to user specifications.
4+
% this routine was generated using AMICI commit 8e3f5d50faeacd3f16d95839fea1182ef5417611 in branch stable in repo https://github.com/FFroehlich/AMICI.
45
%
56
% USAGE:
67
% ======
@@ -71,8 +72,8 @@
7172
% 1: Hermite (DEFAULT for problems without discontinuities)
7273
% 2: Polynomial (DEFAULT for problems with discontinuities)
7374
% .ordering ... online state reordering.
74-
% 0: AMD reordering
75-
% 1: COLAMD reordering (default)
75+
% 0: AMD reordering (default)
76+
% 1: COLAMD reordering
7677
% 2: natural reordering
7778
%
7879
% Outputs:
@@ -229,6 +230,7 @@
229230
sol.sx = bsxfun(@times,sol.sx,permute(theta(options_ami.sens_ind),[3,2,1])*log(10));
230231
sol.sy = bsxfun(@times,sol.sy,permute(theta(options_ami.sens_ind),[3,2,1])*log(10));
231232
sol.sz = bsxfun(@times,sol.sz,permute(theta(options_ami.sens_ind),[3,2,1])*log(10));
233+
sol.srz = bsxfun(@times,sol.srz,permute(theta(options_ami.sens_ind),[3,2,1])*log(10));
232234
sol.ssigmay = bsxfun(@times,sol.ssigmay,permute(theta(options_ami.sens_ind),[3,2,1])*log(10));
233235
sol.ssigmayz = bsxfun(@times,sol.ssigmaz,permute(theta(options_ami.sens_ind),[3,2,1])*log(10));
234236
end

examples/example_events/model_events_syms.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
% set the parametrisation of the problem options are 'log', 'log10' and
44
% 'lin' (default).
55
model.param = 'log10';
6+
67
%%
78
% STATES
89

examples/example_jakstat_adjoint_hvp/example_jakstat_adjoint_hvp.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ function example_jakstat_adjoint_hvp()
22

33
% compile the model
44
[exdir,~,~]=fileparts(which('example_jakstat_adjoint_hvp.m'));
5-
% amiwrap('model_jakstat_adjoint_hvp','model_jakstat_adjoint_hvp_syms',exdir,2)
5+
amiwrap('model_jakstat_adjoint_hvp','model_jakstat_adjoint_hvp_syms',exdir,2)
66
num = xlsread(fullfile(exdir,'pnas_data_original.xls'));
77

88
D.t = num(:,1);

examples/example_jakstat_adjoint_hvp/simulate_model_jakstat_adjoint_hvp.m

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
% simulate_model_jakstat_adjoint_hvp.m is the matlab interface to the cvodes mex
22
% which simulates the ordinary differential equation and respective
33
% sensitivities according to user specifications.
4+
% this routine was generated using AMICI commit 8e3f5d50faeacd3f16d95839fea1182ef5417611 in branch stable in repo https://github.com/FFroehlich/AMICI.
45
%
56
% USAGE:
67
% ======
@@ -71,8 +72,8 @@
7172
% 1: Hermite (DEFAULT for problems without discontinuities)
7273
% 2: Polynomial (DEFAULT for problems with discontinuities)
7374
% .ordering ... online state reordering.
74-
% 0: AMD reordering
75-
% 1: COLAMD reordering (default)
75+
% 0: AMD reordering (default)
76+
% 1: COLAMD reordering
7677
% 2: natural reordering
7778
%
7879
% Outputs:
@@ -226,6 +227,7 @@
226227
sol.sx = bsxfun(@times,sol.sx,permute(theta(options_ami.sens_ind),[3,2,1])*log(10));
227228
sol.sy = bsxfun(@times,sol.sy,permute(theta(options_ami.sens_ind),[3,2,1])*log(10));
228229
sol.sz = bsxfun(@times,sol.sz,permute(theta(options_ami.sens_ind),[3,2,1])*log(10));
230+
sol.srz = bsxfun(@times,sol.srz,permute(theta(options_ami.sens_ind),[3,2,1])*log(10));
229231
sol.ssigmay = bsxfun(@times,sol.ssigmay,permute(theta(options_ami.sens_ind),[3,2,1])*log(10));
230232
sol.ssigmayz = bsxfun(@times,sol.ssigmaz,permute(theta(options_ami.sens_ind),[3,2,1])*log(10));
231233
end

0 commit comments

Comments
 (0)