Giter Site home page Giter Site logo

Comments (5)

ghorwin avatar ghorwin commented on June 13, 2024 1

Interesting - thanks for the link!

from fmucompliancechecker.

nickbattle avatar nickbattle commented on June 13, 2024

This is picked up by VDMCheck, though I agree the error messages could be clearer:

2.2.7 Variable "Input.flowDirection" causality/variability/initial/start <input>/<fixed>/nil/nil invalid at line 20
2.2.7 Variable "Input.flowDirection" variability/causality <fixed>/<input> invalid at line 20
2.2.7 ScalarVariable "Input.flowDirection" invalid at line 20
2.2.1 ScalarVariables invalid
Errors found.

There are many cases like this that the compliance checker is missing.

from fmucompliancechecker.

nickbattle avatar nickbattle commented on June 13, 2024

We're still working on VDMCheck, but it seems to pick up many more problems than the 2.0.4 compliance checker. If you find any issues with the tool, please raise them on the GitHub tracker.

from fmucompliancechecker.

ghorwin avatar ghorwin commented on June 13, 2024

A minor correction to my first post: "initial" attribute must not be given to ScalarVariables with causality "input" (this would violate standard rule on page 47 of the FMI 2.0 specs).

from fmucompliancechecker.

filip-stenstrom avatar filip-stenstrom commented on June 13, 2024

I can't replicate this since I get an error message when trying to run with dummy XML on Checker 2.0.4:

[INFO][FMI2XML] [Line:32] Detected during parsing:
[ERROR][FMI2XML] Start attribute is required for this causality, variability and initial combination

Dummy XML I used:

<?xml version="1.0" encoding="UTF-8"?>
<fmiModelDescription
  fmiVersion="2.0"
  modelName="modelName"
  guid="{8c4e810f-3df3-4a00-8276-176fa3c9f9e0}"
  description="N/A"
  version="2.0"
  generationDateAndTime="2011-09-23T16:57:33Z"
  variableNamingConvention="structured">
  <ModelExchange modelIdentifier="model_identifier"/>

  <TypeDefinitions>
    <SimpleType name="Modelica.Fluid.Types.PortFlowDirection">
        <Enumeration>
            <Item name="In" value="0"/>
            <Item name="Out" value="1"/>
        </Enumeration>
    </SimpleType>
  </TypeDefinitions>

  <ModelVariables>
    <!-- Index of variable = "523" -->
    <ScalarVariable
          name="Input.flowDirection"
          valueReference="20"
          description="Allowed flow direction"
          variability="fixed"
          causality="input">
      <Enumeration declaredType="Modelica.Fluid.Types.PortFlowDirection"/>
    </ScalarVariable>
  </ModelVariables>

  <ModelStructure>
  </ModelStructure>

</fmiModelDescription>

Closing ticket since I can't replicate. Please re-open if you can provide a complete XML that it can be replicated on.

Also, regarding causality="input" variability="fixed", this has been fixed in FMI Library, so should be fixed with next Checker release.

from fmucompliancechecker.

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.