GithubHelp home page GithubHelp logo

fmu.nim's Introduction

scinim

The core types and functions of the SciNim ecosystem

fmu.nim's People

Contributors

mantielero avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

fmu.nim's Issues

Fully create `modelDescription.xml`

The file modelDescription.xml:

<?xml version="1.0" encoding="UTF-8" ?>
<fmiModelDescription guid="{8c4e810f-3df3-4a00-8276-176fa3c9f008}" 
                     numberOfEventIndicators="0" 
                     modelName="inc" 
                     fmiVersion="2.0">
  <ModelExchange modelIdentifier="inc">
    <SourceFiles>
      <File name="inc.c" />
    </SourceFiles>
  </ModelExchange>
  <LogCategories>
    <Category name="logAll" />
    <Category name="logError" />
    <Category name="logFmiCall" />
    <Category name="logEvent" />
  </LogCategories>
  <ModelVariables>
    <ScalarVariable variability="discrete" 
                    valueReference="0" 
                    description="counts the seconds" 
                    causality="output" 
                    initial="exact" 
                    name="counter">
      <Integer start="1" />
    </ScalarVariable>
  </ModelVariables>
  <ModelStructure>
    <Outputs>
      <Unknown index="1" />
    </Outputs>
  </ModelStructure>
</fmiModelDescription>

DISABLE_PREFIX

This is used in C compilation. For nim, we should tweak the exportc.

Create folder structure

Create the folder structure using Nim rather than resusing the structure created by fmusdk

Compile with zig

It would be great being able to create multiplatform FMU's using zig for compilation.

.fmu file not working with OpenModelica

Using OMEdityou can import the model. Later you can instantiate it in a new model. The simulation raises:

Fallo en el proceso
[INFO][inc] [logFmiCall][FMU status:OK] fmi2Instantiate: GUID={8c4e810f-3df3-4a00-8276-176fa3c9f008} SIGSEGV: Illegal storage access. (Attempt to read from nil?) 
Fallo en el proceso Simulation process failed. Exited with code 11.

Remove the includes

Convert the includes into imports, in order to make it behave more like a library.

componentEnvironment not being propagated

When the model is instantiated, componentEnvironment is passed by the simulation environment ħere as we can see in the this type declaration: fmi2CallbackFunctions.

The issue is clear when tested by fmuChecked.linux64:

[ERROR][FMUCHK] FMU logger callback does not propagate component environment to the application

The issue is that, for some reason, functions.componentEnvironment == nil in fmi2Instantiate.

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.