1+ #=
2+ This code was generated by heta-compiler
3+ =#
4+
5+ function __get_nameless_model__()
6+
7+ # ## Define independent and dependent variables ###
8+
9+ @variables t
10+ __ruleVariables__ = @variables a(t) b(t) c(t) d(t) r1(t) r2(t)
11+ __dynamicVariables__ = @variables _a_(t) _b_(t) _c_(t) _d_(t)
12+
13+ # ## Define potential algebraic variables ###
14+
15+ # ## Define parameters (constants and statics) ###
16+ __constParameters__ = @parameters k1 k2 k3
17+ __staticParameters__ = @parameters comp1 comp2
18+
19+ # ## Define an operator for the differentiation w.r.t. time
20+ __D__ = Differential(t)
21+
22+ # ## ODE Equations ###
23+ __eqs__ = [
24+ # extended rules
25+ a ~ _a_/ comp1,
26+ b ~ _b_/ comp1,
27+ c ~ _c_/ comp1,
28+ d ~ _d_/ comp2,
29+ r1 ~ k1 * a,
30+ r2 ~ k2 * b * c - k3 * d,
31+
32+ # ODEs
33+ __D__(_a_) ~ - r1, # da/dt
34+ __D__(_b_) ~ r1- r2, # db/dt
35+ __D__(_c_) ~ - r2, # dc/dt
36+ __D__(_d_) ~ r2, # dd/dt
37+ ]
38+
39+ # ## TIME EVENTS ###
40+ function __sw1_tstops__(__const__, __times__)
41+ return [50.0 ]
42+ end
43+
44+ # ## C EVENTS ###
45+
46+ # ## STOP EVENTS ###
47+
48+ # ## EVENTS ASSIGNMENTS ###
49+ __sw1_affect__ = [
50+ __a__ ~ (a + 1e+0 ) * comp1,
51+ ]
52+
53+
54+ # ## Initialization ###
55+
56+ __constValues__ = [
57+ k1 => 0.001 ,
58+ k2 => 0.0001 ,
59+ k3 => 0.022 ,
60+ ]
61+
62+ __init__ = [
63+ comp1 => 1.1 ,
64+ comp2 => 2.2 ,
65+ a => 1e+1 ,
66+ b => 0e+0 ,
67+ c => 1e+0 ,
68+ d => 0e+0 ,
69+ r1 => k1 * a,
70+ r2 => k2 * b * c - k3 * d,
71+ ]
72+
73+ __amountsInit__ = [
74+ _a_ => a * comp1,
75+ _b_ => b * comp1,
76+ _c_ => c * comp1,
77+ _d_ => d * comp2,
78+ ]
79+
80+ # ## ODESystem definition ###
81+ __sys__ = ODESystem(__eqs__, t, [__dynamicVariables__; __ruleVariables__], [__constParameters__; __staticParameters__],
82+ name = :nameless,
83+ discrete_events = [],
84+ defaults = [__constValues__; __init__; __amountsInit__]
85+ )
86+
87+ return (
88+ structural_simplify(__sys__),
89+ [__constValues__; __init__; __amountsInit__],
90+ NamedTuple{(:sw1, )}([(__sw1_tstops__, __sw1_affect__, false ), ]),
91+ NamedTuple{()}([]),
92+ NamedTuple{()}([]),
93+ )
94+
95+ end # function __get_nameless_model__
96+
97+ __model__ = __get_nameless_model__()
0 commit comments