Skip to content

Commit

Permalink
cases 20-22
Browse files Browse the repository at this point in the history
  • Loading branch information
metelkin committed Nov 22, 2024
1 parent 1e91a9f commit adbb547
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cases/0020/index0.heta
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
comp1 @Compartment .= 1;

// species
x1 @Species { compartment: comp1 , output: true} .= 10;
x1 @Species { compartment: comp1, output: true} .= 10;
x2 @Species { compartment: comp1, output: true } .= 0;
x3 @Species { compartment: comp1, output: true } .= 12.12;

Expand Down
27 changes: 27 additions & 0 deletions cases/0021/index0.heta
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
Create complete model with 3 compartments and 3 species.
Add possible reactions.
Set initial concentrations.
Set rate rules.
Set parameters.
Set compartments.
Set species.
*/

// Compartments
comp1 @Compartment .= 1;
comp2 @Compartment .= 1.5;
comp3 @Compartment .= 2;

// Species
s1 @Species {compartment: comp1} .= 10;
s2 @Species {compartment: comp1} .= 20;
s3 @Species {compartment: comp2} .= 30;

// Reactions
r1 @Reaction {actors: s1 + s2 -> s3} .= k1 * s1 * s2 * comp1; // mass action
r2 @Reaction {actors: s3 -> s1 + s2} .= k2 * s3 * comp2; // mass action

// Constants
k1 @Const = 0.1;
k2 @Const = 0.2;
21 changes: 21 additions & 0 deletions cases/0022/index0.heta
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
Create a model with 2 compartments and 2 species.
It also has Time event starting at 10 and repeat each 20 time units.
The event changes the rate of the first reaction to 0.5.
*/

// Compartments
comp1 @Compartment .= 1;
comp2 @Compartment .= 2;

// Species
s1 @Species .= 10;
s2 @Species .= 20;

// Reactions
r1 @Reaction {actors: s1 + s2 -> s3} .= k1 * s1 * s2 * comp1; // mass action
r2 @Reaction {actors: s3 -> s1 + s2} .= k2 * s3 * comp2; // mass action

// Time event
time_event @TimeEvent {start: 10, period: 20};
s1 [time_event]= 0.5;
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"scripts": {
"start": "node js/create-prompt.js"
},
"dependencies": {
"dotenv": "^16.4.5",
"glob": "^10.4.2",
Expand Down

0 comments on commit adbb547

Please sign in to comment.