QCMF: a tool for generating qualitative models from ...

12
QCMF: a tool for generating qualitative models from compartmental structures L. Ironi~~ and M. Stefanelli( 2 ) (1) Istituto di Analisi Numerica del C.N.R., Pavia, Italy (2) Dipartimento di Informatica e Sistemistica deIl’UniversitS di Pavia, Pavia, Italy lilianaOsupersl .ian.pv.cnr.it Abstract This paper describes a framework, called QCMF (Qualitative Compartmental Modeling Frame- work), which assists the user in formulating mod- els of a physical system and in analyzing their be- haviors through the simulation of the effects of a variety of different perturbations of the system. QCMF has adopted the compartmental theory as modeling ontology: a system is represented as a finite set of interacting compartments. The user enters, through an iconic language and menus, the compartmental structure of a physical system and defines the kinds of functional relationships de- scribing the interactions between compartments. Then, QCMF automatically generates a behavior model of the system. Such a model consists of a set of ordinary differential equations, which are currentLy qualitatively expressed, and is directly coded into the language (QSIM) which is inter- preted by the simulation algorithm. The system behavior can be obtained by simulating the model starting from an initial state which describes the perturbations acting on the system. The code defining the initial state is automatically built by QCMF as well. Finally, explanations of the pre- dicted behavior are also automatically generated. Moreover, QCMF is capable to build and to main- tain a library of models for a given system. Keywords: Mathematical modeling, qualitative modeling, qualitative simulation, compartmental theory, graphical interface. Introduction System dynamics modeling is a powerful tool for rea- soning about physical systems. Model-based reason- ing goes through different stages: first, model formula- tion and generation, then prediction and explanation of the system behavior. Model formulation, that is the definition of the relations between model variables, it- quires the expert’s domain knowledge as well as a large more complete version of this paper will appear in Computer Methods and Programs in Biomedicine body of domain independent knowledge. This includes mathematical concepts and fundamental principles of physics. Moreover, in order to be computationally tractable, the formulated model needs to be manip- ulated so that it can be represented through the lan- guage required by the adopted simulation algorithm. This part of the modeling process, called model gen- eration, is strictly domain independent and has been proved to represent a heavy and time-consuming ac. tivity. In fact, although today available simulation languages are more user-friendly than standard pro- gramming languages, they still require precise syntax and semantics. A good knowledge of the simulation algorithm is also necessary for interpreting the simula- tion results. Hence, the need derives for building tools that have the necessary methodological knowledge for assisting the user in the model formulation phase, and for automatically executing the generation, simulation and explanation steps. This paper describes a framework, called QCMF (Qualitative Compartmental Modeling Framework), for assisting the user in the process of model build- ing (i.e., model formulation and generation) and sim- ulation. The chosen modeling ontology is the com- partmental one: a system is viewed as a finite set of compartments which interact by exchanging or trans- forming material. Flows through the system are repre- sented as transfers from one compartment to another. Compartmental modeling can be properly exploited for the formal description of the dynamics of chemical re- actions and material transfer processes. Although its most common application remains bio-medical science, its use has spread to other domains such as ecology, epi- demiology, hydrology as well as chemical engineering. QCMF includes knowledge of the theory of com- partmental systems (Atkins, 1974), while the domain ontology, that is the decomposition of a specific sys- tem into compartments and the network of interac- tions between these, is entered by the user through an iconic language. A representation of the compartmen- tal topology in a given system is called structure model, whereas the set of representations of the behaviors of each compartment, namely a set or Ordinary Differen-

Transcript of QCMF: a tool for generating qualitative models from ...

Page 1: QCMF: a tool for generating qualitative models from ...

QCMF: a tool for generating qualitative models fromcompartmental structures

L. Ironi~~and M. Stefanelli(2)(1) Istituto di Analisi Numerica del C.N.R., Pavia, Italy

(2) Dipartimento di Informatica e SistemisticadeIl’UniversitS di Pavia, Pavia, ItalylilianaOsupersl.ian.pv.cnr.it

AbstractThis paper describesa framework, called QCMF(Qualitative Compartmental Modeling Frame-work), which assiststhe user in formulating mod-els of a physical systemand in analyzing their be-haviors through the simulation of the effects of avariety of different perturbations of the system.QCMF hasadoptedthe compartmental theory asmodeling ontology: a systemis represented asafinite setof interacting compartments. The userenters,through an iconic languageandmenus, thecompartmental structure of aphysical systemanddefines the kinds of functional relationships de-scribing the interactions between compartments.Then, QCMF automatically generatesa behaviormodel of the system. Such a model consists ofa setof ordinary differential equations,which arecurrentLy qualitatively expressed,and is directlycoded into the language (QSIM) which is inter-preted by the simulation algorithm. The systembehavior can be obtainedby simulating the modelstarting from an initial statewhich describestheperturbations acting on the system. The codedefining the initial state is automatically built byQCMF as well. Finally, explanationsof the pre-dicted behavior are also automatically generated.Moreover, QCMF iscapable to build and to main-tain a library of models for a given system.Keywords: Mathematical modeling, qualitativemodeling, qualitative simulation, compartmentaltheory, graphical interface.

IntroductionSystemdynamicsmodeling is a powerful tool for rea-soning about physical systems. Model-basedreason-ing goes through different stages: first, model formula-tion and generation, then prediction and explanationof the systembehavior. Model formulation, that is thedefinition of the relations between model variables, it-

quires the expert’sdomain knowledgeaswell asa large

more complete version of this paper will appear inComputerMethods and Programsin Biomedicine

body of domain independentknowledge. This includesmathematical conceptsand fundamental principles ofphysics. Moreover, in order to be computationallytractable, the formulated model needs to be manip-ulated so that it can be representedthroughthe lan-guage required by the adopted simulation algorithm.This part of the modeling process,calledmodel gen-eration, is strictly domain independent and has beenproved to represent a heavy and time-consuming ac.tivity. In fact, although today available simulationlanguagesare more user-friendly than standard pro-gramming languages,they still requireprecisesyntaxand semantics. A good knowledge of the simulationalgorithm is alsonecessaryfor interpreting the simula-tion results. Hence, the needderives for building toolsthat have the necessarymethodologicalknowledgeforassistingthe user in the model formulation phase,andfor automatically executing the generation,simulationand explanation steps.

This paper describes a framework, called QCMF(Qualitative Compartmental Modeling Framework),for assisting the user in the processof model build-ing (i.e., model formulation and generation) and sim-ulation. The chosenmodeling ontology is the com-partmental one: a system is viewed as a finite set ofcompartmentswhich interact by exchangingor trans-forming material. Flows through the systemare repre-sentedas transfers from onecompartment to another.Compartmental modelingcan be properly exploitedforthe formal description of the dynamics of chemical re-actions and material transfer processes.Although itsmostcommonapplication remains bio-medicalscience,its usehasspread to other domainssuch asecology,epi-demiology,hydrology as well as chemical engineering.

QCMF includes knowledge of the theory of com-partmental systems(Atkins, 1974), while the domainontology, that is the decompositionof a specific sys-tem into compartments and the network of interac-tions betweenthese, is entered by the user through aniconic language. A representationof the compartmen-tal topology in a givensystemis calledstructuremodel,whereasthe setof representationsof the behaviors ofeach compartment, namely asetor Ordinary Differen-

Page 2: QCMF: a tool for generating qualitative models from ...

tial Equations(ODE) basedon the massbalancelaw,definesa behaviormodelofthegivenstructure.WithinQCMF, a systemmodelis representedby a behaviormodel associatedwith an initial statewhich describesthe perturbationsactingon astructuremodel.

Although our long-termgoal aims at building aframework capableto executethe tasks of generat-ing and simulatingboth quantitativeandqualitativemodels,this paperdealsonly with qualitativemodels.Nevertheless,aquantitativeformulationcan beeasilyderivedfrom the structuremodelby symbolicallyma-nipulatingthe acquiredknowledgein order to simplifythe processof writing the setof ODEs,andby snap-pingthe behaviormodel into its correspondingnumer-ical oneaccordingto the selectednumericalsimulationalgorithm. Similar facilities are now provided by themost recent releaseof SAAM (SAAM. 1993), whichcould supplementQCMF with quantitativecompart-mentalmodelling tools.

QCMF embedsall theneededmethodologicalknowl-edge,and thereforeallowsthe userto go through thedifferentmodelingphasesvery easily:1. A structuremodel is enteredthrougha userfriendly

graphicalinterface;2. The behaviormodelis formulatedby performingan

automaticanalysisof the given structure,and byacquiringinformationaboutfunctionalrelationshipsbetweenvariables;

3. The behaviormodel is automaticallygenerated inthe QSIM code(Kuipers, 1986);

4. The initial statecorrespondingto either single ormultipleperturbationsactingon the systemisauto-maticallygeneratedin theQSIM code;

5. The systemmodel is simulatedin order to predicttheeffectscausedby the consideredperturbations;

6. A causalexplanationof the simulatedresults, inaddition to the graphical representationgiven byQSIM. is automaticallygenerated.The choiceof QSIM amongtheseveralproposedap

proaches(llobrow, L984; Weld andl)e Meet, 1990) toqualitativemodelingis due to the fact that it sn’iiisto offer the most suitableformalism to reprehentthedynamicsof procesteswhosebehaviorcan be qnantit atively describedby ODEs(Kuipersanti Kassirer,1983;LCuipers, 1989).

Let us observethat each systemcan be describedby severalmodels,eachof them providinga description at a different level of detail. ‘this meansthat,accordingto the availableknowledgeand t lie purposeof model building, a system can be deconiposeclindifferent ways and different assumptionson the func-tional relationshipsbetweenvariablescan beexplored.Hence the needfor building a library of modelsfor agiven system,wheredifferent emit it ies composingniodels arerepresentedthrough frames,andt lie wholesetid’ framesis organizeir intn a hierarrhical structure.

The problemof automaticallyselectingwithin the Li-brary the appropriatemodel for a specific goal is cru-cial in model basedreasoning(Addanki a at, 1991;FalkenhaierandForbus,1991;Iwasaki,1992;Nayakciat, 1991; Weld, 1990), and will be consideredin thefuture work.

QCMF,whichhasapracticalvalueasastand-alonesystem,could alsobe viewedasan acquisitiontool ofknowledge representedthroughsystemmodels. Theavailability of alibrary of modelsallowsaKnowledgeBasedSystem(KBS) toreasonexploitingdeepknowl-edge,soenhancingits problemsolvingability.

This paperis organizedas follows: after abrief in-troductionto compartmentaltheory,the nextsectionsdealwith an overviewof QCMF. The user-QCMFin-teraction in model formulation, generationand simnulation phasesis illustratedthrough anexampletakemifrom themedicaldomain.Finally, the majorstrenghtsandlimits of this work arediscussed.

CompartmentalmodelingA compartmentis fundamentallyan idealizedstoreofasubstance,homogeneouslydistributed: if asubstanceis presentin aphysicalsystemin severalformsor loca-tionsandpassesfrom oneform or locationto another,lien each form or locationconstitutesaseparatecoin-partmentfor that substance.It should henotedthatdifferent conipartmnentscan coexist in the sameloca-tion of asystemandthat thecoinpartnientsdo not al-wayscorrespondto physicatlyidentifiablecomponents.

Ruth modeling techmiique is applicablewhen thestudyconcernstheflow of somesubstancethroughtimesystem. In such models,the flow through thesystemis representedas transfersfrom onecompartmenttoanother.Thestructuremodel,that isthe system’sde-coimipusitiun amid the network of interactionsbetweencompartments,is usuallydisplayedby meansof acoinpartinentaldiagraiii. Decomposingasysteminto coin-partmentsleadsdirectly to its behavior,namelya setof equationsbasedon the mnai,sbalancelaw. The statevariablesof the system,which are denotedby .r,(l),representthe concentrationor amountof substanceinthe i—th conipartmentwhich exchangesmatter withother comnpartnients or t lie externalenvironmentattime 1. ‘The rate of changeof:, is obtainedby theequation:

1, = ~ +j—1

— lod:,) (I)‘Si

J�i

wherei, denotesthe timederivativeof:,; f,,j anti J,j,denoteflow variables,that is the ratesof masst ramisferinto the i — lb comnpartmemit from the,J — lb compartment anti into thej lb compartmentfroni the i lbcompartnient. respectively. (Time conipartimment0 de-notesthe externalenvironnient). In general,the flowof material dependsnn t he quantityor cnncentration

Page 3: QCMF: a tool for generating qualitative models from ...

of material in the sourcecompartnient and may alsobe controlledby the quantity or concentrationin someothercompartments,that is:

f~j = f~(x~x1, Xm,

where x~,xi, cm, .. denote the state variable of thesource compartmentand the variableswhich control~ respectively.The dependencyof a flow variableonstatevariablescan be either linear or non-linear. Bothstate and flow variablesarealwaysnon-negative.

In order to formulate the behaviormodel, the func-tional dependenciesof eachflow fjj on x,j in (1) mustbe expressed. The nature of thesefunctional depen-dencieswill vary accordingto the systemunder inves-tigation and will be suggestedeither by observing thereal system behavioror by the available knowledge.

Overview of QCMFQCMF is a tool which integratesthe stepsnecessaryto reason about a system behavior: model building,model simulation, and resultsexplanation. The inter-est for automatingsuch processeshas recently arisen,and a numberof methodshasbeenproposedby severalresearchers(e.g. (Addanki ci al., 1991; Falkenhaierand Forbus, 1991; Iwasaki, 1992; Nayak ci a!., 1991;Weld, 1990;Capelo ci a!., 1993;Crawford ci a!., 1992;Low and Iwasaki, 1992)).

Fig. 1 givesan overview of QCMF’s modules. it isnienu—drivenandits major componentsale the (~EN-ERATE, SIMULATE, EXPLAIN and BROWSEmod-ules.

The GENERATEmodule helps (1) the user in en-tering both the compartmentalstructure and the as-sumptionsabout the functional relationshipsbetweenvariables;(2) then, it automaticallyanalyzesthe struc-ture in order to (3) write down the model equationsinto the QSIM language.

The so generatedqualitativemodel is given as inputto the SIMULATE module. This module (1) managesthe information entered by the userabout the pertur-bationsactingon the system;(2) it updates,if needed,thebehaviormodel; (3) it automaticallygeneratestheinitial state in the QSIM language;(4) it. predicts, bysimulatingthe model, thepossiblebehaviorsof thesys-tenswhich arepresentedto theuser in a graphicalform.The analysisof such an outcomecan suggesta modelrevisionof either the structure and behavior model orthe initial state.

The user is allowed to requesta causal explanationof the predictedbehaviors. The EXPLAIN module hasaccessto all the information about the systemmodeland to the predictedbehavior to be explainedin orderto generatea causalchaindescribingthesystemtransi-tion from onestateto another. To this end, it exploits:1) the structuremqdel as a causalgraphwherethe ef-

fects of a changepropagatefollowing the pathsin themodel topology, (2) the behavior model to detect the

‘primary’ causesof the change,and (3) knowledgeofthe QSIM algorithm, namely the transition rules, to

LXP AN

I CAUSAL NETWORKL GENERATION

EXPLANATION

L GENERAl ON —

Figure 1: Overview of Q( ME’s modules. Informationenteredby the userareexplicitely indicatedby arrows.Rectangulcsindicate tasksautomaticallyexecutedbythe system

GE NLRAFL

MOOEL

LIETRARY

~IMULATION1

Page 4: QCMF: a tool for generating qualitative models from ...

PS Structuremodel

Figure2: The hierarchicalstructure of the library ofmodels

identify which changesoccur front onesystemstatetoits successor.

Moreover, the GENERATE and SIll l’LATE mod-ules organize andmaintaina library of models whichcan be efficiently retrievedandusedby a KBS for agiven goal. Each model M can be identified with thetuple (PS, 5, B, Q, where PSdenotesa physical sys-tem which has been modeled by specifying for eachconsideredstructure model (b) different behavior mod-els (B’), eachone requiring the definition of the con-sidered perturbations (I). All theseentitiesarerepre-sentedby frames which are hierarchicallyorganized ina treestructureasshown in Fig. 2. Any branch of thetreerepresentsa different model If of PS~It may repre-senteither a differentlevelof abstraction (i.e.,differentstructure model), or a different theory (i.e.. differentbehavior model), or different working conditions (i.e.,different perturbation). Thus, each pieceof knowledgeenteredby the userduring her interaction with QCMFfills a slot of a suitable frame of the model compo-nents hierarchy shown in Fig. 2. This view makesclear which different models have beenbuilt for rep-resenting the available knowledge. ‘this organizationis useful on one sideto Q( ‘MF to correctly accessthemodel library, ssid on the other side to the user toeasily examine the assumptionsmade in building themodels. The latter of theseoperationsis performedby the BROWSE module, which provides facilities tovisualize to the userall the information stored in thelibrary.

Model formulation and generation‘two different sub-modules,which can be selectedthroughasub-menuassociatedwith the GENERATEbutton, deal separatelywith the structure and behav-ior model.

The structure model consistsof information about thedecompositionof the systeminto compartments, andabout the network of interactions between compart-ments and external environment.

A user-friendly graphicalinterfaceallowsthe user toenter the definition of the structuremodel and/or toedit a previously defined structure. Eachobject of thestructure, i.e. compartments,flows, controls, mustbedefined by the user according to the available knowl-edge. Eachobject is representedthroughan icon, andis enteredby the user by clicking the correspondingbutton. According to the selectedobject, further in-formation mustbe enteredby the user. Namely,it is

Lni imultniS requiredto specify:

• for a compartmeat, the nameof the substanceit con-tains, and the position on the input/output graphi-cal window;

• for a flow, the connections between compartmentsand the exchangeswit Ii the environment,i.e. whichcompartment the flow is leaving from to reach an-other conipart itient or t he environment, and whichcompart inent t lie flow is entering from anothercorn—l)artniellt or front the environment;

• for a control, the controlling variable and the controlled flow.Each compartment is automatically labeledwith a

number, and the flows are automatically labeled tak-big into account their direction. This facilitates themodel formulation processsincethe direction of eachflow can be easily identified, aswell as the modelvari-ables. ‘l’hus, writing the equations in the behaviormodel generation phaseis straightforward. All inputoperations are guided: they mostly occur through ci-tIter menu and/or the selectionof compartments.

The componentsof the structure arerecorded asval-ues of ‘dots of the slructurc frame that the user canmodify at any time during the generation phase. Thevaluesassociatedwith the compartment, flow and con-trol attributes/slotsare respectivelythe list ofthecoinpart mnent nmmmher labels with their respective dubbednames,the list of the flows, and the list of the control-ling conil)artnment number labels wit Ii their respectivecontrolledflows. Moreover, informationaboutthe systern which the structure is relatedto and the list of itsassociatedbehavior niodels have to be recordedintoslotsof t he strun tire frame in order to suitably locatethe structure wit bin the librar) of nioclels. ‘therefore,the structure frame is describedby five slots,namely~l1ysical-system,behaviors, compartments, flows andcontrols.

In order to draw a clear and nice view of the com-partmental diagram, functions looking for the mini-malconnection path of two compartments,and avoid-ing the overlapping of objectshave beenimplemented.Graphical editing facilities are available to the userin order to modify a structure: rompartnments, flows

SI

/P\/.I.\ /H\

St

B~i s11

~

/I\III lilt liii

5 B B

ni ii uwu~

/\

Page 5: QCMF: a tool for generating qualitative models from ...

and controlscan be deleted. The system updatesthestructure frame and all related lists and the coinpart—mentaldiagram, that is the compartmentsand flowsarerelabeled.The structuremodel can be stored,andthen retrieved, through the frame and lists containinggraphicalinformation. However, the savilig operationis performedonly after an automaticdebuggingof themtroduceclstructure ensuresthat it is an acceptablecompartmentalstructure, i.e. all conipartnient.s areinsomewa.y connectedamong themselves.

Behavior model

Theformulationof thebehaviormodelof a given st ruc—ture requiresto specifythevariables,the functional re—lat ionshipsbetweenvariables,and then to write downthe differential equation (1) for eachcommipartnieiit

The i (lent ification of all the relevant variablesis au—I omatically Performedby QCMF by exploiting tie information representediii the structure: the uiunher ofcompartinentsallows us to identify t lie statevanahles

and their time derivativevariables.i’~ the flow slotpermits tli.e identificationof the flow variablesf~, amidfor eachof t hem to state if it is a leaving or enteringflow, and consequentlyits dependencyon the variable

TIme possibledepenclency of f~jon ot her variablescan be derived by reading the content of the controlslot. Iii the caseof controlled flows, the multi—valuedfunctional dependenciesbetween flow an(I state vari-ablesareexpressedassum or product of single—valuedfimctions. These functions, which actually are aux-iliary variables, a.re autouiatically dubbed and nit ro—(luced into the list of variables.Then, t lie initial quau—t.ity spacesL~must he specified for eachvariable. l”irst,thesets L, associatedwith the flow andstatevariablesareinstantiatedto (I) I Ni”) for the non-negativityprop-em’ty of thesevariables,whereasthe setsL~associatedwith thevariables,i~jareinstantiatedto (Ml N F’ 0 IN F’),whereM INF andINF in the QSTM not ation mean —

aiid + ~, respectively. As soon as fur tlier i uforinat monabout the system is provided by the user, I lie sets L,ai’e updated by inserting new Iandniarksvalues, ‘l’heoi’der i’elation of thenew landmarks~vitli m’espect to t lie

previously defined ones is stated by the user, t luouglimenus,on the basisof her knowledge.

In addition to updatet lie npiantity ~~~aceassociatedwit Ii each variable, and to translate into t lie QSI~iIlanguagethe relationslnps bet~~‘eenvariahles, Q( ‘M Fderivesautouiatically for eachconipartwent thedilfor(‘mit mal equation which describesthe dynauucsof t liecontainedsubstance.First , for eachcouipartmiient,allentering and leaving flows must be olent i lied so thathe correspomidingmass halance equation (I) can he

written. Moreover, the analysisof the coiiipart nien—al diagramallows us to identify particuham’ featuresoflie structure, andto write further equationsdescribing

global pm’opertiesof the system (for example,the massconsem’vatiou law fom’ closedst ructmire). ‘[‘lie I ranslationuito the QSIM qualmtativ, constraints is st raighitfor—

wam’d in most cases. Ilowever, since QSIM constraintopem’atnm’s are relationsand not functions, the syntaxdoes not allow nestimig of constraints to create coin—

plex expressions. In such cases,QCMF introduces avariable, which hasno physical meaning, to representmt em’mmiedia te results. In the following, the variables

are denoted by Xi, Fij , DXi, i’espectively,whemi they areinstantiatedby Q(’ M F. The kind of relaionshiip betweenvariablesis suggestedby the specific

domainknowledge: therefore, it is entered by the userwho is helpedin I his operationby a menu. TIme allowedkimids of relatiouslupsallow t lie imser to describequahi—atively a wide set of functional dependenciesbetween

variablesin tem’mns of their regions of momiotonicity.Infominatiomi about I lie behaviormodel is storedimito

a frame, mvliicli is representedby live slots, nammiely

physical-system,structure, perturbations, flows amid(omit rolled flows. ‘the first t liree slots store all the inforniat ion needed for idemit if’ying, in the hierarchicalrec st mud ure of tin’ model library, the hianchi which

I lie heliavior model belongsto, amid its possibleassociat ed branches. ‘l’hiei m’ valuescorrespond,respectively,to the namesof the phiysical systemand the structum’ewhich the hehaviom’ is related to, amid to t lie list of itsassociatedperturbations. The flows and controlled-flows slots allow us to characterizea behaviormodel ofan umidem’hyirig stnmctimre, that is t hey give informnatiouabout the assimmnptionsmadeon the fumict jonah rela—iomiships hietweemi flows and state variables. ‘[‘he val—mes gi vem to theseslots arethe list of flows, or auxil i amyvariablesdefining flows, wit Ii their respectiveimifom’nia—I iou about I lie assumedI vpe of m’elationship, amid I lielist of coumrolled flows wit hi I heim’ associatedkiiid ofalgehm’aicoperatorwhich allows mis to (lefimie the nuilti—valimed fumïctionaI dependencyof the flow’ omi t lie st atevar jabh’s.

Model simulation‘I he m mia in task of I lie Si \ It [‘AT F moodule deals ~viI IiI he amiloniatic generalmon of t lie nutial stateof I lie pci’-tubed system direct l\ in tie QSIM code, i.e. tie au—toutatic delimit ion for each variable of its qualitativevalue (q’al) amid its direct iou of chuamige(qdzu). Q( ‘Mi’tries to build, startimig f’romu I Ii’ valuesof’ I lie perturbedvariables,the imut ial stale of the subsetof system vam’i-ahleswhucli gmiaraiiteesthegemiera(ionof a single commi—

phete svsteni stale. Q( ‘~\lF builds the imut.ial state ohthe variables n, and i~. Kmiowimig the state of smmclivam’iables is si hliciemit whiemi I lie flow variables are notcomitrolled, ot hierwise t lie isem’ niay be asked to givefurther imuformatiou, if any, about the stateof tIme con-I rolled flows wInch , heimug I lie result of algebm’aicop(‘rat ions betmveemi simigle valuedfumictions, could be notmimiivocallv delermnimied. Such a pam’tial mit ial state togethiem’ wit hi I lie hehaviom node! are givemi as input toQSh~mI, which delen iii mies Is consist(‘mit coin i)letiomi byprol)agatmmigt lie state ~almesof the specifiedvariablesllir~mmghntie eurustraiuuts.‘lie i,asic ~lels in the desigmi

Page 6: QCMF: a tool for generating qualitative models from ...

amid imimphemnuemitatiomiof tine algonithuiii gemueratimig timeimmitial state are the followimig:

1. the miser enters,throughmiiemiums,the (luahitativevalueof oneor more perturbedvam’iahhes;

2. QCMF automaticallyidentifies, by analyzimigthebe-havior mimodel, the variableswhich are himikeci to thepertmmrhedoneshy fummctiomiah relatiomishups,amid thiemiimidirectly interestedby thie pertum’batiomi, and dietermimies their qvals;

3. the sigmn of ~ is calcuhatccl by exploit imig the qua1 ofthevariablesj;~appeam’ingiii tine equatiomiwhich de—fimies ~j. This allows us to determnimnethe qdnn’ of ,n’~,andof all the flow variableshimikech by fummctiomiah reha—tionsinps to ~ Multiple perturbations areallowed.Whiemiever, due to multiple pei’turbatiomns, there isambiguity in defining thesign of ,i~j, tine miser is askedto state,accordingto the availahlekmiowledge,whichis tIme pm’evailimig pem’t urhatiomi.

‘I. the qdmis of the variables,i’~are detem’mimied by con—sichem’igt lie qdnrsof the m’elat.ed flow variables. Whena qdmn’ camì miot be mmmnvocahly (letenmnined, the miser isaskedhto selectone omu t lie basisof lien k nowhedge.

Omnce the initial stateIn as heemu (hehimmedi, thin’ miser ~‘amummmii a simiiuiatiomn hy selectimngthe melatcdl opt iou iii t hueSIM PLATE mnemnu or simnply savethe gemieratedcode.i~nothem’ task perfom’mnnech by the SA\’E option is tIneupdatimigof time heha.vior framuue amid its associatedper—tmmrbation framewithnmn the libm’ary of mmiodels. The p r—It i’baluon ,fn’annc is descrihedby four slots, thm’ee oft hiemiuidemitify I lie physicalsystem,the st m’uct (ire amid the be—huavior nnodels the system pei’tum’hations refem’ to, amidtine last omne records time perturbed variablesa.mnch thieim’associatedperturbation,

Tine user is allowed to comusudem’ two difh~renticimidsof scemiam’io iii defImiing the initial state. In one case,theeffectsof perturbimuga m’eferemicesteadystateoft hesystemiu can be simulated; in I lie other one, a tracerkimnetics can be amialyzedh. All hioughi there~5 lid) coinceptuai diiffem’ence in building the imntial state, two sub—niodules,which am’e selectedI him’ough u a sub—menuof t hueSIMULATE button, cleat separatelyw’ithn I lie dilferemutscemnanios. ‘l’hme maimu differemuce betweemu I hue two sub—unodlulesconcernstine imnteractiou betweemu theuseramidQCMF’.

Perturbation of the steady stateSystem models should describe how omue or muuumht piedmstum’banceson a systemii causethe I ramusit.uomnfromu itsnommnaI state I 0 au abnom’uuai omie. ‘l’iiemu , such nuod(‘Is are obtaimnedi by pertumrbimig the nonruuahstate sup-posed to be steady, i.e. hy chuamuging t lie qmmalmlalivestate of somne variables, amid possibly hy iuut.rodhmmcimugeither structural or behavioral changesin tine nnodehdescnihdmugt lie physical pm’ocessdurimig the (~ENERA—‘I’ION phase.On time ot lien hiamich, it is equally jutcrest—

m mug t he suminimlatiomi of tine tim uie evol mtion of the sstcii

fm’omii aim abmnonmuualsteadystate to a miornual one, fom’examnpie, in a miiechicai comntext, causedby a therapy.

hi both cases,the initial state is defined by both timereferemucesteady state aundl tine perturbedone. There—fore, the first task execuutedhby this simh—nmnoduleis timediefimutioun of tine steady value of each variable. Thisoperatiomiis performnwh autoniaticallyby QCMI” when—ever tine quaintity spaceof I hue variable defined in theheinaviormiiodeh is (0 ~); otherwisetheuseris askedto

specify, th roughn a mmcmi, imn which interval the steadyvalue of a ~‘aniahle lies. New haundlrmuarksrepresentimigtine steadyvaluesareaddedto theim’ respectivequamntityspacesin tIne behavior uiuodel by exploitimig the fumic—tiomnal dependemiciesbetweenvariables,amid new corre—

spomidlimig valuesare addedto the correspondingconst raimits. Then, tine usem’ mniumst choose,alwaysthrougha mcmiii, ~vinichnvam’iabhesare perturbed, svhiethner thieim’value is greaterom’ lower tluami time steachyomie, amid pos-sibly tIne om’dlimnal rehatiou with tine othnem’ lamidimnarks.‘Flue options ol’l’ered iii tine unemnmis represemnteither thevariables thuat caun lie pem’tmurhed, i.e state vam’iabhes,constamit flows amid fraci ioiial tramisfem’ m’ate coefficiemntswhich (hefimie hiuiear flows, or I lie intem’vals where thesteady amid I lie pertmurhed ~‘ahlies cami lie. As the sys—Iemui is umnitially supinosedh td) be iii eqtmihbm’icmni, thismneamnsthat the qm)alof i1 uuuust he edlumahto zero,that isthe flows emit en mug a couuipartuncutpeu’fecthybalamicetimefhows heavimig tin’ counnpam’tmuuemut. QC’MF checkstIme coim—sistemicv of tine specified steahyvalueswith time struc—time mmiodel.

Tracer kinetics

(‘ommipart.mnuemnt.almmiodlehiung plays am import ammt role indescm’ibiug mioth t lie dl isl m’ihimmtion amid metaholismii of

ci them’ t racem’ labeled coumnpoummidhs 01’ dl rugs. An idealtracei’ expeniinemnt comisistS iii tine apphcatiomiof a testsigmmal liaviuug umegligihihe mass amid hehaviungniet.aholically exactly as tIne onigiuuah suibstamice to which isani(led as a mm marker. A mimi umnher of’ useful propertieseunnerge (( ‘am’somi c/ al. , 1983) froun such hiypothieses.I”irst , tine I macer exhibits hiuueam’ dymnanii cs if tine sys—temn is iii a comnstamut steadly state auidh im’m’espedtive of~vlietlieu or uuot I lie fummuctiomnal dependhemnciesnhefimnimngthe iuilerdommmhiartuuieuital flows arelimmear. l”umrtherniore,I hiese linear dymuauunmd’sare I imuue imuvam’iant. Qmmahtativemnodiels of I macem’ ki mid ics cami easily allow tine user toimuvestigale t lie couiseqmeucesof reunovimig the hypoth-esisof “suuiaih—sigmiai perturhatioum’’ by (‘omisidhem’immg muomuhiuiear fumuct momial depemndeuicmes.

In this scemuanuo. I lie gemienatoun of thuc’ unit mal statecould he seemi as a pantucmular caseof t lie pertum’hationoh’ a steady stale where lIme steadyvalue of each van—aIde us assuimmied to lie equal Id) zem’o (thus mneansab—seiuceoft macerin all comuipartnueunt.s),amid themeis a sun-gle pem’I.mm’lnatiomu which conrespommdsto time muitm’odmmctiomuof a I macem’ labeled n’ommipommuid imito omie comrmpantmuuemmtII owevem’ a specific sumh—mnodmmle lids beemm inupiemimeuitedmuuaiuuly to munaumageiii a suitableway the dialoguewmthu

Page 7: QCMF: a tool for generating qualitative models from ...

time usem’. Withimi this context, time variablesu’epresemitthe coumcemmtratiomiamid tramisferof time tracersumhistamice.

The usermnust choose,throughmimeuius,both the coin—

partummemitwhei’e the traceris introchmmcccl amid time hoiumch ofimuput sigmia] for the tracer. The input sigmual camn lie ei-ther an irimpuise (iunjectiorm expenimneunt)om’ a stepsigumal(immfusiomm experiumment).QCMF verifies if time stnumctuu’emodel is coumsistentwith tine chosemi iuipmmt sigunal thatis the abseuiceor presemiceof a flow fm’oni the extem’mialworld to time conmmpam’tment,respectivehy.

Behavior explanationWe considerexplamiatiomisas presemitatiomiof imufonnima—tiomi that offem’ a nmeanimmgful imitem’hil’etatiomi of simu—lation m’esults, which clescm’ibes, in a haingumage thatis comiupreheuisibleby the usem’, how amid wIny a he—haviom occumrs. Timefone, tIme cone of the EXPLA INmnodhule, whuchi huas beemu fully desigmuech, but still wi-

den developunient.,deals nvithn a mimetlnoch for geuuenatimuga causal iiterpretation of beliaviom’s; nuone pm’ecusc’ly,givemi a successiomnof qualitative stateschescu’ihiiuig asimimuhateci behiaviom’, QCMF identifies the cause—effecthimiks between variables in successivestates. One oftime basic distimmctiomi~sbietweemi the proposed diffenemitapproachesto the gemmeralioum of causal explammationsof the systenm hieIiaviors (Dc Kheeu’ amid Ilm’owmi, 1986;Iwasali amid Summon, 1986a;lw’asahci amid Simmiomu , 198Gb;(3aumtier and (3umber, 1993) is whether the m’ehatiomis om’coumstraiuitsmmmcl imi the ummodel arechirectiommal on miot. Inthe fornmer case,a causal ad:coumil, is simuupie to be oh—taumueci becausetine valuesare prolnagatedthrough thuc’directional const,raimitssupphiedi by the mimodel builder.Altenmiatively, bidirectional comistramuits u’equire causalonclenimug teciimniqcmesbecausethey hackaim c’xphicit mcmi—nesemitatioumof causality. TIne commtext iii which the EX-PLAIN mmnodumiegemneratesa causalaccoummitis hunmitechtoconipantumiemitalmmmodelimmg mumethiochohogyiii which ucla—tiommshnpsarediu’ectiomual. ‘i’hnus allows us, givemi a hiich i—nectional QS[M model, to umiterpret the system ‘s be—luavior hiy comiibimuiumg siuniulatuomuresultsamid tIne kuiowh—erigeof time chrectionalrelatuomushupsexpm’essedthuromughuthe commipantmimeuitah chuagu’amin In the tramisutmomu f’rommua state (Q5’~)to its successor(Q$’~+J one on umiorevariableswill changequalitativestate. ‘[‘his tramusitiouufrom state QS~to QS~+~will he unecessanily(lid’ to lineqdnmsimu stateQS~descnibimig theevohuutiouuoccuurnimig muthe systemumat timmie I~.‘[‘his pniuiciple is the basisof tInealgdii’ithuui umichenhyimig the EXPLAIN uumoduhebecauseitallowsQCMI” to caumsahlycomicatemiatethe changesfnciumua stateto its sccesson:time algonithiumi whmemi comnpanumigt~vosuccessivestateswill simugheotmt thosecinaungesthatare a direct coumsequmemmceof tine dhrectiomus of chmauugein QS~amid will pm’opagatetIne effc’cts of theseciiamigesthrough the dmu’ect.iomuah comistramuits to ad’cdiuiuut. fom’ thenemumaumningchiammges. Aphihmedl to a hiehiaviou’ chuosemi bythe miser, thus procechimm’eis repeated hiegiunmmmuugfrdinm theimmmtual state to thewhole sequenceof qualitativestatesd!escm’ibimng tIne behuaviom’. ‘hue causal accouuuutwe are

aimmmiuig at arisesfronm chmainimig tue separateaccountsobtaimmed fom’ the successivetramisitiomis. Tine user willbe allowed to ask foi’ causalexplammationsof either a

shiecific biehavior of time systemmm or time differencestimewhole set of possiblesysteumm behaviorsexhibits. Thepresemitatiormof explamiatioumsare provided at differemithevehof details: fist, the u’eievanmteventsarepresented,amid them , omi the usem’ reqimest, moi’e amid uiiore detailedcatmsaiexpianatiomisfor amiy chammgein tIme systemim vam’i-ablesare him’oducedl.

An example of application of QCMF tothe medical domain

Tine hack of metimodological kmmowiedgenecessaryfom’hiumilohing amid simuhatimugrnochehshas beemi a seu’iotms dc—

tei’u’emnt fom’ phmysiciamis, ummuichu miidiu’e thnamm for expert. inother clomimaiuis, fromum usimig systeumi mmmodehs in spite oftheir gm’eat (utility loin neasounng ahiout pathnophiysio—Idigical systemuis. As shmowum iii ( ltamiiouii ci ci., 1992),uiue.hical neasounmuguuiay he bm’oken chowmi imito two chif—fenemmi. phases: first , umuitial nnfoinmumatiomm is exploited toselect cauichidateprohiheuui’ssolcutuomis(hypothesisselec-tion phase),audi them thesesohumtioimmsare usedasstart-imug counditioins to foirecastexpected coumsequencesthatshioimmlih derive if adoiptechas final solutiomis (hypotlme—Sm testing phase). Diseasesrepresenttime sohutionsofdiagnostic u’easomnimig, i.e. the search for tine Iiest cx-

phamiat.iomi of tine cunnemmt situmatiomn of a patiemit, whiletreat,mmiemit.s m’epm’esent. time solmitions of a therapyplan—mnimmg prcihiheuim, i.e. the seam’chm for the best action toaummehioratea patiemit’s coinohitiomus. Structure and be—hiaviom’ umuodhels provide ami essential lomiowiedge I’emire—seuntationiforrumahisni fom’ exphoitimnggemnumirie pathophiysi—ohogicaltheories,whemiavailable,in time testing phaseofmumeclicalneasonimug(Inoimui d ci., 1990): tIme consequencesof a sc’hected sohuutioimm cain lie dibtaimmed hiy simmmhatimmga mmiocheh oif tine comusichem’eoh pathophiysiohogicahprocess.A diseasecan he mniooheheoh by chiamigiuig time valuesofsoimiie mimoidel vanialles, amnch possihily eitinen time fcunc—tiouual rehatiomishnupshetweemuvariablesou’ tine structureuuuodeh with respect to) tIme omne olescm’ibimmg tine physio—hoigical behavior ‘i’hnus, tIme moidel sirnuiatiommprovides11w mew steadystate, which is abmionmnial, aswell as thetramisiemut to achieve it in case of therapy plamuuuimng,also the actioimu of lime liv pothesizeoltreatnnemitumeecis tobe uuuodeled: for ex:nuuuple a drugs farmumacohoimieticsisessemitial to describeluow it affects tIme systemmm’sbehiav-ion. ‘l’huus, a KBS should comitaiun ohiffei’ent stm’uctum’eamn,h hehuavidir uuiodels (vimidhi coumlol lie used wheneverthe sohuutioiuu‘s hypothesesthey m’ehiresemit are selecteolascandidatesohumtiouis. lu tIme mmmedicalcointext, QCMFcaum lie viewedi as a pomvem’fiih tool for time acohdmisitiomi of

pathiomihysiologicalhomioiwleohge.Let mis coimmsuoiem’, for examnpie, the (ilucose—lmnstmiimn

Regumlatoirysysteni (G—l—R) iii circler to olescnibeQCMF’at woim’k. Aftem’ thue seiect,uomn of tine systemun, tIme (userus thucum allowed to enter oimue oif the mmmodei—m’easomniuig

phases. ‘FIne st.ructumne unoichel shmowmu iii Fig. 3 conic—

Page 8: QCMF: a tool for generating qualitative models from ...

Figure 3: A st i’umct mire ummoiciel of the ghumcose—mmistmhinnegumiatoiry svstemum

spomiols to tine simplest ohecomnnpositioimu foir G I—Il,, aunohimncludestwo couimpartnuents:glucoseamid iinsuhmi.

The glucose is describedby a singie comnhiartnmemntu’epresentimngextracehiuharfunds, The processesthathave heeun explicitly comisideredare the liver glucoseproduction fio amid tine glucoseehimiminatiomi i’m. Theliver glucoseproductioumdepemidsnun both extracehhumlarglucoseamid plasmaimisuhimi; while the ghtmcoseehimmumma—tion is dcmc to remial excretiomn,as well as to time imismmhmi—dependemitglucose utihzatiouu by imiuscles amid adiposetissimes amid time insuhmi imndepeumdemitghumccise umtihizatiommby tine ceuntralumel’voussystemmiamid mccl hilooid cells. Timeimisulin simbsystemmmis also descm’ibedby a simmghecomimpam’t-mnmemmt represeuntimigplasmimaimisuhimi. The imisumi in produmc—tion derivesfronm tine pancreatic m’espoimmse to glucosestiniulation. There is mo excluammge oif flow hetweemntime two commipartmineunts, hut t hey interact to countm’oltine glucoseprodtmctiounamid] ehinmimmatiomm amid the umusulimnpi’oductiomi.

At first, time aim tommnatic amualysisof tine st rumctui’e inFig. 3 ideumtifies tine following vaniahiles:Xl, X2, DXI,DX2, F 10, FO1, F20, F02. Time infonmnatiou 51 om’eoh iii

tine structureframmme (Fig. 4) allows QC’MF to idemutifywhich flow amid statevariablesarerelated to. ‘Fine flowFO1 depenois0mm Xl amid omi tine comnt.u’ohhiungvaniahilm’ X2,FlU depemidson both Xl amid X2, while F20 amid F02are u’espectively functiomi of Xl (contm’olhmig variable),amid X2.

As fam’ as tine liver glucoseproductioun(F’] 0) is coum-cenmied, it is reasomnahieto assumethat F10(X1.X2) isexpu’essedby suumnnmimng two simigle valued ftmmmctiomus of

iuaimie: C—I—I?

patliophysiological—systemn:Gimncose—Iuusuuinn

behaviors: umocmii al be/i—i be/i—2

conmpartments: I-glucose 2-nnsuiun

flows: FlO J”Oi P20 P’02

comit:rols: I-Fit) 2-FlO 2-FOi i-F20

Figumm’e 4: ‘[‘lie fm’amiue u’epresemitimngthe structure modelof tine Glucoselnsmmhmm Reguulat.iomisystemii showniii Fig.3. Slot miammies am’e imiohcaieoh in hold while slot valuesin itahc

Xi amid X2, whosediumlihied nannesXl F10 aiim] X2F10am’e auitoimumatically litmilt hiy jomnimug tIme naummesof the comu—t rohhimig vaniahileamud t lie coimntu’ohled flow. Both X IF1Oamid X2F’ 10 cain m’easoimuably lie assummneol to liehave asa mmmomiotounc ohecreasimugfuunctiou of Xl iii tine immter—vai (0 XI * ) amid of X2 iii the imit ervai (0 X2* ) . me

sped ivelv, amiol coumustaunt elsewhere. Amialogouishy. tinefuumctiomi 1,01(Xl ,X2) , oiescnihiimng time glumcoise ehinimimma—I ioimm, can lic’ olefluied by time sumumi of Xl FOI and X2FOIwhiei’e Xl [‘01 (Xl) can lie assumineclto be niomiotomnc iii—creasimmg, amid X2F’Ol (X2) unmomiotommic increasingiii tineimmteu’vai (0 X2**), and comistant elsewhere. The pro-ductioui of imisumhiun (F20) cami be u’easonahhyassumedto imicrease mmnommotomiicahiy with tine couicentrationofglucose (Xl) neacinimig a satumm’atioum value (F20**) for

Page 9: QCMF: a tool for generating qualitative models from ...

Figure 5: A possiblebehavior of tine (3-I-R system in responseto an increasedglucoseconcentratioimwith respectto the umornmaivalue, denotedin correspomndeunceto N

Xl=Xl**. Suchachoice us supported by availableex-perimental knowledge. All tine above mnuemntiommed landimmarks areautormmaticallygeneratedammol included iii thequantity spacesof their respectivevaniahihes. Let misnotice that a Iaumdmark caum aiso be remnmoveol froimm itsquantity spacewhen new information allows us to muar-row either tine doummainm or time coclonmamuiof tine come-spoinolingvariable. For example,thequantity spaceofF20, firstly instantiated to (0 ~), is restricted to (0F20**) as F20** representsthe maxiummuni value F20can take on. Time insulin ehiumminatioum F02 can be as-suimmed to bea monotoniciimcreasingfunction of X2. Asfar as time liver glucoseproductiomn (F 10) is concerned,it is reasommahieto assumethat FiO(X I ,X2) is expressedby suummnmingtwo single valuedfumuctions of Xl amid X2,whosedubbednamesX1F10 amid X2F1O areaumtouumatmcally built by joiniumg the nauniesof tine countrohlumig vari-ableaumd the controlled flow. Boihi XI F 10 and X2FIOcan reasommainhybe assumumnedto bchavc’ a_s a umioumnoutouncdecreasingfunction of Xl in tine iummtenval (0 XI *) amid ofX2 in time interval (0 X2*), respectively,amnol coumstauitelsewhere. Analogously, the fuuictmomm FO 1 (Xl ,X2), de-scribing time glucoseelimination, can be defined by thesum of X1FUI amid X2FOI, whereXIFO1(Xl) can beassumedto be immonotommic imicreasimmg,and X2F01(X2)ummonotouuic iumcreasilmgin tine imiterval (0 X2* * ). amid con-staumt elsewhere. Of course,other kummd~of fund monaldependenciesbetweeii variablescould lie hiypotiiesized,amid, therefore,time assuummedhehavmornmodel is umot tueonly possibleone for the structure in Fig. 3.

Let us now sdmppose that the perturbed condit.iommof G-I-H comusists of amu increased glucosecomncentraion with respectto tine unonimnal vaiue(referemicevalue).

‘Time immit.ial stat.egeuuc’rateoi by Q(’NIF’ results in a LISPfumnctmoui descrihimmghioth time nonummalstatearid time per-tim rhed one. By the analvsis of tine beinavior model,time variables mdciii mfieol as 1iossmidy’ interested by tine

perturbationof Xl are [‘20, X1FIO, X1FO1, andcomi-scqumeumtiyFlU amid FOl. As the normal value of Xi issumpposedto lie iii the uuiterval (Xi “, Xl **), as well asX2 doesin (X2*, X2**), [‘20, X1FO1 amid FOl takeomia value greaterthnaim time mionimmal one, whereasX1F1O,amid thiemn FlU, do mmot cinamigesince the perturbedvalueof Xl still hues in time satunation interval. Therefore,itis DXi < 0 (DX 1= LII.) — [‘01). amid DX2 > 0 (DX2=F20 F02). This nmeans that qdzr(X1) us decreasingamid] qulur( X2) imncrea.siuug,amid commsequemntiy,by tine ammah-

sms of t hue oommst ramunts, it is qdmr(DXI) imncreasimngamidqJuu’( DX2) decreasing.

hi respomnseto tine assummiedpentunhatiomi, two classesof behaviorshave been olitaimied: t raumsiemnt coursesshiowiumg daniped oscihhatiomnsor muot. Aim examimpleofbehavior takenfrom the hatterclass is sliowun in Fig. 5.Let us miotice that all time behaviorsgeneratedby timesiuimujlatmomi arefeatmired by a final steadystatewherealllie variablesassuimiue agaimn I lie norummal value. This ishe expecteo] resuiIt as I lie comisideredmmmodel representsinc physiological heinavuorof G— I— R . ‘Flue simulated

behaviorsshow all thud’ possibleways time systemmm in a

perturbed coumudit mom i’eadts to bniung itself hack to the

STROCTOID MOSEL C’3—S — — SEWAV~ORMODEL NOSUAL

42 8?

88:4,21

2,3.’, .84 TIC, 2,,*, ~ ~ .

Q,al,te,.~Qt*4 ~ E,,.,’,,,,..,.’,’,O’

i__se’ y~

OHS I*8T184AC4 028.000

6 . . NP 4,4’. 4 N 4*,,’ ~ ~, . ~‘‘~O ~fl2~3,~44’ P~ON.Nj’

2 63.. LNN,b, . S. ‘4 .,* . .,b N 2,5, N,.~ ~ .,, £

Page 10: QCMF: a tool for generating qualitative models from ...

METAIOL~CSYSTEM CPOCOSE-I6%OL PS

— STROCrURE MODEL 431—185.0 IEHAVPOR MODEL DPOSE’tS—l

#0428,84 OF~S33 ETNE 1D6CE51TC5Lf3X3E~IN.) P86.

xl

~T)

SSCL.5( o)

4)

5,) P~4P~‘fl 42044 P ~£eP’’... w~,.,,1.6.1:,, ‘2). b.’,,M.. ~N,.,,,4,.,d, 8.S,~ £ 0.,. ‘‘“‘*~* 4I~,’ ~ 2-534~ on. Q’Q~Pt~

—~P

Figure 6: A typical behavior of time type ii diabetesconcemmtration with respectto the normal one

nmornmahity. ‘I’lme behaviorsgrou~nedinto time two classesmmiaimmly differ for tine diffs’remnt tenmporahorders in whichdmfferemmt events occur. More imnterestimugscenariosde-scribingG-h-R abnormalbehaviors,smmchi as type I amidtype II diabetes,camnunot be obtained by simmmpiy per-turbing tine variablesof tine previoumsdefined model,but. structural amid behavioral changesare mneeded. IntypeI diabetesthereis ainmostno inmsuhnsecretiounfrommmpamicreaticcells, that is the insuhinm productioum is mnotcoumtrohledammy more by tine glucosecomicentratiomi. Intype Ii diabetes,in aoldmtiomm toi a reduced proohumctionof imnsmmhin, the glucoseuptake by umnuischesamnci adiposetissuesdoes mnot depend nun imusumhmn As far as time be-huavior mmiodeisare comncenmmech. iii the first ca_se I lue vanable F2U does miot appearany imuore uu t lie list of systemim variables amnci comistraimits. In the secoimuol c;is’e I lievariableFU 1 canhe supposedm unomnotoumn mc ally iii creasingwith Xi, amid F20 a constamit fummctmom whosevalue uslower I luau tine mnonunnai ouie.

Fig. 6 shows a typical respoumseof time type Il chia-iuetesmimodeh iii responseto an increasedvalue of thegiimcose concentrationwith respect to tine inormimal omne.As expected, as the glucose elimimiunation is insulin re-sistent, the glucoseconcentrationcain reach agaium themnormal value,whereasthe iumsuhin, for its reducedpro-duction, decreasesamid achievesa steady value iowertiman the normal omie. Nevertheless,ammotiner class of

predicted behaviors, where tine glucose comicemmtratiouachievesa steaohy value lower thmamm the starting valuebut still higher thmami tine nionummal omme, is equmahhyaccept—

umnodet mmm respommsc to an increased value of time glucose

ablefroummi a pathiophnysiologicalpoint of view.

ConclusionComnpartmmientaimodeling is a well-known modehimigtechmmiiquefor therepresemntat ion of tine behaviorof comim-plex systems,amid its useby researchersin physics,biol-ogy amid niedicinedatesbackto time 1920’s. In time corn-partmental approach,the behaviorof a complex sys-tern is represemitechthmrough an idealizeddeconmpositionof time s stemum into immtenactingcompartuneumts,whosehe-hnavior is basically go~t’nmieol by tIme massbalancelaw.‘[‘lie comiupartnmeimts (10 mint unecessanilycorreshiomidi toact mma I ol ist u mugumshuable phmysucal coniponent.suunl ike I hadevice ‘emitened approachu mum which conipounemnts have aohm rect correspomuohemice ~t h tIme different lulmysical partsau artifact us madeui of.

l’hus paperdescruhi’N I Inc arclmitecture of QCMF, acomuiputen—hiasedframiil’mvork win ichi mmml egratesfacilitiesfour gemieratumug a miuod’l of a commmh)artumieuntah system.simnumhat mug its behavior amid providing a causalexpla-natmom of I lie obt aimed behavior.

in ot her works (Addamiki c/ aL. 1991; Fahkenhaicnaumcl Fonhius, 1991; Low amid Iwasaki, 1992)dealingwith

qualitative uiiodeh constructiou, the mmmodehing problemis approacimedby selectimng, within a large predefimiedmodel hhrary, umuodel fragmimemuts,amid possibly by corn-

posimig thiemni. in particular, tine selectiomi is perforuimeolaccordimmg to either a set of assurmmptiomnsor a user’s

query abouttime system’sbehavior. In theseworks, tineummodel fonmnumlatioinprocedureis basedon QPT (Forhius,

Page 11: QCMF: a tool for generating qualitative models from ...

1984). QCMF, which is hasedion QSIM, allows tineniodehler to specify in a graphical way, time comimpart-mriemntalstructureof any new systeni, amid acquirestimeneededknowledgeto geumeratea systemummodel. Thiemi,a miew rmmociei is storedinto a library fm’ommm which it caumlie easily retrieved. Time huasic unmoolel comhiounemnts,i.e.commmpam’Imneuits, are miot worth to be stom’ed sepau’atelysimmce they au’e mint iuinysioiogicahhy mmieamiimngfumh oumtsioietIne context where they are placed, i.e. time ovem’allnioudel. Tins representstime major ohifferemuce betweeuitIme two approaches:iii time former omie conmpomremmtscaumhue fully defimmed indepemidentlyfrom tlneir commihuinationiumto a specific ummodel, in tine latter onemodels cami liebuilt. iumstammtiatimig few commceptualemitities, i.e. coin—

partmneumts, flows, control signals,audi so on.In this papem’ tine unaimi emumphmasishas heemu guvemi lou

I lie oheso’niptiomu ouf QCMF‘s aimihity iii muiodei fonuimumla—I iou , geunenatiomuamnol siuuiuiatioui. ‘h’inese facilities aremuow fully opem’ational. The muuaiii prohhemunswe f:nceohoheai with tIme simimum I ation hurocess.Q( ‘NI 1’ um henIs frcuu ii

QSlI\’I all of it.s st.n’emmghtsand hiuintatiouuis ( 1”oiuicin~’ amidKumipers, 1992; Kuipers, 1987; Ku.mipers anol Beanlamit,1988; Kuiupeu’s et ou/., 1991; Lee amid [cuuipers, 1988;

Shuemu amid Leitcli, 1991; Stm’cmss, 1988): it is capableto

predict all possible system helmaviom’s hut camm head toaim intractablebranchingof time behavioraltm’ee. hi or-dci’ to commtroi the sinmtmhation, QC’MF autoiuiaticallyimu—yokesfilters for redhuciumgtine prohifem’atiouunof hiehavuor’s,muammiehy time Higher Order Derivative(IIOD) coumstr’aimut(Kuipem’s C al. 1991)or, whneunevertinis is miot applica-ble, tine chatter’ huox ehimmnumatioumitedhnumiolue((‘lamicy amidKuipers, 1993). Whiemmevem’ it. is possilule, Q( ‘M F ahsouexploitsfilters expressimrgtine mirasscomiservatiomilaw hiyiuitrooiimcimig unto tine behavior mmnouhel the sumitahihevari-ables aind comnstra,imnts. Another way to fumrt lieu’ m’ehumcetime behaviortree comnsistsin perforuummmmgair attaimmableemivisionnient,i.e. no new la,mmcimmmarks am’c imntrodumceoh.As new lamndrnarksare related to a siuecific huchmaviom’,this immakes easier tine conmpan’isomi ouf hmehiaviom’s allow—imrg ums to aggregatethe simimilar ounes. ‘I’hme aggm’egatmuof behaviorsaimims at tahoimig tIme sigmiificauit. dhstimuct ionsfor time umser miecds omit of I lie hehiaviou’ tree, At a firstm mistamice, tine miser’ commId he mum t crested omily iii tIne di is—

I nnctioumseitlmer iii a subset of variablesor in t lie finalecmuniii hu’iu mu state. For’ example,mu a tlierapeut~d com u—

text, hmmo~vimmgif a systemum iii au abmuonmimalsteadhystate,when pem’turbed huy a t hienapy, us (‘apahie tdi a(’hiui’\’ea mnonmniah state is time essemntial immfonmmnatioun. In fact,if the set ouf produceol alt enmiativesdiol mint countaimu tineexhiectedibehaviors,time perturbedmimoudel should be re-vised.

As regarolsits possibleuse, unaumyissumescmiii he coin-sichered. First, QCMF camn work as a stamndl-ahomnesys-temmi resumitingiii a powcm’fumh (lid actic tool f’om’ m’easomiimigahommt tine pathopimysiolougicalhuehnavioum’s of a systemui.‘l.’hmemm, QCM 1” can he fully immtegrated nvi tiniii I argem’knowledge—basedsystemmis that misc differemul founumialismi is.hun fact, it irmay gemieratekuiowiedgesomim’ces that ~amihe

pi’ohiem’ly exploited iii tine deductiveiniferemuce ouf mincdi—cah reasounii ig iii t lie execmmli ciii ou f huothi di agmiostic amidtherapeutictasks.

AcknowledgementsWe especially thank B. Kmnipem’s who pu’ovided theComumuimomi LISP immuhmhcmmmemitatiomiof QSIM. We arm’ alsoiumdeimted to A. Cattaneowho imnphementedpant ofQCMF in his Master Thesis, to D. Chammcy for pro-viohing Ins last exteumsiomisto QSIM, amid to S. Temitoumifor techmuicai simp~uor’t.This woi’k is part of tIne AIMpm’oject A2034, a GemneralAm’chitecturefor Medical Ex-pert Systemmms II (GAMES II), which is suipponieci luythe EumnopeamiCouuimmnummnity.

ReferencesAchohauukm, SR.; ( ‘m’euuiouuuimui . H.; amid Peumbenthy, J.S.1991. ( raphus ouf umuochels. .4c/ufieial 1mm/c iii g nec51:145 177.

At kimis, C. L. 1971. .IJulIu ouuupar/uuuen/al Modelsma lIt—oloqucal~-iysIcuums. Cluapumnami amid hail , Louiolomi.

Bohurow, l).( (ed) 1 9i~4. Quialulomlivc T?asouumug aboutPhysical .5’ye/cuuus. Nom’tIi ilollauud, Ammmster’o.ia,mmm.

(‘apelo, AC.; hm’oni, L.: amid ‘I’emitonii, S. 1993. Ammuouchel—iuasedsystemum foum’ time chassmficatiommammd aural—ysis of mimatenmals. JimIc/hugomu / .~‘ys/euiusEuuguuueerimug2(3):145 158.

Camsomm, F. H.; ( ‘uhuehli, ( ‘.; amid 1”iumkeumsteimn, L. 1983.Time Ma/lucuuum/ucal Modolmmug of Metabolic aurd En-docrumu SysCmmus. \NTihey, Nu’w York.

(‘hammcy, D.J. arC Kunipers, B.J. 1993. Beimavior ahi—stractioumfor tu’actalulesinmumlationm. In Proc. 7/li inter’—ii (u/loll oi/ hI’oi’k.s/iop omu Qualitative Reasomuzuug,Seattle.57—64.

Ci’awfon’d, J.; Fau’ciuhnam’, A.; and Kumipers, B.J. 1992.Q PC’: A comnpihem’ fu’omn huhysical umnodelsinto omuahita-tive ohilfeneuitial eopmations. In B. Faitings, P. Struss,editor 1992, lbccemu/ .1deemu cos ui Qua/i/alive P/uysucs.Nll’l’ Press. 17 32.

De Kheei’, .1. amid llrouwui , ,b .8. 1986. ‘l’hneounmesouf causaloui’dem’iug . .4u’Iuficua/ Jim/chim g mu d( 29:33 61.

h”aikc’uihiaim’m’, B. awl Fonhuums, K fl. 1991 . ComiuposiI moumiaI m nodehmug: fiuidiung tIne m’iglmt munoohel fom’ the job..1 m’luJio’ual Imu/ohhug uuc 51:95 113.

F’onhus, K. 1). 1 9~4.QuuahutativeprocessI hneory..lr/u—ficual Imutc/hugm~muu~21:85 I6S.

Foumciiè, 1’. aiim] icumipens, B.J . 1992. Reasomnimigaboutemrengy in qmmahtatmve simiuuniatioui. IEEE Transacluousomu Sysl iims, Ma mu a mud (‘ybcrne/rcs22:47 63.Gautien, P.O. amid Cm’umhen, ‘F. U. 1993. Gemieraiimngexhmlamiat.iomisouf device behavior using couunpositiomnalmnmoclehiuig amuol causalom’dem’iumg. In Proc. 7//i. 1mm/c emma—luau ah U’ou’/,’s/u op ouu Qmum ii / a / ~cc I?asomu17mg, Seattle.59 97.

Page 12: QCMF: a tool for generating qualitative models from ...

Ir’omni, L.; Stefarnehii,M.; amid Laimzola, C. 1990. Qual-itative ummodeis iii medicaldiagnosis. Artificial Jim/el/i-gence n Medicine 2:85—101.

Iwasaki, Y. amid Simon,HA. 1986a. Causality iii ole-vice behavior. Artificial [nielligence 29:3’-32.Iwasaki, Y. amid Simon, HA. 198Gb. Thneom’ies ofcausal ordering: reply to de kleer amid hirowmn. Ar-tificial Intelligence29:63—72.

Iwasaki, Y. 1992. Reasouningwith mumuitiple abstrac-tion mnodehs, In Faitings, B. and Stu’uss, P., editom’s1992, RecentAdvancesin Qualitative Physics. MITPress.67—82,

Kumipers, B,J. and Beariant, D, 1988. Usimmg incomum-plete quantitative knowleolge imm qumahitativereasomi-imng. In Proc. AAAI-88, Los Altos. Mom’gamn Kaufmmiamnmi.324—329.Kuipers, B.J. amid Kassiu’er, 1 P. 1985. Qualitativesimuiatiomi in medical piuysiology: a pm’ogm’ess rehiont..Techmmmical Report. M]T/LCS/TM-280, MIT.

lKumipers, 13.3.; Cimium, C.; Daile Moulle, 1).’]’.; andThnroop, D. R.. 1991. Flighmem’—oroher derivative coin—straimmts in ciuahitativesimumlation. .4r/mficuab lot el/u—gemuce51:343--380.

Kuipers, B.J. 1986. Qualitative simumlatiomi. ArtificialIntelligence 29:280—338.

Kuipers,B.J. 1987.Abstraction by tinuue-scalein qumal-itative sinmuiation.1mm Proc. AAAI-87, Los Altous. Nlor-gaim Kaumfnmamiui. 621—625.

Kumipers, B.J. 1989. Qualitativen’easonimng~vit.incaumsahmuuodelsin diagnosisof coumupiexsysteumns.In \Vidmiiamm,L.E.; Loparo, K.A.; and Nielsen, N.R., editors 1989,Artificial 1mm/el/igence,Smmmuu/a/mouuamid Mode/mug.Wi-ley, New York. 257-274.

Lee, W.W. arid Kuipers, B.J. 1988. Non-iuutersectionof trajectories in qualitative phaseshuace: a giohualcouistm’aint for qualitativesimmuumlatiomm. lmn Proc. AAAI-88, Los Altos. Morgami Kannfmmuammmm. 286—290.

Low, CM. amid I~vasaki,Y. 1992. Device umuoohelhingenvironnmnent: aim immteractmve emivim’ommmmmemmt. fom’ ummouoh—elhimmg device behiavioumr. Imutehhigent.S’ystcnm.sEngineer—immg ](2):115—145.

Nayak, P.; Joskowicz, L.; ammol Adchamihoi, 5. 1991.Automated nmodehsehectiomiusing comitext—chepemnolemit.behaviors. In Proc. 5th imuteruuatuomuu/ Work’s/mop onQualitative Reasomming,Aumst.in . Aumstimn U mmiv. I 0—21

Ranmoumi, l\’I.; Stefanehhi,M.; Magumauni,L.; amid I3amosi,(4. 1992. Aim epistemmmoiogicahframimework fom’ mnmeohmcahkmuowledgebaseolsystems.IEEE Transactionsoum .Sys-tents Man amid Cybernetics22:1361—1374.

SAAM, 1993. User’sguide mimanuma]. Resouumu’ceF’acihit.yfor Kinetics Analysis - Univ. \‘Vashmingtoun.

Shen, Q. ammol Leitcim, R.R. 1991. Conuhuimuinug c~ual—itative sirnuhatiomi amid fuzzy sets. In Faltimigs, amidStnumss, P., editors 1991, RecentAdvancesiii QuahmLm—live Physics.MIT Press. 83—100.

Struss, P. 1988. Global filters for qualitative belnav-iou’s. In Proc. AAAJ-88, Los Altos. Morgan Kaumi-mmuamnmm. 275—279.

Weld, D.S. amid Dc Kleer, J.(eds.)1990. ReadzmrgsinQua/i/alive ReasommmngAboat Physical Systeuns.Mor-gaum K aumfnuann,Los Altos.

Welol, D.S. 1990. Appn’oximumatiounrefornmuiatioums. InProc. AAAJ-90, Los Altous. Moirgami Kaumfummaummi. 407—-412.