Page 774 - ExtendSim User Guide
P. 774

748 Data Management and Exchange
ExtendSim databases for internal data storage
• Use database tables to provide outputs and reports throughout the model.
• Reuse common sets of data from one model to the next.
• Importmodelinputsfrom,orexportresultsto,externalapplications.
While using a database to manage data is indispensable for large models, the user interface makes it convenient to use an ExtendSim database even for small models.
Creating and interacting with internal databases
There are three ways you can create an ExtendSim database:
1) Throughtheuserinterface,usingmenucommandstocreateanewdatabase,asillustrated starting on page 748, or by importing a database text file from an ExtendSim or SDI data- base.
2) Usedatabasefunctionsinanequation-basedblockfromtheValueorItemlibrary.These blocks are discussed in “Equation-based blocks” on page 695.
3) ProgramwithModLcode.Formoreinformation,seetheDeveloperReference.
ExtendSim provides the following methods for models to interact with databases;
1) Throughtheuserinterface,usingdynamicdatalinkingtoestablishlivelinksbetweendia- log items and databases. This is demonstrated in “Dynamic linking to internal data struc- tures” on page 737.
2) UsingReadandWriteblocks(Valuelibrary)orRead(I)andWrite(I)blocks(Itemlibrary) to exchange data between a model and a database. This is illustrated in “Read and Write blocks for accessing a database” on page 754.
3) Usingdatabasefunctionsinanequation-basedblockfromtheValueorItemlibrarytoman- age data. These blocks are discussed in “Equation-based blocks” on page 695.
4) ProgrammingusingModLcode.SeetheDeveloperReferenceformoreinformation.
How to create an ExtendSim database
The following example shows how to use menu commands to create a database for the Reser- voir model that was shown in the Tutorial module. While a database is obviously unnecessary for the Reservoir model, the purpose of the example is to show how to create an internal data- base.
As illustrated in the example that follows, the steps are:
1) Openaneworexistingmodel
2) Createanewdatabaseforthemodel.
3) Addtablesandfieldstothedatabase.
4) Adddatabaserecords.
5) Ifthedatabasewillbeusedtoinputvaluestothemodel:enter,paste,orimportvaluesfor the database cells.
How To

   772   773   774   775   776