Skip to content

Commit

Permalink
reverted merge
Browse files Browse the repository at this point in the history
  • Loading branch information
fabian.froehlich committed Mar 17, 2016
1 parent 2eb3bae commit 48b65ad
Show file tree
Hide file tree
Showing 80 changed files with 192 additions and 90,232 deletions.
30 changes: 20 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@

*.o

doc/*

debug_amici/*

models/*

doc/*
Expand All @@ -17,7 +23,7 @@ images/*

*.mexmaci64

*.o
*.eps

*.js

Expand Down Expand Up @@ -61,24 +67,28 @@ examples/example_6/html/*

*.mat

mtoc/makeExampleDoc.m

mtoc/makeDocumentation.m

examples/example_5/example_model_5_paper.m

*.m~
mtoc/makeDocumentation.m

*.plist
mtoc/makeDocumentation.m

*.pbxproj
index.html

*.xcworkspacedata
*.js

*.xcuserstate
*.template

*.xcsettings
*.dox

*.xcbkptlist
*.json

*.xcscheme
examples/geneExpression/simulate_geneExpression.m

*.xccheckout
*.m~

*.plist
81 changes: 24 additions & 57 deletions @SBMLode/SBMLode.m
Original file line number Diff line number Diff line change
@@ -1,71 +1,38 @@
%
% @file amioption
% @brief definition of amioption class
%
classdef SBMLode < handle
%SBMLODE carries all information about the differential equation
%defined by a SBML model definition file. This class acts as an
%interface between SBML files and \ref amimodel
%SBMLMODEL Summary of this class goes here
% Detailed explanation goes here

properties
% vector of non-constant and non-boundary states @type symbolic
state = sym([]);
% vector of guessed observables @type symbolic
observable = sym([]);
% vector of guessed observable names @type symbolic
observable_name = sym([]);
% vector of SBML parameters @type symbolic
param = sym([]);
% vector of amimodel parameters @type symbolic
parameter = sym([]);
% vector of constant states @type symbolic
constant = sym([]);
% vector of compartments @type symbolic
compartment = sym([]);
% vector of compartment volumes @type symbolic
volume = sym([]);
% vector of initial values for non-constant and non-boundary states @type symbolic
initState = sym([]);
% vector of boundary condition states which are not constant @type symbolic
condition = sym([]);
% vector of reaction fluxes @type symbolic
flux = sym([]);
% matrix of reaction stochiometries @type symbolic
stochiometry = sym([]);
% right hand side of differential equation for states @type symbolic
xdot = sym([]);
% vector of trigger functions for events @type symbolic
trigger = sym([]);
% matrix of event bolus @type symbolic
bolus = sym([]);
% cell array containing the function definition @type cell
funmath = {};
% cell array containing the function arguments @type cell
funarg = {};
% expression for time in the model @type char
time_symbol = char([]);
% nominal parameter value @type sym
pnom = double([]);
% nominal condition value @type sym
knom = double([]);
state@sym;
observable@sym;
observable_name@sym;
param@sym;
parameter@sym;
constant@sym;
reaction@sym;
compartment@sym;
volume@sym;
initState@sym;
condition@sym;
flux@sym;
stochiometry@sym;
xdot@sym;
trigger@sym;
bolus@sym;
funmath@cell;
funarg@cell;
time_symbol@char;
pnom@double;
knom@double;
end

methods
function model = SBMLode(filename)
% constructor of the SBMLode class. This takes the name of an
% SBML definition file and constructs an SBMLode object based
% on the parsed model
%
% Parameters:
% filename: SBML definition file @type char
%
% Return values:
% out: optimized expression @type SBMLode
model.importSBML(filename);
end

importSBML(this,filename)

importSBML(this,filename)
writeAMICI(this,modelname)
end

Expand Down
9 changes: 0 additions & 9 deletions @SBMLode/importSBML.m
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
function importSBML(this,modelname)
% importSBML parses the SBML document and initialises the respective
% \ref SBMLode object accordingly
%
% Parameters:
% modelname: name of the sbml model file, without extension
%
% Return values:
% this: initialised SBMLode object object @type SBMLode

try
model = TranslateSBML([modelname '.sbml']);
catch
Expand Down
9 changes: 0 additions & 9 deletions @SBMLode/writeAMICI.m
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
function writeAMICI(this,modelname)
% importSBML writes the information stored in the SBMLode object into
% an AMICI model definition file
%
% Parameters:
% modelname: target name of the AMICI model definition file, _syms
% will be appended
%
% Return values:
% this: initialised SBMLode object object @type SBMLode
fprintf('writing file ...\n')
fid = fopen([modelname '_syms.m'],'w');

Expand Down
12 changes: 6 additions & 6 deletions @amidata/amidata.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@
% number of conditions/constants
nk=0;
% timepoints of observations
t = double([]);
t@double;
% observations
Y = double([]);
Y@double;
% standard deviation of observations
Sigma_Y = double([]);
Sigma_Y@double;
% event observations
Z = double([]);
Z@double;
% standard deviation of event observations
Sigma_Z = double([]);
Sigma_Z@double;
% experimental condition
condition = double([]);
condition@double
end

methods
Expand Down
24 changes: 5 additions & 19 deletions @amievent/amievent.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,18 @@

properties ( GetAccess = 'public', SetAccess = 'private' )
% the trigger function activates the event on every zero crossing @type symbolic
trigger = sym([]);
trigger@sym;
% the bolus function defines the change in states that is applied on every event occurence @type symbolic
bolus = sym([]);
bolus@sym;
% output function for the event @type symbolic
z = sym([]);
z@sym;
% flag indicating that a heaviside function is present, this helps
% to speed up symbolic computations @type logical
hflag = logical([]);
% to speed up symbolic computations
hflag@logical;
end

methods
function AE = amievent(trigger,bolus,z)
% constructor of the amievent class. this function constructs an event object based on the provided
% trigger function, bolus function and output function
%
% Parameters:
% trigger: trigger fuction, the roots of this function define
% the occurence of the event @type symbolic
% bolus: bolus fuction, this function defines the change in
% the states on event occurences @type symbolic
% z: output function, this expression is evaluated on event
% occurences and returned by the simulation function @type
% symbolic
%
% Return values:
% AM: model definition object
if(~isa(trigger,'sym'))
if(isa(trigger,'double'))
AE.trigger = sym(trigger);
Expand Down
2 changes: 1 addition & 1 deletion @amievent/setHflag.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
% gethflag sets the hflag property.
%
% Parameters:
% hflag: value for the hflag property @type double
% hlfag: value for the hflag property @type double
%
% Return values:
% this: updated event definition object @type amievent
Expand Down
41 changes: 15 additions & 26 deletions @amifun/amifun.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,30 @@

properties ( GetAccess = 'public', SetAccess = 'public' )
% symbolic definition struct @type symbolic
sym;
sym@sym;
% short symbolic string which can be used for the reuse of precomputed values @type symbolic
strsym;
strsym@sym;
% short symbolic string which can be used for the reuse of old values @type symbolic
strsym_old;
strsym_old@sym;
% name of the model @type char
funstr;
funstr@char;
% name of the c variable @type char
cvar;
cvar@char;
% argument string (solver specific) @type char
argstr;
argstr@char;
% argument string (solver unspecific) @type char
fargstr;
fargstr@char;
% dependencies on other functions @type cell
deps;
% nvec dependencies @type cell
nvecs;
deps@cell;
% nvec dependencies
nvecs@cell;
% indicates whether the function is a sensitivity or derivative
% with respect to parameters @type logical
sensiflag;
% with respect to parameters
sensiflag@logical;
end

methods
function AF = amifun(funstr,model)
% constructor of the amifun class. this function initializes the function object based on the provided
% function name funstr and model definition object model
%
% Parameters:
% funstr: name of the function @type string
% model: model definition object @type amimodel
%
% Return values:
% AM: model definition object
AF.funstr = funstr;
AF = AF.getDeps(model);
AF = AF.getArgs(model);
Expand All @@ -49,7 +40,7 @@
AF = AF.getCVar();
AF = AF.getSensiFlag();
end

printLocalVars(this,model,fid)

writeCcode_sensi(this,model,fid)
Expand All @@ -62,15 +53,13 @@

[ this ] = getArgs(this,model)

[ this ] = getFArgs(this,model)

[ this ] = getNVecs(this)

[ this ] = getCVar(this)

[ this ] = getSyms(this,model)

[ this ] = getSensiFlag(this)

[ this ] = checkDeps(this)
end
end

Loading

0 comments on commit 48b65ad

Please sign in to comment.