Comments (4)
@nickbattle, can you propose a fix?
from reference-fmus.
@t-sommer I can propose arbitrary changes that will pass validation, but these are reference FMUs which presumably are intended to work in a particular way, so I think the FMU authors really ought to decide what the correct settings should be.
In the Resource/FMI2.xml case, the variable "y" is invalid because its "initial" clause defaults to "calculated" and you cannot have a "start" value if a variable is calculated. So one solution would be to remove the start clause. Or you could define a different "initial" setting. I don't know the intent of the model, so I can't guess which is appropriate.
Fixing the "InitialUnknowns" just means adding a InitialUnknowns section to the ModelStructure that is the same as the Outputs section. Though if you change the initial value of "y", you don't have to include it in the InitialUnknowns (only "approx" or "calculated" outputs are needed in InitialUnknowns).
The fix for Stair/FMI2.xml is easier. From the name "counter", I assume it is discrete rather than continuous, and therefore should have a variability of "discrete" rather than the default, which is "continuous".
If someone can indicate which changes are appropriate, I can re-validate them.
from reference-fmus.
therefore should have a variability of "discrete" rather than the default, which is "continuous"
The FMI 2.0.1 Spec is ambiguous here:
on page 48 it says:
(a) Only a variable of type = “Real” can be “continuous”. [...] (b) The default is “continuous”.
IMHO the (b) takes precedence over (a).
In FMI 3.0 this has been clarified:
The default is continuous for variables of type
<Float32>
and<Float64>
, and discrete for all other types.
from reference-fmus.
Yes, I agree, otherwise we do not know the variability of non-Reals without explicit variabilities. The formal model always regards ScalarVariables with a missing variability as "continuous". In the case of your PR, that causes another error, because the type is now "Integer" which cannot be "continuous". It needs a variability clause to say the variable is "discrete".
As you say, this is clarified in FMI3 and the formal model therefore implements this and your PR changes for the FMI3.xml are accepted (though the InitialUnknowns issue remains in both).
from reference-fmus.
Related Issues (20)
- [LINUX] Resource FMI 2 FMU does not url decode the resource location
- Check if currentCommunicationPoint matches internal time in fmi*DoStep()
- Check if stopTime is exceeded in fmi*DoStep()
- Fix derivate attributes in BouncingBall/FMI2.xml & FMI3.xml
- Don't terminate if status == error
- Don't get/set states if NX == 0
- Linker error when building fmusim HOT 4
- Fix validation of derivatives in fmusim
- Separate repos for Reference FMUs and fmusim
- Remove unused eventInfo from FMI{1|2}Functions structs
- Remove "2" from FMI2*State enums
- Handle FMI 3.0 integer types in FMIApplyInput()
- building fmusim fails due to missing file HOT 3
- building FMU .so file does not seem to work HOT 1
- Set instance->time to startTime in FMI3EnterInitializationMode()
- fmu state mask has wrong enum
- logMessage function not working because of vsnprintf() HOT 3
- invalidState() getting used in fmi2Fucntions.c
- Set instance->time to tStart in FMI1InitializeSlave()
- fmusim: stopTime ignored in versions >v0.0.22 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reference-fmus.