Skip to content

Commit

Permalink
remove @SimpleTask
Browse files Browse the repository at this point in the history
  • Loading branch information
Evgeny Metelkin committed May 31, 2021
1 parent 6f4f51d commit 42f36c3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 138 deletions.
101 changes: 2 additions & 99 deletions cases/all-classes.heta
Original file line number Diff line number Diff line change
Expand Up @@ -90,109 +90,12 @@ pmid @ReferenceDefinition {
suffix: /
};

pow @FunctionDefinition {
pow #defineFunction {
args: [x, y],
expr: x^y
};

kDa @UnitDef {components: [
kDa #defineUnit {components: [
{ kind: g, multiplier: 1e3, exponent: 1},
{ kind: mole, exponent: -1}
]};

// simulations

simple_task1 @SimpleTask {
model: sp1, // reference to space
subtasks: [
{saveat: [1,2,3], output_ids: [A, B, C]}
{saveat: [4,5,6], output_ids: [C]}
],
type: simulation,
reassign: { // update constant values
const1: 3,
const2: 4.4
},
tspan: [0, 120], // time range
solver: {
alg: Rosenbrock23,
reltol: 1e-6,
abstol: 1e-12,
maxiters: 1e7,
dtmax: 0.1,
tstops: [] // force calculation in time points
},
data: {},
reduce: {}
};

simple_task2 @SimpleTask {
model: sp1,
subtasks: [
{saveat: [4,5,6]}
]
};

multi_task1 @MultiTask { // unscoped
task_vec: [simple_task1, simple_task2],
sizes: {k1: 1, k2: 2}
};

// === fitting ===
dts1 @SimpleData {
output_ids: [A, B, C], // depDataMarkers
indepData: ['t'], // indepDataMarker
t: [1, 2, 3], // indepData
val: [ // depData
[1, 1, 1],
[1, 1, 1],
[1, 1, 1]
],
evid: [0, 0, 0]
}

l1 @SimpleTask {
model: sp1,
sizes: {}
subtasks: [{
data: dts1
reduce: ln_loss2
}],
reduce: sum
};
l2 @SimpleTask {
model: sp1,
sizes: {dose: 1}
subtasks: [{
data: dts2
reduce: ln_loss2
}],
reduce: sum
};

likelihood_sum @MultiTask {
tasks: [l1, l2],
reduce: sum
};

fitting_task1 @FittingTask {
inter_task: likelihood_sum,
fit_sizes: [k1, k2, k3],
fitter_opt: {
alg: LN_NELDERMEAD
}
};

dts1 @Observation {
kind: KineticsObservation,
indepDataMarker: t,
indepData: [0.1, 0.2, 0.3, 0.4, 0.5],
depDataMarkers: [x, y, z, s],
depData: [
[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0]
]
};
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## 0.4.1

- `@StopSwitcher` as an experimental class
- remove `@SimpleTask`

## 0.4.0

Expand Down
39 changes: 0 additions & 39 deletions classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ Heta classes describes hierarchical types of Heta components.
- [CSwitcher](#cswitcher)
- [StopSwitcher](#stopswitcher) (experimental)
- [Dose](#dose) (experimental)
- [SimpleTask](#simpletask) (experimental)

**Simple types**

Expand Down Expand Up @@ -403,44 +402,6 @@ dose1 @Dose {
};
```

## SimpleTask

**Parent:** [Component](#component)

*This is an experimental and not supported in most exports*

`@SimpleTask` describes settings for simulation of the model based on particular namespace.

| property | type | required | default | ref | description |
| ---------|------|----------|---------|-----|-------------|
| subtasks | Subtask[] | true | | | Array of elements of type {saveat: \<number[]\>, output: \<string[]\>} |
| tspan | number[] | | [0, 100] | | start and end point of simulation |
| reassign | Dictionary | | {} | `Const` | reassignments of constants for the simulation |
| solver.alg | string | | lsode | | method |
| solver.reltol | number | | 1e-6 | | relative tolerance |
| solver.abstol | number | | 1e-6 | | absolute tolerance |
| solver.maxiters | number | | 1e5 | | maximum number of iteretions |
| solver.dt | number | | 0 | | dt value |
| solver.dtmin | number | | 0 | | dtmin value |
| solver.dtmax | number | | 0 | | dtmax value |
| solver.tstops | number[] | | [] | |time points for force stop |

### Example

```heta
st1 @SimpleTask {
subtasks: [
{ saveat: [0, 10, 100], output: [A, B, C] }
],
tspan: [0, 120],
reassign: { p1: 10, p2: 0 },
solver: {
alg: lsoda,
abstol: 1e-9
}
};
```

## ID

ID describes the string type which is used for idexing Heta components. ID type can be used for namespaces, identifiers and references.
Expand Down

0 comments on commit 42f36c3

Please sign in to comment.