Skip to content
MathWorks - Mobile View
  • MathWorks アカウントへのサインインMathWorks アカウントへのサインイン
  • Access your MathWorks Account
    • マイ アカウント
    • コミュニティのプロファイル
    • ライセンスを関連付ける
    • サインアウト
  • 製品
  • ソリューション
  • アカデミア
  • サポート
  • コミュニティ
  • イベント
  • MATLAB を入手する
MathWorks
  • 製品
  • ソリューション
  • アカデミア
  • サポート
  • コミュニティ
  • イベント
  • MATLAB を入手する
  • MathWorks アカウントへのサインインMathWorks アカウントへのサインイン
  • Access your MathWorks Account
    • マイ アカウント
    • コミュニティのプロファイル
    • ライセンスを関連付ける
    • サインアウト

ビデオ・Webセミナー

  • MathWorks
  • ビデオ
  • ビデオ ホーム
  • 検索
  • ビデオ ホーム
  • 検索
  • 営業へのお問い合わせ
  • 評価版
4:37 Video length is 4:37.
  • Description
  • Full Transcript
  • Related Resources

SimBiology Tutorials: Building a Model – Algebraic Equations

From the series: SimBiology Tutorials for QSP, PBPK, and PK/PD Modeling and Analysis

Learn how to define algebraic equations with SimBiology® of the Model Builder app.

In this video, we'll talk about how to implement algebraic equations in SimBiology. And to define an algebraic equation, you can use one of the following constructs. Initial assignment defines a mathematical expression that is only evaluated once at the beginning of a simulation. It lets you specify the initial value of a parameter, species, or compartment capacity as a function of other model component values.

Initial assignment is expressed as variable equals expression. For instance, koff equals the decision constant, KD, times kon on in the case of reversible binding. A repeated assignment is used to define a time-dependent quantity using an algebraic equation. It's evaluated at every time step, which is determined by the solver during the simulation process.

For instance, the total concentration of the receptor could be equal to the receptor plus complex in a TMDD model. At the start of a simulation, that is, at simulation time equals 0, SimBiology evaluates the initial assignment, and repeated assignment rules, as a set of simultaneous constraints. SimBiology treats the rules as a unified system of constraints and automatically reorders and evaluates them. The order in which the rules appear in the model has no effect on the simulation results.

The next construct is an algebraic rule. It lets you specify mathematical constraints on one or more parameters, species, or compartments that must hold during a simulation. It takes the form 0 equals expression, and the rule is specified as the expression. For instance, the repeated assignment of both could be written 0 equal total receptor minus receptor minus complex.

Repeated assignment rules are mathematically equivalent to algebraic rules but result in exact solutions, instead of approximated solutions. Therefore, it is recommended that you use repeated assignment rules, instead of algebraic rules, whenever possible. Use algebraic rules only when you cannot analytically solve the equations to get a closed-form solution, or you have multiple equations with multiple unknowns, and it could be inconvenient to solve.

If you use a repeated assignment or an algebraic rule to vary the value of a compartment during the simulation, make sure their constant property is set to false. If the quantity defined by your mathematical expression is not used to compute other quantities in your model, you could also define it as a post-simulation observable. However, we dedicate another video to observables because they can be used in more use cases.

So let's see now how to implement initial and repeated assignments in the model builder app. In this model, the PK is modeled using a two-compartment TMDD model. We expect the receptor to be at steady state when no drug was administered. Which means that we will define the synthesis rate, ksyn, as a function of the receptor concentration at steady state, and its remission rate, kel.

Since ksyn will be defined as the beginning of the simulation and will not change afterwards, we can define this expression as an initial assignment. ksyn equal to kel times receptor. We don't need to use the dot notation to specify receptor, because its name is unique in the entire model. If the expression contained the plasma drug concentration, for example, we would need to use the notation central.drug to differentiate it from the drug concentration in the peripheral compartment.

Note that a new icon appears next to the one representing its constant value. We can now show the initial conditions and see that ksyn has been updated to 0, since initial concentration of receptor is currently set to 0. So let's change it to 10, and change kel to 0.2. And now, the initial value of ksyn shows 2, as expected.

Let's now add a new parameter to compute the receptor occupancy, RO, which is defined as the fraction of the total receptor concentration bound to the drug. RO is dimensionless, so we will define it as a parameter. And since it will depend on receptor and complex, which are time dependent, it will itself be time dependent.

So we need to define it as non-constant. We can now add a repeated assignment and make sure that the initial value of RO is computed correctly in the parameter list. And finally, the repeated assignments will be displayed in the list of equations. This concludes the tutorial. Thanks for watching.

Related Products

  • SimBiology

Bridging Wireless Communications Design and Testing with MATLAB

Read white paper

Feedback

Featured Product

SimBiology

  • Request Trial
  • Get Pricing

Up Next:

This video demonstrates how to simulate a model in SimBiology in the SimBiology Model Analyzer App.
7:17
SimBiology Tutorials: Simulating a Model in SimBiology
View full series (10 Videos)

Related Videos:

8:25
SimBiology Tutorials: Building a Model – Differential...
7:17
SimBiology Tutorials: Simulating a Model in SimBiology
25:49
Modeling Biology with SimBiology: An Introduction for iGEM...
52:52
Population Pharmacokinetic Modeling Using Nonlinear...
36:13
Application of SimBiology to PK/PD, Systems Pharmacology &...

View more related videos

MathWorks - Domain Selector

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

  • Switzerland (English)
  • Switzerland (Deutsch)
  • Switzerland (Français)
  • 中国 (简体中文)
  • 中国 (English)

You can also select a web site from the following list:

How to Get Best Site Performance

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.

Americas

  • América Latina (Español)
  • Canada (English)
  • United States (English)

Europe

  • Belgium (English)
  • Denmark (English)
  • Deutschland (Deutsch)
  • España (Español)
  • Finland (English)
  • France (Français)
  • Ireland (English)
  • Italia (Italiano)
  • Luxembourg (English)
  • Netherlands (English)
  • Norway (English)
  • Österreich (Deutsch)
  • Portugal (English)
  • Sweden (English)
  • Switzerland
    • Deutsch
    • English
    • Français
  • United Kingdom (English)

Asia Pacific

  • Australia (English)
  • India (English)
  • New Zealand (English)
  • 中国
    • 简体中文Chinese
    • English
  • 日本Japanese (日本語)
  • 한국Korean (한국어)

Contact your local office

  • 営業へのお問い合わせ
  • 評価版

MathWorks

Accelerating the pace of engineering and science

MathWorksはエンジニアや研究者向け数値解析ソフトウェアのリーディングカンパニーです。

ディスカバー…

製品を見る

  • MATLAB
  • Simulink
  • 学生向けソフトウェア
  • ハードウェア サポート
  • File Exchange

製品評価版の入手または製品の購入

  • ダウンロード
  • 評価版ソフトウェア
  • 営業へのお問い合わせ
  • 価格とライセンス
  • MathWorksストア

使い方を学ぶ

  • ドキュメンテーション
  • チュートリアル
  • 例
  • ビデオ・Webセミナー
  • トレーニング

サポートを受ける

  • インストールのヘルプ
  • MATLAB Answers
  • 技術コンサルティング
  • ライセンスセンター
  • サポートへのお問い合わせ

MathWorks について

  • 採用情報
  • ニュースルーム
  • 社会貢献
  • ユーザー事例
  • MathWorks について
  • Select a Web Site United States
  • トラストセンター
  • 商標
  • プライバシー ポリシー
  • 違法コピー防止
  • アプリケーション ステータス

© 1994-2022 The MathWorks, Inc.

  • Facebook
  • Twitter
  • Instagram
  • YouTube
  • LinkedIn
  • RSS

MATLAB を語ろう