{"id":646,"date":"2012-12-11T23:03:33","date_gmt":"2012-12-11T22:03:33","guid":{"rendered":"http:\/\/inprompt.service.tu-berlin.de\/wordMOSAIC\/?page_id=646"},"modified":"2025-09-19T17:48:39","modified_gmt":"2025-09-19T16:48:39","slug":"use-of-functions-i-basic-principles","status":"publish","type":"page","link":"https:\/\/mosaic-modeling.de\/?page_id=646","title":{"rendered":"Use of Functions I &#8211; Basic Principles"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">On this page<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/mosaic-modeling.de\/?page_id=646\/#Model-description\" >Model description<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/mosaic-modeling.de\/?page_id=646\/#Workflow\" >Workflow<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/mosaic-modeling.de\/?page_id=646\/#Notation-of-equation-system\" >Notation of equation system<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/mosaic-modeling.de\/?page_id=646\/#Equations\" >Equations<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/mosaic-modeling.de\/?page_id=646\/#Notation-of-function\" >Notation of function<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/mosaic-modeling.de\/?page_id=646\/#Function\" >Function<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/mosaic-modeling.de\/?page_id=646\/#Equation-system\" >Equation system<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/mosaic-modeling.de\/?page_id=646\/#Evaluation-Simulation\" >Evaluation \/ Simulation<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/mosaic-modeling.de\/?page_id=646\/#Initialization-and-results\" >Initialization and results<\/a><\/li><\/ul><\/nav><\/div>\n<p style=\"text-align: justify;\">This tutorial explains the basic principles of how to use functions in MOSAICmodeling. Functions should be used whenever it is possible to calculate the value of a variable directly by an algebraic expression based on the values of other variables.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Model-description\"><\/span>Model description<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">This example will solve the following equation system:<\/p>\n<p><p class=\"ql-left-displayed-equation\" style=\"line-height: 45px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-e9efe1df22f8c842b407273006493210_l3.png\" height=\"45\" width=\"123\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#97;&#108;&#105;&#103;&#110;&#42;&#125;&#38;&#65;&#61;&#120;&#43;&#98;&#32;&#92;&#99;&#100;&#111;&#116;&#32;&#121;&#92;&#92;&#38;&#66;&#32;&#92;&#99;&#100;&#111;&#116;&#32;&#121;&#94;&#50;&#32;&#61;&#32;&#45;&#32;&#97;&#32;&#43;&#32;&#120;&#92;&#101;&#110;&#100;&#123;&#97;&#108;&#105;&#103;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p><\/p>\n<p>In this example, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-816b613a4f79d4bf9cb51396a9654120_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#65;\" title=\"Rendered by QuickLaTeX.com\" height=\"13\" width=\"13\" style=\"vertical-align: 0px;\"\/> shall be calculated via a function:<\/p>\n<p style=\"text-align: justify;\"><p class=\"ql-left-displayed-equation\" style=\"line-height: 19px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-067315074831b15ca0045d6499edc731_l3.png\" height=\"19\" width=\"211\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;&#65;&#32;&#61;&#32;&#102;&#40;&#97;&#44;&#32;&#66;&#41;&#32;&#61;&#32;&#48;&#46;&#53;&#32;&#92;&#99;&#100;&#111;&#116;&#32;&#40;&#97;&#43;&#66;&#41;&#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p><\/p>\n<p>This function shall be implemented in MOSAICmodeling with the inputs\u00a0<\/p>\n<p><p class=\"ql-left-displayed-equation\" style=\"line-height: 19px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-84d0ad2d26e3d148ca36a750b04e226b_l3.png\" height=\"19\" width=\"201\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;&#109;&#32;&#61;&#32;&#102;&#40;&#111;&#44;&#112;&#41;&#32;&#61;&#32;&#48;&#46;&#53;&#32;&#92;&#99;&#100;&#111;&#116;&#32;&#40;&#111;&#43;&#112;&#41;&#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Workflow\"><\/span>Workflow<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><span class=\"ez-toc-section\" id=\"Notation-of-equation-system\"><\/span>Notation of equation system<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>For the notation of the equation, we need to set up all base names of symbols that appear in the equations, i.e.<\/p>\n<ul>\n<li><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-0e55b0b3943237ccfc96979505679274_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"9\" style=\"vertical-align: 0px;\"\/>, parameter<\/li>\n<li><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-ad69adf868bc701e561aa555db995f1f_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#98;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"8\" style=\"vertical-align: 0px;\"\/>, parameter<\/li>\n<li><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-c74288aabc0e2ca280d25d92bf1a1ec2_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#66;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"14\" style=\"vertical-align: 0px;\"\/>, parameter<\/li>\n<li><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-816b613a4f79d4bf9cb51396a9654120_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#65;\" title=\"Rendered by QuickLaTeX.com\" height=\"13\" width=\"13\" style=\"vertical-align: 0px;\"\/>, explicity calculable value<\/li>\n<li><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-7e5fbfa0bbbd9f3051cd156a0f1b5e31_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#120;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"10\" style=\"vertical-align: 0px;\"\/>, iteration variable<\/li>\n<li><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-38461fc041e953482219abf5d4cce1cb_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#121;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"9\" style=\"vertical-align: -4px;\"\/>, iteration variable<\/li>\n<\/ul>\n<p>The resulting notation has ID 182652.<\/p>\n<h4 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"Equations\"><\/span>Equations<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p style=\"text-align: justify;\">Next, we can define the equations of the model. Therefore, we open the equation editor, load the notation we just created, and enter the equations as stated above in the model description. The formulated equations are available with the IDs 182653 and 182654.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"Notation-of-function\"><\/span>Notation of function<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>Now, we want to set up the explicit function for A. For this purpose, we set up a new notation only for this function. This is not necessary, but it illustrates how MOSAICmodeling works with different notations. In this new notation, we only define the symbols relevant for the function, i.e.<\/p>\n<ul>\n<li><span style=\"font-size: revert; color: initial;\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-fdc40b8ad1cdad0aab9d632215459d28_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"15\" style=\"vertical-align: 0px;\"\/>, output value<\/span><\/li>\n<li><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-5f813d35bd704e28ab3db49ea879d509_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#111;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"9\" style=\"vertical-align: 0px;\"\/>, input value 1<\/li>\n<li><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-5faad0904f612a3fa5b27faafb8dc903_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#112;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"10\" style=\"vertical-align: -4px;\"\/>, input value 2<\/li>\n<\/ul>\n<p>This notation has ID 182655.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"Function\"><\/span>Function<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>Now, we define the generic function, i.e., the function consisting of the variables <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-fdc40b8ad1cdad0aab9d632215459d28_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"15\" style=\"vertical-align: 0px;\"\/>, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-5f813d35bd704e28ab3db49ea879d509_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#111;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"9\" style=\"vertical-align: 0px;\"\/>, and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-5faad0904f612a3fa5b27faafb8dc903_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#112;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"10\" style=\"vertical-align: -4px;\"\/>. Hence, we go to the function tab in the &#8220;Model&#8221; section and take the following steps:<\/p>\n<ol style=\"text-align: justify;\">\n<li>Load the notation for the function<\/li>\n<li>Add a description of the function<\/li>\n<li>Make sure that &#8220;Free interface&#8221; and &#8220;Specify formula&#8221; are selected in the Interface &amp; Body Settings<\/li>\n<li>Go to the tab Interface Specification and click on &#8220;Output&#8221;. Enter <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-fdc40b8ad1cdad0aab9d632215459d28_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"15\" style=\"vertical-align: 0px;\"\/> into the popup window, click on the render button, and confirm<\/li>\n<li>Click on &#8220;Input&#8221; and add the symbol <em>o<\/em> the same way as in the previous step<\/li>\n<li>Repeat the last step to add the input\u00a0 <em>p<\/em><\/li>\n<li>Go to the tab Body Specification and enter the function body <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-42eb827b535a2efcc17fcc74c82f2538_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#48;&#46;&#53;&#32;&#92;&#99;&#100;&#111;&#116;&#32;&#40;&#111;&#32;&#43;&#32;&#112;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"19\" width=\"88\" style=\"vertical-align: -5px;\"\/>, render the formula and save the function<\/li>\n<\/ol>\n<p>The function is available with ID 182656.<\/p>\n<h4 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"Equation-system\"><\/span>Equation system<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p style=\"text-align: justify;\">Now we are able to construct our equation system:<\/p>\n<ol>\n<li style=\"text-align: justify;\">Go to &#8220;Equation System&#8221; and load the notation <strong>for the equations<\/strong><\/li>\n<li>Add the two equations to your system in the Connected Elements tab<\/li>\n<li>Go to the Functions tab. To use the general function created above, it must be added to the equation system and applied on the variables within this problem. In this context, applying means specifying which variable names in the equation system are supposed to be the corresponding input and output variables of the function.<\/li>\n<li>Click on &#8220;Add Function&#8221; at the bottom of the screen and open your function in the opening popup window. After loading the function, you should see the expression for <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-fdc40b8ad1cdad0aab9d632215459d28_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"15\" style=\"vertical-align: 0px;\"\/> as a function of the inputs <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-5f813d35bd704e28ab3db49ea879d509_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#111;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"9\" style=\"vertical-align: 0px;\"\/> and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-5faad0904f612a3fa5b27faafb8dc903_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#112;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"10\" style=\"vertical-align: -4px;\"\/>. On the left hand side of the dialog, you see the Output Naming<span style=\"text-align: justify; color: initial;\"> and the Input Naming<\/span><span style=\"text-align: justify; color: initial;\"> as defined in the function.\u00a0<\/span><\/li>\n<li>On the right hand side of the dialog there is a section called Applications (Function Calls), which contains the tables Output Variable, Input Variables, and Parameters. Click on &#8220;Add Application&#8221;, which opens another popup window.<\/li>\n<li>In this dialog, double click into the field Applied Naming<span style=\"text-align: justify; color: initial;\"> or click on &#8220;Edit Output&#8221; <\/span><span style=\"text-align: justify; color: initial;\">below that field. This opens another dialog where you can enter the naming of the output variable in the equation system.<\/span><\/li>\n<li>Enter <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-816b613a4f79d4bf9cb51396a9654120_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#65;\" title=\"Rendered by QuickLaTeX.com\" height=\"13\" width=\"13\" style=\"vertical-align: 0px;\"\/> into the Tex Expression, render, and confirm<\/li>\n<li>Double click into the table row of the variable naming <em>o<\/em> or select this row and click &#8220;Edit Input&#8221;. Again a dialog is shown in which a variable naming can be entered. Enter <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-0e55b0b3943237ccfc96979505679274_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"9\" style=\"vertical-align: 0px;\"\/>, render, and confirm; then repeat this step for <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-5faad0904f612a3fa5b27faafb8dc903_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#112;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"10\" style=\"vertical-align: -4px;\"\/> with <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-c74288aabc0e2ca280d25d92bf1a1ec2_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#66;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"14\" style=\"vertical-align: 0px;\"\/> being the applied input<\/li>\n<li>Confirm these matches at the bottom of the window. When clicking on &#8216;A&#8217; in the Applications, you should now find the match of the inputs (<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-431fc3ed622ef50a9903a9d16fb0d5d8_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#111;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#97;&#114;&#114;&#111;&#119;&#32;&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"45\" style=\"vertical-align: -1px;\"\/>, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-a74f0ca1b4774d74967eb9625dc5eff4_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#112;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#97;&#114;&#114;&#111;&#119;&#32;&#66;\" title=\"Rendered by QuickLaTeX.com\" height=\"16\" width=\"51\" style=\"vertical-align: -4px;\"\/>)<\/li>\n<li>Confirm in this window at the bottom and save your equation system<\/li>\n<\/ol>\n<p>This equation system is available with ID 182657.\u00a0<\/p>\n<h4 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"Evaluation-Simulation\"><\/span>Evaluation \/ Simulation<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>Your model is now complete and you can move on to the &#8220;Simulation&#8221; section of MOSAICmodeling.<\/p>\n<ol style=\"text-align: justify;\">\n<li>Enter a suitable description<\/li>\n<li>Select the tab Equation System and load the system created in the previous steps. As there are no indices in the model, you can skip the Indexing step<\/li>\n<li>Select the tab Specifications. In the list ALL VARIABLES, you will find the variables as defined in your model notation. Therein, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-816b613a4f79d4bf9cb51396a9654120_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#65;\" title=\"Rendered by QuickLaTeX.com\" height=\"13\" width=\"13\" style=\"vertical-align: 0px;\"\/> will be of type &#8220;CALCULATED_VALUE&#8221; because it is determined by a function<\/li>\n<li>Classify the variables <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-0e55b0b3943237ccfc96979505679274_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"9\" style=\"vertical-align: 0px;\"\/>, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-ad69adf868bc701e561aa555db995f1f_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#98;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"8\" style=\"vertical-align: 0px;\"\/>, and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-c74288aabc0e2ca280d25d92bf1a1ec2_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#66;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"14\" style=\"vertical-align: 0px;\"\/> as design variables by selecting this category from the dropdown menu in the Type column. You can also assign the variables <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-7e5fbfa0bbbd9f3051cd156a0f1b5e31_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#120;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"10\" style=\"vertical-align: 0px;\"\/> and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-38461fc041e953482219abf5d4cce1cb_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#121;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"9\" style=\"vertical-align: -4px;\"\/> as &#8220;ITERATION_VALUE&#8221;<\/li>\n<\/ol>\n<h3><span class=\"ez-toc-section\" id=\"Initialization-and-results\"><\/span>Initialization and results<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>This simple example shall be solved with two different initial guesses for the variables x and y (= cases 1 and 2), which are given in Table 1. After assigning the initial guesses and the parameter values, you can save the variable specification and then the simulation. You can find both initializations in the example folder in MOSAICmodeling:<\/p>\n<ul>\n<li>Case 1: simulation ID 182658 with variable specification 182659<\/li>\n<li>Case 2: simulation ID 182661 with variable specification 182660<\/li>\n<\/ul>\n<p>The solution for both iteration variables and both cases is also given in Table 1.<\/p>\n\n\n<figure class=\"wp-block-table is-style-stripes has-small-font-size\"><table><thead><tr><th class=\"has-text-align-center\" data-align=\"center\">Name<\/th><th class=\"has-text-align-left\" data-align=\"left\">Description<\/th><th class=\"has-text-align-left\" data-align=\"left\">Value \/ Initial guess<\/th><th class=\"has-text-align-left\" data-align=\"left\">Solution<\/th><\/tr><\/thead><tbody><tr><td class=\"has-text-align-center\" data-align=\"center\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-0e55b0b3943237ccfc96979505679274_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"9\" style=\"vertical-align: 0px;\"\/><\/td><td class=\"has-text-align-left\" data-align=\"left\">Parameter a<\/td><td class=\"has-text-align-left\" data-align=\"left\">2.0<\/td><td class=\"has-text-align-left\" data-align=\"left\"><\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-ad69adf868bc701e561aa555db995f1f_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#98;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"8\" style=\"vertical-align: 0px;\"\/><\/td><td class=\"has-text-align-left\" data-align=\"left\">Parameter b<\/td><td class=\"has-text-align-left\" data-align=\"left\">1.0<\/td><td class=\"has-text-align-left\" data-align=\"left\"><\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-c74288aabc0e2ca280d25d92bf1a1ec2_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#66;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"14\" style=\"vertical-align: 0px;\"\/><\/td><td class=\"has-text-align-left\" data-align=\"left\">Parameter B<\/td><td class=\"has-text-align-left\" data-align=\"left\">-4.0<\/td><td class=\"has-text-align-left\" data-align=\"left\"><\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-816b613a4f79d4bf9cb51396a9654120_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#65;\" title=\"Rendered by QuickLaTeX.com\" height=\"13\" width=\"13\" style=\"vertical-align: 0px;\"\/><\/td><td class=\"has-text-align-left\" data-align=\"left\">Explicitly calculable value<\/td><td class=\"has-text-align-left\" data-align=\"left\"><\/td><td class=\"has-text-align-left\" data-align=\"left\">Case 1: 1.5; Case 2: 1.5<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-7e5fbfa0bbbd9f3051cd156a0f1b5e31_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#120;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"10\" style=\"vertical-align: 0px;\"\/><\/td><td class=\"has-text-align-left\" data-align=\"left\">Value x<\/td><td class=\"has-text-align-left\" data-align=\"left\">Case 1: 0.0; Case 2: -0.5<\/td><td class=\"has-text-align-left\" data-align=\"left\">Case 1: -0.25; Case 2: -2.0<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-38461fc041e953482219abf5d4cce1cb_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#121;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"9\" style=\"vertical-align: -4px;\"\/><\/td><td class=\"has-text-align-left\" data-align=\"left\">Value y<\/td><td class=\"has-text-align-left\" data-align=\"left\">Case 1: 0.0; Case 2: 0.5<\/td><td class=\"has-text-align-left\" data-align=\"left\">Case 1: -0.75; Case 2: 1.0<\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\">Table 1: Overview of parameter values, initial guesses, and the solution for both cases.<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>This tutorial explains the basic principles of how to use functions in MOSAICmodeling. Functions should be used whenever it is possible to calculate the value of a variable directly by an algebraic expression based on the values of other variables. Model description This example will solve the following equation system: &nbsp; &nbsp; In this example, [&hellip;]<\/p>\n","protected":false},"author":188,"featured_media":0,"parent":307,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-646","page","type-page","status-publish","czr-hentry"],"_links":{"self":[{"href":"https:\/\/mosaic-modeling.de\/index.php?rest_route=\/wp\/v2\/pages\/646","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mosaic-modeling.de\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/mosaic-modeling.de\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/mosaic-modeling.de\/index.php?rest_route=\/wp\/v2\/users\/188"}],"replies":[{"embeddable":true,"href":"https:\/\/mosaic-modeling.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=646"}],"version-history":[{"count":88,"href":"https:\/\/mosaic-modeling.de\/index.php?rest_route=\/wp\/v2\/pages\/646\/revisions"}],"predecessor-version":[{"id":6224,"href":"https:\/\/mosaic-modeling.de\/index.php?rest_route=\/wp\/v2\/pages\/646\/revisions\/6224"}],"up":[{"embeddable":true,"href":"https:\/\/mosaic-modeling.de\/index.php?rest_route=\/wp\/v2\/pages\/307"}],"wp:attachment":[{"href":"https:\/\/mosaic-modeling.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=646"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}