Giter Club home page Giter Club logo

Comments (2)

JamesVaughan avatar JamesVaughan commented on August 31, 2024

My current proposition is to include a new feature into the Multi-run framework to define a template. This template would contain an attribute for the parameters into the template, and inner XML. This XML would have its attributes searched for %[ParameterName]% and on invocation of the template have it replaced with the given parameter's value. This could greatly reduce the amount of duplicate lines, making it easier to validate.

from xtmf.

JamesVaughan avatar JamesVaughan commented on August 31, 2024

In 8b403b4 I've implement the logic for templates and the ability to import/execute other multi-run files recursively. The following files would show how to use a template to create another template that is able to execute a model system.

TemplateTest.xml

<Root>
  <import Path="..\..\Input\TemplateTest2.xml" />
  <executeTemplate Name="ExecuteWaitTwice" Dur1="5 seconds" Dur2="10 seconds" />
</Root>

TemplateTest2.xml

<Root>
  <template Name="ExecuteWaitTwice" Parameters="Dur1;Dur2">
    <template Name="ExecuteWait" Parameters="Duration">
      <run RunAs="%%Duration%%" Name="%%Duration%%:">
        <ChangeParameter ParameterPath="Wait time" Value="%%Duration%%" />
      </run>
    </template>
    <executeTemplate Name="ExecuteWait" Duration="%Dur1%" />
    <executeTemplate Name="ExecuteWait" Duration="%Dur2%" />
  </template>
</Root>

from xtmf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.