Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

How to access a model instance defined with the DSL #409

Open
SergeStinckwich opened this issue Dec 16, 2021 · 0 comments
Open

How to access a model instance defined with the DSL #409

SergeStinckwich opened this issue Dec 16, 2021 · 0 comments

Comments

@SergeStinckwich
Copy link
Collaborator

SergeStinckwich commented Dec 16, 2021

When a model is expressed with the DSL like below, how you can access the model?

KModel SEIRS
    attribute: #(status -> S E I R);
    parameters: #(beta gamma mu lambda sigma nu);
	 lambda: #(beta*I/N);
    equations: #(
         S:t= mu*N - lambda*S - mu*S + nu*R.
         E:t= lambda*S - sigma*E - mu*E.
         I:t= sigma*E - gamma*I - mu*I.
         R:t= gamma*I - mu*R - nu*R.).

Composition LPAI
    model: 'SEIRS'.

Scenario Scr1
    on: 'LPAI';
    mu: 1/(76*365);
    beta: 0.21;
    gamma: 1/14;
    sigma: 1/7;
    nu: 1/365;
    S: 0.999;
    E: 0.001;
    I: 0.

Simulation InfluenzaSim rungeKutta  
    scenario: 'Scr1';
    from: 0;
    to: 1000;
    step: 1.

Visualization InfluenzaViz diagram
    for: 'InfluenzaSim';
    xLabel: 'Time (days)';
	open
@SergeStinckwich SergeStinckwich changed the title How to access a model instance with DSL How to access a model instance defined with the DSL Dec 16, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant