diff --git a/cases/all-classes.heta b/cases/all-classes.heta index 3881d8d..79f6f66 100644 --- a/cases/all-classes.heta +++ b/cases/all-classes.heta @@ -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] - ] -}; diff --git a/changelog.md b/changelog.md index 3f5a256..e29dca4 100644 --- a/changelog.md +++ b/changelog.md @@ -3,6 +3,7 @@ ## 0.4.1 - `@StopSwitcher` as an experimental class +- remove `@SimpleTask` ## 0.4.0 diff --git a/classes.md b/classes.md index e0d5960..03b0b2d 100644 --- a/classes.md +++ b/classes.md @@ -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** @@ -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: \, output: \} | -| 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.