{"id":3430,"date":"2018-10-30T11:41:10","date_gmt":"2018-10-30T10:41:10","guid":{"rendered":"http:\/\/mosaic-modeling.de\/?page_id=3430"},"modified":"2024-07-14T15:04:31","modified_gmt":"2024-07-14T14:04:31","slug":"use-of-functions-iv-definition-by-interface","status":"publish","type":"page","link":"https:\/\/mosaic-modeling.de\/?page_id=3430","title":{"rendered":"Use of Functions IV &#8211; Definition by Interface and Empty Body Functions"},"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=3430\/#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=3430\/#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=3430\/#Notation-of-equation-system\" >Notation of equation system<\/a><ul class='ez-toc-list-level-5' ><li class='ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/mosaic-modeling.de\/?page_id=3430\/#Base-names\" >Base names<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/mosaic-modeling.de\/?page_id=3430\/#Indices\" >Indices<\/a><\/li><\/ul><\/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=3430\/#Equations\" >Equations<\/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=3430\/#Definition-of-interface\" >Definition of interface<\/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=3430\/#Definition-of-function\" >Definition of function<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/mosaic-modeling.de\/?page_id=3430\/#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-10\" href=\"https:\/\/mosaic-modeling.de\/?page_id=3430\/#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-11\" href=\"https:\/\/mosaic-modeling.de\/?page_id=3430\/#Initialization-filling-out-the-the-empty-body-and-results\" >Initialization, filling out the the empty body, and results<\/a><\/li><\/ul><\/nav><\/div>\n<p>Functions defined by interfaces can also be called &#8220;empty body functions&#8221;, because only inputs and outputs and no function bodies are specified within MOSAICmodeling. They can be used as placeholders in equation systems. The output and input variables must be defined via an interface, but the mathematical expression will not be specified at that point. In this way, the equation system is independent of the functional correlation used to calculate the output variable. Similar to functions with defined bodies, several variable inputs are possible while only one output variable is calculated. Both input and output variables can be scalars or vectors. Hence, more than one functional dependence can be expressed by the use of one empty body function.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Model-description\"><\/span>Model description<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>In this exercise the use of functions defined by interfaces is practiced. The following equation must hold:<\/p>\n<p><p class=\"ql-left-displayed-equation\" style=\"line-height: 53px;\"><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-c67634a8d32ad15ea2e901081a27c946_l3.png\" height=\"53\" width=\"82\" 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;&#90;&#32;&#61;&#32;&#92;&#115;&#117;&#109;&#95;&#123;&#105;&#61;&#49;&#125;&#94;&#52;&#32;&#122;&#95;&#105;&#46;&#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p><\/p>\n<p>The components <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-882fb4913c5afd18ebd28a67256a668a_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#122;&#95;&#105;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"13\" style=\"vertical-align: -3px;\"\/> of the vector <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-ec5583fa081a1e03212c151e3c222412_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#122;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"9\" style=\"vertical-align: 0px;\"\/> are calculated via the following mathematical operations:<\/p>\n<p><p class=\"ql-left-displayed-equation\" style=\"line-height: 157px;\"><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-18351c2667be385bea031ee27481c3ef_l3.png\" height=\"157\" width=\"81\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#97;&#108;&#105;&#103;&#110;&#42;&#125;&#38;&#122;&#95;&#49;&#32;&#61;&#32;&#120;&#32;&#43;&#32;&#121;&#32;&#92;&#92;&#91;&#50;&#101;&#120;&#93;&#38;&#122;&#95;&#50;&#32;&#61;&#32;&#120;&#32;&#45;&#32;&#121;&#32;&#92;&#92;&#91;&#50;&#101;&#120;&#93;&#38;&#122;&#95;&#51;&#32;&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#120;&#125;&#123;&#121;&#125;&#32;&#92;&#92;&#91;&#50;&#101;&#120;&#93;&#38;&#122;&#95;&#52;&#32;&#61;&#32;&#120;&#32;&#92;&#99;&#100;&#111;&#116;&#32;&#121;&#46;&#32;&#92;&#92;&#91;&#50;&#101;&#120;&#93;&#92;&#101;&#110;&#100;&#123;&#97;&#108;&#105;&#103;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p><\/p>\n<p>This shall be achieved with an empty body function. The mathemical expressions shall thus be added later, in this case in Matlab. The function&#8217;s output variable <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-ec5583fa081a1e03212c151e3c222412_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#122;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"9\" style=\"vertical-align: 0px;\"\/> is thus a vector. In the simulation, <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;\"\/> shall be determined iteratively for a given <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-0be116875001706f29a24434bd0d91c9_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#90;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"12\" style=\"vertical-align: 0px;\"\/>.<\/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>Set up a notation with the following base names and indices:<\/p>\n<h5><span class=\"ez-toc-section\" id=\"Base-names\"><\/span>Base names<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<ul>\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;\"\/>, constant<\/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<li><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-0be116875001706f29a24434bd0d91c9_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#90;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"12\" style=\"vertical-align: 0px;\"\/>, sum of all components of <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-882fb4913c5afd18ebd28a67256a668a_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#122;&#95;&#105;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"13\" style=\"vertical-align: -3px;\"\/><\/li>\n<li><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-ec5583fa081a1e03212c151e3c222412_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#122;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"9\" style=\"vertical-align: 0px;\"\/>, vector<\/li>\n<\/ul>\n<h5><span class=\"ez-toc-section\" id=\"Indices\"><\/span>Indices<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<ul>\n<li><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-31318c5dcb226c69e0818e5f7d2422b5_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#105;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"6\" style=\"vertical-align: 0px;\"\/>, index for components of <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-ec5583fa081a1e03212c151e3c222412_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#122;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"9\" style=\"vertical-align: 0px;\"\/> 1&#8230;NI<\/li>\n<\/ul>\n<p>The resulting notation has ID 182679.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"Equations\"><\/span>Equations<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>Now formulate the model equation defined above. The resulting equation has ID 182680.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"Definition-of-interface\"><\/span>Definition of interface<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>To create the interface, do the following in the Interface tab:<\/p>\n<ol>\n<li>Load the notation<\/li>\n<li>Add an informative description of the interface<\/li>\n<li>Add fields for <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;\"\/>, <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;\"\/>, and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-882fb4913c5afd18ebd28a67256a668a_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#122;&#95;&#105;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"13\" style=\"vertical-align: -3px;\"\/> by clicking on &#8220;+ Field Name&#8221;<\/li>\n<li>Select the dimensions of these three variables &#8211; Scalar for <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;\"\/>, and Vector for <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-882fb4913c5afd18ebd28a67256a668a_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#122;&#95;&#105;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"13\" style=\"vertical-align: -3px;\"\/><\/li>\n<li>Select &#8220;In&#8221; for <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;\"\/>, and &#8220;Out&#8221; for <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-882fb4913c5afd18ebd28a67256a668a_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#122;&#95;&#105;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"13\" style=\"vertical-align: -3px;\"\/> in the In\/Out column<\/li>\n<li>Go to the Pattern Assistance tab and select Function in General within the Type of Interface<\/li>\n<li>Save the interface<\/li>\n<\/ol>\n<p>This interface is available in MOSAICmodeling with ID 182681.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"Definition-of-function\"><\/span>Definition of function<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>To create the empty body function, we take the following steps in the Function tab:<\/p>\n<ol>\n<li>Load the notation of this example<\/li>\n<li>Add an informative description of the function<\/li>\n<li>Make sure that Load interface is selected in the Interface &amp; Body Settings<\/li>\n<li>Load the interface you created<\/li>\n<li>Save the function<\/li>\n<\/ol>\n<p>The function has ID 182682.<\/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>Go to the tab Equation System and add your equation in the same way as in the previous examples. Then go to the Functions tab within the equation system and take the following steps:<\/p>\n<ol>\n<li>Add the function by clicking on the &#8220;Add&#8221; button at the bottom<\/li>\n<li>Add an application by clicking on &#8220;Add Application&#8221;<\/li>\n<li>Add <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-882fb4913c5afd18ebd28a67256a668a_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#122;&#95;&#105;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"13\" style=\"vertical-align: -3px;\"\/> as Applied Naming for the output and <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;\"\/> as well as <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 Applied Naming for the input<\/li>\n<li>Confirm that and confirm again to close the popup windows. You should now see one application of the function within the equation system<\/li>\n<\/ol>\n<p>The resulting equation system has ID 182683.<\/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>Next, we can move to the &#8220;Simulation&#8221; section and load the equation system we just created. Then, we take the following steps:<\/p>\n<ol>\n<li>Add a description for your simulation<\/li>\n<li>In the tab on the Generic System, go to Functions and check whether MOSAICmodeling confirms one usage of the function in one application<\/li>\n<li>Go to Indexing and enter 4 as Max Value for NI; then click on Confirm Index Data<\/li>\n<li>Go to the Specifications tab and assign\u00a0<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-0be116875001706f29a24434bd0d91c9_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#90;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"12\" style=\"vertical-align: 0px;\"\/> and\u00a0<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;\"\/> as design values<\/li>\n<li>The variables <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-c4c9d4be06d01cb76fb760370a892d17_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#122;&#95;&#49;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"14\" style=\"vertical-align: -3px;\"\/> through <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-d3b06a5df347670dbb0398e0a94c4b9e_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#122;&#95;&#52;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"15\" style=\"vertical-align: -3px;\"\/> should be classified as calculated values<\/li>\n<\/ol>\n<h3><span class=\"ez-toc-section\" id=\"Initialization-filling-out-the-the-empty-body-and-results\"><\/span>Initialization, filling out the the empty body, and results<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>To initialize and specify the model, take the following steps:<\/p>\n<ol>\n<li><span style=\"font-size: revert; color: initial;\">Initialize this example with the design values and initial guesses given in Table 1<\/span><\/li>\n<li><span style=\"font-size: revert; color: initial;\">Save the variable specification\u00a0<\/span><\/li>\n<li>Save the simulation<\/li>\n<li>Go to the Evaluation tab and generate the code for Matlab<\/li>\n<li>Copy the generated code into Matlab and search for the following code:<\/li>\n<\/ol>\n\n\n<pre class=\"wp-block-code\"><code>function&#91;std_z_i] = fun_182682__03_function_emptybody(std_x,std_y)\n\tstd_z_i =  --- NO BODY DEFINED: ADD YOUR CODE HERE.--- ;\nend<\/code><\/pre>\n\n\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0Replace the body of the function with the following code:<\/p>\n\n\n<pre class=\"wp-block-code\"><code>function&#91;std_z_i] = fun_182682__03_function_emptybody(std_x,std_y)\n    std_z_i(1) = std_x + std_y;\n    std_z_i(2) = std_x - std_y;\n    std_z_i(3) = std_x \/ std_y;\n    std_z_i(4) = std_x * std_y;\nend<\/code><\/pre>\n\n\n<p>This simulation is available with ID 182684 with variable specification 182685. <span style=\"font-size: revert; color: initial;\"> The solution for the iteration variable is also given in Table 1.<\/span><\/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-0be116875001706f29a24434bd0d91c9_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#90;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"12\" style=\"vertical-align: 0px;\"\/><\/td><td class=\"has-text-align-left\" data-align=\"left\">Parameter determining the sum of <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-882fb4913c5afd18ebd28a67256a668a_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#122;&#95;&#105;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"13\" style=\"vertical-align: -3px;\"\/><\/td><td class=\"has-text-align-left\" data-align=\"left\">18.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-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\">Parameter<\/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-c4c9d4be06d01cb76fb760370a892d17_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#122;&#95;&#49;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"14\" style=\"vertical-align: -3px;\"\/><\/td><td class=\"has-text-align-left\" data-align=\"left\">First component of <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-ec5583fa081a1e03212c151e3c222412_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#122;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"9\" style=\"vertical-align: 0px;\"\/><\/td><td class=\"has-text-align-left\" data-align=\"left\"><\/td><td class=\"has-text-align-left\" data-align=\"left\">6.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-296aedbf33cd811252319b54c1d3ccbc_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#122;&#95;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"15\" style=\"vertical-align: -3px;\"\/><\/td><td class=\"has-text-align-left\" data-align=\"left\">Second component of <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-ec5583fa081a1e03212c151e3c222412_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#122;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"9\" style=\"vertical-align: 0px;\"\/><\/td><td class=\"has-text-align-left\" data-align=\"left\"><\/td><td class=\"has-text-align-left\" data-align=\"left\">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-4ef1d3a7510759ba2295dc0428021d64_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#122;&#95;&#51;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"15\" style=\"vertical-align: -3px;\"\/><\/td><td class=\"has-text-align-left\" data-align=\"left\">Third component of <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-ec5583fa081a1e03212c151e3c222412_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#122;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"9\" style=\"vertical-align: 0px;\"\/><\/td><td class=\"has-text-align-left\" data-align=\"left\"><\/td><td class=\"has-text-align-left\" data-align=\"left\">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-d3b06a5df347670dbb0398e0a94c4b9e_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#122;&#95;&#52;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"15\" style=\"vertical-align: -3px;\"\/><\/td><td class=\"has-text-align-left\" data-align=\"left\">Fouth component of <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-ec5583fa081a1e03212c151e3c222412_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#122;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"9\" style=\"vertical-align: 0px;\"\/><\/td><td class=\"has-text-align-left\" data-align=\"left\"><\/td><td class=\"has-text-align-left\" data-align=\"left\">8.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\">Iteration variable<\/td><td class=\"has-text-align-left\" data-align=\"left\">10.0<\/td><td class=\"has-text-align-left\" data-align=\"left\">2.0<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\"><\/td><td class=\"has-text-align-left\" data-align=\"left\"><\/td><td class=\"has-text-align-left\" data-align=\"left\"><\/td><td class=\"has-text-align-left\" data-align=\"left\"><\/td><\/tr><\/tbody><\/table><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Functions defined by interfaces can also be called &#8220;empty body functions&#8221;, because only inputs and outputs and no function bodies are specified within MOSAICmodeling. They can be used as placeholders in equation systems. The output and input variables must be defined via an interface, but the mathematical expression will not be specified at that point. [&hellip;]<\/p>\n","protected":false},"author":149,"featured_media":0,"parent":307,"menu_order":3,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-3430","page","type-page","status-publish","czr-hentry"],"_links":{"self":[{"href":"https:\/\/mosaic-modeling.de\/index.php?rest_route=\/wp\/v2\/pages\/3430","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\/149"}],"replies":[{"embeddable":true,"href":"https:\/\/mosaic-modeling.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3430"}],"version-history":[{"count":29,"href":"https:\/\/mosaic-modeling.de\/index.php?rest_route=\/wp\/v2\/pages\/3430\/revisions"}],"predecessor-version":[{"id":6153,"href":"https:\/\/mosaic-modeling.de\/index.php?rest_route=\/wp\/v2\/pages\/3430\/revisions\/6153"}],"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=3430"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}