Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Initial assignment feature #145

Open
aidinbii opened this issue Apr 4, 2024 · 1 comment
Open

Initial assignment feature #145

aidinbii opened this issue Apr 4, 2024 · 1 comment

Comments

@aidinbii
Copy link

aidinbii commented Apr 4, 2024

Hello, I want to ask about this feature

The definition of Ke_3 in the model should not be with an assignment Ke_3 := Ke_30 + diff_Ke1
but with an initial assignment Ke_3 = Ke_30 + diff_Ke1

From this discussion: ICB-DCM/pyPESTO#1334 (comment)

@dilpath
Copy link
Member

dilpath commented Apr 5, 2024

Hi @aidinbii

You can create this initial assignment with the following:

parameters:
  - parameterId: Ke_30
    nominalValue: 30

  - parameterId: diff_Ke1
    nominalValue: 1

odes:
    - stateId: Ke_3
      rightHandSide: 0 + 0
      initialValue: Ke_30 + diff_Ke1

The Ke_3 ODE is a bit of a hack: it will create the correct initial assignment, and the right-hand-side needs to be anything that evaluates to 0, so that Ke_3 doesn't change value over time. 0 by itself doesn't seem to work in the current version of yaml2sbml.

You can then use Ke_3 as a parameter in other expressions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants