Git Product home page Git Product logo

Comments (5)

ThummeTo avatar ThummeTo commented on June 28, 2024

Makes sense!

from fmi.jl.

ThummeTo avatar ThummeTo commented on June 28, 2024

Also in-place-input-modification (as option) would be a thing ...

from fmi.jl.

ThummeTo avatar ThummeTo commented on June 28, 2024

Thinking about it, there are some problems, for example the state u is not known (in general) for CS-FMUs. So (u, t) input functions would only be a thing for ME-FMUs... I will keep this in mind and try to find a good solution. In general, also the FMU2Component would be useful to know inside f.

So f(component::FMU2Component, t::fmi2Real) for CS- and ME-FMUs
and as an alernative f(component::FMU2Component, u::Array{fmi2Real, 1}, t::fmi2Real) for ME-FMUs only?

from fmi.jl.

sathvikbhagavan avatar sathvikbhagavan commented on June 28, 2024

Yes, input functions which depend on u makes sense only in ME FMUs.

from fmi.jl.

ThummeTo avatar ThummeTo commented on June 28, 2024

This will be supported in the release v0.10.0:

Input functions need to meet one of the following patterns:

  • inputFunction(comp::FMU2Component, t::fmi2Real)
  • inputFunction(t::fmi2Real)

Additionally - for ME only - there are:

  • inputFunction(comp::FMU2Component, u::Union{AbstractArray{fmi2Real,1}, Nothing}, t::fmi2Real)
  • inputFunction(comp::FMU2Component, u::Union{AbstractArray{fmi2Real,1}, Nothing})
  • inputFunction(u::Union{AbstractArray{fmi2Real,1}, Nothing}, t::fmi2Real)

Note to check u !== nothing before using it, because the first call might be u=nothing (if no start state is given, the start state is solved during initalization of the FMU, after the initial inputs are set).

from fmi.jl.

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.