Home
ModelMaker User Manual
Contents
1. Optimization Run 21x Parameters Included In Optimization Initial value Optimised value Error O Main iO estuary_rate 0 0430986 0 0430986 0 00196123 iQ river_rate 0 0967595 0 0967595 0 00610714 Method q Weighting BS Reasonable error estimates Marquardt Ordinary least squares Simplex Weighted least squares r Initial Parameter Estimation J7 Calculate Estimate Methods e Gid gach C Extended least squares Click to open the Optimization Settings dialog box Advanced Choose between Marquardt and Simplex methods of optimization Marquardt is the default and recommended optimization method Simplex is only recommended for experienced users Select Reasonable error estimates to use the error estimates indicated on the Weighting tab of the Optimization Settings dialog box Clear this check box to choose a least squares method to calculate the scaling of the differences between the mode values and the experimental data ordinary least squares weighted least squares or 134 Optimization Parameter estimation The Optimize tab The O ptimization Settings dialog Optimize tab Chapter 14 extended least squares M arquardt only Extended least squares is an option for situations where the errors in the data values are not known Select Calculate E stimate to enable initial parameter estimation using either Grid search or Simulated annealing The Grid search and Simulated ann
2. M oda Configuration D2 QueryPage T 1 II Get the chosen lookup table data page Actions which do not return a value must be used on their own eg InitializeA II GetV alue Which Year Question D1 D1 gt 90 and D1 lt 99 M odelM aker provides a set of control statements for conditionally controlling which actions are executed when the event is triggered The if and if else statements allow the conditional execution of actions The syntax of the if statement is as follows if expression is true execute action or group of actions Components independent and component events 87 Chapter 8 Thus if the bracketed expression is true the action or group of actions which follows it is evaluated If the expression is false the specified action or group of actions is ignored and execution passes on to the next statement For example if D1 gt 10 f Dlis too big D1 10 Set D1 to its upper limit Actions can be grouped together using braces curly brackets and All of the actions within the braces are executed when the if statement expression is true if year 0 If the first time D1 0 nitialize components D2 10 Note semi colon must still be used to separate the actions within the braces The if statement can be extended by using the if else form as follows if expression is true execute first action or group of actions else execute second
3. Please enter the new rainfall page N ew Rainfall Data MetData displays the following dialog box and sets the active page of the lookup table Rainfall to the page with the entered identifier New Rainfall Data x K Please enter the new rainfall page The event action QueryLookupPage can also be used to return the identifier of the currently active page for a lookup table It is often appropriate to arrange datasets into several different files e g a separate file for each year of observed sunshine hours or for the sunshine hours observed at several different meteorological stations At the start of a model run M odaM aker loads the configured file and calculates the values of its configured lookup series from the loaded Components lookup tables and lookup files 79 Chapter 7 data It is possible to change the loaded file during the mode run by using the following event actions e SetFileN ame lookup file le name This attempts to set the active page of the lookup file with the symbol lookup_file to the page with the identifier page number If the new file does not exist or cannot be loaded an error message is displayed and the model run is terminated For example the action SetFileN ame Sunshine sun2 dat loads the file sun2 dat from the current directory into the lookup file Sunshine e Message Title lookup _file This displays a dialog box with the given message and title an
4. Enter a mathematical expression defining the initial value Component Delay Initial Value MaximumDely T Universal T Global M Save Value IV Show Description Description Enter a mathematical expression defining the maximum delay duration Enter a description of the delay optional DLL functions DLL functions allow ModelM aker models to be connected to external functions defined in Windows DLL Dynamic Link Library modules Such functions may contain special calculations or dialog interfaces written for a particular purpose outside the normal scope of a ModelM aker model Refer to the ModelM aker Reference M anual for more information on writing DLL functions ModelM aker communicates with functions held in DLLs by passing and receiving two sets of values The values passed or input to the functions are defined by a user defined list of mathematical expressions The values output by the functions are each assigned a symbol and can then be used by other model components in the normal way A DLL function can be one of two types normal or integration Normal DLL functions behave in a similar way to variables and are designed to carry out straightforward calculations In addition to the configured input value they receive the current value of the independent variable Integration DLL functions behave in a similar way to compartments and are designed to carry out integration type calculations over the same calcul
5. The Diagram view Chapter 3 3 Views and Toolbars The Model Explorer M odelM aker s interface is divided into two panel s the Model Explorer on the left and the Mode View on the right The M odel Explorer organizes the many views that make up a model into a tree structure with each branch representing a different view and provides a simple way to navigate your model Click a view in the Model Explorer to display its contents in the Model View Expand and collapse branches by clicking the plus and minus icons ModelMaker tutor1 mod fr File Edit view Component Model Window Help Denge SAA O LMM e On ROOS Y ODE oo tutor1 mod 6 Main J Definition tg Parameters eo Sample Points DI Model Data O Page1 4 Results fk Graphi HI Tablet a Archive 1 Estuary When a new model is opened only the Diagram view is represented in the Model Explorer Additional views are added to the Model Explorer as a model grows in complexity Views The Diagram view contains the model diagram and is where models are created and defined This view is displayed when a new mode is opened and has the default name Main Sub mode s are stored under the Diagram view as sub views called Sub1 Sub2 etc The Diagram toolbar plus specific View menu Component menu and RMB commands are active in the Diagram view Components and model building are discussed in more detail in Chapters 5 6 7
6. e Repeat to add a second parameter p2 e Double click p1 to open its definition dialog e Enter rive_ratein the Symbol edit box and 0 1 in the V alue edit box e Click OK e Repeat for p2 entering stuary_rate and 0 05 in the Symbol and Value edit boxes Now wecan complete the flow definition e Activate the Diagram view M ain by selecting it in the Model Explorer e Double click F1 to open its definition dialog box e Enter River in the Symbol edit box and rive_rate Lakel in the Equation edit box i e select and double click rive_ratein the Available Components list box e ClickOK 16 ModelMaker tutorial Chapter 2 e Repeat for F2 entering Estuary in the Symbol edit box and estuary_rate Lake2 in the Equation edit box Once the flows have been updated the model diagram should not contain any blue or red shading indicating that M odelM aker can find no errors in the modal definition and that the model is ready to run Step 5 Running your model The model is now ready to run This is the process of solving the equations over the desired range of the model s independent variable See Chapter 11 Running M odds By default ModelM aker s independent variable is time t All equations are solved over a range of values for t and all equations are written with respect to t e Click the Integrate icon The Run dialog box opens M odelM aker runs a mode fromt 0 tot 100 by default and calculates values 100 times dur
7. this is assumed to be the first column by default e Click the Series icon on the Model Data toolbar The Model Data Series Definition dialog box opens e Select the second series in the Series list box e Change the series type to Data V alue and select Lakel in the Available Components list box e Click D dineto complete the series definition e Select the third series in the Series list box e Change the series type to Data V alue and select Lake in the Available Components list box 32 ModelMaker tutorial The completed moda up to this point is tutor8 mod Chapter 2 e Click OK to complete the series definition and close the dialog The model data values we have just configured are automatically added to the graph of Lakel and Lake2 unless otherwise configured in the Graph Series dialog box Error bars have also been calculated for the model data based on the default optimization error which is configured in the Weighting tab of the Optimization Settings dialog box We shall change the default error value to a more appropriate fractional error value of 0 25 e Select Modell Configure gt Optimization The Optimization Settings dialog box opens e Select the W aghting tab e Check that Fractional is selected as the Data Error and enter 0 25 in the edit box e ClickOK The graph of Lakel and Lake is updated to reflect the new default error settings Pollutant Levels in the Lakes 1000 800 600 400 Polluta
8. A C Data I Universal C NotUsed T Global I Repeat View series Select the lookup series type m Interpolation Method Constant EE Check to repeat data Interval Start Polynomial beyond available data C Interval Center C Rational Repeat series can C Interval End wer E extend infinitely above ue Down F Linear and below the available data Use Up and Down Select the interpolation to change the series method to use order Components lookup tables and lookup files 75 Configuring the Table tab The Lookup Table Definition dialog Tabletab Configuring the Series tab Chapter 7 Configuring lookup tables Lookup tables are configured in the Lookup Table Definition dialog box To open the Lookup Table Definition dialog box e Double click the Lookup Table from either the model diagram or the Definition view The Lookup Table Definition dialog box is divided into four tabs Table Series Bitmap and Information See Chapter 5 Working with M odds for more details on using the Bitmap and Information tabs e Inthe Table tab enter text in the Symbol edit box Enter a unique symbol Lookup Table Definition Table Series Bitmap Information Symbol Select the data page to be active at the start of the model run Active Page T Universal T Global H Show Description decision a Enter a description of the table optional Ac
9. Your sample point selection can be changed at any time by re opening the Histogram Selection dialog box e Click the Selection icon on the Graph toolbar Histogram Selection RE Number of columns into Selected which the data are divided Number of bins Sample Points mme Available sample points Sample points selected to plot on the histogram Like graphs the histogram series title axes and legend can be customized in order to present the graph in the most effective way See Chapter 12 Graphs for more information about histogram customization As histograms are stored under the Results view they can be archived See Chapter 12 Graphs for more information about archiving results Histogram data like other graphs and tables can be saved as a tab separated text file See Chapter 12 Graphs for more information about saving data as a text file Monte Carlo statistics The Monte Carlo statistics for each series can be viewed from the Graph Series Options dialog box e Click the Series icon The Graph Series Options dialog box opens 48 0 Monte Carlo analysis Chapter 16 e UseUp and Down to select a series e Click the Series Statistics button The Global Sensitivity Results dialog box opens This dialog summarizes the statistics for the series giving dataset information average values curve information and distribution data T he G lobal Global Sensitivity Results BSF gt Sensitiv
10. as your model is changed To archive the Results view e Click the Results view in the Model Explorer e Select RMB Archive The Results view and a copy of the Definition view are archived toa view called Archivel Additional results sets are archived as Archive2 Archive3 etc The Sample Points view is used to create sample points for minimization and M onte Carlo analysis A sample point represents the value of a component at a particular moment in time To create the Sample Points view e Click the Sample Points icon If the Sample Points view already exists it becomes the active view Sample points are discussed in more detail in Chapter 15 M inimization and Chapter 16 M onte Carlo Analysis Views and toolbars 43 The Lookup Tables view Deleting and renaming views TheM ain toolbar Chapter 3 The Lookup Tables view is created when a lookup table component is configured All lookup table data are stored under this view See Chapter 7 Components Lookup Tables and Lookup Files To deletea view e Click the view to be deleted in the Model Explorer e Select RMB Delete View To rename a view e Click the view to be renamed in the Model Explorer e Select RMB Rename View The View Name dialog box opens e Enter anamein the View N ame edit box and click OK Toolbars By default M odelM aker displays two toolbars the Main toolbar and the View toolbar Pass the mouse cursor over an icon to display its ToolTip The
11. reference is shown in the parent model as an inward connection with a corresponding inward connection inside the sub model Similarly an output connection is shown as an outward connection inside the sub model with a corresponding outward connection in the parent model Input Output To change the symbol or arrow position of a corresponding sub model reference 94 Components sub models delays and DLL functions Chapter 9 e Doubleclick the reference to be customized e Select its new properties in the M odel Reference Definition dialog box Input references Connecting a model component to an input reference in the parent model passes the value of the component into the sub model making it available to the components inside the sub model The connection can be made using a flow from a compartment or an influence If a flow is connected to the input reference the value of the flow is passed into the sub model If an influence is connected the value of the source component of the influence is passed Only one component may be connected to the parent end of an input reference Value1 Input SubModel SS Input2 Inside the sub model the input reference takes the value of the connected component in the parent model This value can be used in the normal way by using the symbol of the input reference Value of Input used in Valuela N gt gt and Valuetb Inputt Value1b Value2a Value of I
12. 2 0 11 because the fractional change in the parameter is less than the minimum change Retry count is the number of times minimization retries a calculation if a parameter violates its constraint range The parameter is set to the nearest extent of its constraint range and the simplex step is repeated Minimization Configuration BE Constraint Range Multiplicative hoan C Absolute bn Convergence Change fo Fractional Change foot o Minimum Change hem Retry Count bk 144 Minimization Configuring the Parameter view Chapter 16 16 Monte Carlo Analysis Monte Carlo analysis enables mode parameters to be specified as random distributions A model is run for a specified number of times and during each run the value of the parameter is taken from a specified probability distribution In this way the effect of varying parameters on a component value can be investigated Monte Carlo output is plotted as a histogram giving a distribution of a particular model value that is produced by the variation of the model parameters To perform Monte Carlo analysis on a simulation one or more sample points must be specified A sample point is a result of the simulation i e the value of a component at a particular moment in time Sample points for M onte Carlo analysis and minimization runs are created in the Sample Points view See Chapter 15 Minimization for more information about using the Sample Points view Configur
13. Cherwell be liable to you for loss or damage of any kind except personal injury or death resulting from Cherwell s negligence including lost profits consequential or other loss arising from the use of or inability to use the Software or from errors or deficiencies in it whether caused by negligence or otherwise in excess of 125 of the price paid for the Software except as expressly provided in this License ModelMaker End User License 5 5 If you deal as a consumer as defined in the Unfair Contract Terms Act 1977 your statutory rights remain unaffected 6 SUPPORT Cherwell s technical support staff will endeavour to answer any queries you may have about the Software Support contact details are given in the Schedule 7 LAW This License constitutes the entire agreement between you and Cherwell relating to the Software and is governed by and construed in accordance with the laws of England The courts of England shall have exclusive jurisdiction SCHEDULE Technical support is available directly from the ModelKinetix web site at http www modelkinetix com support Our web support database is constantly updated and we strongly urge you to explore the support options here before calling us In the unlikely event that you cannot find your answer on our web support database please call our UK office directly on 44 0 1865 784800 between the hours of 9 30 and 17 30 UK time Monday to Friday inclusive excluding UK public ho
14. Main toolbar cannot be customized and is always displayed It displays the N ew Open Save Cut Copy Paste Undo Redo Print Print Preview Find Component Integrate Graph Histogram Table Parameters Sample Points Contents and What s This icons Cee tae l e MII dr Or The View toolbar icon selection varies with each M odelM aker view It ensures that the dialog boxes and features most relevant to a particular view are readily available For example the Diagram toolbar is displayed when the Diagram view M ain is active It displays the Select Compartment Variable Defined Value Flow Influence Delay DLL Function Sub model Input Output Lookup Table Lookup File Independent Event Component Event and Text Box icons BA Views and toolbars The Diagram toolbar Chapter 3 ROOS OCDOArFHEOOM To turn the View toolbar off or on e Select View Toolbar gt Display To customize the View toolbar e Select View Toolbar gt Customize The Toolbar Customization dialog box opens Select the view toolbar to be customized in the View drop down list The toolbar icons available for selection are listed on the left hand side of the dialog box and the currently selected icons are listed on the right Use gt gt and lt lt to add or remove icons from the toolbar The order in which the chosen icons are listed corresponds to the order in which they appear on the toolbar Use Up and Down to alter the relativ
15. Select the M inimize option button in the Sample Points view for SP1 36 ModelMaker tutorial The completed moda up to this point is tutor10 mod Chapter 2 The model is now ready to minimize e Click the Integrate icon arrow and select M inimize from the drop down menu The Start Minimization dialog box opens This dialog summarizes the component time point and parameter selection and starts the calculation e Click Advanced The Minimization Configuration dialog box opens e Enter 1 in the Convergence Change edit box and 25 in the Convergence Steps edit box e Click OK to close the dialog e Click OK to closethe Start Minimization dialog and run the minimization M odelM aker runs the model many times adjusting the values of rive_rateand estuary_rate When the process finishes the new parameter values are displayed in the sub view Parameter Results rive_rate 0 1048 and estuary_rate 0 0471 U se the update command to adopt the minimize values in the model Re run the mode and check a table of Lake2 values to confirm that it contains 500 kg of pollutant on day 20 Step 18 Monte Carlo analysis Monte Carlo analysis enables model parameters to be specified as random distributions A model is run for a specified number of times and during each run the value of the parameter is taken froma specified probability distribution In this way the effect of varying parameters on a component value can be investigated See
16. action or group of actions Thus if the expression in brackets is true the first action or group of actions is executed If the expression is false the second action or group of action is executed instead For example if D1 lt 10 If not too big D1 D1 1 increment D1 else if too big D1 0 start again Again braces can be used to group actions to be executed For example if weight gt 10 if things have got too heavy store store weight storethe product weight 0 and start again else if still spare capacity 88 Components independent and component events whileloop do whileloop Chapter 8 weight weight 10 taketheload The while loop allows actions to be repeated while a specified expression is true The syntax of the while statement is as follows while expression is true execute action of group of actions Thus for as long as the expression in the brackets is true the action or group of actions following it is repeatedly evaluated When the expression is false execution passes to the next action For example while D1 lt 10 while D1is small enough D1 D1 D2 add the value of D2 Braces can be used to group actions to be executed For example while D2 lt 100 whilethere is still room left D2 D3 D4 add the product of D3 and D4 D3 D3 D4 increment D3 The do while loop is similar to the while statement allowing actions to be repea
17. and any backup copy and the other person agrees to the terms of this License 3 1 3 make one copy of the Software for back up purposes only which copy must reproduce and include this License in full 3 2 You shall not 3 2 1 use or copy the Software other than as permitted by this License 3 2 2 at any time allow more users than stated in your sales invoice to access or use the Software concurrently 3 2 3 modify adapt merge translate decompile disassemble or reverse engineer the Software except as permitted by law 3 2 4 use sell assign rent sub license loan mortgage charge or otherwise deal in any way in the Software or the accompanying documentation or any interest in them or under this License except as expressly provided in this License ModelMaker iii End User License 4 5 TERM 4 1 Unless terminated under clause 4 2 this License shall last for as long as you continue to use the Software 4 2 This License shall terminate automatically if you fail to abide by any of its terms 4 3 Upon termination of this License you shall destroy the Software and its accompanying documentation and shall erase all copies of the Software under your control and stored on any medium including the hard disk copy and any backup copy WARRANTIES AND REMEDIES 5 1 Cherwell warrants that the storage media on which the Software is supplied will be free from defects in materials and workmanship under norma
18. are configured in the Model Data Series Definition dialog box To open the M ode Data Series Definition dialog box e Click the Series icon or e Select View Series Select the series to define Select the series type Model Data Series Definition Series Title Label Use Define to complete Series Type z Sortat EE Deire the series definition Data Value Inset Insert to add a new Fractional Error series and Remove to Absolute Error Remove C Notused delete a series Available Components bo Estuary a Select the series model component In the M odel Data view one column must represent the independent variable this is assumed to be thefirst column The other columns can be one of four types 1 Data values associated with a particular model component 2 Fractional error values associated with a particular data value column 132 Optimization Configuring the Parameter view Configuring the Model Data view Running optimization Chapter 14 3 Absolute error values associated with a particular data valuecolumn 4 Notused The fractional and absolute errors are used to weight the contribution of the data values during optimization To use these configured errors select U se values from tablein the Weighting tab of the Optimization Settings dialog box see bd ow If error values do not exist default values are configured To configure a data series e Select the series to be define
19. boxes Enter a unique Enter a valid file Access the Find symbol name File dialog box Lookup File Definition Symbol Configure the format of the lookup file File Format T Universal T Global H Show Description View Data Lookup File Name View the lookup file Description Enter a description of the file optional e Select the Series tab e Select the lookup series to be configured and configure its type symbol and characteristics For a Control series e Select a component from the A vailable Components drop down list For a Controlled series 74 Components lookup tables and lookup files The Lookup File Definition dialog Series tab Chapter 7 e Enter aunique symbol global or universal in the Series Symbol edit box e Select a controlling series e f required define the series as repeated e Select an interpolation method For a Data series e Enter a unique symbol global or universal in the Series Symbol edit box e f required define the series as repeated For an Unused series e Noother selections are required e ClickOK Enter a symbol for the series Select the lookup series to configure Lookup File Definition Add a new lookup series feries Bitmap Information Lookup Jeries Series Symbol Series2 Remove the selected lookup series Series Type C Control EE bomponents fo es Cortef be Seiest lh
20. cannot be zoomed in or out the Zoom In or Zoom Out menu items are grayed out Setting user preferences In the User Preferences dialog box you can set a variety of model editing model running and output properties The properties set are saved with a modal but the default settings that M odelM aker applies to anew mode can also be changed To open the User Preferences dialog box e Select Edit User Preferences The User Preferences dialog box is divided into two tabs General and Output Use the General tab to 1 Select or deselect quiet editing mode 2 Request that equations areupdated when flows areadded or renoved Working with models 63 Chapter 5 3 Show information icons 4 Set double click to open and close text box icons 5 Set the Maximum Undo Level set to 20 by default 6 Warn when all components are initially zero 7 Collect debug information This will enable the Debug Information dialog box once a model has been run Select Modell Debug Information to open the debugger 8 Save selected component values 9 Update graphs during a mode run 10 Display a final elapsed time message Use the Output tab to 1 Specify the name of a report file and choose to overwrite existing files 2 Enabletracing specify a trace file name and choose to overwrite existing files Several of the actions which an event can trigger control the output of trace messages which can be of assistance when debugging a model The Tr
21. dimensional array of elements in terms of i and j and a three dimensional array of element in terms of i j and k For example if a defined value were defined as D1 0 1 0 1 i j 1 10 then its elements would take the following values D1 0 0 O 0 1 10 10 D1 0 1 O 1 1 10 20 D1 1 0 1 0 1 10 11 D1 1 1 1 1 1 10 21 Array elements may also refer to other elements in the same array and in other arrays using iterator expressions For example given two 2x 2 arrays one may be defined like this V1 0 1 0 1 C1 i j In this case the values of the elements of C1 will be copied to the elements of V 1 When not all the elements within an array of component elements can be defined by the same equation or set of conditional equations they can be defined in more than one section This commonly arises when modeling the edge effects of an area or volume In this case two model components are given the same symbol but different array element ranges For example a 2 x 2 defined value could be defined in two sections as follows 70 Components compartments flows variables and defined values Chapter 6 D3 0 1 0 i 10 D3 0 1 1 i 100 j Its elements would then take the following values D3 0 0 0 10 0 D3 0 1 0 100 1 1 D3 1 0 1 10 10 D3 1 1 1 100 1 101 When taken together the sections of an array must define a complete contiguous array of elements with no elements missing F
22. example 29 Serial Number 2 Series statistics eee 149 Simplex esceseeeseeeeeeees 134 Simulated annealing 137 Simulation models ee 8 Snap to ed 54 62 Starting ModelMaker from a shortcut 0 0 0 eee 47 from the start menu 47 from Windows Explorer 47 Step length 0 ee 111 Subdivistons 111 Sub model references 94 input references 95 output references 96 Sub models 0 ceeeeeeeeseeeeee 93 Support technical oeenn tis vii T Table 2022 127 archiving seee 129 COPYING sinnini 130 lakes example 17 renaming table views 130 saving as a text Die 130 selecting components 127 table series n se 128 Technical support vii 154 Text beogeg ne onis es 59 Text file save a graph as eseese 125 save a table as 130 Tile horizontally 0 eee 51 Tile vereal 51 Toolbars fecie cscessduecdedeteecvorns et es 44 Custom zing ossessione 45 diagram eeeeeeeeeeeeeeeeeees 44 MAID EE 44 Top level model 93 Tracing ae tee ee Eege 64 HACE EE 64 TRIS SETS e eee 81 non periodic 0 0 eeeeeeeeeeeeee 81 periodici eege gear eet 81 U Unconditional components 67 defining snenie 67 Universal components 57 Update parameterz 138 143 lakes example cece 34 User Names c sic cates i 2 User preferences sees 63 general ob 63 Output Lob 64 selected component va
23. follow the links to Support Our Web support database is constantly updated and we strongly urge you to explore the support options here before calling us In the unlikely event that you cannot find your answer then please e mail us support modelkinetix com or call our UK office on 44 0 1865 784800 during normal office hours Telephone calls will be logged in our support system and you will be contacted subsequently with a solution or request for more information by e mail fax or phone ModelMaker vii Contents Contents INSTALLATION AND LICENSING sssssssnsnnsnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn 1 DESKTOP INSTALLATION uu ccccccssscesseeecsscceeeeeseusessseeueeeeueeeuseseeaeeeeeeesenseees 1 NETWORK INSTALLATION r ea te a aaa eaea a a aiaa N 3 ABOUT THIS MANUAL sssssssssnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnna 5 CONVENTIONS USED IN THISMANUALL wie ssccceeceseceeseecesssceueeeseeeessuseseaeeeas 5 L INTRODUCTION EE 7 EMPIRICAL MODELS am Zeg ddze e aaa a a a eaa 7 SIMULA geld d Lee EE 8 DEVELOPING A MODELMAKER MODEL wassseccessceesseceseceeeeeecesecsuueeeueeessseeees 9 2 MODELMAKER TUTORIAL sssssssssnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnaa 13 STEP 1 PLANNING YOUR MODEL uuveecsscccssseesceeeeeeecseceeaeeeeueesseeseeeeeseeeess 13 STEP 2 ADDING COMPARTMENTS 14 STEP 3 ADDING FLOWS wieeecccccccsccseeeseecccsecceeaeesueeesseceeaeeeeueessssesueeaueeeess 15 STEP 4 ADDING PARAMETERS nssssssssssssrrssuss
24. it can be referenced from anywhere in the model and removes the need for direct connection Sub models are added to the Diagram view as branches of the main mode diagram By default these branches are called Sub1 Sub2 etc To activate a sub model view e Double click a sub model component in the mode diagram Note selecting View Parent mode will take you up one level into the parent model of the current sub model Selecting View Top level model will access the model diagram of the top level model Components sub models delays and DLL functions 93 Adding sub model references Sub model references in the parent moda Corresponding references inside the sub model Chapter 9 There are two types of sub model reference input and output These are used to pass values into and out of a sub model respectively To add a sub model reference to a parent model e Select the sub model component in the mode diagram The input and output reference icons will be enabled on the toolbar e Select a reference icon and click in the model diagram GL Input Output Each sub model reference is given a unique symbol to distinguish it from other references To change the symbol of a parent model reference e Doubleclick the reference to be renamed e Enter anew namein the Model Reference Definition dialog box When a sub model reference is added to a sub model component a link is made between the sub model and its parent An input
25. mod Chapter 2 There is not a data point for every day of the year so if we want to know what the discharge rate is on day 65 for example we must use interpolation The default method is linear interpolation where the data takes a straight line between data points In our model we will assume that the discharge rate on day 65 is the same as on day 63 i e wewill use start value interpolation e Select the Interval Start interpolation method e Click D dineto complete the definition of the second series e Click the View Data button The Lookup Tables view is created and activated with the sub view Data D ata contains an empty sheet called Page1 with the column headers t and Discharge This is where the lookup table data are entered e Enter the lookup table data We can now re run the model The new graph of Lake2 shows that there is actually more pollutant reaching the bottom lake than we had assumed and that the chemical treatment is being applied much more often Pollutant Levels in the Lakes Lake ease Lako Pollutant kg Time days Step 14 Running sensitivity analysis When developing or analyzing a model it is often useful to investigate the effect of altering aspects of the model Sensitivity analysis allows the effect of systematic parameter adjustment on the values of selected components to be investigated See Chapter 11 Running M odds In our ModelMaker tutorial 29 To follow this e
26. over the defined range Thus if the component is a one dimensional array the first iterator symbol i by default will iterate over the range and if it is a two dimensional array the first and second iterator symbols will be available i and j by default For example given a 2 x 2 array of compartments C1 0 1 0 1 the expression C1 0 1 0 1 i 1 j 10 assigns values to the elements of C1 as follows C1 0 0 0 1 0 10 1 C1 0 1 0 1 1 10 11 C1 1 0 1 1 0 10 2 C1 1 1 1 1 1 10 12 86 Components independent and component events Calling actions Control statements if and if dse statements Chapter 8 The following expression the value 10 to array elements C2 a 0 and C2 a 1 0 where ais another component value C2 a a 1 0 10 The next expression copies the reflection of the array D2 about its main diagonal into D 1 D1 0 10 0 10 D2 j i J M odelM aker provides a wide range of actions for communicating with the model user and adjusting the state of the model A complete list of event actions can be found in the M odelM aker Reference Manual Event actions can be divided into two types 1 Those which return a value e g GetChoice QueryPage 2 Those which do not return a value e g M essage SetPage Actions which return a value can be used to assign values to model components e g D1 GetChoice Do you want to model water flow
27. run Use gt gt and lt lt to select components whose values are to be preserved Check to perform sensitivity T Logarithmic Step analysis Sensitivity Parameter Check for logarithmic steps R estuary_rate OH river_rate Han Select the parameter to be varied Start Value Io Stop Value fi Enter parameter stop and start values Retained series During a repeated run or sensitivity analysis M odelM aker creates a retained series of data for each selected model component for each run of the model Each retained series is labeled with the number of the run or parameter value for which it was created For example a repeated run for component C1 produces retained series C1 Run1 C1 Run2 etc sensitivity analysis of component C1 based on the adjustment of parameter P1 at values 0 1 0 2 etc produces retained series C1 P1 0 1 C1 P1 0 2 114 Running a model Chapter 11 In most circumstances only one series of data is created for the independent variable as the component retained series are calculated for the same values of the independent variable If however the run is halted the final value in the series may be calculated at a unique value of the independent variable In this case M odelM aker creates a retained series of data for the independent variable The retained series created by a repeated run or sensitivity analysis are available for inclusion in tables and graphs by opening
28. so far we can use this new information to get a more accurate picture of what is going on We will use a lookup table component Chapter 7 Components Lookup T ables and Lookup Files to add the following table of data to our modd Time days Discharge rate kgd 1 HL D k e Delete the Switch event and the Discharge defined value ModelMaker tutorial 27 Chapter 2 e Add alookup table T1 e Add an influence between T1 and Lakel e Doubleclick T1 to open its definition dialog box e IntheTabletab enter D ata in the Symbol edit box e Select the Series tab Estuary We must create a lookup series for every column of data in the table so that M odelM aker knows what the data represents The first column of data contains observation times We will define this column as a control series because M odelM aker uses this column to control which value is drawn from the discharge rate column We will define the second column as controlled because it is controlled by time e Select Series in the Lookup Series list box and enter t in the Series Symbol edit box M odelM aker assumes that the first column is a control series e Click Dedineto complete the definition of the first series e Select Series2 in the Lookup Series list box and enter Dischargein the Series Symbol edit box M odelM aker assumes that the second column is controlled by t 28 ModelMaker tutorial The completed moda up to this point is tutor6
29. the Graph Selection or Table Selection dialog boxes See Chapter 12 Graphs and Chapter 13 Tables for more information on graphs and tables If at the start of the run retained series exist from a previous sensitivity analysis or repeated run ModelM aker replaces the old series with the new series Running a model 115 Chapter 12 12 Graphs Graphs provide an easy way to view both calculated and Model Data values Graphs like tables see Chapter 13 can be archived and restored at a later date so that the effects of changes to the model can be examined Graphs are stored under the Results view as Graph1 Graph2 etc Histograms are stored under the Results view as Histol Histo2 etc and are discussed in Chapter 16 M onte Carlo Analysis The values of Compartments Variables Flows Defined values and Delays can be shown on graphs N ote that component values are only available for plotting if Save Value is selected in each component definition dialog box However all component values are saved if Save sdected component values is cleared in the User Preferences dialog box Edit menu Creating graphs To create a graph e Click the Graph icon or e Select View Graph The Graph Selection dialog box opens Use this dialog to specify which component values are to be presented on the vertical and horizontal axes e Select components in the Components list box These components will be plotted on the vertical axis e Click
30. the parameter set that corresponds to the global minimum deviation between the experimental and calculated data For many problems however multiple local minima may exist These can cause problems for the M arquardt and Simplex algorithms if you do not havea good initial parameter value because they cannot distinguish a local minimum from a global minimum 136 Optimization The O ptimization Settings dialog Estimation tab Search Rangepand The Optimization Settings dialog Estimation tab Annealing pand Chapter 14 Simulated annealing and grid search are methods of parameter estimation and can be used when the initial parameter value is poor The Estimation tab is split into three panels default search range simulated annealing and grid search Default search range Default search range sets the parameter estimation range for simulated annealing and grid search in relation to its value For example 10 sets the multiplicative range to 0 1 value lt value lt lO value 0 1 sets the fractional range to valueX1 0 1 and 0 01 sets the absolute range to valuet0 01 Optimization Settings RE Pe Optimize Weighting Estimation r Default Search Range Multiplicative Fractional C Absolute fio fp 1 fi 01 Simulated annealing Simulated annealing is a standard way of optimizing models where several local minima exist in order to find the global minimum See the M odaM aker Reference M anual for further infor
31. to run the analysis N ext we will display the M onte Carlo results as a histogram 38 ModelMaker tutorial Histograms WM Monte Carlo statistics Chapter 2 e Click the Histogram icon The Histogram Selection dialog box opens e Enter 15 in the Number of Bins edit box The x axis will be divided into 15 columns e Select SP1 in the SampleP oints list box and click gt gt to move it into the Sdected list box e ClickOK The histogram is added to the Results view as Histo2 The graph shows the frequency distribution of Lake2 values in 100 trials if the estuary_rate fluctuates by a standard deviation of 0 02 around a normal distribution Like graphs histograms can be customized in the Series Attributes X axis and Y axis dialogs which can be accessed from the Graph toolbar Try adjusting the axis scaling until you are happy with the distribution 15 CH Number of occurances on 250 280 310 340 370 400 Pollutant in Lake2 kg on day 50 To view the statistics from the M onte Carlo analysis e Click the Series icon on the Graph toolbar The Graph Series Options dialog box opens ModelMaker tutorial 39 Chapter 2 e Click Series Statistics Thecompleted modd The Global Sensitivity Results dialog box opens This dialog up to this pointis summarizes the statistics for SP 1 In our distribution Lake2 varies tutorll mod from 250 9 to 399 5 kg with a mean value of 317 2 kg 40 ModelMaker tutorial
32. to select parameters to investigate during analysis See Chapter 14 Optimization Chapter 15 M inimization Chapter 16 M onte Carlo Analysis Specify which sub model you want to add a new parameter to by clicking the appropriate sub model entry with the LMB To add a parameter e Click the Parameter icon or e Select Component Parameter Defining parameters Parameters are defined in the Parameter Definition dialog box To open this dialog e Doubleclick with the LMB on the parameter to be defined The Parameter Definition dialog box is divided into four tabs Definition Constraints Estimation and Information See Chapter 5 Working with M odes for more details about the Information tab Use the Definition tab to characterize the parameter The value of the parameter is shown in the Value field of the Parameter view e Enter anamein the Symbol edit box e Enter a value in the V alue edit box Enter a unique symbol or an array element range expression Parameter Definition Definition Constraints Estimation Information Use to define each element of the parameter array Enter a value for the parameter element T Universal IT Show Description ee Enter a description for the component optional 104 Parameters Configuring the Constraints tab The Parameter Definition dialog Constraints tab Configuring the Estimation tab Chapter 10 Use the Constraints tab to define parameter constraints
33. 8 and 9 Views and toolbars 41 The Definition view The Parameter view The Model Data view The Results view Chapter 3 The Definition view shows the definition of all model components It provides a tree view of the structure of a model with each branch representing a sub model or set of component array elements To create the Definition view e Select View Definition If the Definition view already exists it becomes the active view The Moda Definition view is an alphabetical text listing of the components of a model When used in combination with the model diagram it can speed the process of model development and debugging Double click a component to open its definition dialog box directly from the Definition view The Parameter view is used to create view and manipulate parameters It provides a tree view of a modal s structure with each branch representing a sub model or parameter array range To create the Parameter view e Click the Parameters icon If the Parameter view already exists it becomes the active view The Parameter toolbar plus specific Component menu and RMB commands are active in the Parameter view Parameters and the Parameter view are discussed in more detail in Chapter 10 Parameters The Mode Data view is used to configure experimental data for optimization when the fit between the model predictions and the configured data is improved To create the M odel Data view e Select View Mod
34. 9 graph axes esseere 120 graph series 0 00 eee 118 lakes esample 18 model values ee 119 renaming VIEWS ossee 126 Save value oseese 117 saving as a text file 125 selecting components 117 show optimization data 120 show selected data 120 152 Grid search 138 H Help about ModelMaker 52 context sensitive 0 eee 51 CN EE 51 tip of the day wo eee 52 Histograms ceeeeeeeeerees 147 ALCHIVING e aoin ata 148 CUSLOMIZING oseese 148 lakes example ssseeeeeeeeeee 39 saving as a text file 148 selecting sample points 147 I Import a text Die 77 131 Independent events 0 000 0 81 lakes example eee 23 Independent variable 57 Influences cccccccceeeee 56 66 lakes example sseeeeeeeeeee 20 Ihnformati on ob 58 Installing ModelMaker 1 3 Integration method 0 0 110 Interpolation 0 0 00 eeeeeeeeeeeee 73 lakes example ssseeeeeeeeeee 29 Iterator symbols 57 86 L License ON user iii Licensing ModelMaker 1 4 IMB ee E 5 Lookup files cee eeeeeeeeeeeeee 73 CONFIQUTING 2 2 eeeeeeeeeeeeee 74 Lookup series eeeeeeeeeeeeee 73 control series s s s 73 controlled serie 73 ata serie 73 Interpolation s s s 73 lakes example ssseeeeeeeeeee 28 repeat Series 75 unused series eeeeeeeeee 74 Lookup Gab
35. Activation Codes in the License Control dialog box e Click OK Your copy of ModelM aker will now be fully licensed Network installation This installation should only be attempted by network administrators Both the server and client installations require administrator privileges It is important to follow the correct installation sequence A Install ModelM aker on your server B Install ModelM aker on your client workstations C Run ModaM aker from one of the client workstations NOT the server and activate licensing e Insert the M odelM aker CD and run autorun exe as described for a desktop version e Select Install ModelM aker 4 You will be given 2 installation choices 1 Install ModelM aker on your desktop 2 Install M odelM aker on your network e Select option 2 to install the network version of M odelM aker You will be given 2 further choices 1 Install M odelM aker on your network server 2 Install ModelM aker shortcuts and drivers on a network workstation e Select option 1 to install M odelM aker to your desired network directory ModelMaker 3 Installation and licensing e Run option 2 on every client workstation that will run M odelM aker over the network When Mode aker is first run following installation it must be run from a client workstation It will detect that it is being invoked from a network client and set itself up as a network version The network license is then enabled which allows M odelM aker to be r
36. C Scientific Fixed Point Select a numerical format and enter the number of decimal places Help Set Default Use the Title tab to define the font text position and orientation of the axis title Select or enter Select or enter a font name a font style Select or enter a font size Axis Configuration TheGraph Axis Senne Configuration dialog Format Labets Tie E Font Name d Size Title tab facial 10 Regular Op Arial Black de m S Bae I Bodrac z 8 EI Select a font Ep TE effect Underline I Strikeout Select a new font color Color Set Color Ais Title Text JLa el Lake2 Enter the axis title Select the position and text orientation y axis Hep __SetDetaut_ only of the axis title 122 Graphs Axis scaling during a model run Customizing the title legend background and frame TheGraph Attributes dialog General tab Chapter 12 Asamodd is run the values of model components displayed on a graph may exceed the bounds of the current graph scale You can configure the axis to expand its scale during the model run by selecting the M inimum and M aximum fields in the Format tab of the Graph Axis Configuration dialog box If these options are selected the axis will adjust during the model run if necessary and at the end of the run in order to display the best presentation of the data The following graph attributes can
37. Chapter 14 Use the Weighting tab to configure weightings and error magnitude for error calculations The data weighting options only apply to the reasonable error estimates and weighted least squares weighting schemes Data weighting may be 1 Mean Observed i e if you have a number of data points for one X value the weighting can be taken as the mean of these values 2 Predicted i e uses the predicted model values for the error weighting 3 Individual i e use if you have individual data points with their own errors Choose the magnitude from the Data Error panel Select O verall mean for corrected WSS if you have several data sets and would like to use the mean of all the data sets for the corrected weighted sum of squares instead of the sum of the individual means Optimization Settings 2 x Optimize f Estimation Set the error as a fraction of Data Weighting the size of the data value Mean Observed Predicted Individual Set the error as an absolute value Data Error Fractional Absolute Use the errors configured in the Model Data view Use values from table Multiple Data Series I Overall mean for corrected WSS Use the Estimation tab to configure the initial parameter estimation method and settings if Calculate E stimate is selected in the Optimization Run dialog N ote that parameter estimation is only available with Marquardt optimization The aim of optimization is to find
38. Chapter 16 M onte Carlo Analysis In our model we shall investigate what effect varying estuary_rate has on the value of Lake2 on day 50 of the model run We will specify that estuary_rate follows anormal distribution For this example we will reload tutor6 mod ModelMaker tutorial 37 To follow this exampleload the mode tutor6 mod Chapter 2 e Activate the Parameters view Select the M onte Carlo check box for estuary_rate e Click the button in the in the Dist Type field for estuary_rate The Distribution dialog box opens e Select Normal from the Distribution drop down list e Enter 0 05 in the M ean edit box and 0 02 in the Standard deviation edit box e ClickOK e Click the Sample Points icon to activate the Sample Points view As with minimization Monte Carlo analysis uses sample points to test the values of selected components at selected moments in time e Add asample point SP1 e Doubleclick SP1 to open its definition dialog box e Enter 50 in theTimePoint edit box and select Lake in the Component list box e Click OK e Select the M onte Carlo button in the Sample Points view for SP 1 The Monte Carlo configuration is now complete and is ready to run e Click the Integrate icon arrow and select M onte Carlo from the drop down menu The Monte Carlo Run dialog box opens This dialog summarizes the parameter and sample point configuration We shall keep the default value of 100 trial runs e Click OK
39. Independent events are triggered at user defined values of the independent variable as the model is run They can be periodic eg trigger every 5 days starting on day 10 or non periodic eg trigger on the first Tuesday of the month or a combination of the two eg trigger on weekends and every first Tuesday Component events are triggered when a user defined condition becomes true This condition can be defined in terms of any other component value eg when the lake is full open the sluice gates The active status of an event can be 1 Configured to be active or inactive at the start of a model run 2 Configured to be reactivated or de activated after having been triggered 3 Activated or deactivated by the actions of other events Event actions When an event is triggered a list of user defined actions is performed There is no difference in the way in which independent and Components independent and component events 81 Chapter 8 component events behave once they have been triggered In addition to simply changing the component values events can 1 Re initialize selected components or the whole of the model 2 Display messages 3 Ask the mode user for a Yes No answer or anew value for a compartment or defined value 4 Change the data source for lookup tables and files 5 Control other events 6 Evaluate DLL functions 7 End the model run Events can also include loops and conditional statements in their list
40. M anual for more information on extended least squares and other statistical background Archiving results Optimization results can be archived together with graphs and tables e Select the Results view in the M odel Explorer e Select RMB Archive Optimization 139 Creating the Sample Points view Adding sample points Defining sample points Chapter 15 15 Minimization During minimization the parameter values used in the model are adjusted to find the smallest value of a particular component at a selected point in the mode run ModelM aker uses the downhill simplex method of minimization The Sample Points view is used to create sample points for both minimization runs and Monte Carlo analysis A sample point is a result of the simulation i e the value of a component at a particular moment in time The model will be run up to this time point and no further in order to obtain the value of the component with the minimum computational effort Using the Sample Points view To create the Sample Points view e Click the Sample Points icon or e Select View Sample Points If the Sample Points view already exists it becomes the active view The Sample Points view is divided into five fields N ame Component Time Point Monte Carlo and Minimize To add asample point e Click the Sample Point icon A sample point called SP1 will be added to the view further sample points can be added as SP2 SP3 etc Sample point
41. M odaM aker U s M anual Cherwell Scientific Limited The Magdalen Centre Oxford Science Park Oxford OX4 4GA United Kingdom 04 00 End User License Agreement 1 2 3 End User License LICENSE 11 12 Cherwell Scientific Limited of The Magdalen Centre Oxford Science Park Oxford OX4 4GA Cherwell hereby grants you a non exclusive license License to use the software accompanying this license Software and the accompanying documentation on the following terms The copyright and all other rights in the Software and the accompanying documentation remain with Cherwell ACCEPTANCE 2 1 2 2 You are deemed to accept the terms of this License if you install the Software on a computer If you do not wish to accept these terms you must within 30 days of purchase erase any installation file and any copy of the Software and documentation you have downloaded or stored on any medium and return any copies of the CD manuals and packaging to Cherwell together with proof of purchase for a full refund SCOPE OF LICENSE 3 1 This License permits you to 3 1 1 use the Software on a single computer or on a networked computer drive 3 1 2 transfer the Software to someone else provided that you assign all of your rights and obligations under this License to such other person you erase all copies of the Software under your control and stored on any medium including the hard disk copy
42. ModelMaker User Group To email the ModelMaker User Group e Select Help E mail ModelKinetix com M odelM aker User Group o Send a message o Subscribe 52 Basics Adding component boxes Chapter 5 5 Working with Models When a new model is opened only the Diagram view is represented in the Model Explorer Model diagrams are built in the Diagram view from the range of components displayed on the toolbar M odelM aker has 16 types of component which are discussed in more detail in Chapters 6 to 10 Each type of component excluding parameters is represented by a unique diagram representation and falls into one of the following categories 1 Component boxes compartments variables defined values delays lookup tables lookup files independent events component events DLL functions and text boxes 2 Component lines flows and influences 3 Sub model references input and output references Parameters are added to the model via the Parameter View see Chapter 10 Parameters Adding components Each component is represented by a unique diagram representation Place the mouse cursor over a toolbar icon to display a ToolTip To select a component e Click the component icon on the toolbar or e Select Component component type The cursor changes to a cross hair to reflect the type of component selected To add a single component box to the model diagram e Select the component box icon from the Diagram t
43. S LOOKUP TABLES AND LOOKUP FILES 73 Beie a Le 73 CONFIGURING LOOKUPHLES E 74 CONFIGURING LOOKUP TABLES sccsssseseesseeseesseeeeecsseeeessseteeeesneesesaees 76 USING THE LOOKUP TABLE VIEW EN 77 x ModelMaker Contents CHANGING A LOOKUP DATA SOURCE oiesssscssssessseeseeeeessecseeeaeseeecssssseaeeens 78 8 COMPONENTS INDEPENDENT AND COMPONENT EVEN a E ee EE 81 EVENT TRIGGERS E E EAE EEA EE D Ra 81 EVENT ACHIONS vise A E EEEE A EAE EEA AENEA EE OS 81 EVENT CALCULATION ORDER 82 DEFINING EVENTS n eege ioecitn ed Pat acid deta eue 83 9 COMPONENTS SUB MODELS DELAYS AND DLL FUNCTION KEN 93 SUBAM ODEUS ee ee Ee EE eren 93 DELAY EE 97 BIR D td ele EE 98 DEL EVALUATION ORDER a E saceuvasavdeccicdacetaayed 101 J0 PARA METER S araida ua sdascetecdntecedsdaactda sdaceneavezcuntacancusiaedsccvvaedscee 103 USING THE PARAMETER VIEW vacsscccseccccessccseeeseeeesssecuueesseeessseeseaeeeeueeess 103 DEFINING PARAMETERS 2 cccsceessceeeeececssccueeeeuseessccesuueeeueeesseeesnueeeseneess 104 ARRAYS OF PARAMETERS E 107 11 RUNNING A MODEL ssssssssssnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnna 109 CONFIGURING RUN OPTIONS wicsccssccssecessesecsscseueeeeseussecesseeeesueessenseaeeess 109 CONFIGURING THE INTEGRATION METHODEN 110 CONFIGURING A REPEATED RUN uiccccsscccsscccssscsseeeseeecssseseseeeeueeesseeseaeeess 112 CONFIGURING SENSITIVITY AN AUS 113 RETAIN ED SERIES eu savicdstesdectet scvivatvaduadunadcuvaledaadiaeanveanaldedenda
44. VANCED MINIMIZATION CONFIGURATION u ccssccsseccsssessseeeeeeeessesees 144 16 MONTE CARLO ANALYSIS ssssssssssnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnna 145 CONFIGURING MONTE CARLO ANALYSIS icccccssccsseecssscsseeeeseeeesessseaeeess 145 CREATING HISTOGRAMS EE 147 MONTE CARLO eraf 148 VN DEX E E E AEE AEAEE A AE AE 151 xii ModelMaker Installing ModelMaker Registering and licensing ModelMaker Installation and licensing Installation and Licensing ModelM aker can be installed as a desktop or a network version The desktop version is standard and should be chosen by most users The network version is for installations where multiple linked workstations will be accessing the same data and requires the purchase of more than one license Desktop installation e Insert the M odelM aker CD into your CD ROM drive The installation routine should run automatically If it does not you must locate and run autorun exe e Open Windows Explore or M y Computer e NavigatetoD whereD isthe name of your CD drive e Locate and double click autorun exeto run the installation The ModelKinetix CD menu will open e Select Install ModelM aker A You will then be given 2 installation choices L Install ModelM aker on your desktop 2 Install ModelM aker on your network e Select option 1 and follow the on screen instructions You must run the desktop version of ModelM aker from your local drive eg C By default the installer su
45. aceM essage event action is used to output a message to the trace file and the message can be labeled by assigning it to one of nine trace levels The TraceOn and TraceOff event actions are used within a model to switch tracing on or off The Enable Tracing check box acts as a master switch for controlling whether M odelM aker processes event actions to do with tracing The Active Levels check boxes determine which trace messages are written to the trace file For example if only the Level 1 check box is selected then only messages output by the TraceM essage action as level 1 messages will be written to file See Chapter 8 Components Independent and Component Events for more information on using events 64 Working with models Chapter 6 6 Components Compartments Flows Variables and Defined Values Compartments flows variables and defined values share two important characteristics they can all be defined as 1 Conditional or unconditional components 2 Arrays of component elements Compartments Compartments represent integrators in a model The value of a compartment represents the quantity held within it and is calculated using a differential equation which gives the rate of change of the value d Compartment dt f where f is a function of the values of components defined in the model and t is the independent variable of the model usually time A compartment must also have an initial value which is
46. all Find DLL Functions Find available modules DLL Name Function Name Function Type Pie Pie ete Find available functions in the selected module T Universal T Global Show Description Select the function type Enter a description of the DLL function optional Description Each DLL module may contain many functions which can be used by a DLL function component The M odelM aker function interface allows the developer of the DLL to provide the names of the functions available in a DLL and information about their use and input and output values If this information is available for the specified DLL Components sub models delays and DLL functions 99 Chapter 9 the Functions button will be activated Click the Functions button to activate the DLL Functions dialog box TheDLL Functions Only display those functions which dialog box match the DLL function type DLL Functions in H mmtest dil Egari ane Display all functions in chy tee eee the module Available functions Function Description a ee fines poaten Description of the selected function Description of the input values Description of the output values DLL function Thevalues input to a DLL function are specified by a list of value definition mathematical expressions defined in terms of the other components in the model The input values are defined using the Values tab of the DLL Function Defini
47. ally down the length of the M odelM aker window e Select Window Tile Horizontally To arrange the icons of minimized model windows e Select Window Arrange Icons ModelMaker Help Select Help Contents or Help Index to launch the on line Microsoft Windows Help system Select Help Using help for help on using and customizing the help system Context sensitive help takes the form of a question mark located in the top right hand corner of dialog boxes To use context sensitive help e Click with the LMB The cursor changes to indicate context sensitive help is active inside the dialog box e Click the dialog text for which you would like more information Basics 51 Tip of the Day About ModelMaker Chapter 4 A popup window opens Close this window by clicking the screen with the LMB Alternatively use What s This e Click the What s This icon or e Select Help What s This The cursor changes to indicate context sensitive help is active inside the M odelM aker window To read ModelMaker s Tip of the Day e Select Help Tip of the Day Information about your version of ModelMaker including licensing codes is available under About M odelM aker Select Help About ModelM aker ModelMaker on the Web The M odelKinetix com Home Page and the ModelM aker support site can be accessed directly from M odelM aker e Select Help ModelM aker on the Web o ModelMaker Home Page o ModelMaker Support
48. alog Legend tab is similar to the Title tab but is used to configure the legend characteristics N ote that the graph dialog boxes can also be accessed from the RMB or by double clicking with the LMB on appropriate areas of the graph For example double click the graph title to open the Graph Attributes Configuration dialog box Graph cross hairs To allow values to be read quickly and easily cross hairs can be displayed on the graph e Press and hold down the LMB in the graph until the cross hairs appear The x and y values at the current mouse position are shown on the message bar The accuracy of the values shown depends on the size of 124 Graphs Copying a graph Chapter 12 the graph window Thus the greatest accuracy is achieved with a maximized graph window Archiving graphs You may want to store several sets of results in order to investigate changes to your model You can do this by archiving results e Select the Results view in the M odel Explorer e Select RMB Archive All views in the current Results view are archived to anew view called Archivel The current Definition view is also copied to the archived view Additional results sets will be archived as Archive2 Archive3 etc The archived results will not be updated as you make changes to your model Saving a graph as a text file To save the values from the active graph as a tab separated text file e Select View Save View as Text The Save View A
49. alog summarizes the parameters and sample points that have been selected for Monte Carlo analysis Use this dialog to specify the number of trial runs e Enter a valuein the N umbe of trials edit box e Click OK During Monte Carlo analysis ModelM aker compiles the model and displays the analysis status on the message bar showing the time elapsed and the current run number Pressing lt Esc gt will cancel the analysis 460 Monte Carlo analysis TheM onte Carlo Run dialog box Chapter 16 Monte Carlo Run RH x Number of trials Parameters Used O Man iO estuary_rate Normal 0 05 0 02 Sample points Compartment Main Lake2 at t 50 Creating histograms The results of the M onte Carlo analysis can be viewed in the form of a histogram To create a histogram e Click the Histogram icon or e Select View Histogram The Histogram Selection dialog box opens e Select sample points to plot in the Sample P oints list box e Click gt gt to move the selected components into the Sdected list box e Enter a value in the N umber of bins edit box e Click OK Histograms are stored under the Results view as Histol H isto2 etc Repeat the steps described above to add additional histograms to the Results view Monte Carlo analysis 147 Changing the histogram selection The Histogram Sdection dialog box Customizing histograms Archiving histograms Saving a histogram as a text file Chapter 16
50. an array range expression in the Symbol edit box Click outside the symbol field to enable the X Y and Z spin boxes You can now assign individual values to the array elements e Intheavailable X Y or Z spin box click the up down arrow to scroll to the appropriate array element number e Enter a number in the V alue edit box e Repeat until you have defined the whole array For example a parameter with the symbol p 0 1 0 1 reoresents a 2x2 array of parameter elements each of which can havea different value Unlike compartments flows variables and defined values parameter arrays may only be defined as a single section This is because each parameter element must be individually defined Note you can also use the shortcut menu to add and define parameters i e select RM B N ew Parameter or RM B Edit Parameter Parameters can be updated with optimized or minimized values see Chapter 14 Optimization or Chapter 15 M inimization Parameters 107 The Run dialog Chapter 11 11 Running a Model Once a model has been defined by inserting and configuring all the necessary model components it can be run This is the process of solving all the model component equations using the selected integration method over the desired range of the model s independent variable To run a modal e Click the Integrate icon or e Select Model Integrate The Run dialog box opens e ClickOK The model is run using the default run opti
51. arameter estimation to a value within a range that is relative to the parameter value Multiplicative allows a wide estimation range to be set eg 10 sets the estimation range as 0 1 value lt value lt lO value Fractional allows a narrow estimation range to be set eg 0 1 sets the estimation range as value 1 0 1 Absolute sets an absolute estimation range eg 10 set the range as valuet10 Fixed sets the estimation range as an absolute range Check a range type and enter a value in the corresponding edit box Parameter Definition Definition Constraints Estima ion Information C Default c None e Mutipicative 70 Range Fractional E C absoute P Check Fixed and enter upper and lower limits Lower Bound Fixed Upper Bourd p Grid Steps 2 Logarithmic Steps ets the size of the grid steps when using Grid search during Range and Fixed estimation Cancel Sets the grid step sizes to be taken in logarithmic sizes To delete parameters from the Parameter view e Select the parameter to be deleted e Select Edit Delete or press the lt Delete gt key The selected parameter will be removed from the Parameter view To undelete the parameter e Select Edit Undo Component Delete 106 Parameters Chapter 10 Arrays of parameters To define a parameter as an array e Doubleclick the parameter to be defined The Parameter Definition dialog box opens e Select the Definition tab e Enter
52. archived results will not be updated as you make changes to your model Saving a table as a text file To save the values from the active table as a tab separated text file e Select View Save View as Text The Save View As Text dialog box opens with the default file specification of the model name and the extension txt e Enter afile name in the Filename edit box e Click OK The table is saved in a tab separated format with the selected file name To copy a selection of the active table to the Windows clipboard e Select the cells of the table which are to be copied e Select Edit Copy or click the Copy icon The data are copied to the Windows clipboard as tab separated text values which can be used by other Windows applications Renaming table sub views To rename a table sub view e Select the table in the M odel Explorer e Select RMB Rename View The View Name dialog box opens e Enter anew namein the View N ame edit box 130 Tables Creating the Model Data view Adding pages Copying pages Changing pages Chapter 14 14 Optimization Calculated values produced by running a model can be compared with experimental data using the optimization feature During optimization selected model parameters are systematically adjusted to find the best agreement between the model and the experimental data In ModelM aker simple analytical methods such as linear regression are not generally applicable Therefore
53. artments flows variables and defined values are very similar Open the unconditional definition dialog box e Doubleclick the component to be defined with the LM B e Specify the component characteristics e Click OK Enter a unique symbol or an array element range expression Enter a mathematical expression defining the component value Unconditional Compartment Definition Definition Bitmap Information Symbol Lake Equation dLakel dt River Enter a mathematical expression defining the initial value Initial Value 11000 T Universat I Global M Save Value M Show Description GE compartments only Available Components Filters AYsilable Functions Filters SEEE estuary_rate ES un 3 i Enter a description for kake GPL lo the component optional ya rate fest fo SA e ID b ien zi Make the component conditional Help Conditional Cancel Components compartments flows variables and defined values 67 Chapter 6 Defining Open the Conditional Component dialog box conditional components e Click the Conditional button in the Unconditional Component Definition dialog box The Conditional Definition dialog box is invoked with the currently entered equation as the default equation Enter a unique symbol or an array element range expression Create a new conditional T he C on di ti on al Conditional Compartment Definition expression Component Definition Bitmap In
54. ation steps as those M odelM aker uses to evaluate the rest 98 Components sub models delays and DLL functions DLL function definition TheDLL Function Definition dialog DLL tab Chapter 9 of the model In addition to the configured input values they receive the values of the independent variable at the start and at the end of the last successful integration step undertaken by M odelM aker In addition to being normal or integration a DLL function can be defined to be event only By default a DLL function is evaluated i e the external function is called for every calculation sten made by M odelM aker For some external functions this is not appropriate In such cases event only DLL functions which can be evaluated only by an event using the EvaluateFunction action can be used For example a DLL function which uses a dialog box to ask the user for model initialization information might only be called at the start of a modal run In this case the DLL function would be made event only and would be evaluated by an event triggered at the start of the model run The DLL tab of the DLL Function Definition dialog box is used to configure the component symbol DLL module and function Open the DLL Function Definition dialog box by double clicking the DLL component Enter the name of the module containing Enter a unique the required function svmbol DLL Function Definition 8 Enter the name of the E function to c
55. be changed 1 Title text position color and font 2 Legend position color and font 3 Graph background color and frame properties To customize the title and legend e Click the Attributes icon or e Select View Attributes The Graph Attributes dialog box opens e Define the new title legend frame and background characteristics e Click OK The Graph Attributes dialog box is divided into three tabs General Title and Legend Graph Attributes Configuration RH sl General Tite Legend Select h elect a grap background color General Options Background Color IN Show Frame Frame Axis Color za Check to add a frame Set Color Select frame color Use the General tab to change the background color and frame properties of the graph Graphs 123 TheGraph Attributes dialog Titletab Chapter 12 Select or enter Select or enter a a font name font stvle Graph Attributes Configuration Select or enter a General Title Legend font size Eont Name Arial Regular a a Tr Arial Black Italic 1 za afai CE I Bold talc Select a font effect r Effects I Underline Select a new font I Strikeout color Color AaBb0123 Set Color Enter a title for the r Graph Title graph Text Graph KEE Select the graph title P Top C Bottom position Help Set Default Use the Title tab to define the graph title characteristics The Graph Attributes di
56. be evaluated If when evaluating a conditional component M odelM aker reaches the end of an equation list without finding a condition which is true it is unable to evaluate the component and terminates the model run with an appropriate error message Thus using a default equation at the end of an equation list prevents accidental conditional evaluation errors Defining arrays of component elements A single compartment flow variable or defined value component can represent an array or part of an array of component elements in up to three dimensions A component is defined as an array of elements by adding an array range expression after the component symbol in the Symbol field of the appropriate definition dialog box For example a compartment with the symbol C1 0 1 0 1 represents a 2 x 2 array of compartment elements Components compartments flows variables and defined values 69 Component element definition Component array sections Chapter 6 The component elements defined by an array component are evaluated using the same equation or set of conditional equations M odelM aker defines three iterator symbols i j and k by default to allow the definition of component elements to reflect their position within an array These iterator symbols are defined in the Symbols tab of the Model Options dialog box e Select Modell Options Thus a one dimensional array vector of elements can be defined in terms of i a two
57. canteaays 114 IDA NM KE 117 GREATIN G GRA PHS eg edeeg ees uge eet ee Eed 117 CUSTOMIZING GRAPHS EE 118 GRAPH CROSS HAIRS wiccccccsscceeeeccsscceeececueesscceeueeesueeessecesueeeuunesseesseaeeess 124 ARCHIVING GRAPHS wecssccccsessssscssscccsssessuanstsecestacedsacsesceausaseusennnaaceevenaes 125 SAVING A GRAPH ASA TEXT ELE 125 RENAMING GRAPH SUB VIEWS ssssssssssssssrrrrusunrnnunnnnnnnnnnnnnnnnnnnnnnnnnnnne 126 DB TABLES enge EENS EES ENNEN 127 CREATING TABLES fics sai sucechiceacvacoysndhshiretuvvacesanchiseivvessevsobtaacbiaacvvsetdndasts 127 CUSTOMIZING TABLES E 128 ARCHIVING TABLES EE 129 SAVING A TABLE ASA TEST ELE 130 RENAMING TABLE SUB VIEWS ueesscccsscccccsscsseeeceeeecseccaeeeeeeeessseesuseeeeeeeess 130 ModelMaker xi Contents 14 ORULMKZATHION et cases dsc NESEdeENKAgE AER Nd AS EE EENS EEN 131 USING THE MODEL DATA VIEW wisecssscccesesscceseeeecsscceaeeeeeeesssesenaeeeeeeeess 131 CONFIGURING OPTIMIZATION u ccccccsscccsececssccsseeeseeesssesesseeesueesessseaeeess 133 OPTIMIZATION SETTINGS EE 134 ADVANCED OPTIMIZATION SETTINGS cccccsscccsseccssscseeeeeueeeusseeeueeeeeeeess 135 OPTIMIZATION BESUUTS EEN 138 15 MINIMIZATION EE 141 USING THE SAMPLE POINTS VIEW uu cccccccsseceseseessscseeeesuseessseesueeeseeeeess 141 CONFIGURING MINIMIZATION ccccccsscccsecccsscsseeeeseeessscseeeeesueessssessaeeess 142 THE PARAMETER RESULTSVIEW sssssssssssssssssnnunrunnnnnnnnnnunnnnnnnnnnnnnnnnnnnnnn 143 A RGHIVING RESULTS EE 143 AD
58. cessarily constant period before feeding it back into the model A delay component is specified in terms of 1 The component whose value is to be delayed 2 A valueor mathematical expression defining the duration of the dday 3 An initial value At the start of the model run M odelM aker does not know what the delayed value of the component should be so a value or defining mathematical expression must be supplied 4 The maximum dday Model aker has to maintain a buffer of past values in order to calculate ddayed values and needs to know how big to make this buffer If the delay is variable you should set this field to the largest value of delay you expect If during the moda run the delay duration exceeds this value the run is halted with an appropriate error message ModelM aker must be able to evaluate the delay duration initial value and maximum delay at the start of the model run requiring that they all be defined in terms of model parameters defined values and numeric expressions A delay is defined using the Delay Definition dialog box which can be accessed by double clicking the delay component Components sub models delays and DLL functions 97 The D day Definition dialog box DLL function evaluation Chapter 9 Enter a unique symbol Enter the component whose value is to be delayed Enter a mathematical expression defining the delay duration Delay Definition itmap Information l
59. conjunction with compartments to build up systems of differential equations See Chapter 6 Components Compartments Flows Variables and D efined Values Weshall add two flows to our model to represent the river and the estuary e Click the Flow icon on the toolbar e Click Lakel with the LM B followed by Lake2 e Repeat to create a flow between Lake2 and Sea The equations of the compartments are automatically updated to reflect the presence of the flow Thus the blue shading of the compartments is removed but now the flow is shaded red to indicate an equation error This is because flow is defined as being proportional to the value of its source compartment F1 Lakel F2 Lake2 represents an as yet unknown value We shall define asa parameter and then complete the flow definition ModelMaker tutorial 15 nonameO0 mod St t Parameters Chapter 2 Step 4 Adding parameters Parameters represent constant values within a model Their values cannot be changed from within a model but can be adjusted during certain model analysis procedures See Chapter 10 Parameters Parameters are added to a model from the Parameters view e Click the Parameters icon The Parameters view is created and activated This view is divided into six columns Name Value Optimize Minimize M onte Carlo and Dist Type e Click the Parameter icon on the Parameters toolbar A new parameter p1 is added to the Parameters view
60. ctive way When a mode component is selected for the vertical axis of a graph a graph series is created to display the values associated with the 118 Graphs Adding model data points Chapter 12 component A graph series can be associated with the following sets of values 1 Model valuesi e values calculated from the model 2 Data pointsi e data configured in the M odel Data view See Chapter 14 O ptimization 3 Error barsi e error calculated for the data points Error bars are based on the default optimization error which is configured in the Weighting tab of the Optimization Settings dialog box Error values can also be configured in the Mode Data view SeeChapter 14 Optimization The series options for a graph are defined in the Graph Series dialog box e Click the Series icon or e Select View Series The Graph Series Options dialog box opens e Select a graph series in the Series list box and define its marker and line attributes etc e Click D gine The options for the series are saved e UseUp and Down to change the graph series selection e ClickOK to save the series options and dismiss the dialog If mode data have been configured for the components plotted on a graph these data can be added to the graph as data points In the Graph Series Options dialog box e Select Data Points for each series with model data If more than one page of data has been configured in the M odel Data view you can cho
61. d e Select a series type e Select a component in the A vailable Components list box The series will represent this component e Click Deine Configuring optimization e Activate the Parameter view Select which parameters will be optimized e Select the appropriate boxes in the Optimize field e Activate the main Model Data view Assign the M odel Data pages to be used in the optimization e Select the appropriate boxes in the Includein optimize field e Click the Integrate icon arrow and select Optimize from the drop down menu The Optimization Run dialog box opens e ClickOK Optimization 133 The O ptimization Run dialog box Optimization method Error weighting Chapter 14 Your model is optimized with the default settings During optimization ModelM aker compiles the model and collates the selected model data pages The optimization status is displayed on the message bar showing the percentage of the independent variable range covered the time elapsed the number of convergent steps and the best value calculated Optimization runs until either the convergence criteria are met or an error is encountered Pressing lt Esc gt will cancel the optimization process Optimization settings Use the Optimization Run dialog to confirm the optimization method and start optimization The pane at the top of the dialog lists the parameters to be adjusted their initial values their optimized values and any error values Marquardt only
62. d prompting the user to enter the name of a file to load into the lookup file which has the symbol lookup_file The name of the currently loaded fileis used as the default file name If the new file does not exist or cannot be loaded an error message is displayed and the user is prompted to enter another file name If the user clicks Cancel the mode run will be terminated For example the action GetFileN ame Please enter the new sunshine file New Sunshine File Sunshine displays the following dialog box and loads the file with the entered name into lookup file Sunshine New Sunshine File x K Please enter the new sunshine file 80 Components lookup tables and lookup files Independent events Component events Event active status Chapter 8 8 Components Independent and Component Events M odelM aker provides two types of event component to accommodate discontinuous models independent and component events Events exploit the fact that M odelM aker uses initial value integration methods M odelM aker starts every integration step as though it was the first treating current component values as initial values and discounting what has gone before Consequently an event can adjust model component values at the end of an integration step without affecting the accuracy of the integration Event triggers Independent and component events differ only in the way in which they are triggered
63. dels require a random seed value for the pseudo random number generator The default value is 1 Choose from five integration methods Euler Mid Point Runge Kutta Bulirsch Stoer and Gear Runge Kutta is the default method Gear s method has different run options which are discussed below This is the number of output points for plotting or displaying in a table and is used to control the amount of data generated You can choose user defined or adaptive output points With user defined the number of output steps must also be entered the default value is 100 With adaptive output points ModelM aker will calculate the number of output points depending on the nature of the function i e more output points will be calculated for curved regions of the function 110 Running a model Step Error scaling Configuring Gear s method Chapter 11 than for straight functions N ote that adaptive output points are not compatible with repeated runs The step panel configures the integration step calculation Using the default step options the initial step length is equivalent to the full range of the integration divided by the approx no of steps Accuracy is used to scale the integration method s error calculation The smaller the accuracy value the more accurate the mode calculation is but the longer the mode takes to run Minimum value is also used in the error calculation and prevents numerical overflow when the values of model c
64. during optimization and minimization calculations Constraints can be defined as unconstrained a range multiplicative or absolute or fixed Unconstrained is the M odelM aker default selection and means that parameters can take any value during optimization and minimization A constraint range provides a way to control the range of parameter values used during analysis Select Range to set a constraint range in relation to the parameter value For example a range of 10 sets the multiplicative range to 0 1 value lt value lt lO value and the absolute range to valuet10 Select Fixed to set the constraint range to lie between fixed upper and lower limits Check for a multiplicative range and enter a value in the edit box Parameter Defini ion Definition ji Estimation Information Unconstraingd Check for an absolute range and enter a value in the edit box Check for fixed constraints and enter limits in the edit boxes Use the Estimation tab to set limits on parameter estimation before optimization Parameter estimation can be defined as default none a range multiplicative fractional or absolute or fixed Default sets parameter estimation as the default search range defined in the Optimization Settings dialog Estimation tab None sets the parameter value to remain fixed Parameters 105 The Parameter Definition dialog Estimation tab Deleting parameters Chapter 10 Range constrains the p
65. e mode you are likely to find that some changes are required Introduction 11 Chapter 2 2 ModelMaker Tutorial This tutorial will introduce you to M odelM aker s interface and to many of its main features The step by step instructions will take you through the construction of a simple illustrative example the flow of chemical contaminants through a water system M odelM aker opens with an empty mode window called noname00 mod Model aker s interface is divided into two panels the M odel Explorer on the left and the Model View on the right The Model Explorer presents a tree view of the many views that make up a model and provides an easy way to navigate your model noname00 mod opens with only one active view the Diagram view M ain where model s are created and defined More views are added to the Model Explorer as a model is built and analyzed Step 1 Planning your model Weare going to construct a model that represents the flow of pollutants through a simple water system that consists of two lakes connected to the sea by ariver and an estuary Estuary We shall make the following assumptions 1 The water level in the lakes is at equilibrium so the effects of pollutant dilution can be ignored 2 Theamount of pollutant flowing through the river and the estuary is proportional to the amount of pollutant in the lake at their source ModelMaker tutorial 13 Chapter 2 e The flow of pollutant in the rive
66. e position of icons Use the Separator button to group icons together through the addition of separators See the M odaM aker Reference M anual for a list of ModelM aker s toolbar icons Views and toolbars 45 From the Start menu From Windows Explorer From a shortcut Chapter 4 4 Basics This chapter deals with M odelM aker s utility commands Starting ModelMaker There are several ways to start M odelM aker A ModedlMaker program item is automatically created during installation e Select Start Programs M odelM aker A M odelM aker 4 from the Windows Taskbar Start M enu e Access Windows Explorer or M y Computer The default M odel M aker installation is to C Program Files Cherwell Scientific M odelM aker A mm exe e Locate and double click the file mm exe You can create a shortcut to M odelM aker on your Windows desktop e Select the mm exe file in Windows Explorer e Select RMB Create Shortcut e Drag the new shortcut onto your desktop To start M odelM aker from the shortcut e Doubleclick the desktop icon Closing ModelMaker To close M odelM aker e Select File Exit or e Click the Close button x in the upper right hand corner of the M odeM aker window Basics 47 Chapter 4 You will be prompted to save any changes to models you have been working on Opening a model To open a model in ModelM aker e Click the Open icon or e Select File Open The Open dialog box opens e Uset
67. e this action we can use the if d se statement e Define the action as shown below Independent Event Definition 2 x i Bitmap Information if Discharge 25 A4 If the current value of Discharge is high Discharge 10 Reduce the level else otherwise the current value of Discharge is low Discharge 25 Ji Increase the level Everything to the right of a double slash is a comment and is ignored by ModelMaker e Click OK to close the dialog 24 ModelMaker tutorial The completed moda up to this point is tutor4 mod Chapter 2 A Estuary This completes the definition of the independent event Re running the model results in a zigzag pattern of pollutant discharge as the initial dumping fades away Pollutant Levels in the Lakes 1000 800 600 Lakel 400 e lt Lake Pollutant kg 200 D 10 20 30 40 50 60 70 80 90 100 Time days Step 12 Adding component events Component events and independent events differ only in the way they are triggered Component events are triggered when a defined condition becomes true M odelM aker uses a tolerance value to ensure that component events are triggered correctly See Chapter 8 Independent and Component Events We shall now assume that when the pollutant level in our model reaches 400 kg a chemical treatment is applied to the lake which removes 150 kg of pollutant from the water This eve
68. ealing options are configured in the Estimation tab of the Optimization Settings dialog box Advanced optimization settings Click the Advanced button of the Optimization Run dialog box to open the Optimization Settings dialog box where more complex optimization options can be set The Optimization Settings dialog box is divided into three tabs Optimize Weighting and Estimation This dialog can also be opened from the M odel menu e Select Modell Configure gt Optimization Use the Optimize tab to configure the general settings for optimization i e convergence criteria parameter settings for Marquardt optimization and a constraint equation that limits the values of parameters The constraint expression can include more than one parameter Enter the number of convergent steps before optimization terminates Enter the size of the convergent Optimization Settings Enter the number of times the optimization will retry the last convergent steps Convergence Change Convergence Steps Retry Count Mesquack Settings Enter the initial lambda value Initial Lambda Minimum Change fie20 Fractional Change pao oo Ty Use Constraint Equation Enter the minimum change in lambda Check to apply an additional constraint expression Enter a lower value a condition and an upper value Optimization 135 The Weighting tab The Optimization Settings dialog W dghting tab The Estimation tab
69. ect Lakel and Lake in the Components list box e Click gt gt to move Lakel and Lake into the V etical A xis list box By default ModelM aker plots the graph against the independent variable e ClickOK Pollutant Levels in the Lakes Lake1 eea e Lako Pollutant kg Time days A new graph is added to the Results view as Graphl Many of the graph s properties can be customized in the Graph Series Options 18 ModelMaker tutorial To follow this exampleload the mode tutorl mod Chapter 2 Graph Attributes Configuration X Axis Configuration and Y Axis Configuration dialog boxes These dialogs can all be accessed from the Graph toolbar by clicking the Series Attributes X Axis and Y Axis icons respectively Step 8 Adding variables Weshall now assume that there is a continuous discharge of pollutant into Lakel in addition to the initial dumping incident We will define the discharge as a variable component where Discharge 25 xsin E 365 A variable is a value which is calculated as the model is run according to its equation See Chapter 6 Components Compartments Flows Variables and D efined Values Before adding the variable we will add anew parameter x pi to our model e Activatethe Parameters view by selecting it in the M odel Explorer e Add anew parameter with the symbol pi and the approximate value 3 1415927 Now we can define the variable Discharge e Activate the Diagra
70. ed by the equation N N exp At where N is the amount of radioactive material left at time t if there was N o at time t O and the decay constant of the radioactive material concerned is This decay constant can be estimated by making observations of the count rate from the radioactive source at various times and then fitting the above equation to the data Count Rate 100 O Sample 1 Fat 0 20 40 60 80 100 Days Both of these empirically derived examples are simple models They provide a quantitative description of a process They could be used to predict the amount of radioactive material remaining at times in the future or to predict the temperature at various times next year Of course the predictions may not be perfect as they depend on the accuracy of the model In the case of radioactive decay the modal is good and we could be confident of its predictions Predicting meteorological factors like temperature however is much harder and the sine mode is probably only good at describing overall long term trends Simulation models Simulation models sometimes called mechanistic models describe a number of sub processes which can be combined to represent the behavior of a larger more complex system Often the sub process descriptions are empirical in nature rather like those described in the previous section but they are combined in a realistic way For example we might try to model how radioactive fallo
71. ed to the Lookup Table view as T2 T3 etc e Select the lookup table sub view eg T1 T2 etc e Select the option that corresponds to your desired active page To add anew page to the Lookup Table view e Select View Add Page To copy the currently active data page e Select View Copy Page To change the name of the currently active data page e Select View Change Page Components lookup tables and lookup files 77 Deleting pages Inserting columns and rows Configuring the lookup table Changing the active lookup table page Chapter 7 To remove the currently active page of data from the table e Select View Delete Page Use the Lookup Table view toolbar icons to insert or delete rows and columns Use the options under the View menu to insert or delete cells The Lookup Table Definition dialog box can be accessed directly from the Lookup Table view e Click the Series icon Alternatively selected lookup series may be configured individually From the Lookup Table view e Doubleclick in the column header of the series to be configured The Lookup Table Series Definition dialog box opens for the selected series Changing a lookup data source M odelM aker allows the data source of a lookup table or lookup file to be changed during a model run For lookup tables this involves changing the active page of the lookup view and for lookup files it means changing the configured lookup file The Lookup view associa
72. el Data If the M odel Data view already exists it becomes the active view The Mode Data toolbar plus specific View menu and RMB commands are active in the M odel Data view The M odel Data view is discussed in more detail in Chapter 14 O ptimization The Results view contains a set of working results where graphs tables minimization results and optimization results are stored as sub views The Results view is created when a graph or table is 42 Views and toolbars The Sample Points view Chapter 3 defined or results are generated during an optimization or minimization calculation Graphs and histograms are stored under the Results view as Graphl Graph2 or Histo1 Histo2 etc The Graph toolbar plus specific View menu and RMB commands are available in the graph sub views Graphs and histograms are discussed in more detail in Chapter 12 Graphs and Chapter 16 M onte Carlo Analysis Tables are stored under the Results view as Tablel Table2 etc The Table toolbar plus specific View menu and RMB commands are available in the table sub views Tables are discussed in more detail in Chapter 13 Tables The optimization and minimization parameter results are stored in the Parameter Results sub view and the statistics from the optimization calculation are stored in the Optimization Statistics sub view See Chapter 14 Optimization and Chapter 15 M inimization The Results view can be archived to a new view which is not updated
73. ent event triggers Definition dialog box To define a periodic trigger e Select Periodic Trigger e Enter values in the Period and Starting At edit boxes To define a non periodic trigger e Select N on periodic Triggers e UsetheNew Change and Remove buttons to add edit and delete non periodic triggers ModelM aker must be able to evaluate periodic and non periodic triggers at the start of the model run As a result they must be defined in terms of mode parameters defined values and numeric expressions The Independent Enter the trigger period Event Definition expression dialog Triggers tab Independent Event Definition 1 Actions Bitmap Information LH Periodic Trigger Period Enter the trigger start Starting At 7 value expression I Non periodic Triggers 84 Components independent and component events Configuring event actions The Event Definition dialog Actions tab Comments Chapter 8 Defined non periodic triggers Independent Event Definition Create a new non I Non periodic Triggers periodic trigger Edit the selected non periodic trigger Delete the selected non periodic trigger The Actions tab of the Independent and Component Event Definition dialog boxes is used to define the actions which an event will perform when it is triggered Independent Event Definition Definition Triggers if Discharge 25 Ai If the current value of Discharge is high Di
74. eren eegen 24 87 While loop ou ee eeeeeeeeneeeeee 89 Copying a graph as a bitmap osese 125 as a metafile eee 125 AS TEXE ee ee 125 Copying a table ee 130 Copying components 62 D Defined values ceeeeee 66 lakes example cee 23 Definition View ceeee 42 Delays isgirsti siiis 97 Deleting views sssesoeseseeeeese 44 Diagram View ccccccceeeeeeee 41 Dist Py pei ivszcusicsicestesieeeeeeass 145 DLL functions 0 0 00 eee 98 GENIN G sss ecs3siscssteaiacsassenestes 99 evaluation order 101 E E mail 151 Index sending a model ee 49 User Group 52 Empirical models 05 7 Error bars lakes example 33 Error scaling ceeeeeeee 111 Evaluation order 82 101 entsuergt ees iegee enee 81 LE 81 active status 81 component lakes example 25 control statements 87 definint eeren eis 83 evaluation order 82 independent lakes example 23 Ea KeA ARE EET 81 Extended least squares 135 139 F Filter buttong eee eee 55 Find components 00 55 FIOWS ierni 56 65 lakes example 15 Formatting components 61 G EE 111 Global componentzs 56 Global Sensitivity Results 149 Graphs Ss seisis 117 ALCHIVING haria 125 axis scaling eee eeeeeeee 123 COPINE i lertee sihatlebeese 125 Cross harg cee eeeeeeeeeeeee 124 data points eee eee 119 errr bag 11
75. es 73 CONFIQUTING oseese 76 ModelMaker entering data 77 lakes example 27 Lookup Tables view 44 77 active PALE 0 eeeeeeeeeesteeeeeees 77 adding pages eeeeeee TI changing pages 0 REI Confteurtng oeseri 78 COPYING pages eeeeeeeee 77 IER sees REI deleting pages 78 M Marquardt ce eeeeeeeeeneees 134 mbk files oss bani ia 49 Minimization 141 advanced settings 144 CONFIQUTING 00 eeeeeeeeeeee 142 constraint range s 144 convergence change 144 downhill simplex 141 fractional change 144 lakes example 35 minimum change ee 144 TEtry COUNL eee eeeeeeeeeeeees 144 Model data series 004 132 absolute errors eeeeee 133 fractional errors 08 132 Model Data view 42 131 configuring series 132 lakes example 32 Model Explorer 41 Model option 6l Model View 41 Monte Carlo 145 CONFIQUTING sesser 145 ist type as 145 dstrt button 145 global sensitivity results 149 lakes example 37 running ooo eee raias 146 Statiste 148 O Opening a model ee 48 Optimization essees 131 advanced settings 135 ModelMaker CONFIQ UTING 0 eee eeeeeee 133 convergence criteria 135 error weighting 0 134 estimation 136 lakes example ceeeeee 33 Method orenian s 134 parame
76. es whilst preserving the final state of the mode from one run to the next This is particularly useful for periodic models and for stochastic models where many runs are required to assess the effect of random factors Repeated runs are configured in the Repeated Run and Repeated Run Settings tabs of the Run Options dialog To set up a repeated run e Select the Repeated Run tab e Enter a value in the N umber of Runs edit box e Select components in the Components to Include list box The calculated data are saved for the selected components These retained series are available for inclusion in graphs and tables e Click gt gt to move the selected components into the opposite list box e Select the Repeated Run Settings tab e Select the Repeated Run option button e Select components in the P reserved Component list box The values of these components are preserved from one run to the next e Click gt gt to move the selected components into the opposite list box e Click OK in the Run Options dialog e Select Repeated Run in the Run dialog e Click OK in the Run dialog 112 Running a model TheRun Options dialog Repeated Run tab Chapter 11 Run Options RH sl Number of runs g r Components to include Enter the number of repetitions Use gt gt and lt lt to select the components whose values are to be saved Pressing lt Esc gt wll cancel the repeated run calculation Configur
77. eter view The Parameter view Chapter 10 10 Parameters Parameters store constant values within a model They do not havea diagram representation and are considered to be global Instead of a having a representation in the Diagram view parameters are added viewed and manipulated in the Parameter view Using the Parameter view To create the Parameter view e Click the Parameters icon or e Select View Parameters If the Parameter view already exists it becomes the active view The Parameter view is divided into six fields Name Value Optimize Minimize Monte Carlo and Dist Type Use the Parameters icon to create or activate the view Use the Parameter icon to add parameters to the view Ze ModelMaker tutor2 mod Main E Sub1 fx Definition ie Parameters Main L estuary_rate 0 05 pi 314159 O river_rate Di o Sample Paints ET Model Data C Model Data gr Results P Graphi E Tablet JO Sub1 The Name field provides a tree view of a model s structure with each branch representing a sub model or parameter array range Expand and collapse branches by double clicking the plus and minus icons Parameters are presented in alphabetical order within each sub model Parameters 103 Adding parameters Configuring the Definition tab The Parameter Definition dialog Definition tab Chapter 10 Use the Optimize Minimize M onte Carlo and Dist Type check boxes
78. for i 0 i lt 10 i i 1 incrementi from Oto 9 Messagg D1 i f info i D1fi display the value of each array element Braces can be used to group actions for D1 0 D1 lt 10 D1 D1 D2 starting from 0 increment D1 GetV alue How much to add Question D2 D2 lt 10 Get an increment from the user total total D2 keep track of the total The break statement is used with while do while and for loops to break out of the loop and transfer execution to the next action following the loop For example for i 0 i lt 10 i i 1 incrementi from Oto 9 90 Components independent and component events continue statement goto statement Chapter 8 DU D1 i 1 add to the dements of D1 if D1 i gt 5 if an element is too big break break from the for loop The continue statement is used with while do while and for loops to return execution to the top of the loop without executing the actions which follow the continue statement For example for i 0 i lt 10 i i 1 incrementi from Oto 9 if i 5 continue donot add to element D1 5 DU D1 i 1 add to theedements of D1 The goto statement allows the unconditional transfer of execution to a particular action The goto statement has the following syntax goto label where label is a text identifier within the list of actions A label is identified by appending a co
79. formation Definition dialog Symbot Definition tab Conditions Edit the currently selected expression Delete the currently selected expression Change the evaluation order Enter a mathematical reng expression defining the initial value compartments only Make the component Enter a description for the unconditional component optional e Usethe New Change Remove Up and Down buttons to manage the conditional equations Selecting New or Change opens the Conditional Equation Definition dialog box e Enter values in the Condition and Equation edit boxes e ClickOK 68 Components compartments flows variables and defined values The Conditional Equation D efinition dialog box Default equations Component array symbols Chapter 6 Enter a conditional expression or leave blank for default Conditional Equation De inition Condition Default Equation dLakel dt fr iver Available Components Filters Available Functions Enter a mathematical expression defining the component value z g estuary_tate Lakel a River river_rate If the Condition field of the Conditional Equation Definition dialog box is left blank or contains the word Default M odelM aker will always evaluate the condition as being true Thus any conditional equations which appear below a default equation in the equation list of a component will never
80. ge covered the time elapsed the number of convergent steps and the best value calculated for the 142 Minimization The Start M inimization dialog box Update the model parameters Chapter 15 minimization component Minimization runs until either the convergence criteria are met or an error is encountered Pressing lt Esc gt will cancel the minimization process Start Minimization 21x Component to minimize Main Minimum Time point 20 Parameters used DI Man LH estuary_rate 0 05 0 047098 boo river_rate Di 0 104805 Click to open the Minimization Configuration dialog box Advanced f Cancel The Parameter Results view The parameter results from the minimization are displayed under the Results view as a sub view called Parameter Results Parameter Results provides a tree view of a model s structure with each branch representing a sub model Branches can be expanded and collapsed by double clicking the plus and minus icons The new parameters are displayed in a field called Minimize result To update your model parameters with the minimization results e Activate the Parameter Results view e Select the parameter to be updated e Select RM B Update parameter Archiving results Minimization results can be archived together with graphs and tables e Select the Results view in the M odel Explorer e Select RMB Archive Minimization 143 Constraint range Convergence change Frac
81. ggests the directory CA Program Files Cherwell Scientific M odelM aker 4 When Mode Maker is first run following installation it runs as a fully functioning demo that will expire after 30 days You must register your copy of ModelM aker with Cherwell Scientific in order to ModelMaker 1 Installation and licensing continue using it after 30 days M odelM aker can be registered at any time during the demo or even after the demo has expired e Select Help About M odelM aker to open the About M odelM aker dialog box e Click U ser D eails to open the User Details dialog e Enter your User Name Organization name and your M odelM aker Serial N umber N ote that if you do not have a ModelMaker Serial Number this entry can be left blank e Click OK e Click Licensing to open the Licensing dialog and note the settings in the following table Serial N umber User Name Organization User Code 1 User Code 2 To complete your license registration you must contact Cherwell Scientific to obtain your Activation Codes e Open the modelkinetix com web site http www modelkinetix com e Navigate to Support and follow the on line instructions Alternatively you can e mail us licensing model kinetix com or if you don t have internet access telephone our UK office When you have obtained your Activation Codes 2 ModelMaker Installing ModelMaker Installation and licensing e Enter the 2
82. gt gt to move the selected components into the V ettical A xis list box Double clicking components also moves them from one list box to the other e Select a component in the H orizontal A xis list box This component will be plotted on the horizontal axis By default the independent variable normally time is used for the horizontal axis Graphs 117 Changing the graph selection The Graph Selection dialog box Customizing the graph series Chapter 12 but any other suitable component can be chosen Now the graph is ready to plot e Click OK Repeat the steps described above to add further graphs to the Results view Your component selection can be changed at any time by re opening the Graph Selection dialog box e Click the Selection icon on the Graph toolbar or e Select View Selection Use gt gt and lt lt to change your component selection Components selected for the Available Semer y axis of the graph Components Graph Selection selected for the x axis of the graph pow Estuary H Lake H Lake2 Use gt gt and lt lt to move selected components between list boxes coat River Lo Sea Use lt Shift gt and lt Ctrl gt to Use these filters to select the make multiple selections component types displayed Customizing graphs The graph series title axes and legend can be customized in order to present the graph in the most effe
83. he Look in drop down list to locate your model e Click Open To open a new modal e Click the New icon or e Select File New Alternatively you can open a model from the recent models list e Select File recent model mod Closing a model To close a modal e Select File Close e Click the close icon x in the top right hand corner of the model window You will be prompted to save any changes To close all open mode s e Select Window Close All 48 Basics Chapter 4 Saving a model ModelM aker saves models with the extension mod To save a modd e Click the Save icon or e Select File Save To savea model with anew name e Select File Save As The Save As dialog box opens e Usethe Savein drop down list to locate your desired drive and folder e Enter the model name in the Filename edit box e Select M odd files mod from the Saveas type drop down list e Click OK M odelM aker creates two other types of file when saving model s L Model backup files with the extension mbk When a model is saved to file a backup copy is made if a previous version already exists 2 Model save files with the extension sav As the mode is run ModelM aker saves the calculated values of the model components to file Sending a model as an e mail To send a model as an e mail e Select File Send A new e mail message dialog opens with your mode attached as a file Basics 49 Chapter 4 Password
84. he independent variable is time represented by the symbol t e Three array iterator symbols these must be unique valid symbols They are used to iterate over the x y and z coordinates of array components By default they are given the symbols i j and k The run symbols for a mode are defined using the Symbols tab of the Mode Options dialog box accessed by selecting Options from the Model menu Model Options x S Diagram Font Independent Variable kr First Iterator i O O Second Iterator i Third Iterator fe Component description Each model component can havea single line of descriptive text associated with it to make the model easier to understand The Working with models 57 Chapter 5 description can be displayed with the model component in the M odel Diagram view Parameter view or Definition view To display a description e Open the component definition dialog box e Enter your text in the Description edit box of the Definition tab e Select Show D escription Component information A component can also have a longer section of free form information associated with it in addition to the single line description This might be used for example to give references or provide a more detailed description of the role of the component in the model To add information about a component e Open the Component Definition dialog box e Enter your text in the Information tab The information text is
85. ing Monte Carlo analysis e Activate the Parameter view Choose the parameters to be varied e Select the appropriate check boxes in the M onte Carlo field This enables the button in the Dist Type field e Click the button The Distribution dialog box opens Use this dialog to choose a random number distribution e Selecta Distribution Type enter the required Characteristics and click OK Normal Triangular Uniform Exponential Weibull Beta Gamma Logistic Pareto Extreme Value Binomial Poisson Geometric and Log Normal distribution types are available Each requires different characteristics which must be defined to suit your parameter distribution Monte Carlo analysis 145 The Distribution dialog box Configuring the Sample Points view Running Monte Carlo Chapter 16 Distribution KEI Distribution Type Characteristics Mean tt Standard deviation 0 e e Activate the Sample Points view e Configure a sample point for M onte Carlo analysis e Select the M onte Carlo check box for the configured sample point You may configure and select any number of sample points Use the RMB click the M onte Carlo header to select all sample points clear the selection and toggle the selection Once parameters and sample points are correctly configured Monte Carlo analysis is enabled e Click the Integrate icon arrow and select M onte Carlo The M onte Carlo Run dialog box opens This di
86. ing sensitivity analysis During sensitivity analysis the value of a selected parameter is systematically adjusted to obtain an indication of how sensitive the calculated values of other model components are to this change To set up sensitivity analysis e Select the Repeated Run tab e Select components in the Components to Include list box The calculated data are saved for the selected components These retained series are available for inclusion in graphs and tables e Click gt gt to move the selected components into the opposite list box e Enter a value in the N umber of Runs edit box This is the number of runs required to reach the Stop Value e Select the Repeated Run Settings tab e Select the Sensitivity Analysis option button e Select or clear the Logarithmic Steps check box e Select a parameter Running a model 113 TheRun Options dialog Repeated Run Settings tab Chapter 11 This parameter will be adjusted during the analysis e Enter values in the Start V alue and Stop V alue edit boxes These are the initial and final values of the parameter e ClickOK in the Run Options dialog e Select Repeated Run in the Run dialog e Click OK in the Run dialog Run Options 2 Lx Integration Repeated Run Repeated Run Settings S l Check to perform 2 a repeated run re r Repeated run settings LH Reset Random Number Generator Preserved component Check to use the same random number series for each
87. ing the model run e ClickOK The model is run with the default options When the calculations are complete a message appears stating how long the calculation has taken This simple model should only take a fraction of a second Click OK to dismiss this dialog Step 6 Displaying tables Tables provide access to the values calculated by ModelM aker during a model run See Chapter 13 Tables We shall create a table of Lakel and Lake against time e Click the Table icon The Table Selection dialog box opens e Select Lakel and Lake in the Components list box i e use lt Ctrl gt or lt Shift gt to make multiple component selections e Click gt gt to move Lakel and Lake into the Sdected list box The independent variable t is selected by default ModelMaker tutorial 17 a The completed moda up to this point is tutor1 mod Chapter 2 e ClickOK The Results view is created and activated with a sub view Tablel which contains your model s data Tables can be customized using the Table Series dialog box To open this dialog e Click the Series icon on the Tables toolbar This dialog is used to change column titles and apply different numeric formats Click OK to close the dialog Step 7 Displaying graphs Graphs represent a useful way of examining data trends See Chapter 12 Graphs We shall plot a graph of Lakel and Lake2 against time e Click the Graph icon The Graph Selection dialog box opens e Sel
88. ion dialog box Variables Variables have values which are calculated as the model is run The value of a variable is expressed as an equation of the form Variable f where f is a function of components defined in the model Defined values Defined values are constant values calculated at the start of a model ee value of a defined value is expressed as an equation of the Defined value g where g is a function of defined values and model parameters The value of a defined value may also be set by the actions of an independent or component event 66 Components compartments flows variables and defined values Unconditional components Conditional components Defining unconditional components The U nconditional Component Definition dialog Definition tab Chapter 6 Defining unconditional and conditional components The value of an unconditional component is defined using a single equation which is always used when evaluating the component This is the default state for new components The value of a conditional component is defined using a list of conditions which have associated equations When the component is to be evaluated M odelM aker works down thelist of conditions until it finds one which is true It then uses the associated equation to work out the value of the component If no true condition is found an error is generated The Unconditional and Conditional Definition dialog boxes for comp
89. iterative numerical methods of optimization are used Marquardt and Simplex These are very powerful methods of optimization but can be very time consuming They may not always find the perfect parameter values and may in certain circumstances simply not work In ModelMaker input experimental data are called model data and are configured in the M odel Data view Using the Model Data view To create the Model Data view e Select View Model Data If the Model Data view already exists it becomes the active view The view is created with an empty page called Page 1 further pages of data are added as Page 2 Page 3 etc Enter your data into the table or select File Import File to import a text file into the active table The Import File dialog box will open Press Format to select the file format options To add anew page to the Model Data view e Select View Add Page To copy the currently active data page e Select View Copy Page To change the name of the currently active data page Optimization 131 Deleting pages Inserting columns and rows Configuring the data series TheM odd Data Series Definition dialog box Chapter 14 e Select View Change Page To remove the currently active page of data from the mode data table e Select View Delete Page Use the Model Data toolbar icons to insert or delete rows and columns Use the options under the View menu to insert or delete cells Model data series
90. ity Results dialog box Monte Carlo analysis 149 Index A ACHONS eege ge ed 81 EADE si one 87 Comments 85 control statements 87 GetFileName eee 80 GetPages edu ege 79 SetFileName eee 80 tat ee eis 78 Activation Codes eeeeeeeeee 2 Adaptive ott 110 ARCHIVE aan 43 Arrange ICOMS s es 51 Arrays components elements 69 parameter arrays 0 107 AXIS scaling s es 123 B Bitmap ob 58 C Cascading windows 51 Chipboard E 62 Closing a model eee 48 Closing ModelMaker 47 Compartments 0 eee 65 lakes example 14 Component arrays 0 00 0 69 Component event 81 lakes example eeeeeeee 25 Components GI TEE 53 aligning NEES 62 he EE 69 bitmap image eee 58 le 53 conditional s es 67 defining 55 description sssseeeseeeeeeeeeee 57 finding sseni 55 formatting global ModelMaker Index Information 58 Je Ee ee 53 MOVING sessi aaa 6l saye v lue ee eeeeeeeeeeeeee 117 Selecting sirae eee 60 sbadumg oon eiorinn 59 GE EE 61 sub model references 53 unconditional eeee 67 universal 57 Conditional components 67 default 69 Aefining wee eee tiris 68 lakes example seeeneseee 21 Control statements 0 87 Irene eege 90 COMUINUC iaiia 91 do while Jop 89 for LOOP oe eeeeeeseeeereeeeeeeeeee 90 SOO ce teak eens cess 91 Eel
91. l the components we have created have had only one equation which has been evaluated throughout the model run This is fine for most continuous models but often things change as the model progresses For our model for example let s assume that when the level of pollutant in Lake2 reaches 250 units the discharge in the lake is reduced to a value given by the following equation Discharge 10 xsin S 36 XT 5 To deal with this we can make Discharge a conditional component See Chapter 6 Components Compartments Flows Variables and D efined Values Instead of having a single equation a conditional component has a list of conditions with associated equations M odelM aker evaluates each condition in turn until it finds a condition which is true and uses the associated equation to evaluate the component In our new model the value of Discharge will be influenced by the value of Lake2 so we must insert a new influence between Lake2 and Discharge e Add an influence from Lake to Discharge Now we can define Discharge as a conditional component e Doubleclick Discharge to open its definition dialog box e Click Conditional The Conditional Variable Definition dialog box opens Initially the conditional component is defined with a single default condition Default or empty conditions are always defined as true e Click New The Conditional Equation dialog box opens ModelMaker tutorial 21 The completed moda up to
92. l use for a period of 90 days after the date of original purchase If a defect in any disk occurs during such period you may return it with proof of purchase to Cherwell who will replace it free of charge 5 2 Cherwell warrants that the Software will perform substantially in accordance with its accompanying documentation provided that the Software is properly used on the computer and with the operating system for which it was designed and that the documentation correctly describes the operation of the Software in all material respects If Cherwell is notified of any material error in the Software during the period of 90 days after the date of original purchase it will correct any such error within a reasonable time or at its option refund the price of the Software against return of the Software and its documentation 5 3 The warranties set out in clauses 5 1 and 5 2 are your sole warranties and are in place of all warranties conditions or other terms expressed or implied by statute or otherwise all of which are hereby excluded to the fullest extent permitted by law Clauses 5 1 and 5 2 also set out your sole remedies for any breach of Cherwell s warranties 5 4 In particular Cherwell does not warrant that the Software will meet your requirements or that the operation of the Software will be uninterrupted or error free or that all errors in the Software can be corrected You load and use the Software at your own risk and in no event will
93. lidays Telephone calls will be logged in our support system and you will be contacted by e mail fax or teleohone with a solution or a request for more information E mail support queries should be sent to support modelkinetix com ModelMaker v Copyright Publisher Disclaimer Trademarks ModelKinetix com web site Technical Support Copyright and Technical Support 2000 Cherwell Scientific Limited All rights reserved No part of this publication or the program ModelM aker may be reproduced transmitted transcribed stored ina retrieval system or translated into any language or computer language in any form or by any means electronic mechanical magnetic optical chemical manual biological or otherwise without prior written permission of the publisher M odelM aker is published by Cherwell Scientific Limited The Magdalen Centre Oxford Science Park Oxford OX4 4GA Cherwell Scientific make no representations or warranties with respect to the contents hereof and specifically disclaims any implied warranties of merchantability or fitness for any particular purpose All trademarks and registered trademarks are the property of their respective companies For technical support Frequently Asked Questions FA Qs or product information please visit our web site at http www modelkinetix com Technical support is available directly from the M odelKinetix com wed site at http www modelkinetix com simply
94. lon to it For example if D1 gt 10 if Dlistoo big goto no_add skip the increment D1 D1 10 increment D1 no ad transferred to here when D1 gt 10 The goto statement can be used anywhere in the action list although it is recommended that its use be kept to a minimum in order to maintain clarity Components independent and component events 91 The Sub model view Chapter 9 9 Components Sub models Delays and DLL functions Sub models Sub mode l components are used to create hierarchical structure within a model As a model grows in size and complexity the ease with which it can be understood and manipulated is greatly increased by dividing it into groups of components Each group termed a sub model typically represents a logical section of the model Each sub model may contain further sub models ModelM aker does not place a limit on how deeply sub models can be nested Sub model hierarchies define the scope of the symbols of the components within them Thus two components may have the same symbol as long as they are in separate sub models and neither of them is universal When a model needs to pass values in and out of the sub mode s it contains there are two options 1 Usesub model references This is generally the recommended method because it preserves the structure of the model 2 Usea universal component to hold the value to be passed Making a component universal means that
95. lues 117 H Variables diene en 66 lakes example eee 19 Views ALCHIVING e aa ooit 43 Definition view 42 deleting seesesseeeseeeeeeeeee 44 Diagram View cceeeeee 41 Lookup Tables view 44 77 Model Data view 42 131 Optimization Statistics view AAA EE 138 Parameter Results view 138 143 Parameter view 42 103 TENAMING 0 0 0 eeeeeeeeeeeeeeeeeees 44 ModelMaker Results view 42 Sample Points view 43 141 Ww Web sites cccccececcsseeeeseeeeeees 52 Weighting individual 0 0 0 0 eee 136 ModelMaker mean observed 0000000 136 predicted 0 eeeeeeeeee 136 Windows metafile 125 Z ZOOM mm 63 ZOOM OUt ccccceeeececeeeeseseseeeees 63 155
96. m represents the structure of the model with influences and flows showing the way in which different components are interrelated However it is not always possible or practicable to construct models in this manner so M odelM aker defines two exceptions to the rule global and universal components Global components can be referenced by any other component in the same sub model or in a lower sub model For example a model component that is used by many components in a sub model can be defined as global to avoid inserting many influences Parameters do not have a diagram representation and are therefore considered to be global in scope by default 56 Working with models Universal components TheM odd Options dialog Symbols tab Chapter 5 Universal components can be referenced by any other component in the entire model For example a model component that is referenced by many components in different sub models can be defined as universal to avoid creating many sub model references Since a universal component can be referenced from anywhere within a modal its symbol must be unique Whenever you attempt to change the symbol or the universal status of a mode component ModelM aker will alert you to any symbol clashes Configuring run symbols In addition to the symbols defined by the components of the modal Model aker requires four further symbols e Theindependent variable This must bea unique valid symbol By default t
97. m view M ain by selecting it in the Model Explorer e Add avariable V1 to your model e Doubleclick the variable to open the Variable Definition dialog box e Enter Dischargein the Symbol edit box and 25 sin t pi 365 in the Equation edit box e Click OK The next step in our mode definition is to tell ModelM aker that Lakel will use the value of the Discharge variable This is done by using an influence ModelMaker tutorial 19 The completed moda up to this point is tutor2 mod Chapter 2 Step 9 Adding influences e Select the Influence icon e Click Discharge followed by Lakel The influence is inserted between the two components Estuary N ext we must update the equation of the Lakel compartment to take account of the Discharge variable e Double click Lakel to open its definition dialog box e Update the Equation edit box to read Discharge River Select the graph of Lakel and Lake2 and re run the model The amount of pollutant now increases towards the end of the run as the pollutant discharge increases Pollutant Levels in the Lakes 1000 800 600 Lake1 400 Lake2 Pollutant kg 200 0 L dg eg LA L tt Jit LEI L d L LL yO Ta H ij LA LA 10 20 30 40 50 60 70 80 90 100 Time days D rr 20 ModelMaker tutorial To follow this exampleload the mode tutor2 mod Chapter 2 Step 10 Defining conditional components Up to this point al
98. mation Number of times the temperature is dropped Number of trials at each temperature r Annealing Maximum number of temperature steps Number of trials accepted before the temperature is dropped Trials are accepted or rejected by comparison to a Boltzmann or Tsallis distribution Number of trials per temperature step Number of good trials before temperature step 10 Initial temperature pooo m Acceptance Probability Distribution Cooling Schedule Boltzmann Tsallis C Multiplicative Select whether the temperature is dropped by multiplicative or exponential cooling gt Termination Criterion Exponential T Use proportion of good steps fp 05 Check to stop the annealing if the proportion of good trials falls below a specified level Optimization 137 The O ptimization Settings dialog Estimation tab Grid Search pand The Parameter Results view Update the model parameters The Optimization Statistics view Chapter 14 Grid search r Grid Search rc Sets the grid step sizes to be Default Grid Steps fe Logarithmic St i A S H AaS Ge taken in logarithmic sizes Sets the size of the grid steps when using Grid search during parameter estimation Optimization results The parameter results from the optimization are displayed under the Results view as a sub view called Parameter Results Parameter Results provides a tree view of a model s s
99. me observed data for an event which shows how it varies in relation to another factor then it is often possible to develop an empirical model which describes this variation For example in the temperate zone of the northern hemisphere the mean monthly temperature varies during the year in a manner similar to that shown in the graph below Celcius 15 Temperature Months The points on this graph provide some useful information graphically summarizing the annual fluctuations The data can be described further by fitting a mathematical function using statistical methods as shown in this case with a sine function The parameters of the sine function are estimated by minimizing the deviations of the curve from the data points This is often a useful exercise as the resulting fitted equation can provide a useful summary of the data although in many cases the nature of the equation has no physical meaning In other words the choice of function is quite arbitrary we simply choose something of the right general shape However this is not always the case sometimes the function used is dictated by some underlying theory whose parameters are unknown In such cases the fitting Introduction 7 Chapter 1 process takes on new meaning as we are estimating parameters which have some physical meaning based on theory The goodness of fit gives us some idea of how good the theory is For example radioactive decay is describ
100. never displayed by ModelM aker but an information indicator can be displayed to show that a component has some information text defined e Select Show Information Icons on the General tab of the User Preferences dialog box Edit menu Component bitmap image M odel components can be represented as bitmap images in the model diagram e Open the Component Definition dialog box e Enter anamein the Bitmap File N ame edit box or invoke the O pen dialog to locate your bitmap file e Select a Bitmap sizing option 58 Working with models Bluediagonal lines Green outlineor green diagonal lines Green or green cross hatching Red or red cross hatching Text box definition Chapter 5 Scale component to bitmap will increase the component size to match the bitmap s size if it is smaller than the bitmap Tile bitmap within component will tile the bitmap to fill the component Scale bitmap to component will stretch or squash the bitmap to fill the component Component shading ModelM aker uses shading to provide information about the status of model components Component lines are outlined or completely filled with color whereas component boxes are shaded with color The component is empty i e has no equation event condition event action or lookup file name defined M odels containing empty components cannot be run The component is global i e its symbol can be referenced by other model components in the same s
101. nput2 used in Value2a and Value2b Value2b Input2 Components sub models delays and DLL functions 95 Chapter 9 Output Connecting a model component to an output reference inside its sub references moda passes the value of the component out of the sub model making it available to the components in the parent model The connection can be made using a flow from a compartment or an influence If a flow is connected to the output reference the value of the flow is passed out of the sub model If an influence is connected the value of the source component of the influence is passed Only one component may be connected to the sub model end of an output reference Value1 Output1 e Output2 In the parent model the output reference takes the value of the connected component in sub model This value can be used in the normal way by using the symbol of the output reference Value1 Value of Output used in Valuela and Value1b Value1b Value of Output2 Value2b used in Value2a and Value2b Output P gt SubModel Value2a Output2 96 Components sub models delays and DLL functions Chapter 9 Delays In many systems not everything happens at once and the consequences of certain occurrences may not be felt by the model until some period of time has passed To accommodate this ModelM aker provides a delay component which takes the value of another mode component and delays it for a defined but not ne
102. ns e Select Lakel and Lake in the V atical Axis list box e Click lt lt to move them into the Components list box e Select Lakel river_rate 0 05 Lakel river_rate 0 06 Lakel river_rate 0 07 Lakel river_rate 0 08 Lakel river_rate 0 09 in the Components list box e Click gt gt to move them into the V etical A xis list box e Click OK to plot the graph Pollutant Levels in the Lakes a E e E E a E 0 deeg Se eg d SE d E e e eg 0 10 20 30 40 50 60 70 80 90 10C Time days Laket river_rate 0 05 Lakel river_rate 0 06 Lake1 river_rate 0 07 Laket river_rate 0 08 Laket river_rate 0 09 Step 15 Comparing the model with observed data When a model of a real system has been developed it is important to assess how well it is working by comparing the model s predictions with experimental data We shall overlay some experimental data to a graph of our model s predictions For this example we will reload tutor2 mod ModelMaker tutorial 31 Chapter 2 To follow this Experimental data is configured in the Model Data view exampleload the modd e Select View Model Data tutor2 mod The Moda Data view is created and activated with an empty sheet Page 1 You need to enter the data e Enter the following experimental data Each column of data must be configured and associated with a model component One column must represent the independent variable t
103. nt kg 200 0 10 20 30 40 50 60 70 80 90 100 Time days Step 16 Optimization Once experimental data have been associated with a modal it is possible to improve the modal so that it fits the experimental data more accurately This is achieved by optimization where selected mode parameters are systematically adjusted to reduce the deviation ModelMaker tutorial 33 To follow this exampleload the mode tutor8 mod 7 tutor8 mod 6 Main to TT fA Model Data C Page 1 4 Results Ec Graphi IT Table1 Updating the parameters Chapter 2 between the model and experimental data See Chapter 14 Optimization We are now in a position to optimize our example model with respect to the configured experimental data We shall optimize the parameters rive_rate and estuary_rate using the default optimization settings of M arquardt optimization and Ordinary least squares weighting e Activatethe Parameters view by selecting it in the M odel Explorer e Select the Optimize check boxes for rive_rateand estuary_rate Optimization is now enabled e Click the Integrate icon arrow Tand select Optimize from the drop down menu The Optimization Run dialog box opens Use this dialog to confirm the optimization method and parameter selection and start the calculation e ClickOK to run the optimization The optimization eventually converges on the new parameter values of river _ rate 0 0968 and est
104. nt will be triggered within one hour of the pollutant level becoming too high The tolerance will therefore be set to 1 24 0 042 ModelMaker tutorial 25 To follow this exampleload the mode tutor4 mod Chapter 2 The next stage in developing the mode is to insert a new component event The model also requires two new influences between Lake and the event because the event both tests and adjusts the value of Lake2 Add acomponent event E1 Add two influences between Lake and E1 and E1 and Lake2 Estuary A Double click E1 to open its definition dialog box Inthe D efinition tab enter Treatment in the Symbol edit box Select the Trigger tab Enter Lake2 gt 400 in theCondition edit box and 0 042 in theT olerance edit box Select the A ctions tab Enter Lake2 Lake2 150 in the edit box Rerun the model The graph of Lake2 shows the zigzag trace of the pollutant treatments 26 ModelMaker tutorial Thecompleted modd up to this point is tutor5 mod To follow this exampleload the mode tutor5 mod Chapter 2 Pollutant Levels in the Lakes 1000 800 600 Lake 400 Lake Pollutant kg 200 0 10 20 30 40 50 60 70 80 90 100 Time days Step 13 Lookup tables Suppose that somebody has actually gone out to Lakel and measured the pollutant discharge rate on the first day of each week Instead of using the regular pattern of discharge assumed
105. odel reference is added to the model diagram A matching reference is added to the diagram of the selected sub model 54 Working with models Adding multiple components Canceling a component selection Component filter buttons Chapter 5 Multiple component boxes lines or references can be added to the mode diagram by holding down the lt Ctrl gt key as the components are added The cursor remains as a cross hair representing the selected component If you select a component to add to the diagram and then change your mind press lt Esc gt or click the Select icon on the Diagram toolbar to cancel your selection The cursor returns to its normal pointer shape Defining components The characteristics of each model component are defined in its component definition dialog box To access this dialog e Double click the component with the LMB or e Select the component and press lt Enter gt Alternatively anumber of components can be defined in turn by selecting them together and double clicking within the selection area The definition dialog for each of the selected components is accessed in turn Click the Cancel button in any of the dialogs to stop the process Most of the component definition dialog boxes and many other M odelM aker dialogs contain list boxes which display Available Components Use the component filter buttons to select the types of component that are displayed Passing the mouse cursor over each fil
106. of actions Event calculation order The calculation order of events can be defined by the model designer For all other components except DLL functions M odelM aker calculates their values in the order which is implicit in their definition i e if component A uses the value of component B component B will be evaluated first Since events have such freedom to change the state of the model M odelM aker has no way of defining exactly how events should be ordered and must leave the job to the user This only becomes important for models with many interacting events Use the Component Order dialog box to determine the order in which events and DLL functions will be evaluated To open the Component Order dialog box e Select Component Evaluation Order Use the Up and Down buttons to change the evaluation order 82 Components independent and component events Configuring event definition The Event Definition dialog Definition tab Configuring component event triggers Chapter 8 Defining events Events are configured in the Event Definition dialog box To open the Event Definition dialog box e Double click the event in the mode diagram The Event Definition dialog box is divided into five tabs Definition Trigger Actions Bitmap Information Independent and Component Events use the same configuration process in the Definition tab to define the symbol and type e Inthe Definition tab enter text in the Symbol edi
107. omponents are very small With user defined output points fixed step integration can be selected select Fixed Step and enter a value in the Subdivisions edit box Thus with this option the total number of calculations will be equal to the number of output points multiplied by the number of subdivisions Choose how the method error is scaled The default method sets error scaling to be proportional to a constant value of 10 If Gear is selected as the integration method the Integration tab options change Gear s method is an appropriate solver for stiff simulations where processes happen on very different time scales It automatically adjusts the size of integration steps to match the timescale on which the simulation is evolving N ote that Gear s method may be a memory intensive calculation If the Specify initial steosize and Limit steosize check boxes are left clear ModelM aker will select values Run Options RH sl Integration Repeated Run Repeated Run Settings Random Seed fi Integration Method Gear zl r Output points User defined Number C Adaptive Enter a relative error per step E g An error of 0 001 ensures an error on each component in one integration step of less than 0 1 Gear Options Relative error per step 0 001 T Limit stepsize eg Running a model 111 Chapter 11 Configuring a repeated run Repeated run operation provides the ability to run a model many tim
108. ons Si 7 Enter the starting value of the Start Value independent variable for the run Stop Value 100 Repeated Run Enter the stop value of the independent variable for the run Check to initiate repeated run options Click to open the Run Options dialog Configuring run options More advanced run options can be configured from the Run Options dialog box To open the Run Options dialog e Click the Advanced button in the Run dialog or e Select Model Configure gt ntegration The Run Options dialog is divided into three tabs Integration Repeated Run and Repeated Run Settings Running a model 109 TheRun Options dialog Integration tab Random seed Integration method Output points Chapter 11 Configuring the integration method The integration method that is used to solve the model is selected and configured in the Integration tab See the M odaM aker Reference M anual for more information about the available integration methods Enter a random seed for stochastic models Run Options Choose user defined or adaptive output points User defined Number fi 00 C Adaptive Check to use fixed step integration Enter a minimum value Enter an accuracy scaling value Proportional the function to C the function and its defivative aconstant value fio Enter an accuracy Select the type scaling value of error scaling to perform Stochastic mo
109. oolbar e Movethe cursor to the position in the model diagram where you want the component to appear Working with models 53 Adding component lines Adding sub model references Chapter 5 e Click the LMB The component box is added to the model diagram at the cursor position or at the nearest grid point if snap to grid is enabled The cursor returns to its normal pointer shape To indicate that the newly added component box is in its uninitialized or empty state it appears shaded in blue Component lines require a source component and a target component For flows the source and target boxes must both be compartments To add acomponent line to the mode diagram Select the component line icon from the Diagram toolbar e Click the source component e Click the target component The component line is added between the two selected components A newly added flow has an invalid equation and therefore appears shaded in red If acomponent line is selected for addition to the diagram and the left mouse button is clicked at an invalid position in the model diagram M odelM aker beeps to indicate the invalid mouse selection and the cursor returns to its normal pointer shape Sub mode references allow communication between parent models and sub models To add a sub model reference e Select the sub model in the mode diagram e Select the sub model reference icon from the Diagram toolbar e Click in the model diagram The sub m
110. or example a defined value array with sections D3 0 1 and D3 3 4 is illegal because there is no definition for element D3 2 Components compartments flows variables and defined values 71 Control series Controlled series Data series Chapter 7 7 Components Lookup Tables and Lookup Files Lookup files and lookup tables provide a mechanism for linking models with external numerical data With lookup files the data are held in a text file which is attached to a model component Lookup tables hold their data in a lookup view which allows direct entry of data into the model Lookup series A lookup table or file can have many lookup series associated with it where each series symbol represents a column of data within the Table view or attached file Lookup series work in the same way for tables and files There are four types of series A control series is assigned to a column of data which contains values of an existing model component Thus a control series does not havea value or symbol of its own but uses the value of the model component to determine which data points are to be used to calculate the value of a controlled series A controlled series is assigned to a column of data which contains the data from which the value of the series is to be evaluated A controlled series has its own unique symbol which is used by other model components to refer to its value A controlled series must also be assigned a cont
111. ose to display all model data or selected sheets only Graphs 449 The Graph Series Options dialog box Customizing graph axes Chapter 12 e Select Show Optimization Data or Show Selected D ata With Show Selected D ata you must also select the page number of one or more sheets e Select Apply to All to apply this setting to all series See Chapter 14 O ptimization for more information about configuring the Mode Data view Select the graph Enter legend text series to define Select series values to show Graph Series Options Legend Text Top Define Shi A r Vael Select the line Legend Entry type line color Value Marker IN nd E Model Values Se and marker type Data Poi s APEI Fob Wa d for model values Eror Bars a DataMake H and data points m Model Data Sheets Show data configured Show Optimization Data 0 in the Model Data Show Selected Data view if available T Apply to ai Use Up and Down to change the graph series selection Select to open the Series Statistics dialog Histograms only When a graph is created it is given a default axis configuration depending on the value of the series You can change the following characteristics of a graph axis 1 Maximum and minimum values 2 Major and minor tick intervals 3 Crossing point 120 Graphs The Graph Axis Configuration dialog Format tab Chapter 12 4 Grid lines 5 Axis title text
112. position color and font 6 Axis label numeric format color and font To customize a graph axis e Click the X Axis or Y Axis icon or e Select View X Axis or View Y Axis The appropriate Graph A xis Configuration dialog box opens e Define the new axis characteristics e ClickOK The Graph Axis Configuration dialog boxes are divided into three tabs Format Labels and Title Use the Format tab to define the axis limits tick marks crossing point and grid lines Clear these flags to enter a fixed value for the axis characteristic Axis Configuration Select the major unit EE tick mark type Maximum ho M Major Unil ho t S C K Minor Unit Cross C Outside KR XAvisCrossesAt p 7 Major Unit Grid Lines Grid Color SetColor Solid C Dashed Minor Unit Ticks Select the minor unit tick mark type Losec cae Select the minor unit tick mark type C Dotted Customize grid Help Set Default Cancel Graphs DL Chapter 12 Use the Labels tab to define the font and numeric format for the axis labels Select or enter a font name Select or enter a font style The Graph Axis a Configuration dialog e ls Y Axis Configuration Select or enter a font size Font Name Font Stue E Labds tab a a i T Arial CE I Bodrac A ia sl SEA e EH effect T Underline T Strikeout AaBb 0123 Select a new font color r Numeric Format C General
113. protection To protect a mode with a password e Select File Password Protection The Add Password Protection dialog box opens e Enter a password in the Password and Verify edit boxes You will be prompted for the password next time you open the modd Printing from ModelMaker Any of the ModelM aker views can be printed e Click the Print icon or e Select File Print The Print dialog opens e Check that the printer details are correct and click OK Use Print Preview to check what a printed document will look like To access Print Preview e Click the Print Preview icon or e Select File Print Preview From Print Preview you can L Print the document by clicking on the Print icon 2 Scroll through the document pages with the left and right arrows 3 Close the preview by clicking the Close icon Open the Page Setup dialog box to customize your page and printer settings e Select File Page Setup 50 Basics On line help Context sensitive help Chapter 4 e Check the settings and click OK Arranging windows The names of all open models are listed at the foot of the Window menu Click a model with the LMB to make it the active model Use the Window menu options to arrange open model windows To display model windows in a cascading style e Select Window Cascade To display model windows vertically across the width of the M odelM aker window e Select Window Tile Vertically To display model windows in horizont
114. pter 1 of the boxes represents a complex system in its own right and it may be appropriate to further divide some of them into sub components The next step is to identify the real life processes at work For example radiocaesium deposited on the leaves of vegetation will be transferred to the soil via two real life processes weathering where radiocaesium is washed off by rain and leaf turnover where leaves die and fall to the ground Each component will require an equation in terms of other components within the model or externally input data and parameters The equations needn t be very complicated but generally require some consideration of the physical processes at work Consider the example of radiocaesium weathering from a leaf surface a process that must be dependent on rainfall A simple first assumption might be that it is proportional to rainfall weathering rainfall As such this equation can t be implemented in ModelM aker so a weathering coefficient could be introduced to turn the proportionality into an equation weathering W x rainfall The value of W can be estimated from our knowledge of the weathering process and adjusted in relation to observed data It may also be appropriate to undertake experimental work to estimate W directly In developing this relationship two new factors have been introduced to the model the parameter W and rainfall Rainfall may be calculated in the model but is more likely
115. r 0 1 x the amount of pollutant in the top lake e The flow of pollutant in the estuary 0 05 x the amount of pollutant in the bottom lake 3 1000 units of pollutant are dumped in the top lake at time t 0 Step 2 Adding compartments We shall start the mode by adding compartments to the Diagram view M ain A compartment is a container in a model and is defined in terms of what is entering and leaving it See Chapter 6 Components Compartments Flows Variables and D efined V alues Compartments appear in model diagrams as rectangular boxes e Click the Compartment icon on the toolbar e Add a compartment C1 by moving the cursor to the desired location in the model diagram and clicking with the Left Mouse Button LM B e Repeat the above steps to add two more compartments C2 and C3 The three compartments are filled with blue lines indicating that the compartment equations are undefined The properties of a model component are defined in its component definition dialog box e Double click C1 with the LMB to open its definition dialog box e Enter Lakel in the Symbol edit box and 1000 in the Initial Value edit box e Click OK to close the dialog e Doubleclick C2 e Enter Lake in the Symbol edit box e ClickOK 14000 ModelMaker tutorial EE e Repeat for C3 entering Sea in the Symbol edit box Step 3 Adding flows Flows represent the transport of a quantity from one compartment to another and are used in
116. r component value or make it converge on a desired value In our model let s assume that we want to force the amount of pollutant in Lake2 to be 500 kg on day 20 of the mode run To do this we shall add a new variable to the moda For this example we will reload tutor2 mod e Add avariable V1 e Add an influence between Lake and V1 e Doubleclick V1 to open its definition dialog box e Enter Minimum in the Symbol edit box and abs Lake2 500 in the Equation edit box abs is an absolute value e Click OK to close the dialog ModelMaker tutorial 35 Chapter 2 Minimum Estuary d A N ow the model definition is completed we can set up the minimization options e Activate the Parameters view e Select the M inimize check boxes for river_rateand estuary_rate M odelM aker uses sample points to test the values of selected components at selected moments in time Sample points are configured for minimization and Monte Carlo analysis in the Sample Points view e Click the Sample Points icon The Sample Points view is created and activated This view is divided into five columns Name Component Time Point M onte Carlo and Minimize e Click the Sample Point icon on the Sample Points toolbar A new sample point SP 1 is created e Double click SP1 to open the Sample Point Definition dialog box e Enter 20 in the TimeP oint edit box and select Minimum in the Component list box e Click OK to close the dialog e
117. r to keyboard characters For example lt Esc gt means press the Escape key lt Ctrl C gt means hold down the Control key whilst pressing C lt Alt F O0 gt means press the Alt key followed by F then O e LMB refers to the Left Mouse Button and RMB refers to the Right M ouse Button menu For example RM B Parameters means click the right mouse button within the Model Viewer panel and select Parameters from the menu In ModelM aker there are typically several ways to access dialog boxes and features These methods include toolbars program menus the Right Mouse Button shortcut menu and keyboard shortcuts In general only toolbar icons and program menus have been documented in this manual However the shortcut menu will also access many M odelM aker functions N ote that the appearance of the shortcut menu depends on the area or component that is clicked See the M odelM aker Reference M anual for a list of keyboard shortcuts ModelMaker 5 Chapter 1 1 Introduction A model is a quantitative description of a real life process or system and is typically composed of mathematical equations which give numerical answers These answers can be substantiated against factual data to test the accuracy of a model If a model is accurate it can be used to make predictions In the next section some of the important differences between empirical models and mechanistic or simulation models are discussed Empirical models If you have so
118. ries dialog box opens e Select atable series in the Series list box and define its title and numerical format etc e Click Deine 128 Tables The T able Series dialog box Chapter 13 The options for the series are saved Use the Up and Down buttons to change the table series selection Click OK to save the series options and dismiss the dialog Select the table Enter a title for the series to define table column Table Series Column Title Bottom Select a numeric Ak format and number of decimal places Numeric Format C General Scientific Fixed Point Places IT Apply to All Check to apply the numeric format to the whole table Use up and down to change the table series selection N ote the table selection and series dialog boxes can also be accessed from the RMB or by double clicking with the LMB on appropriate areas of the table For example click the table header to open the Table Series dialog box Archiving tables You may want to store several sets of results in order to investigate changes to your model You can do this by archiving sets of results e Select the Results view in the Model Explorer e Select RMB Archive All views in the current Results view are archived to anew view called Archivel The current Definition view is also copied to the archived view Additional results sets will be archived as Archive2 Tables 129 Copying a table Chapter 13 Archive3 etc The
119. rol series which determines which data points are to be used to calculate its value Once the required data points have been identified the values of the series are calculated by interpolation Interpolation can be constant linear polynomial or rational See the M odaM aker ReferenceM anual for more information about interpolation A data series is assigned to a column of data from which single values can be picked A data series has its own unique symbol but can only be evaluated using the lookup function Data series are used to extract a data value from a specific index in a column of data Data series are not assigned a control series and cannot be interpolated Components lookup tables and lookup files 73 Unused series Configuring the File tab The Lookup File Definition dialog Filetab Configuring the Series tab Chapter 7 An unused series is assigned as a place holder to a column of data that is not used by the model Configuring lookup files Lookup files are configured in the Lookup File Definition dialog box To open the Lookup File Definition dialog box e Double click the lookup file from either the model diagram or Definition view The Lookup File Definition dialog box is divided into four tabs File Series Bitmap and Information See Chapter 5 Working with M odds for more details on using the Bitmap and Information tabs e Inthe Filetab enter text in the Symbol and Lookup File N ame edit
120. s Text dialog box opens with the default file specification of the model name and the extension txt e Enter a file name in the Filename edit box e Click OK The graph is saved in a tab separated format with the selected file name To copy the active graph to the Windows clipboard e Select Edit Copy or click the Copy icon The graph is copied to the Windows clipboard as tab separated text a Windows metafile or a bitmap image and can be used by other Windows applications Graphs 125 Chapter 12 Renaming graph sub views To rename a graph sub view e Select the graph in the Mode Explorer e Select RM B Rename View The View Name dialog box opens e Enter anamein the View Name edit box and click OK 126 Graphs Changing the table selection Chapter 13 13 Tables Tables provide access to the values calculated by M odelM aker during a model run Tables like graphs see Chapter 12 can be archived and restored at a later date so that the effects of changes to the model can be examined The values of Compartments Variables Flows Defined values Delays and the independent variable can be shown on tables Tables are stored under the Results view as Tablel Table2 etc Creating tables To create a table e Click the Table icon or e Select View Table The Table Selection dialog box opens Use this dialog to specify which components are to be presented in your table e Select components in the Componen
121. s are defined in the Sample Point Definition dialog box e Doubleclick with the LM B on the sample point to be defined The Sample Point Definition dialog box opens e Enter values in the Time P oint and N ame edit boxes e Select a component in the Component list box Minimization 141 Configuring the Parameter view Configuring the Sample Points view Running minimization Chapter 15 e ClickOK In the Sample Points view e Select the M onte Carlo check box and or the M inimize option button Configuring minimization e Activate the Parameter view Select the parameters to be adjusted e Select the appropriate boxes in the M inimize field Thereis no limit to the number of parameters which M odelM aker can adjust during minimization but the more that are selected the longer the process takes e Activate the Sample Points view e Configure a sample point for minimization e Select the M inimize option button for the configured sample point Only one Minimize option button can be selected Once parameters and sample points have been configured correctly minimization is enabled e Click the Integrate icon arrow and select M inimize from the drop down menu The Start Minimization dialog box opens e Click OK The minimization is run with the default settings During minimization ModelM aker compiles the model and displays the minimization status on the message bar showing the percentage of the independent variable ran
122. scharge 10 Reduce the level else otherwise the current value of Discharge is low SS 25 Ai Increase the level Defined event actions Event actions consist of alist of action statements each separated by a semi colon The actions of an event may 1 Assign new values to certain model components 2 Call actions 3 Useconditional statements to execute different groups of actions based on the condition of the model To make the actions of an event easier to understand comments can be added Any text on a line to the right of a double slash is ignored by ModelM aker For example Components independent and component events 85 Assigning model component values Chapter 8 Change the state of the model Year 0 Reset the year counter Event actions can assign new values to compartments and defined values The iterator symbols i and k by default are also available and can be assigned integer values For example C1 10 D1 C1 2 5536 D2 D1 cos t 2 i j To allow the assignment of new values to arrays of compartments and defined values M odelM aker makes use of the iterator symbols to define a shorthand syntax as follows component range specification iterated_expression where range specification defines a valid range of the elements of the component and iterated_expression is a mathematical expression in which the iterator symbols appropriate to the dimension of the component iterate
123. sessateeeesaeeess 49 PASSWORD PROTECTION EEN 50 PRINTING FROM MODELMAKER EEN 50 ARRANGING WIN DOS 51 MODELMAKER HELP ccscccsessssecssssceesssseeeusseeeessaseeesssseeeesessesesessesessses 51 M ODELMAKER ON THE WEB EEN 52 M ODELMAKER USER Gpoup EEN 52 5 WORKING WITH MODELS sssssssssnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnaa 53 ADDING COMPONENTS u sessssssseccsssceecsssseeesssceeesscceeeeseseeeessseeeessseansesees 53 DEFINING COMPONENTS EEN Ke FINDING COMPONENTS EN Ke ele ee EE 56 CONFIGURING RUN SrMBOLS EE 57 COMPONENT DESCRIPTION scsssseeeessseeeesssseesessseeeeeseneeeessseteeesseaeeeesaees 57 COMPONENT INFORMATION ssssssssssssssernserenenrrensnnrnnnnrnnnnnrennnnrennnrnnnnnrnna 58 COMPONENT BITMAP IMAGE AE 58 COMPONENT SHADING EE 59 BS age KEE 59 SELECTING COMPONENTS EE 60 MOVING COMPONENTS EEN 61 FORMATTING COMPONENTS E 61 USING THE CLIPBOARD ET 62 SCROLLING AND ZOOMING THE MODEL DIAGRAM u esscessseeeesereeseesseeeees 63 SETTING USER PREFERENCES ccsssssesssecessssseccssseeesesseeeesssseeeessseeeeeessaeeess 63 6 COMPONENTS COMPARTMENTS FLOWS VARIABLES AND DEFINED VALUES sssssssssnsnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnanan 65 COMPARTMENTS ripae atinan eters ere e EE Reeg E 65 FLOWS EE 65 VARIA OR 66 DEFINED VALUES A e A E E A E 66 DEFINING UNCONDITIONAL AND CONDITIONAL COMPONENTS 00008 67 DEFINING ARRAYS OF COMPONENT ELEMENTS n ssssssssssssrnseriresrrrnnsrrereere 69 7 COMPONENT
124. srnnunununnnnnnnnnunnnnnnnnnnnnnnnnnnnnnna 16 STEP 5 RUNNING YOUR MODELL wicsseccsscccsssecseceeeeeeccseecsueeeeueesssseeaeeeeeeeess 17 STEP 6 DiSbpLAariNGTABLES 17 STEP 7 DISPLAYING GRAPHS nsssssssssssssrrrununnrnnnnnnununnnnnnnnnnnnnnnnnnnnnnnnnnnnnna 18 STEP 8 ADDING VARIABLES cccccsssccsececssscceeeecueeesssceeueeesueessseeeaeeeueeeess 19 STEP 9 ADDING INELUENCES 20 STEP 10 DEFINING CONDITIONAL COM PONENTS 21 STEP 11 ADDING DEFINED VALUES AND INDEPENDENT EVENTS 23 STEP 12 ADDING COMPONENT EVENTS 25 STEP 13 LOOKUP TA BD Sa EE 27 STEP 14 RUNNING SENSITIVITY ANALYSIS woccccccescccsscssueeeseeeessssesseeeeeeeess 29 STEP 15 COMPARING THE MODEL WITH OBSERVED DATA 31 STEP 16 OPTIMIZSATION E 33 STEP 17 MINIMIZATION uescsccccsccsceeseececssceseeeeseeeesseeeeeeeeuueesseeeeueeeaneeess 35 STEP 18 MONTE CapLOANALYgls 37 3 VIEWS AND TOOLBARS ssssssssnnsnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnna 41 THE MODEL EXP OR R EE 41 AVAN AV KEE EA AE E ENE et ee deet A 41 TOOT EEN 44 A BA S O S EEN 47 STARTING MopE MakrEn 47 CLOSING MODELMAKER usseccscccccssecsececeuecccscecsueeseueecssecuaeeeuueessseeenaeeess 47 ModelMaker ix Contents OPENING A MODEL wcsccccsccssscsecssssesecssseesusceeeeessseeeesscseueessceeneesuseesessesanes 48 CLOSING A MODEL ccccssccssscsecsssseesesseueusssceeeeesseeeeseseeeessseeeesusseeeessssenes 48 SAVING A MODEL EE 49 SEN DING A MODEL ASAN E MAIL cccssscesssseeeessseeeessseseessseeee
125. t Events Let s assume that the pollutant discharge rate in our model follows a regular pattern every week it switches between 25 ko and 10 kgd 1 To model this behavior we will replace the variable Discharge with a defined value also called Discharge and an independent event e Select the Discharge variable and press lt Delete gt Discharge and the influences connecting it to Lakel and Lake2 are deleted e Add adefined value D1 e Double click D1 to open its definition dialog box e Enter Dischargein the Symbol edit box and 25 in the Equation edit box e Click OK e Add anindependent event E1 e Insert three new influences between Discharge and Lakel Discharge and E1 and E1 and Discharge ModelMaker tutorial 23 Chapter 2 Independent events are triggered at pre determined values of the independent variable Such triggers can be periodic or non periodic e Double click E1 to open its definition dialog box e Inthe Definition tab enter Switch in the Symbol edit box set Initial Status to Active and set Event Class to Reactivate e Select the Triggers tab The Triggers tab defines when the event will be triggered e Select Periodic Trigger e Enter 7 in the Period edit box and 7 in the Starting At edit box e Select the Actions tab The Actions tab defines what will happen when the event is triggered We want to say If the value of Dischargeis 25 Se Discharge to 10 Otherwise Se Discharge to 25 To defin
126. t box e Select Initial Status and Event Class options Enter a unique symbol Independent Event Definition Enter a description of Triggers Actions Bilmap Information the event optional Switch Symbol Define whether the event is re activated once triggered I Universal I Global M Show Description Description Initial Status e Active Inattye Event Class E Reactivate Do not reactivat Define whether the event is initially active The component event trigger condition and tolerance are configured in the Trigger tab of the Component Event Definition dialog box e Select the Trigger tab e Enter a Boolean expression in the Condition edit box This may contain references to any model value in order to decide whether the event should be triggered e Enter a value in the Tolerance edit box When a component event whose condition is true is encountered the step length of the model integration method is adjusted in order to trigger the event within the defined tolerance value Components independent and component events 83 Chapter 8 The Component Enter the conditional Event D efinition trigger expression Trigger tab Component Event Definition Definition GE Enter the trigger tolerance value Tolerance Configuring Independent events are triggered at user defined values of the independent independent variable in the Triggers tab of the Independent Ev
127. tab to specify font name style size and effects A mode can be formatted in the Mode Options dialog box e Select Modell Options The Mode Options dialog box is split into three tabs Symbols see Configuring run symbols Diagram and Font Use the Diagram tab to specify line characteristics and set grid options for the model Use the Font tab to specify font name style size and effects The size of a component box can be changed by selecting it and dragging the appropriate sizing handle to attain the desired dimensions M odelM aker automatically reformats the text within the component The sizing functions of the align menu can also be used to resize component boxes Components can be resized to match the widest narrowest tallest or shortest component in the modal Working with models 61 Aligning components Chapter 5 e Select the component or components to be resized and the component whose size will be copied e Select Component Align and the appropriate alignment function o Widest Narrowest Tallest Shortest M odelM aker resizes the selected components Model diagrams are entirely free format ModelM aker draws no functional inferences from the relative positions of model components H owever in order to improve the appearance of a model it is possible to align components Flows and influences cannot be aligned because their position depends on the positions of their source and target components To align a gro
128. ted while a specified expression is true The difference lies in that the expression is evaluated at the end of the loop rather than at the beginning The syntax of the do while statement is as follows do action or group of actions while expression is true Thus the action or group of actions following the do statement is executed once and then repeatedly for as long as the expression in the brackets is true When the expression is false execution passes on to the next action This means that the actions or group of actions will always be executed at least once For example do D1 D1 D2 always increment D1 at least once while D1 lt 10 repeat until D1 is too big Braces can again be used Components independent and component events 89 for loop break statenent Chapter 8 do D2 D3 D4 D3 D3 D4 while D2 lt 100 The for loop allows actions or groups of action to be executed a specified number of times The syntax of the for statement is as follows for initial assignment condition increment assignment action or group of actions The for loop uses three expressions to control the execution of actions 1 Initial assignment this is evaluated before the loop is started 2 Condition this must be true for the loop to be executed 3 Increment assignment this is executed at the end of the loop before the condition is re evaluated to decide whether to repeat the loop again For example
129. ted with a lookup table can have more than one page of data each with the same lookup series configuration and a unique identifying number At the start of a model run ModelMaker calculates the values of its configured lookup series from the data contained on the active page It is possible to change the active page during the mode run by using the following event actions e SetPage lookup_table page number This attempts to set the active page of the lookup table with the symbol lookup_table to the page with the identifier page number If the lookup table does not have a page with the given identifier an error message is displayed and the model run is terminated 78 Components lookup tables and lookup files Changing the configured lookup file Chapter 7 For example the action SetPage M etData 1 sets the active page of the lookup table M el ata to the page with the identifier 1 e GetPage M essage Title lookup_table This displays a dialog box with the given message and title prompting the user to enter the identifier of the page which is to be made the active page of the lookup table with the symbol lookup_table The currently active page identifier is used as the default value If the lookup table does not have a page with the entered identifier an error message is displayed and the user is prompted to enter another value If the user clicks Cancel the mode run is terminated For example the action GetPage
130. ter estimation 135 TESUIIS corato ess 138 TUDMING E 133 statistics eeeeeeeesteeeeeees 138 Weighting seesesseeeeseeeeeseee 136 Optimization Statistics view 138 Output points 110 P Parameter Results view 138 143 Parameter view 0000 42 103 Parameters ccccceeeeeeeeeees 103 e E 107 Contrainten 105 defining enesenn 104 deleting iisiesessisiii 106 Cetmaton ee eeeeeeeeeeeeee 105 lakes example ssseeeeeeeeee 16 updating oe 138 143 Parent model sssneseeeeeseeeeeee 93 Password protection 50 Print Drevieuw 50 Printing egene EES 50 R Random seed 110 Register ModelMaker 1 Renaming Views seeseeseeeesee 44 Repeat data ii nesses 75 Repeated mun 111 Results view 42 archiving 0 eeeeeeeeeeeeereeeeee 43 Retained series ee 114 lakes example sseeeeeeeeee 30 RM get iins 5 Run Option S 109 advanced cceeesseeeeeees 109 error Scaling eeeeeeeeeees 111 integration method 110 output points eee 110 Index random seed cesses 110 subdivisions s s s 111 Run symbols ossee 57 Running a model 4 109 gear s method 111 lakes example 17 S Sample points 141 145 Sample Points view 43 141 SQV EEN 49 Saving a model 49 mbk files eeeeeeseeneees 49 mod files eee eeeeeneees 49 SAV Dies 49 Sensitivity analysis 113 lakes
131. ter will display a ToolTip explaining which components will be filtered The functions filter buttons work in the same way Available Functions Filters al E E Available Components lol ololle 2 DOS Finding components Use the Find Component dialog box to find a component s model diagram representation or definition within the model To open the Working with models 55 Influences and flows Global components Chapter 5 Find Component dialog box e Click the Find Component icon or e Select Edit Find Component The model s components will be shown in the Components list box e Select the component you want to find e Press Show to view the selected component which will be centered within the Diagram view or e Press Edit to view the definition dialog box for the selected component Symbol scope M odelM aker models can be created as hierarchical structures containing nested sub models With the exception of universal components considered below sub model s are treated as separate models This means that no two components in the same sub model can have the same symbol but components in two different sub models can have the same symbol In general if one component references another then they must be connected by an influence or flow For example if V1 V2 3 then V2 can be said to influence the value of V1 and an influence must be inserted between V2 and V1 This rule ensures that the diagra
132. that double clicking the left mouse button will open or close the text box icon by selecting the Double click opens and closes text box components check box in the General tab of the User Preferences dialog box select Edit User Preferences Selecting components Components must be selected before they can be moved or resized etc To select a Component box e Click inside the box with the LM B To select a Component line e Click the arrow with the LM B 60 Working with models Formatting a single component Formatting all model components Sizing components Chapter 5 Moving components Components can be moved either singly or in groups Select the component or components you want to move hold the left mouse button down within the selection area and drag the components to their new position Formatting components The way in which a mode component is drawn can be changed by using the Component Format dialog box This allows you to change the line thickness line color font and font color used to draw the component For component boxes you can also define how the text within the component is formatted To format an individual component e Select the component to be formatted e Sedect Component Format to open the Component Format dialog box The Component Format dialog box is divided into two tabs Diagram and Font Use the Diagram tab to select line characteristics and text formatting options Use the Font
133. this point is tutor3 mod Chapter 2 e Enter Lake2 gt 250 in the Condition edit box and 10 sin t pi 365 in the Equation edit box e ClickOK The new conditional equation is inserted into the Condition and Equation list boxes e Click OK to close the definition dialog box Select the graph of Lakel and Lake2 and re run the model The graph now shows the effect of switching the rate of discharge as the amount of pollutant in Lake2 changes Create a new graph of the value of Dischargeto see how the conditional component changes during the model run Pollutant Levels in the Lakes Lake a a ae Lako Pollutant kg 0 10 20 30 40 50 60 70 80 90 100 Time days 22 ModelMaker tutorial To follow this exampleload the mode tutor3 mod KL Chapter 2 Step 11 Adding defined values and independent events A defined value is calculated only at the start of a model run or in response to the actions of an event This means that they are very useful for holding values which do not change very often or which change only in a discontinuous manner See Chapter 6 Components Compartments Flows V ariables and D efined V alues We shall use a defined value to hold the discharge level which is changed by an event M odelM aker provides two types of event to cater for discontinuous models independent and component events events can adjust model component values See Chapter 8 Independent and Componen
134. tion dialog box TheDLL Function Defined input value Definition dialog expressions Values tab Input Cz Values DLL faes Bitmap Information Input Values Create a new input value Change the currently selected input value Delete the currently selected input value Use Up and Down to change the input value order Each of the output values from a DLL function is given a unique symbol so that it can be used by other components in the model The 100 Components sub models delays and DLL functions TheDLL Function Definition dialog Values tab Output Values Chapter 9 output values are defined using the Values tab of the DLL Function Definition dialog box Defined output value expressions Enter a unique symbol for the output value DLL Function Definitior Input Values Define the output value type Accept the output value definition Output Values Create a new output Symbol fOutputt value Output2 T Universal F Global T Not Used Delete the currently selected output value Use Up and Down to change the output value order DLL evaluation order Use the Component Order dialog box to determine the order in which events and DLL functions will be evaluated To open the Component Order dialog box e Select Component Evaluation Order Use the Up and Down buttons to change the evaluation order Components sub models delays and DLL functions 101 Creating the Param
135. tional change Minimum change Retry Count TheM inimization Configuration dialog box Chapter 15 Advanced minimization configuration Clicking the Advanced button of the Start Minimization dialog box opens the Minimization Configuration dialog box This dialog can also be accessed from the M odel menu e Select Modell Configure gt M inimization The constraint range provides a way to control the range of parameter values used during the optimization process The constraint range selected is used as the default range for all the parameters selected for the minimization process Alternatively parameters can be assigned their own constraint range which overrides the default See Chapter 10 Parameters This is the fractional change in the value of the model component being minimized which is considered to be convergent This is the fractional change in the parameters which is used to calculate the vertices for the simplex method For example if a parameter has a value of 10 0 and the fractional change is 1 0E 3 the model is run with the parameter set to 10 0 10 0 x 1 0E 3 10 01in order to calculate the vertex of the simplex This is the minimum absolute change in the value of a parameter which is allowed when calculating the vertices for the simplex method For example if a parameter has a value of 0 1 the fractional change is 1 0E 3 and the minimum change is 1 0E 2 then the model is run with the parameter set to 0 1 1 0E
136. tivate the Lookup Table view e Select the Series tab The Lookup Table Definition dialog Series tab works in the same way as the Lookup File Definition dialog Series tab To configure the Series tab refer to the section Configuring the Series tab described under Configuring Lookup Files 76 Components lookup tables and lookup files Entering lookup table data Creating the Lookup Table view Selecting the active page Adding pages Copying pages Changing pages Chapter 7 Once the form of the lookup table has been defined the data values can be entered in the Lookup Table view To access the Lookup Table view e Click View Data at the bottom of the definition dialog This activates the Lookup Table view where data values can be defined The Lookup Table view is discussed in more detail below e Enter your data into the table Select File Import File to import a text file into the active lookup table The Import File dialog box opens Select Format to configure the file format options Using the Lookup Table view To create the Lookup Table view e Select the lookup table in the model diagram and select RMB Lookup Table Data If the Lookup Table view already exists it becomes the active view The view is created with an empty sheet P age 1 under the sub view T1 or the Lookup Table Symbol name if it has been defined Further sheets can be added to T1 as Page 2 Page 3 etc Further Lookup Tables can be add
137. to be input from external data It is often the case that new relationships can only be added to the model if new components are also introduced The implementation of mathematical relationships is a very thorough process in which every system in your model must be quantified In some cases the relationships may be well established and come straight from a textbook Often as in the example used here the processes are only poorly understood meaning that highly empirical relationships have to be used 10 Introduction Step 3 Implementing your model The next steps Chapter 1 M odelM aker is designed to mimic the process of conceptual model development as much as possible The first step involves constructing a diagram on the screen which represents the various mode parts This diagram is composed of a series of M odelM aker components each of which is intended for a different type of mathematical operation Each component has a definition which can be edited to insert its equation and any other appropriate information Once your mode has been implemented it can be run the equations are solved generating results that can be interpreted in graphs or tables Validation of your model may involve checking the model results against observed data to test its predictive power ModelM aker provides a series of facilities to make this as straightforward as possible In practice model development is often very iterative Having tested th
138. tructure with each branch representing a sub model Branches can be expanded and collapsed by double clicking the plus and minus icons The optimized parameter values are presented in fields called Optimize result and Optimize error To update your mode parameters with the optimization results e Activate the Parameter Results view e Select the parameter to be updated e Select RM B Update parameter The optimization statistics are displayed under the Results view as a sub view called Optimization Statistics Select the Optimization Statistics view in the Model Explorer to display a summary of the optimization statistics The statistics presented in the summary are 1 Degrees of freedom DF 2 Weighted sum of squares WSS i e the variation attributed to each component 3 Mean square MS i e the variation per degree of freedom where MS WSS DF 4 Total uncorrected sum of squares 138 Optimization Chapter 14 5 12 valuei e r Model WSS Total WSS 6 F valuei e the variance ratio whereF Model MS Residual MS 7 P valuei e probability that the model explained the variation by chance M arquardat only 8 Q valuei e probability that the differences between the model and data have occurred by chance M arquardt only The optimized values of the parameters o and are also reported during extended least squares calculation These values are calculated for each configured data series See the M odelM aker Reference
139. ts list box These components will be tabulated e Click gt gt to move the selected components into the Selected list box Double clicking components also moves them from one list box to the other e ClickOK Repeat the steps described above to add further tables to the Results view Your component selection can be changed at any time by re opening the Table Selection dialog box e Click the Selection icon on the Table toolbar or e Select View Selection Tables 127 The T able Selection dialog box Customizing the table series Chapter 13 Use gt gt and lt lt to change your component selection Available Components selected to components be displayed in the table Table Selection x Components Selected Use gt gt and lt lt to move selected components Leow River between list boxes Use these buttons to select the component types displayed Use lt Shift gt and lt Ctrl gt to make multiple selections Customizing tables The table series title and numerical format can all be customized in order to present tabulated values in the most effective way When a mode component is selected for a table a tables series is created to display the values associated with the component The display of each of these sets of values is controlled using the Table Series dialog box To define the options for a table series e Click the Series icon or e Select View Series The Table Se
140. uary_rate 0 0431 The new parameter values are shown in the Parameter Results view which is a sub view of Results The M arquardt default optimization method also produces an estimate of the standard error associated with each optimized parameter value A summary of the optimization statistics is written to the Optimization Statistics view which is also a sub view of Results The optimization process produces an excellent fit between the mode and the experimental data with an r value of almost 0 9 Now we can update the model with the optimized values of rive _rate and estuary_rate e Activate the Parameter Results view e Select rive_rateand select RM B Update parameter 34 ModelMaker tutorial The completed moda up to this point is tutor9 mod To follow this example load the mode tutor2 mod Chapter 2 e Repeat for estuary_rate Now re run the model with the optimized parameters to inspect the improved fit of the model to the experimental data Pollutant Levels in the Lakes 1000 800 600 Lake 400 Lake2 Pollutant kg 200 Time days Step 17 Minimization During minimization the parameter values used in the model are systematically adjusted to find the smallest value of a particular component at a selected point in the mode run See Chapter 15 M inimization However by choosing the way in which the model component is defined minimization can also be used to maximize anothe
141. ub model or a lower sub model without a direct influence or flow connection The component is universal i e its symbol can be referenced by other model components in the whole model without a direct influence or flow connection The component is in error Model s containing components in error cannot be run Text boxes Text boxes are components that allow the model developer to add informative text toa model they take no part in model calculations To add a text box to a modd e Select the Text Box icon from the toolbar e Click in the model diagram with the LM B To access the Text Box Definition dialog box e Double click the text box component with the LM B Working with models 59 TheT ext Box Definition dialog box Chapter 5 By default the complete text within a text box is displayed in the model diagram For some models which contain large amounts of descriptive text it may be more convenient and less cluttered to hide the text until the user wishes to read it In this case the text box can be displayed as an information icon until opened by the user Text Box Definition 21x Text Text a Enter text r Border T Neonized Rectangular C Rounded C None Select border DN type Check to display text box as an icon By default double clicking the left mouse button on a text box will access its definition dialog in the normal manner When model development is complete this can be changed so
142. un from any workstation on your network N ote that the installation will fail if ModelM aker is first run from the server Registering and e Register and license your network copy of ModelMaker as licensing described for a desktop version ModelMaker This information will be stored in the network license file and will be retrieved by whichever workstation is running the application Extra licenses can be bought at any stage for additional client workstations 4 ModelMaker About this manual About this Manual This manual will guide you through M odelM aker s comprehensive range of features The accompanying Reference M anual contains mathematical theory and additional reference information Chapter 1 is a brief introduction to mode design and will be of interest to users with little or no previous experience of creating and using models Chapter 2 is a tutorial for users who are new to ModelMaker In this chapter we describe the layout of the interface the construction of a simple model and some basic M odelM aker functions Chapters 3 to 16 make up the bulk of the manual and explain how M odelM aker s tools and features work running the application using the interface model building and running graphs tables and analysis techniques Conventions used in this manual e Program menu commands are referred to as File Open for example meaning select Open from the File menu e Angled brackets are used to refe
143. up of components carry out the following steps e Select the components to be aligned e Select Component Align and the appropriate alignment function o Left Center Vertically Right Top Center Horizontally Bottom M odelM aker aligns the selected components as requested The Snap to Grid option in Modell Options can also be used to align model components as they are added moved and resized Using the clipboard Use the clipboard to move or copy components within or between models Select the component that you wish to copy or move and click the Copy or Cut icons from the Main toolbar If components are available in the clipboard they can be pasted into a mode using the Paste button If component symbols clash you are prompted to supply alternative symbols 62 Working with models Chapter 5 Scrolling and zooming the model diagram Use the scroll bars to move around the model diagram To zoom the model diagram out i e to view a greater area of the model diagram e Select View Zoom Out The mode diagram will be re drawn at asmaller scale It is possible to zoom the model diagram out successively six times To zoom into the model diagram i e to view a smaller area of the model diagram e Select View Zoom In The cursor changes to the zoom in magnifying glass e Move the cursor to the position of interest and click the LM B The model diagram is re drawn at a larger scale centered on the cursor position If the model
144. used to define its value at the start of the model run The initial value may be zero but if all compartments have an initial value of zero a warning dialog will show when the model is run The initial value equation is of the form Initial value g where g is a function of defined values and model parameters The value of a compartment may also be set by the actions of an independent or component event Flows Flows represent the movement of something from one compartment to another i e some quantity is subtracted from the source Components compartments flows variables and defined values 65 Influences Chapter 6 compartment and added to the destination compartment The value of this flow is expressed as an equation of the form Flow f where f is a function of the values of components defined in the model often a proportion of the value of the flow s source compartment By default when a flow is added to the model diagram the equations of its source and target compartments are updated to reflect its presence The process is reversed if the flow is renoved In some models this may be inappropriate in which case the updating of the compartment equations can be switched on or off by selecting the appropriate check box on the General tab of the User Preferences dialog box Edit menu Influences show where the value of one component affects the value of another Influences do not have a symbol or a definit
145. ut is adsorbed by plants The rate of uptake may be assumed to depend on the rate of 8 Introduction Step 1 Your conceptual model Chapter 1 plant growth which in turn will depend upon temperature so the mode will have a temperature sub process similar to the previous sine model Our mode will also have to account for the radioactive decay of the fallout so we will also have a decay sub model as described previously These sub processes would be combined with other relevant considerations to produce a model which simulates the overall system ModelM aker is intended primarily for developing simulation type models rather than more statistically oriented empirical models Developing a ModelMaker model The first step in model development is to plan your model Les consider the important stages involved in the transfer of radiocaesium from grazing systems to the human food chain A diagram is a good way to understand this process BOMB TEST Nuclear CHERNOBYL ETC Release ATMOSPHERIC TRANSPORT Deposited on vegetation surface WEATHERING LEAF TURNOVER Absorbed by plants or ROOTUPTAKE Grazing Ba Animals uc Soil Humans In this example the major components of the system are shown as boxes and radiocaesium transfer is represented by arrows In fact each Introduction 9 Step 2 Developing mathematical relationships Cha
146. xampleload the mode tutor6 mod Chapter 2 model we shall investigate the effect of adjusting rive_rate from 0 05 to 0 09 Sensitivity analysis is configured in the Run Options dialog box e Click the Integrate icon The Run dialog box opens e Click the Advanced button The Run Options dialog box opens e Select the Repeated Run tab e Enter 4in the N umber of runs edit box e Doubleclick Lakel in the Components to include list box Lakel is moved into the opposite list box The values of Lakel will be saved as retained series e Select the Repeated Run Settings tab e Select the Sensitivity analysis option e 6Select rive_rateas the Sensitivity Parameter e Enter 0 05 and 0 09 in the Start V alue and Stop V alue edit boxes e Click OK in the Run Options dialog box e Select Repeated Run in the Run dialog box e ClickOK in the Run dialog box The model is run five times at rive_rate values 0 05 0 06 0 07 0 08 and 0 09 The resulting values of Lakel are saved as retained series which can be presented as a graph or table by accessing the Graph Selection or Table Selection dialog boxes We will replace the graph of Lakel and Lake Graph1 with a graph of the retained series 30 ModelMaker tutorial The completed moda up to this point is tutor7 mod Chapter 2 e Activate Graph1 by selecting it in the Model Explorer e Click the Selection icon on the Graph toolbar The Graph Selection dialog box ope
Download Pdf Manuals
Related Search
Related Contents
Product catalogue 2010 GPS Protocol Manual de Instruções 取扱説明書 パワーコンディショナ Philips DLA63066 For iPod touch G2 Jam Jacket Grafik Astonishing Brightness from a compact package Cuidado y limpieza del horno. Ponts RLC portables SkyFile Mail User Manual - Delta Wave Communications Inc. Documento PDF - AMS Tesi di Laurea Copyright © All rights reserved.
Failed to retrieve file