92
Annex1 Projectreport2008 Selectedpublications2008

Univerzita Karlovapatf-biokyb.lf1.cuni.cz/wiki/_media/projekty/annex_1.pdf · 2 Project Objective The aim of the project is to create a medical teaching simulator of physiological

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

  • Annex�1���

    �����������������������������

    ���������������

    � Project�report�2008��

    � Selected�publications�2008��

  • Ministry of Education, Youth and Sports Project No. 2C06031

    e-Golem: Medical Training Simulator of Human Physiological Functions as the Foundation for e-Learning-Based Teaching of Acute Conditions

    Medicine

    Project Implementation Description

    Implementation Stage 3: January – December, 2008

    Creative Connections s.r.o.

    The project is implemented in close cooperation with the 1st Faculty of Medicine, Charles University

    Praha, January 2009

  • 2

    Project Objective The aim of the project is to create a medical teaching simulator of physiological functions in humans, serving as a foundation for e-learning-based teaching of acute conditions medicine.

    Today, the old credo of John Amos Comenius – “School as a Play“ (Fig. 1) is finding its application in interactive training programmes using simulation games. Simulation models made accessible through the Internet, connected with multimedia user interfaces and completed with interactive explanations, make it possible to visually elucidate the problem dealt with currently using a simulation play in virtual reality. And just like it is possible to land with a virtual airplane in a simulation game with an air simulator, the project shall make it possible to treat a virtual patient in various situations of acute conditions medicine and observe in detail the behaviour of individual physiological subsystems – the respiratory system, circulatory system, secretory system etc.

    „School as a Play“ for 21st century

    internet + interactive graphics + simulation games

    Fig. 1. Connection of the Internet, multimedia environment serving as the audio and visual user interface, with simulation models enables the students, upon connecting the to magical Internet web, to have a visual feel of the problem being explained, in virtual reality. The old credo of John Amos Comenius – “School as a Play” thus finds its modern application.

  • 3

    The project implementation result shall consist in a set of interconnected interactive multimedia educational programs accessible through the Internet that shall help, with the help of simulation games, to explain the function of individual physiological systems and the causes and manifestations of their disorders, especially in order to understand the pathogenesis of acute conditions when there is not much time available to think, and any error of the physician has fatal consequences. The medical educational simulator of complex physiological regulations of the human organism (code name: e-Golem) shall represent the foundation in creating such educational applications.

    Project implementation takes place in close cooperation with the 1st Faculty of Medicine of the Charles University. Project results are tested on the continuous basis in pilot operation of practical experience in pedagogy of the 1st Faculty of Medicine.

    The project result will be available for free in the Czech language through the MEFANET (MEdical FAculties NETwork) network – connected portals of faculties of medicine serving to distribute electronic educational materials (see http://www.mefanet.cz/index.php?pg=home).

    Two Types of Problems in Creating Educational Simulators Two types of problems must be solved when creating simulators and educational simulation games:

    1. Simulation model creation – the very theoretical research work whose foundation consists in formalization of physiological relations, expressed as a mathematical model. A verified simulation model should be the result that reflects, on the selected accuracy level, the modelled reality behaviour with sufficient closeness.

    2. Creation of the very multimedia simulator or creation of the educational program using simulation game, respectively – this is the practical application of theoretical results, linked to the research results. Created (and verified) mathematical models represent the foundation of the simulator. This is demanding development-related work, which requires to combine ideas and experience of pedagogues who create the educational program scenario, creativity of artists who design interactive multimedia components, and efforts of programmers who “seam“ the resulting work together in the final form.

    Each of these problems has its specifics and therefore requires that quite different development tools are applied.

    While creation of the very simulator is rather development programming type of work, formalization of physiological relations and creation of the simulation model is not a development task but a (relatively demanding) research problem whose efficient solution requires that adequate tools are used to support creation of simulation models.

    Creation of the simulation model as well as creation of the simulator are closely related with each other (see Fig. 2) – a sufficiently well verified model is a prerequisite in creating an educational simulator; on the other hand, use of the simulator in training brings new requirements for creating new or modifying existing simulation models.

  • 4

    Foundation of the Simulator – Extensive Scalable Mathematical Model of Physiological Functions Just like a more or less realistic airplane model is a theoretical foundation of the air simulator, the human organism model (or any human organism subsystem model, respectively) is found on the background of the medical simulator.

    Just like theoretical physics seeks to interpret results of experimental research in physical sciences, the new physiological direction of basic research, sometimes called “integrative physiology”, seeks to achieve a formalized description of mutual interconnection of physiological regulations. Computer-based models are the methodological tool in this case. The international project PHYSIOME (http://www.physiome.org) (Bassingthwaighte, 2000), too, and currently also the whole-European project EUROPHYSIOME (http://www.europhysiome.org) (Hunter and Borg, 2003), strive to concentrate activities in this area.

    The key aspect of the project implementation is therefore represented by research activities focused on creating an extensive scalable mathematical model of physiological regulations, to be used as the foundation for the created educational simulators. The model structure stems from a

    Formalizacefyziologických vztah?

    Vytv á?ení simula?níhomodelu

    Ov??ování chovánísimula?ního modelu

    Implementace modelu do simulátoru

    Vytv á?ení u�ivatelskéhorozhran í simulátoru

    Verifikace simulátoru vevýuce

    Nové po�adavky nasimulátor – nové

    po�adavky na simula?nímodelu

    Chování modelu jejiné ne� chování

    biologick éhooriginálu

    Dostate?n? dobrá shodachování modelu s

    chováním biologick éhooriginálu

    Formalised description of physiological function

    Simulation model design

    Verification of simulationmodel behavior

    Design of simulatoruser interface

    Model behaviorcompared with

    human body behavioris unsatisfactory

    different

    Simulation model design Simulator design

    Model behaviorcompared with

    human body behavioris satisfactory similar

    Implementation of model into simulator

    Verification of simulatorin medical education

    New requirements forsimulation model

    Fig. 2. Two types of problems encountered in creating educational simulators.

  • 5

    combination of our previous model Golem1

    International Cooperation in Creating the Integrated Model of Physiological Functions

    (Kofránek et al. 1997, 2000, 2001) with the extensive model of Guyton et al. (1972) and later modifications of the Guyton’s model (1986, 1992). The model is relatively extensive, it includes 53 differential equations and more than 250 variables. Detailed description of its structure, including description of the meaning of individual mathematical relationships and implementation in the Matlab/Simulink environment, represented the contents of one of the attachments to the previous periodical report.

    Our research efforts correspond to European projects within the framework of the research initiative EUROPHYSIOME - Virtual Physiological Human (see http://www.europhysiome.org). A group of 10 European workplaces in the Europhysiome project is thematically the closest to our intention – to create an extensive integrated model of physiological regulations; this group is associated in the SAPHIR project (Systems Approach for PHysiological Integration of Renal, cardiac and respiratory function), with whom we have established close working relations.

    This group in the SAPHIR project chose (similarly as we) the above mentioned Guyton’s model to serve as the base in creating the integrated model of physiological regulations – in a recent extensive work on this project, Thomas et al. 2008 also quote, besides others, our implementation of the Guyton’s model in the Simulink environment (Kofránek and Rusz, 2007). This European group chose the specially created framework M2SL(Modelling and Simulation Library) as the foundation for implementation; this framework is based on the co-simulation principle, represented by a collection of generic classes in the C++ language. The library created by a team from the University of Rennes is based on works of Zeigler et al. (2000) and Vangheluwe et al. (2002). The M2SL implementation environment is suitable especially for running the model on computers connected in a grid.

    However, it is our aim to use the integrated model of physiological regulations as the core of the educational simulator, to be operated on the client’s computer connected to the Internet. Unlike the SAPHIR project research group, we have therefore chosen Microsoft.NET as the implementation environment for the educational simulator. That is why we have not joined the SAPHIR project officially yet.

    Another reason of our journey separate until the present (except the project SAPHIR) consists in the choice of the initial simulation model for further expansion – SAPHIR group chose the classical Guyton’s (Guyton et al., 1972) and Ikeda’s model (Ikeda et al. 1979) as the initial model. We, too, stemmed from the Guyton’s model – versions from 1972 – 1992 (Kofránek and Rusz, 2007; Kofránek et al., 2007c; Kofránek et al., 2008a, 2008b) and from our Golem model (Kofránek et al. 1997, 2000, 2001), which, by the way, also expanded on the model of Ikeda et al. (1979) at the very beginnings (Kofránek et al. 1982a, 1982b, 1984).

    1 Structure of the model Golem is one of the components of the “Physiolibrary” library created by us for the Matlab/Simulink environment (available from http://physiome.cz/simchip).

  • 6

    However, in this project, we wanted to take up the current results of Prof. Guyton’s co-workers and disciples from the Department of Physiology, University of Mississippi, Medical Center, Jackson, USA, rather than classical works. The educational purpose of creating such an extensive integrated model of physiological functions connects us with the American authors, as well. Their present results are linked to the long-term efforts of one Guyton’s co-worker, Thomas Coleman, as for using extensive models of physiological functions for medical training. As early as in the 80ies, Coleman and Randal (1983) created the educational model “Human” in FORTRAN, an extension of the Guyton’s model designated for medical training. However, the Human model is still used today – it was recently implemented by Meyersem et al. (2008) in JAVA on the Internet – and it is accessible on:

    http://placid.skidmore.edu/human/index.php. Later, Coleman (Fig. 3) with his co-workers created the training simulator Quantitative Circulatory Physiology (Abrams et al., 2007). The simulator was implemented in C++.

    Lately, American authors decided to further expand their model and to separate the simulator implementation and description of the model equations so that the model structure can be apparent to the broader scientific community. They created the model QHP (Quantitative Human Physiology) which, in our opinion, currently represents probably the most extensive integrated model of physiological regulations – the latest version of the model can be found at: http://physiology.umc.edu/themodelingworkshop.

    Together with the American colleagues, we have agreed on long-term direct cooperation in further development of the QHP model. Equations of the QHP model are described (in a considerably complex manner) using a special language based on XML. Structure of the relatively complicated model is quite difficult to read from this writing at the first sight. The model description is divided into dozens of subdirectories, each containing even more than ten files frequently. Overall structure of the model and individual relationships are therefore very unclear. That is why we have created a special software tool QHPView to show clear display of mathematical relationships from XML of QHP notation (see Fig. 4).

    American authors use their own solver to run the simulator. We decided to implement (and modify) the extensive QHP model in the Modelica language environment, which leads to a much more transparent structure of the model and makes modifications and adjustments of the model easier.

    Fig. 3. Thomas Coleman, co-worker of Prof. Guyton and the chief system architect of the QHP (Quantitative Human Physiology) model during his visit in Prague.

  • 7

    Making of the Integrated Physiological Functions Model The integrated model of physiological functions of the organism is based on extension of our original model Golem (Kofránek et al. 1997, 2000, 2001), and an appropriate modification of the QHP (Quantitative Human Physiology) model.

    Our modification of the QHP model consists especially in reprogramming the acidobasic equilibrium subsystem, based on the so called Stewart’s concept of acidobasic equilibrium in the original QHP model. The so called “modern approach” adopted by Stewart (1983) and his followers (for example, Fencl et al., 2000; Sirker et al. 2001) to explaining of acidobasic equilibrium disorders stems from mathematical relationships, calculating the concentration of hydrogen ions [H+] from the partial CO2 pressure in plasma (pCO2), total concentration ([Buftot]) of weak (incompletely dissociated) acids ([HBuf]) and their bases ([Buf-], where [Buftot]=[Buf

    -]+[HBuf]), and from the difference between the concentration of completely dissociated cations and completely dissociated anions – the so called SID (strong ion difference):

    [H+]=Function (pCO2, SID, Buftot)

    The problem of this concept is that accuracy of acidobasic calculations in the model thus depends on accuracy of the SID calculation, i.e. difference between the concentration of completely dissociated

    VascularC

    ompartm

    ents QHPView

    Splan

    chnic

    Veins

    Equations

    Fig. 4. The QHPView tool designed by us allows for increasing the visual clarity of the QHP structure, originally written in hundreds of XML files spread over dozens of directories where equations and individual connections were not clear at the first sight.

  • 8

    cations (i.e. especially sodium and potassium) and completely dissociated anions (especially chlorides). Inaccuracies that occur in modelling sodium, potassium and chlorides intake and secretion are then reflected in inaccuracies of modelling the acidobasic state. Although Coleman et al. essentially improved the accuracy of modelling of sodium, potassium and chlorides intake and secretion in the kidneys, upon modelling a long-term condition (when nothing is happening to the virtual patient), then in the current model version, the virtual patient tends to fall in mild stabilized metabolic acidosis after one month of simulated time.

    Our balance approach to modelling and evaluation of acidobasic equilibrium disorders (Kofránek et al. 2007a, 2007b) stems from modelling of the balances of two flows – CO2 formation and elimination, and formation and elimination of strong acids, interconnected through buffering systems of individual compartments of body fluids. This concept provides an essentially improved closeness of modelling, especially of mixed acidobasic equilibrium disorders.

    Another important modification of QHP consists in extending the model with dependence of potassium flow into cells on inflow of glucose due to insulin (this module has been overtaken from our original model Golem – Kofránek et al., 2001). Besides others, this shall make it possible to model the effect of infusions of potassium-containing solutions with insulin and glucose, used in acute medicine as treatment of potassium depletion.

    In general, it can be said that our QHP modification shall improve the model applicability to modelling complex disorders of acidobasic, ionic, volumetric and osmotic homeostasis of the inner environment, which is of considerable importance especially in acute conditions medicine.

    Another our extension of the QHP model consists in implementation of the blood coagulation subsystem. Interconnection of our simulation homeostasis model with the integrated model of physiological functions shall allow for simulating severe haemostasis disorders (for example, DIC), which play an important role in acute conditions medicine.

    As for QHP, it was possible, on the contrary, to adopt the options of model parameters setting according to constitutional data from QHP in our model (i.e. especially the height, weight, gender) of the simulated patient (solved on a very good level here, just like the possibility of simulating the effect of physical load and simulation of the effect of key pharmaceuticals.

    The model also allows for simulating the effect of artificial pulmonary ventilation and dialysis.

    The current implementation of the model in the Modelica language is available to other researchers on our server, and we exchange the most recent results with our American colleagues through the Google Group service, “Modeling Workshop”: http://groups.google.com/group/modelingworkshop.

    Software Tools to Create the Models: From Matlab and Simulink to Modelica For many years, we were developing and debugging the mathematical models in standard tools of the company Mathworks – in the Matlab/Simulink environment, one of the today’s well-proven industrial standards. We have created a special library of formalized physiological relationships in this environment, Physiology Blockset, freely accessible from our website (www.physiome.cz/simchips).

  • 9

    In Simulink, we have implemented a mathematical model, used as a foundation for the Golem simulator (Kofránek et al. 1997, 2000, 2001); we have also implemented extensive Guyton’s models in this environment (Kofránek and Rusz 2007; Kofránek et al. 2007c, 2008a, 2008b). In the feasibility study created at the beginning of the project, however, we also stated carefully that as for the future prospects, the Modelica language must be also taken into account as an environment to create simulation models.

    In 2008, we became closer acquainted with opportunities provided by this new tool, as well as with the essential difference in creating the models in Modelica and Simulink.

    As a rule, Simulink uses interconnected blocks. In connections between individual blocks, signals flow, which transmit values of individual variables from the output of one block to inputs of other blocks. Input information is processed into output information within the blocks. Connection of blocks in Simulink therefore reflects rather the computation procedure than the very structure of the modelled reality. We speak of the so called causal modelling.

    Recently, new, the so called “acausal“ tools to create simulation models were developed. An essential innovation brought by acausal modelling tools is represented by the declarative (and thus acausal) notation of models, when individual parts of the model are described directly as a system of equations and not as an algorithm to solve the equations.

    QPO DUMPING

    QVO DUMPING

    VLA

    VLA

    PR1

    PGL

    PA

    PRA

    VASinit

    VRA0

    VAS0

    CIRCULATORY DYNAMICS - FLOWS AND PRESSURES

    CD01

    CD02CD03

    CD04

    CD13

    CD06

    CD07

    CD08

    CD09CD10

    CD11CD12

    CD14

    CD15

    CD16

    22MCP

    21VE0

    20VT0

    19RTP

    18FISFLO

    17RBF

    16BFM

    15BFN

    14QPO

    13QVO

    12QAO

    11VLA

    10VPA

    9VRA

    8VVE

    7VVS

    6VAS

    5PLA

    4PPA

    3PRA

    2PVS

    1PA

    if PRA>PR1LLPR1=PR1LL

    2.738

    0

    PR1LL

    0.25

    0.1280.155

    0.0574

    0.3986

    0.25

    0.261

    1s

    xo

    VVS

    1s

    xo

    VRA

    1s

    xo

    VPA

    1s

    xo

    VLA

    1s

    xo

    VAS

    19FIS

    18VIM

    17RR

    16RPT

    15RSM

    14RSN

    13CLA

    12CPA

    11CRA

    10CV

    9CAS

    8VLA0

    7VPA0

    6VRA0

    5VAS0

    4VVS0

    3QLO

    2QRO

    1VB

    QPO

    QPO

    QPO

    QPO

    QVO

    QVO

    QVO

    VAS

    VAE

    CAS

    CAS

    PA

    PA

    PA

    PLA

    VBD*0.261

    VBD*0.128

    VVS

    VVS

    VVSVVS

    VVE

    VRE

    VRA

    VRA

    VPA

    VPA

    VBD*0.3986

    VBD*0.0574

    VBD*0.155

    VPA0

    VPA0

    VLA0

    VLA0

    CPA

    CPA

    CRA

    CRA

    CRA

    CV

    CV

    CV

    CLA

    CLA

    PVS

    PVSPVS

    PRAPR1LL

    PGV

    PPA

    DAS

    DVS

    DRA

    QRO

    QRO

    QRO

    DPA

    DLA

    BFN BFM

    FISFLO

    QVO

    QAO

    QAO

    RVG PGS

    VE

    VLE

    VBD

    RBF

    MCP

    MCP

    MCP

    MCP

    MCP

    VLAEinit

    VAESinit

    VVS0

    VVS0

    VVSinit

    VVEinit

    VRAinit

    VPAinitVPAEinit VLAinit

    Integrator

    Summator

    Multiplier/divider

    Multiplicationby constant

    Fig. 5. Illustration of a part of the blood circulation subsystem model in Simulink. The Simulink network connects individual computational blocks are represents rather the computation procedure than the model structure.

  • 10

    Acausal modelling tools work with connected components in which equations are defined. The equations do not mean assignments (i.e. saving of the result of the assigned instruction computation in the given variable) but a definition of relationships among the variables (as usual in mathematics and physics). These components (which represent class instances with equations) can be connected through exactly defined interfaces – connectors. The important fact is that by connecting the components, connection of the systems of equations in individual components with each other actually happens.

    A typical representative of acausal modelling tools is thus represented precisely by the new object-oriented programming language Modelica (Fritzon, 2003). It was originally developed in Sweden and now, it is available both as an open-source version (developed under the auspices of the international organization Modelica Association, http://www.modelica.org/), and in two commercial implementation (from the company Dynasim – Dassault Systems, called Dymola, and from the company MathCore, called MathModelica).

    Elastic vascularcompartments

    Controllableresistances

    Controlledpump

    (right ventricle)

    Blood vessels(with flow and

    pressure)

    Bus ofcontrolling

    signals

    Fig. 6. Illustration of a part of the blood circulation subsystem model in Modelica (part of the Modelica implementation of the extensive model Quantitative Human Physiology). The model is organized as a hierarchy; individual blocks can be opened by double clicking and represent instances of classes where equations are found. The Modelica network expresses rather the modelled system structure than the computational procedure.

  • 11

    The maker of the well-proven Matlab/Simulink tools – Mathworks company, reacted to the new trends by creating a special acausal Simulink library Simscape and linked domain libraries SimElectronics, SimHydraulics, SimMechanics etc.

    In accordance with modern trends, we have therefore expanded the development tools used to create mathematical models until present (i.e. Matlab/Simulink) by tools that use the acausal modelling language – Modelica. Nevertheless, we immediately found considerable advantages compared to creating the models in the Matlab/Simulink environment, brought by this new tool, especially in making of rather extensive models (Mateják and Kofránek, 2008; Kofránek et al. 2008c, 2008d, 2008e; Rusz and Kofránek, 2008; Stodulka et al., 2008). This led us to fundamental reassessment of the present strategy, and as for further development of the simulator, we opted for the Modelica programming language as the fundamental tool to create simulation models.

    Out of the three development tools for modelling in Modelica mentioned above, Dymola is the currently most advanced one (from the company Dynasim, see: http://www.dynasim.se/index.htm). Therefore we chose Dymola as the reference tool to make and debug the models.

    Another possible development environment to create models in Modelica is represented by MathModelica System Designer (MathCore Engineering AB, see: http://www.mathcore.com/). This environment shall apparently become our main development tool. The reasons are provided below.

    The last one of the relevant possibilities to create models in Modelica is represented by the open-source compiler OpenModelica, developed as part of an international effort under the auspices of Open Source Modelica Consortium (OSMC, see website: http://www.ida.liu.se/labs/pelab/modelica/ OpenSourceModelicaConsortium.html ).

    OpenModelica would be the best choice from the viewpoint of its open nature; however, the present implementation of the compiler and the graphic environment of OpenModelica (SimForge) do not meet yet our demands for quality and reliability. In this respect, it is good news that at the beginning of 2009, the company MathCore joined OSMC. OSMC thus received a very strong partner for further development.

    Our company Creative Connections s.r.o. has also become a member of the OSMC consortium, and we have established cooperation with the MathCore development team in common development of the simulation code redirection for the .NET platform, both form OpenModelica compiler as well as for the compiler of MathModelica System Designer.

    The professional MathModelica System Designer shall then be used for reliable translation of the models for simulators running on the educational portal.

    Upon sufficient maturation of OpenModelica implementation, it will be possible to move smoothly to a full open-source solution.

  • 12

    Software Tools to Create Simulators: Direction – Interconnected Platform to Make Models, Simulators as well as Animations

    The original Solution – Three Types of Development Tools Originally, we were forced to work with three types of different software tools in making the simulators (see fig. 7):

    1. Software tools to create and debug mathematical models to be used as a foundation of the simulator – Matlab/Simulink. In this environment, it is advantageous and efficient to develop the simulation models; however, their running is problematic in this environment.

    2. Software tool to develop the very simulator – in this respect, we have used the environment Microsoft Visual Studio .NET. The simulators were developed in the C# language. Another environment used to make training applications was represented by the development environment Control Web ��� �������������� �������������������������������� ��� ����fact that it provides outstanding possibilities for quick making of the user interface of the simulator – however, the interface shows too much of a “technicist” nature.

    3. Software tools to create interactive multimedia graphics – user interface for the simulators. Here, we have been using Adobe Flash on the long-term basis (formerly, Macromedia Flash). This tool allows for making interactive animations; however, the animations can also be programmed using the special programming language ActionScript. The animations can be thus included in programs created in the environment as well as programs created in Control Web. The important fact is that the animations can (thanks to the above mentioned possibility of programming in the language ActionScript) communicate, on the software basis, with the simulation model programmed in C# in Microsoft Visual Studio .NET. And similarly, animations can be inserted in Control Web, as well.

    As we used various development tools to create the simulation models and to make the very simulator, subsequently we had to ensure sufficiently flexible transmission of results from one development environment to another. As the mathematical models were created in the development environment of Matlab/Simulink and the very educational simulators were built in Microsoft .NET Visual studio (and/or Control Web), it was necessary to create software tools that would make it possible to automate transfer of the model from Matlab/Simulink to Microsoft .NET Visual studio.

    These “connection” tools allowed for developing and continuous updating of the mathematical model in the best suited environment designated for development of mathematical models, and at the same time, for developing the very simulator in .NET Visual Studio (and/or Control Web) without having to reprogram the mathematical model “manually”. They allowed for multidisciplinary cooperation of the research team members – system analysts who created the mathematical models, and programmers who implemented the simulator.

    However, on the other hand, it also meant that we had to work in three software environments, and relevant connection tools had to be innovated often upon every innovation of an individual environment.

  • 13

    From the user point of view – it was possible to work with simple models implemented directly in ActionScript on the background of Flash animations, directly in the browser with an installed Flash player. However, more complex models, for example, the complex model of blood gases transfer (http://physiome.cz/atlas/sim/ BloodyMary_cs/), required installation of the model on the client computer (and presence of the .NET platform which, if not installed on the client computer, was downloaded automatically from a Microsoft server) before their running.

    Installation of the programs requires appropriate administrator rights to the computer, and besides that, the model running as an independent application connects only indirectly with the web interface where the interactive multimedia explanation is implemented.

    Distributionof simulators

    Animation design (in Adobe Flash)

    Simulation modeldesign

    (in Matlab/Simulinkframework)

    Model as the virtual

    driver

    Interactiveanimations

    Controllayer

    Automatedgeneration

    of the model as the .NET assembly

    Simulator development

    Scenario of e-learningeducational programswith simulation games

    Control Web framework

    Microsoft VisualStudio .NET

    framework

    Interactiveanimations

    Controllayer

    Model as the .NET assembly

    Automatedgeneration

    of themodel as the virtual

    driver

    Fig. 7. The original solution of creative connection of tools and applications to create simulators and educational programs using simulation plays. The foundation of the e-learning program is represented by a scenario good quality, designed by an experienced pedagogue. Making of animated images is the responsibility of artists who create interactive animations in the Adobe Flash environment. The core of the simulators is represented by the simulation model created in the environments of special development tools designated for creating simulation models. We have used the Matlab/Simulink environment of the company Mathworks for a long time. Simulator development is demanding programming work; to simplify the programming, we have developed special programs, which facilitate automatic conversion of the created simulation model from the Matlab/Simulink environment to Control Web and to the Microsoft .NET environment.

  • 14

    Simulators that Can Run Directly in the Browser – An Aim that Can Be Achieved Today From the viewpoint of the pedagogical effect, it would be therefore suitable to have to possibility to run and control even complex models directly from within the web browser. Today, it shows that this path is feasible if the whole simulator is created in such a manner so that it can be run in the new Microsoft environment – Silverlight. Silverlight is a reaction of Microsoft to the Adobe Flash Player, widely spread today.

    Silverlight is a web-based platform built on the .NET technology, which abstracts completely from the operating system and hardware used where the application is run. It is designated for creation of dynamic online content and interactive working with such content. It combines text, vector as well as bitmap graphics, animations and video.

    The application is run primarily in the Internet browser without the need of its installation (the only installation needed is that of the Silverlight plugin). Using a small downloadable component (plugin), Silverlight thus allows for interactive control of applications in the majority of today’s web browsers (Internet Explorer, Firefox, Safari) on various hardware and software platforms. The operating systems Windows and Mac are supported as for the most common browsers. As for Linux, the fully compatible, open source implementation Moonlight is under development. Applications created for this platform use an essential part of the .NET framework, which forms part of the plugin (and thus relatively complex computations can be performed, as well).

    Silverlight is thus a platform that makes it possible to distribute simulators through the Internet, which can run directly in the Internet browser (even on computers with various operating systems – it is only necessary that the relevant plugin is installed in the browser).

    The long-awaited sharp version of Microsoft Silverlight 2.0 thus finally did meet the expectations, and it was therefore chosen as the target platform of the simulators and the portal under development.

    The environment of the Microsoft Visual Studio with extensions for Silverlight can be thus used for development of the very simulator. C# and F# (functional language for .NET suitable for implementation of scientific computations) are the implementation languages of the simulators. Finally, the source code of the model created in Modelica is going to be transferred onto the .NET platform, as well.

    From Adobe to Microsoft even in Making the Graphic Interface Besides connection of the .NET environment with tools to create the models, easy connection to the created graphic components of the user interface is important, as well. Flash components can be incorporated in the created simulator through an Active X component. However, bridging over of the two heterogeneous worlds of Adobe Flash and .NET poses further demands on (manual) programming work.

    As for distribution of the web applications, we passed from the Adobe Flash Player platform to the Microsoft Silverlight platform – application of animations, created in the environment Adobe Flash, in the Silverlight platform brings further bridging problems.

  • 15

    However, a solution is starting to show in this respect, as well. The new version of the .NET environment also brings quite new possibilities of creating graphic components. Thanks to the new WPF technology (Windows Presentation Foundation), it is possible to create complex graphic components directly in the .NET platform, which contain animations, vector graphics, 3D elements etc. (similarly as or even with potentially greater possibilities than in the Adobe Flash environment). The important thing is that the created graphic user interface is directly integrated with the .NET platform, which removes the need of bridging over the heterogeneous worlds of .NET and Adobe Flash in development of the simulators.

    Together with the sharp version of Silverlight 2.0, an improved version of the tool Microsoft Expression Blend (2.0 sp1) was released, too, to create graphic interfaces also for Silverlight 2.0. This application was tested successfully with a group of designers – students of a school of graphics. It showed that the interactive graphics students mastered very quickly working with the new tool to create animated interactive graphics.

    In order to support cooperation of artists with programmers, a method of development of animations was developed, which can be inserted directly in applications and easily connected to the model outputs. For more detailed information on these, the so called multidimensional animations, see a separate chapter below.

    We are thus leaving the Adobe Flash platform (and that of the programming language ActionScript) as for creation of animations as the visual interface for the simulators, and we are passing to new animations making tools of Microsoft.

    Reduction of Various Platforms Used to Create Models, Simulators as well as Animations It can be summarized that a considerable innovation took place by using more efficient tools both to create the models (Modelica), and also for the graphic (Expression Blend), program (Visual Studio .NET) and distribution (Silverlight) layer of the training simulators.

    We thus succeeded in reducing the number of platforms, while at the same time, increasing the portability and availability of the applications (simulators that can be run from a browser) to all major operating systems and Internet browsers.

    However, three fundamental domains are still preserved, i.e. the model, graphic layer and the control layer of the resulting application, which must be developed using specialized tools. Sufficiently flexible transfer of the results from one development environment to another must be thus ensured.

    A separate chapter (see below) deals with the Modelica model transformation to the .NET platform. The graphic layer can be used directly on the target Silverlight platform, thus simplifying the development process. The technologies named above allow for easy multidisciplinary cooperation of the research team members – system analysts who create the mathematical models, artists who design the graphic part, and finally, the programmers who implement the very simulator (Fig. 8).

    Procedures and tools of practical and efficient creation of multimedia training simulators thus have been created and tested.

  • 16

    Tvorba animacív Expression Blend

    Distribuce simulátor?v prohlí�e?i

    Model jako

    virtuální?adi?

    Interaktivníanimace

    ?ídícívrstva

    Vývojové prost?edíControl Web

    Tvorba scéná??výukových program?

    vyu�ívajících simula?níhry a simulátory

    Tvorba simula?ního

    modelu v prost?edí

    Matlab/Simulink

    Vývoj simulátoru(programátorská

    práce)

    Tvorba simula?ního

    modelu v prost?edíModelica

    ?ídícívrstva

    Model jako .NET assembly

    Vývojovéprost?edíMicrosoft VisualStudio

    Prost?edí .NET 3.5

    Modelica .NETAutomatickégenerovánímodelu jako

    .NET assembly

    Interaktivníanimace

    Distribuce simulátor?v prohlí�e?i

    Model jako

    virtuální?adi?

    Interaktivníanimace

    ?ídícívrstva

    Vývojové prost?edíControl Web

    Model jako

    virtuální?adi?

    Interaktivníanimace

    ?ídícívrstva

    Vývojové prost?edíControl Web

    Tvorba scéná??výukových program?

    vyu�ívajících simula?níhry a simulátory

    Tvorba simula?ního

    modelu v prost?edí

    Matlab/Simulink

    Tvorba simula?ního

    modelu v prost?edí

    Matlab/Simulink

    Vývoj simulátoru(programátorská

    práce)

    Vývoj simulátoru(programátorská

    práce)

    Vývoj simulátoru(programátorská

    práce)

    Tvorba simula?ního

    modelu v prost?edíModelica

    Simulationmodel design in Modelicaframework

    Microsoft VisualStudio

    .NET 3.5 framework

    Modelica .NETModelica .NET

    Animation design in Expression Blend

    Automatedgeneration

    of the model as the .NET assembly

    Interactiveanimations

    Controllayer

    Model as the .NET assembly

    Distribution ofsimulators in web browserusing Silverlight Scenario of e-learning

    educational programswith simulation games

    Fig. 8. New solution of the creative connection of the tools and applications to create simulators and training programs using simulation plays. A scenario of good quality, created by an experienced pedagogue, still remains the foundation of the e-learning program. Creation of animated images is the responsibility of artists who make interactive animations in the Expression Blend environment. The artists use the software tool Animtester developed by us, to create and test animations to be subsequently controlled by the simulation model. The core of the simulators is the simulation model, created in the environments of special development tools designated to create simulation models. Now, we use a very efficient environment, which utilizes the Modelica simulation language. We are working on the Modelica language compiler to compile into the .NET component form, which, together with the differential equations solver implemented on the .NET platform, as well, shall serve as the “data layer” of the simulator with the implemented model. The user interface is connected with the simulation model using the Data Binding concept, which provides intelligent automatic propagation of values between the layers, thus data transfer. We use hierarchic state automatons to design the inner application logic (the automatons make it possible to remember the relevant model context and the user interface context). We have also developed a visual environment (Statecharts editor), which allows for creating the graphic design of the automatons, generating their code, and debugging them. The resulting simulator is a web application for the Silverlight platform, which makes it possible to distribute the simulator as a web application running directly in the Internet browser (even on computers with various operating systems – it is only necessary that the relevant plugin is installed in the browser).

  • 17

    Transformation of Models in Modelica for Use on the .NET Platform Modelica is a language specialized in formal description of physical models based on systems of differential equations. These systems can be created using graphic notation based on generalized Kirchhoff’s laws. It is thus possible to express in a very natural manner a major part of the model based on its physical topology (and in the hierarchy, as well). The very differential or algebraic equations are specified on the lowest level of the model. Modelica compiler transforms such a model into a single system of equations (the current limit is about as many as 300,000 equations), which is further transformed into the generated code suitable for the numerical solver (the so called DAE solver, for example, DASSL solver). Typically, code in C/C++ is generated. According to the language of the generated code, another compiler is used (for example, C/C++), which makes the executable model program. This program can be then simulated and debugged.

    In order to use the model, designed in Modelica originally, purely in the .NET platform context (the so called managed .NET code; code which does not call native functions of the operating system but uses only services of the virtual machine that executes the code), the Modelica compiler (the so called compiler back-end) must be redirected to some of the .NET languages, for example, C#. It is therefore necessary to have at hand a numerical solver written in the .NET environment, as well.

    Redirecting of the Modelica compiler has been tested with success on implementation of the OpenModelica compiler, made possible by its open nature. It must be emphasized that this is not implementation of the entire Modelica compiler (which would certainly require many years of effort) but rather modification of the code generator, which generates the code in C# rather than C/C++.

    The current version of such a modified OpenModelica compiler allows for only semiautomatic compiling of the model when the major part of the model is compiled automatically into C# while some more complex functions must be modified further manually.

    Nevertheless, in this area, in cooperation with OSMC and the company MathCore, we have already initiated the project of modifying their compilers so that they make it possible to generate the code for the target platform by simply supplying the language-specific templates. Now, the project is in the phase of collecting the requirements for the template-forming language design for the code generator, and it has high priority of the parties concerned. Having experience in modifying the OpenModelica compiler, this grants us access to a professional Modelica language compiler for the .NET platform within two to four months.

    During the past two years, the tool MathModelica System Designer (from MathCore Engineering AB) saw an increase in quality, which is starting to be equal to that of Dymola, thus promising, together with the possibility to generate the code for .NET, high quality of compiling the models for educational simulators.

    Another important part necessary to run the model is represented by a sufficiently robust numeric solver, also running on the target platform. IDA solver from the package SUNDIALS (https://computation.llnl.gov/casc/sundials/main.html) was used for this purpose, which we converted from the original C language to F#, a modern functional language of the .NET family. This implementation is in the debugging phase, nevertheless, it will be tested against the original

  • 18

    implementation for all compiled models. For this purpose, we have developed a testing framework, which allows for parallel running of the presented models, both native C/C++ ones as well as those for the .NET environment, and for comparing the results from the viewpoint of exact agreement.

    Compiling of models in the Modelica language for the .NET environment and the above mentioned numeric solver make it possible to use thus created and transformed Modelica models directly on the Silverlight platform, and consequently to incorporate them directly in our own educational simulators running directly in the Internet browser.

    Multidimensional Animations as Puppets on the Strings of Simulation Models As mentioned above, we have chosen Silverlight to be the target platform. It is an important characteristic of Silverlight that it includes native support of animations. Animations are thus a direct part of the applications, and there is no need to use any additional platform for the graphic layer as Adobe Flash in the past.

    We use Microsoft Expression Blend as the graphic design and animation making tool, which operates directly over the applications project, thus eliminating the need to convert designs of the designer to the application project (see the English text on working procedures for WPF/Silverlight platforms http://windowsclient.net/wpf/white-papers/thenewiteration.aspx). The tool Expression Design can also be used for a rather simple basic design (without animations) whose simpler interface is found closer by the graphic designers thanks to the fact that it resembles Adobe Illustrator, and that it provides the possibility of early copying the designs directly into Blend.

    In order to achieve a professional resulting appearance of the application, the very animations should be created by an artist – the results are far better than if the animations are created by a programmer talented in graphics. However, this would mean to devote certain efforts to training of artists who must manage working with tools to create interactive graphics. However, there is a critical lack of artists with such an education on the labour market. That is why we established cooperation with the School of Arts of Václav Hollar five years ago and opened the “Interactive Graphics Laboratory” at this school. We have also initiated establishing of a college where the subject “Interactive Graphics” is taught as part of a three-year study. Besides others, our members of staff take part in teaching at this college, as well.

    The new tools of Microsoft mentioned above have been tested successfully with a group of artists as part of their lessons and specialized practical experience. The tool Expression Blend does still show certain user defects compared to Adobe tools; nevertheless, the new options connected with multidimensional animations (see below) and especially direct integration of animations in resulting applications clearly compensate such defects. Further considerable qualitative movement of this tool in future versions can be expected, in respect of Microsoft investments in designing tools support.

    The animation approach in Silverlight (originally designed for WPF) is based on animation using the change of some characteristics of the scene in time (unlike the system based on images in Adobe Flash). It is thus possible to animate various proportions of the scene independently of each other at

  • 19

    Fig. 10. Animation of the beating heart. The model outputs have an effect on the heart beat phases, opening and closing of the valves etc. Auxiliary control elements of Animtester are found over the very animation, enabling the graphic designer to debug individual subanimations.

    Fig. 9. Patient intubation. An example of complex animation created in the Expression Blend environment using Animtester

  • 20

    the same time and continuously and thus to create a kind of multidimensional animations or animation “puppets”, which make implementation of expressing various conditions and values of the simulation models considerably easier.

    In order to increase efficiency of creating the graphic layer, we have developed an auxiliary software tool – Animtester, which enables the designers – graphic designers to create such animation “puppets” and debug them without the need of any further programming (see Fig. 9 and Fig 10). Thus created “puppets” can be then connected directly to model outputs and there is no need to add any separate program inter-layer for data propagation, as would be the case if using Flash animations.

    Use of graphic possibilities of the Silverlight platform provides a full replacement of the original approach using animations based on the Adobe Flash platform, thus enabling us to reduce the number of technologies used on the portal, and to achieve a considerable simplification of development and coherent architecture of the resulting applications.

    Simulator Structure – MVC Architecture Even upon using new technologies, the fundamental concept of the three-layered architecture of simulation applications remains without any rather major changes.

    In the case of a more complex architecture, the logic of connecting the user interface and the simulation model can be relatively complex, therefore it is suitable to insert a control layer between the visual elements layer and the simulation model layer; such inserted layer takes care of solving all logic of communication between the user interface and the model at a single point, where the relevant context is saved, as well. The so called MVC architecture of building the simulators (Model – View – Controller) is mentioned in this respect in literature.

    This arrangement is necessary especially in rather complex models and simulators whose user display is represented by many virtual engines and controlled animations on multiple connected screens. Advantages of such an arrangement can be appreciated especially in modifications of both the model and the user interface.

    The very application of the simulator consists of three fundamental parts – layers (see fig. 11). The model takes care of the data and functional base of the simulator. The user interface must present the model behaviour in a suitable manner, and it must allow for its control. The control layer, the so called controller, can be inserted between the model layer and the user interface layer, where all messages and events occurring in virtual engines of the user interface are directed, as well as all communication with the model. All the context of the displayed data and relevant requirements for communication with the model are resolved within this layer. All logic of displaying and communication is thus concentrated at a single point, which provides essential time savings in modifications of the user interface or changes of the model. This approach has been known in literature as the MVC architecture (model – view – controller) or formerly also denoted as UCM architecture (user interface – control object – model layer).

  • 21

    Every layer represents a specific domain with special development tools. An essential part of our work is formed by development of tools and technologies, which allow for connecting the outputs of such domain-specific tools into a single target platform.

    We have chosen the Microsoft Silverlight platform as the target platform, which is built on the Microsoft .NET technology. We use the following technologies for individual layers of educational medical simulators:

    � Model – simulation model created in Modelica. We are working on the Modelica language compiler to compile into the form of a .NET component, to be used as the “data layer” of the simulator together with the differential equations solver implemented on the .NET platform, as well.

    � View – presentation layer of the application (graphic user interface) is formed using the Silverlight 2.0 technology. This technology makes it possible not only to create demanding animated visualizations, but also to show standard control elements known from the basic .NET library. The possibility to control the animations or on the contrary, to use them for data input, is a matter of fact. The very Silverlight 2.0 is based on the .NET technology, and therefore integration of these layers is absolutely transparent.

    � Controller – control layer of the application, which takes care of reactions to events occurring in the graphic user interface, control of the model run, and backward affecting

    ?ídícívrstva výstupy vstupy

    Stavovýautomat pro

    ur?ení kontextu

    Modeljako

    .NET komponenta

    Data Binding

    Silverlight 2.0 .NET

    komponenta

    Modelica .NET

    Microsoft Expression Blend

    Model layer

    Outputs Inputs

    Simulation model

    Hierarchicstate

    automata

    Modeljako

    .NET komponenta

    Modeljako

    .NET komponenta

    Modelas

    .NET component

    Data BindingData BindingData Binding

    Silverlight 2.0 .NET

    komponenta

    Silverlight 2.0 .NET

    komponenta

    Silverlight.NET

    component

    Modelica .NET

    Microsoft Expression Blend

    Controllayer

    Presentationlayer

    (graphic user interface)

    Fig. 11. MVC architecture of the created simulator.

  • 22

    of the user environment. The user environment is connected with the simulation model using the Data Binding concept, which provides intelligent automatic propagation of values between such layers, thus data transfer. We use hierarchic state automata to design the inner application logic (the automatons make it possible to remember the relevant model context and the user interface context). We have also developed a visual environment (Statecharts editor) making it possible to design the automatons graphically, generate their code and debug them, as well.

    Simulation Games on the Web The problem of placing the simulators in web applications is solved perfectly by using the Silverlight technology, which is a native part of the web environment and whose applications are run natively in the Internet browser. We rejected the possibility of running the models on the server and sending the clients only the results, and continue developing simulators that run the simulation model on the client computer.

    The Silverlight application is run in the Internet browser in the transparent mode, while the binary package with the application contains both the user environment code as well as the compiled simulation model. As all components of the simulator are created in the managed code, running of the simulator in the so called sandbox is guaranteed, thus eliminating any exposure of the user computer to any threats on part of the simulator.

    Unlike the solution using ClickOnce or WPF XBAP, Silverlight clips can be inserted in websites similarly as, for example, figures, thus the text written in HTML can be completed with interactive illustrative animations. Moreover, this solution can be combined with any framework to create web applications.

    This allows for creating interactive training documents, combining written text, multimedia interactive graphic elements, streamed audio and video with training simulators.

    Developed Tools Overview Only tools relevant for the existing development technologies are stated below:

    � Modelica .NET – back-end compiler of the Modelica language, which compiles the simulation model into the managed .NET code form, and numerical solver of the system of differential equations. Together, this package makes it possible to run the simulation models as part of a simulator running on the client computer.

    � AnimTester – .NET component that allows for better cooperation of artists who create controllable animations with programmers of the very simulators. Using the techniques such as encapsulation of animated properties and partially also code generation, the artists are enabled to perform advanced testing of the created clips, and at the same time, the resulting animation is more prepared for integration with the rest of the project.

  • 23

    � Statecharts – supporting library for the running of hierarchic state automatons, which control the application in response to events evoked by user interaction or in the model.

    � Statecharts editor – application for graphic design of hierarchic state automatons. The application includes the automaton source code generator and a graphic debugger. The automatons are generated in the form of the so called partial classes (specific feature of the C# language version 2.0 and higher) of the user interface, thus allowing for e.g. access to (implicitly private) GUI elements.

    Making of the Portal Architecture Design A logical consequence of our technological decisions is the aim to build the portal on the combination of standard web technologies and Silverlight.

    This combination will make it possible to present the training text completed with animations, multimedia, streamed video or spoken explanations.

    Together with deploying the server-side technologies, it shall also allow for cooperation of individual users in real time. Together, the parts will form interactive training multimedia documents, functioning as the educational environment using simulation games. It will be possible to work with the interactive training documents in the Internet browser.

    The explanatory text, multimedia elements, interactive animated images and charts drawn in real time will be connected with models running on the background.

    These interactive training documents concerning clinical physiology of acute conditions will represent the resulting content of the entire project. The very simulators are created using the development tools and techniques as described above.

    The models are run by clicking on the web in the transparent mode; physically, they run in the browser in the secured environment (the so called sandbox) on the user computer. This allows for full utilization of the computational capacity of the client computers for the simulators, as well as the high performance of hardware-supported graphic cards in the connected client computers.

    Silverlight, dominant technology of the portal, is also available, besides the operating system Microsoft Windows, for Mac OS and Linux (open-source implementation Moonlight).

    Conclusion In the third stage of the project implementation, we responded to the progress of information technologies both in the area of modelling tools as well as in the area of tools to create simulators.

    In the area of modelling tools, we reacted to the major advancement achieved in the field of acausal tools to create models, and we passed from the Simulink/Matlab platform to the Modelica programming language platform.

  • 24

    We are in the process of implementing the complex integrated model of physiological regulations, representing the foundation of the created simulator and relevant training applications, in the Modelica language (in the Dymola tool environment). The model is created in international cooperation with colleagues from the University of Mississippi, in linkage to the extensive model Quantitative Human Physiology created by them.

    In the area of tools to create simulators, we passed to the target platform Microsoft Silverlight, which makes it possible to create training simulators as web application. As for creating the graphic user interface of the simulators and animations, we left the Adobe Flash technology and reoriented ourselves on the Microsoft Expression Blend technology. Use of graphic possibilities of the Silverlight

    Fig. 12. Testing example of an interactive training document running in the browser window. Animations with text, equations and a chart showing the course of the patient resuscitation are combined in the document.

  • 25

    platform provides a full replacement of the original approach using animations based on the Adobe Flash platform, thus enabling us to reduce the number of technologies used on the portal and to achieve a considerable simplification of development and consistent architecture of the resulting applications.

    In international cooperation, we are in the process of creating a back-end compiler of the Modelica language, providing conversion of the simulation model to the managed .NET code form, and a numeric solver of the system of differential equations. We have joined our efforts in international cooperation with the Swedish company Mathcore and have become members of the Open Source Modelica Consortium.

    All this provides good preconditions for successful execution of the project in its last year.

    References

    1. Abram S.R., Hodnett, B. L., Summers R. L., Coleman T. G., Hester R.L. (2007): Quantitative Circulatory Physiology: An Integrative Mathematical Model of Human Physiology for medical education. Advanced Physiology Education, 31 (2), 202 – 210.

    2. Bassingthwaighte J. B. (2000): Strategies for the Physiome Project. Annals of Biomedical Engeneering 28, 1043-1058.

    3. Coleman T.G. Randall J.E. (1983): HUMAN. A comprehensive physiological model. The Physiologist, vol. 26, (1), 15-21.

    4. Coleman T.G, Hester, R., Summers, R. (2008): Quantitative Human Physiology [Online] http://physiology.umc.edu/ themodelingworkshop/.

    5. Guyton AC, Coleman TA, and Grander HJ. (1972): Circulation: Overall Regulation. Ann. Rev. Physiol., 41, s. 13-41

    6. "Europhysiome project – Virtual Physiological Human" [Online] http://www.europhysiome.org/

    7. Fencl J., Jabor A., Kazda A., Figge, J. (2000): Diagnosis of metabolic acid-base disturbances in critically ill patients. Am. J. Respir. Crit. Care 162:2246-2251, 2000.

    8. Fritzson P. (2003): Principles of Object-Oriented Modeling and Simulation with Modelica 2.1, ISBN 0-471-47163-1,Wiley-IEEE Press, 2003

    9. Hunter, P. J. & Borg, T. K. (2003)" Integration from proteins to organs: The Physiome Project. Nature Reviews Molecular and Cell Biology. 4, 237-243.

    10. Ikeda, N., Marumo, F., Shirataka, M. & Sato, T. (1979)" A model of overall regulation of body fluids. Ann. Biomed. Eng. 7, 135–166.

    11. ���������!$��%���'��*�����!$��$����@�\�*���� E., Pokorný Z., Frouz J and Hauser F. (1982a)" ������������������������������������������������������������

  • 26

    ^`���������������*���������{������`��������|�����}��\���������������@���������~�������������������������������������@�����������������������fyziologie FVL UK, Praha a OHVL ÚSLOZ, Praha. 1982. Praha, Tbilisi.

    12. Kofránek J-�������`�>$�������>$��$��%���'��*�����!$, and Verigo V. (1982b)" ���\���������������������{����������������*{���{���������������������\��sredy. C5-�$�$���������������^$�Proceedings of the symposium Simulation of Systems in Biology and Medicine, Prague 1982.

    13. Kofránek J. and Pokorný Z. (1985)" ������������������������������

    ������������� >��\��{�������������\������{����|����������������������`������>�$�-05 HPK ���������@�������$�$�����������������������������$���$

    14. ���������!$��^����$�����������*�$�" Golem: a Computer Simulator of Physiological Functions as an Efficient Teaching Tool. Theo, Y. M., Wong, W. C., Okeu, T. J., and Rimane, R. 407-411. 1997. Singapore, IEE Singapore Section. Legacy for 21 Century. Proceedings of the World Congress on System Simulation.

    15. Kofránek J., Velan T., and Janicadis P. (2000): Golem – Computer simulator of body fluids and acid-base disorders as an effitient teleeducation tool. Carson, E. R and Salzseider, E. 233-242. 2000. Oxford, Pergamon, Elsevier Science. IFAC Symposium, Karlsburg, Greifswald, 30.3.- 1.4.2000.

    16. Kofránek, J. ���^���$�$����*�������$��������*��$����^�������%}��– Multimedia simulator for medical education. In Patel, L., Rogers, R., Haux R. (Eds.). MEDINFO 2001, Proceedings of the 10th World Congress on Medical Informatics. London: IOS Press, 1042-1046.

    17. ����������!$��������!$��}���@�����`����������������������`���$��������������������������-$��������������������@\������������http://patf-biokyb.lf1.cuni.cz/wiki/_media/workshopy/ od_obrazkovych_schemat_k_modelum_pro_vyuku_definitivni.pdf?id=wiki%3Auser%3Aseznam_publikaci&cache=cache).

    18. ���������!$�������*����$�������������$��¡���������{���������- ���'���������{�������������@�����������������-learningové aplikaci. In: Zeithamlová, Milena. 2007. Praha, Czech Republic, Agentura Acion M. MEDSOFT 2007, ISBN 978-80-867-4200-7 str.83-��$�^�����������������@\������������http://patf-biokyb.lf1.cuni.cz/wiki/_ media/clanky/skola_simulacni_hrou_-_vyuziti_simulacnich_modelu_abr_v_e-learningove_aplikaci.pdf?id=wiki%3Auser%3Aseznam_publikaci&cache=cache )

    19. Kofránek !$������*���$�����������$��@�

  • 27

    the 6th EUROSIM Congress on Modeling and Simulation, Vol. 2. Full Papers (CD). (B. Zupanic, R. Karba, $�

  • 28

    065-4, CD ROM, str. 1-26, [Online] http://www.mefanet.cz/res/file/articles/ prispevek-mefanet-anglicky-kofranek.pdf

    26. Mateják M., Kofránek J. (2008): Modelica vs. blokovo-orientované jazyky ��������������������$�¢��}

    27. Meyers R., Doherty C, Geoffrion L. (2008): Web-Human Physiology Teaching Simulation (Physiology in Health, Disease and During Treatment) [Online]. Available: http://placid.skidmore.edu/human/index.php

    28. “Physiome project" [Online], http://www.physiome.org/ .

    29. Rusz, J., Kofránek, J. (2008): Tools development for physiological educational simulators. In Digital Technologies 2008 *�����$�©�-}�ª$�¨������������������¨���������������������

    ������������������$���¢

  • 29

    List of Publications Supported by the MŠMT (Ministry of Education, Youth and Sports) Project No. 2C06031 in 2008

    Czech/Slovak

    1. !����������������@��`����`�����������$��������������$�¢����������������$���������������*����^���������������������¡�������!���������������������¦������ ¡�������$ Institut biostatistiky a analýz, Masarykova Univerzita. str. 60-72, leden 2008, ISBN 978-80-210-4539-2, [Online] :http://portal.med.muni.cz/download.php?fid=506

    2. !��������������!�����������������*���^���*������������������- od obrázku k �����{�����������$ In MEDSOFT 2008. (Editor: Milena Ziethamlová) Praha: Agentura Action M, Praha 2008, s. 37-56. ISBN 978-80-86742-22-9 [Online] http://patf-biokyb.lf1.cuni.cz/wiki/_media/vzkriseni_guytonova_diagramu.pdf? id=nase_publikace&cache=cache

    3. !�����������������������������������������������������y tvorby výukových ���������$�In MEDSOFT 2008. (Editor: Milena Ziethamlová) Praha: Agentura Action M, Praha 2008, str. 37-56. ISBN 978-80-86742-22-9. [Online] http://patf-biokyb.lf1.cuni.cz/wiki/_media/ technologie_a_trendy_tvorby_vyukovych_simulatoru_-prehledova_prednaska-kofranek.pdf?id=nase_publikace&cache=cache

    4. �������������������������!�������������!��������������{���������������������@�}���������������������$�In MEDSOFT 2008. (Editor: Milena Ziethamlová) Praha: Agentura Action M, Praha 2008, s. 149-156. ISBN 978-80-86742-22-9 [Online] http://patf-biokyb.lf1.cuni.cz/wiki/ _media/jednoducha_simulacni_hra_krok_za_krokem.pdf?id=nase_publikace&cache=cache

    5. �������������!�������������������

    ���$�@������-orientované jazyky ��������������������$�¢��}

    English

    6. !��������������!����������������������%�����«�������������������������simulators for teaching physiology. (Resurection of Guyton's Chart for educational purpose) Proceedings of the Jackson Cardiovascular-Renal Meeting 2008. (Stephanie Lucas Ed), CD ROM [Online] http://patf-biokyb.lf1.cuni.cz/wiki/_media/ resurection_of_guyton_s_chart_for_eduacational_purpose.pdf?id=nase_publikace &cache=cache

    7. !������!������������: Tools development for physiological educational simulators. In Digital Technologies 2008 ������*��� [CD-}�ª$�¨������������������¨���������������electrical engineering, 2008, vol. 1, ISBN 978-80-8070-953-2, 4 strany (CD ROM) [Online] http://patf-biokyb.lf1.cuni.cz/wiki/_media/rusz_kofranek_dt2008.pdf? id=nase_publikace&cache=cache

    8. !�����������������������������������������������

    �������������@��������������or labour for machines. In Technical Conmputing Prague 2008, 16th Annual Conference

  • 30

    ��������$�����������������������*���������@����<������������������!����*���Petr Byron). Humusoft s.r.o., Prague, 2008, ISBN 978-80-7080-692-0. CD ROM, str. 1-16, [Online] http://www2.humusoft.cz/kofranek/058_Kofranek.pdf

    9. J��������������������������������������*������� Privitzer, Martin Tribula, Ond��� Vacek: School as a (multimedia simulation) play: use of multimedia applications in teaching of pathological physiology$�¢���£�$��������������¦����������*�����������¡�������^�������������������������������

  • Ministry�of�Education,�Youth�and�Sports�Project�No.�2C06031�

    e�Golem:�Medical�Training�Simulator�of�Human�Physiological�Functions�as�the�Foundation�for�e�Learning�Based�Teaching�of�Acute�

    Conditions�Medicine�

    Implementation�Stage�3:�January�–�December,�2008�

    Appendix� 1:� � Selected� Publications� Supported� by� the� MŠMT�(Ministry� of� Education,� Youth� and� Sports)� Project� No.�2C06031�in�2008�

    Creative�Connections�s.r.o.���

    The project is implemented in close cooperation with the 1st Faculty of Medicine, Charles University

    Praha,�January�2009�

    ��

  • ���

    �����������������������������������������

    !��������������!����������������������%�����«������������������������������������������������������$��������������%�����«��������������

    ��������������Proceedings of the Jackson Cardiovascular-Renal Meeting 2008$����������

    ���������������������������������$

  • Jackson Cardiovascular-Renal Meeting 2008

    1

    FROM GUYTON'S GRAPHIC DIAGRAM TO MULTIMEDIA SIMULATORS FOR

    TEACHING PHYSIOLOGY (RESURRECTION OF GUYTON’S CHART FOR EDUCATIONAL PURPOSE)

    ��!�#�$�����%��&��'%���������

    ������������������������������������������������������

    ������������������������� �������

    ��������!��"������Summary:

    The authors describe an implementation of a classic many -times-copied Guyton's circulatory-system-control chart in the Simulink environment. They point out that there were mistakes in the original pictographic chart that were necessary to be corrected before the implementation. The appearance of the model has been preserved in the Simulink similar to the Guyton's graphic chart -the scheme layout, the wiring placement, the quantity names and the block numbers are the same. The model behaviour demonstrates the pathogenesis of different pathological states truly enough to be used for teaching of physiological regulatory systems in the biomedical-engineering-students education, as well as as a theoretical basis for a multimedia simulator, created in the .NET environment and web -accessible for medicine students at Charles university in Prague.

    1. Introduction:

    Thirty-six years ago, an especial article appeared in Annual Review of Physiology, Guyton et al. 1972 [4] that surpassed all the traditional papers on physiology of that time. It was introduced by a large diagram in a tip-in plate (a detail at Fig. 1). The chart full of lines and interconnected elements reminded of an electrical device at first sight. Instead of the vacuum tubes or other electrical components, coupled computational blocks (multipliers, divisors, summators, integrators, and functions) were displayed here symbolising mathematical operations performed on the physiological quantities. The leader bundles between the blocks expressed complicated feedback bindings. The blocks were clustered into eighteen groups, each one representing a particular interconnected physiological subsystem.

    *���+9:������$����������culatory

  • Jackson Cardiovascular-Renal Meeting 2008

    2

    2. A web of physiological regulations

    In this completely new way, the Guyton's paper described physiological circulatory -system regulations and wider context of other organism subsystems -kidneys, blood volume and ion balance etc. by a mathematical model. Instead of listing sets of equations, graphical illustration of mathematical relations was employed. This syntax enabled the author to depict the dependencies between particular physiological quantities in the form of interconnected blocks representing mathematical operations.

    The definition of the model consisted only of this basic (yet fully illustrative) figure. Comments and justifying of the mathematical formulation were very brief, e. g., "blocks 266 -270 compute the influence of the cellular pO2, the autonomous stimulation and the basal oxygene consumption on the real tissue-oxygene-consumption rate". This required a high level of concentration (and even certain physiological and mathematical knowledge) from the reader to understand the meaning of the formalised relations between the physiological quantities.

    One year later, in 1973, a monograph appeared [5] that explained many of the used approaches more in detail. The Guyton's model was a milestone -it was the first large-scale mathematical description of physiological functions of coupled organism subsystems and launched a brand-new research area, known as integrative physiology today. The integrative physiology aspires to formalised description of the interconnected physiological regulations, with computer models as the methodical tool. The main activities in this branch are concentrated under the PHYSIOME project (Bassingthwaighte 2000, Hunter et al. 2002) under the auspices of the International Union of Physiological Sciences (www.physiome.org), or the project EUROPHYSIOME for the European Union respectively (www.europhysiome.org).

    The Guyton's school kept on evolving the model. In 1983, Thomas Coleman, one of his scholars and colleagues, built a model called "Human" intended mainly for the educational purposes [3]. "Human" allowed simulation of a number of pathological states (cardiac and renal failure, hemorrhagic shock etc.) as well as the influence of some therapeutic interventions (blood transfusion, artificial pulmonary ventilation, dialysis and others). A modern interactive Java implementation of this model can be found at http://venus.skidmore.edu/human.

    The latest outcome of Guyton's followers is the Quantitative Human Physiology simulator [8] representing the most complex and most extended model of physiological functions so far. The model has been created as an open-source Windows-based project and all its aspects, including over 3000 variables and the mathematical equations describing the physiological processes, have an XML text -readable description. The simulator demonstrates human physiology applying whole-body properties, organs and multi-organ systems, users can view time-dependent solutions and interactively alter parameters to investigate new hypotheses. Model can be downloaded from http://physiology.umc.edu/themodelingworkshop/. 3. Implementation and errors in Guyton's chart The Guyton's model and his further modifications were originally implemented in Fortran and later in C++. Today, there are specialised software simulation tools available for its development, tuning and verification. One of them is the Matlab/ Simulink environment by the MathWorks company, supporting successive model assembly -the particular components can be joined into the simulation networks by

  • Jackson Cardiovascular-Renal Meeting 2008

    3

    computer-mouse dragging of connecting lines. Simulink computational elements are very alike to those used by Guyton for the formalised expression of physiological relations. The only difference is in their graphic form.

    This similarity (and also the last year's 35th anniversary of the idea publishing) has inspired us to resurrect the old classic Guyton's chart and convert it in a functional simulation model [10]. In the Simulink implementation, we have employed switches to turn on and off the particular subsystems and regulatory loops even while running the simulation. We have tried to keep the outer model appearance identical to the original graphic chart -the scheme layout, the wiring placement, the quantity names and the block numbers are the same.

    *���=9>�����������$���������������������������������

    The simulatory visualisation of the old diagram was not as easy as expected -in the original model, several mistakes were found. Although it does not matter in a figure, if we try to animate it in Simulink then the model collapses as a whole instantly. There were not many of those errors -inverse signs, a divisor in place of a multiplier, a mutually interchanged block connection, a missing decimal point in a constant etc. However, they were sufficient for the model not to work. Some of them were evident even with no physiology knowledge -it was obvious from the chart that during the run, the values in some integrators would (due to the wrongly applied feedback) steeply increase to the infinite and the model would break down. With some physiological and system-analysis background and with some effort, all the mistakes could be found eventually (Fig. 3). A detailed description of the errors and the corrections provides Kofránek [10].

  • Jackson Cardiovascular-Renal Meeting 2008

    4

    It is interesting, that Guyton’s chart was many times overprinted as a complicated picture in several publications [7] and nobody made an effort to fix these errors. After all, at the time the pictographic chart was created, there had been no convenient drawing tool yet – the picture had originated as a complex schematic figure – and to copy it manually was not so easy. It is not impossible that the authors didn’t even want to correct the errors – who took the pain over analysing the model, easily uncovered the diagrams mistakes – who wanted to just blindly copy, failed.

    The Fortran implementation was very typical for this time – because of the scant power of processors, advanced numerical methods were engaged to accelerate the program run that were using a various integration step in different part of the model. A direct conversion of the Fortran source to a Simulink model results in a very confusing code [12].

    Our implementation was based on original Guyton’s chart with graphical mistakes fixed. The point was in creating a visual educational tool for the course Physiological regulatory systems. The model enables connecting and disconnecting single loops, analysing individually regulation circuits and their importance in development of particular pathological states. The source code in Simulink of both the corrected original, and much more sophisticated late Guyton’s model is available to download at http://www.physiome.cz/guyton, together with a detailed description and explanation of all the mathematical relations included. As a new simulation framework for design and implementation of simulation models we have chosen modern simulation language Modelica and we are developing original framework ”ModelicaNet” based on Modelica.NET (see http://patf-biokyb.lf1.cuni.cz/wiki/modelica.net). Implementation of Guyton’s model in Modelica simulation language is available to download at http://www.physiome.cz/guyton

    Renal deficiency causing limited salt-load-elimination ability leads to an increase of the total extracellular-fluid volume and consequently of the blood volume after a higher salt and water intake. The hypervolemia incites a cardiac-output increase and the initial hypertension. Via the baroreflex, the sympathetic activity is reduced which in combination with the vascular stretching effect of the elevated

    .

    4. Experiments

    The aimed resurrection was intended to produce a graphical application displaying all the regulatory connections which would allow to verify the influence of the individual parameters on the progress of pathological conditions. Since the first implementation in 1972, the basic pictographic model has been many times upgraded, however, having brought it to life now give us a unique opportunity to apprehend the circulatory-dynamics physiology. This can be observed in the following experiments corresponding to those published in Guyton’s first paper in 1972.

    4.1. Hypertension in a salt-loaded, renal-deficient patient

    This was the first and very fundamental experiment revealing the importance of kidneys in blood-pressure control and their influence of es