Location: CellML 2.0 testing @ a984419d72b5 / complex_imports.xml

Author:
David Nickerson <nickerso@users.sourceforge.net>
Date:
2017-08-31 11:16:51+12:00
Desc:
adding initial set of test models used in libcellml
Permanent Source URI:
https://models.cellml.org/workspace/4b1/rawfile/a984419d72b5dc4ef514f02defb70308fa57b09c/complex_imports.xml

<?xml version="1.0" encoding="UTF-8"?><model xmlns="http://www.cellml.org/cellml/2.0#" xmlns:cellml="http://www.cellml.org/cellml/2.0#" xmlns:xlink="http://www.w3.org/1999/xlink" name="complex_imports" id="complex_imports_id">
  
  

  <import xlink:href="sin.xml">
    <component name="actual_sin" component_ref="sin"/>
  </import>
  <import xlink:href="sin.xml">
    <component name="another_sin" component_ref="sin"/>
    <component name="yasi" component_ref="sin"/>
  </import>
  <import xlink:href="sin.xml">
    <component name="another_sin2" component_ref="sin"/>
  </import>
  <import xlink:href="sin.xml">
    <component name="yasi2" component_ref="sin"/>
  </import>
  <import xlink:href="sin.xml">
    <component name="yasi3" component_ref="sin"/>
  </import>
  <import xlink:href="deriv_approx_sin.xml">
    <component name="deriv_approx_sin" component_ref="sin"/>
  </import>
  <import xlink:href="parabolic_approx_sin.xml">
    <component name="parabolic_approx_sin" component_ref="sin"/>
  </import>

  <component name="main" id="main">
    <variable id="x" name="x" initial_value="0" interface="public_and_private"/>
    <variable id="sin" name="sin1" interface="public_and_private"/>
    <variable id="deriv_approx" name="sin2" interface="public_and_private"/>
    <variable id="deriv_approx_initial_value" name="deriv_approx_initial_value" initial_value="0" interface="public_and_private"/>
    <variable id="parabolic_approx" name="sin3" interface="public_and_private"/>
  </component>
  
  <encapsulation>
    
    <component_ref component="main">
      <component_ref component="actual_sin">
        <component_ref component="another_sin"/>
        <component_ref component="another_sin2">
          <component_ref component="yasi">
            <component_ref component="yasi2"/>
            <component_ref component="yasi3"/>
          </component_ref>
        </component_ref>
      </component_ref>
      <component_ref component="deriv_approx_sin"/>
      <component_ref component="parabolic_approx_sin"/>
    </component_ref>
  </encapsulation>
  
  <connection component_1="actual_sin" component_2="main">
    <map_variables variable_1="sin" variable_2="sin1"/>
    <map_variables variable_1="x" variable_2="x"/>
  </connection>
  
  <connection component_1="deriv_approx_sin" component_2="main">
    <map_variables variable_1="sin" variable_2="sin2"/>
    <map_variables variable_1="x" variable_2="x"/>
    <map_variables variable_1="sin_initial_value" variable_2="deriv_approx_initial_value"/>
  </connection>

  <connection component_1="parabolic_approx_sin" component_2="main">
    <map_variables variable_1="sin" variable_2="sin3"/>
    <map_variables variable_1="x" variable_2="x"/>
  </connection>

</model>