Skip to content

User can proceed with importing invalid XMILE file despite an error #101

@nileshtrivedi

Description

@nileshtrivedi
Image

Here are the contents of the invalid xmile file:

<?xml version="1.0" ?>
<xmile xmlns="http://docs.oasis-open.org/xmile/ns/XMILE/v1.0" xmlns:isee="http://iseesystems.com/XMILE" version="1.0">
  <header>
    <name>Predator-Prey Model</name>
    <vendor>Generated by XMILE Converter</vendor>
    <options namespace="true"/>
  </header>
  <sim_specs method="Euler" time_units="months">
    <start>0</start>
    <stop>100</stop>
    <dt>0.1</dt>
  </sim_specs>
  <model name="Predator-Prey Model">
    <doc>A simple predator-prey model using Lotka-Volterra equations.</doc>
    <variables>
      <stock name="prey_population">
        <units>individuals</units>
        <doc>Initially, there are 50000 hares in the ecosystem.</doc>
        <eqn>50000</eqn>
        <inflow>prey_birth</inflow>
        <outflow>prey_death</outflow>
      </stock>
      <stock name="predator_population">
        <units>individuals</units>
        <eqn>10</eqn>
        <inflow>predator_growth</inflow>
        <outflow>predator_death</outflow>
      </stock>
      <flow name="prey_birth">
        <units>individuals/time</units>
        <eqn>prey_birth_rate * prey_population</eqn>
      </flow>
      <flow name="prey_death">
        <units>individuals/time</units>
        <eqn>prey_kill_rate * predator_prey_interaction</eqn>
      </flow>
      <flow name="predator_death">
        <units>individuals/time</units>
        <eqn>predator_death_rate * predator_population</eqn>
      </flow>
      <flow name="predator_growth">
        <units>individuals/time</units>
        <eqn>predator_growth_factor * predator_prey_interaction</eqn>
      </flow>
      <aux name="predator_prey_interaction">
        <units>individuals * individuals</units>
        <eqn>prey_population * predator_population</eqn>
      </aux>
      <aux name="prey_birth_rate">
        <units>1/time</units>
        <eqn>0.1</eqn>
      </aux>
      <aux name="prey_kill_rate">
        <units>1/individuals*time</units>
        <eqn>0.02</eqn>
      </aux>
      <aux name="predator_death_rate">
        <units>1/time</units>
        <eqn>0.02</eqn>
      </aux>
      <aux name="predator_growth_factor">
        <units>1/individuals*time</units>
        <eqn>0.02</eqn>
      </aux>
    </variables>
    <views>
      <view isee:show_pages="false">
        <stock name="prey_population" x="50" y="50" width="45" height="35"/>
        <stock name="predator_population" x="250" y="50" width="45" height="35"/>
        <flow name="prey_birth" x="450" y="50">
          <pts>
            <pt x="400"/>
            <pt x="500"/>
          </pts>
        </flow>
        <flow name="prey_death" x="50" y="200">
          <pts>
            <pt x="0"/>
            <pt x="100"/>
          </pts>
        </flow>
        <flow name="predator_death" x="250" y="200">
          <pts>
            <pt x="200"/>
            <pt x="300"/>
          </pts>
        </flow>
        <flow name="predator_growth" x="450" y="200">
          <pts>
            <pt x="400"/>
            <pt x="500"/>
          </pts>
        </flow>
        <aux name="predator_prey_interaction" x="50" y="350"/>
        <aux name="prey_birth_rate" x="250" y="350"/>
        <aux name="prey_kill_rate" x="450" y="350"/>
        <aux name="predator_death_rate" x="50" y="500"/>
        <aux name="predator_growth_factor" x="250" y="500"/>
        <connector uid="connector_1" from="prey_birth" to="prey_population"/>
        <connector uid="connector_2" from="prey_population" to="prey_death"/>
        <connector uid="connector_3" from="predator_growth" to="predator_population"/>
        <connector uid="connector_4" from="predator_population" to="predator_death"/>
        <connector uid="connector_5" from="prey_birth_rate" to="prey_birth"/>
        <connector uid="connector_6" from="predator_prey_interaction" to="prey_death"/>
        <connector uid="connector_7" from="prey_kill_rate" to="prey_death"/>
        <connector uid="connector_8" from="predator_death_rate" to="predator_death"/>
        <connector uid="connector_9" from="predator_prey_interaction" to="predator_growth"/>
        <connector uid="connector_10" from="predator_growth_factor" to="predator_growth"/>
      </view>
    </views>
  </model>
</xmile>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions