Skip to content

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

Open

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>

Activity

  1. bpowers commented on Apr 17, 2025

    @bpowers
    Owner

    great find and thanks for the reproducer! will work on this shortly

  2. nileshtrivedi commented on Apr 20, 2025

    @nileshtrivedi
    Author

    Thanks @bpowers !

    Meanwhile, I would love to see a sample/example XMILE file somewhere that can be imported and used in Simlin for simulations.

  3. bpowers commented on Apr 23, 2025

    @bpowers
    Owner

    @nileshtrivedi you can see 4 examples here: https://github.com/bpowers/simlin/tree/main/default_projects , and Stella models that end in .stmx are XMILE and can be imported

  4. added
    frontend
    bug
    on Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugfrontend

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions