Problems in OpenModelica v1.19.2 when installing OpenHydraulics v1.0.1 with Modelica Standard Lib v3.2 - modelica

Greeting Everyone, I am a new one here.
I'm a brand new Modelica user. I'm trying to learn the language with OpenModelica. I'd like to use OpenHydraulics which is in github link in OpenModelica (specifically in the OMEdit Connection Editor).
I downloaded OpenModelica v1.19.2 and Modelica Standard Lib v3.2 to browse and run the library OpenHydraulics v1.0.1. However, when I open the Excavator example and try to Instantiate or Simulate the model I get many errors of the form:
[OpenHydraulics.Basic.VariableRestriction: 51:3-54:64]: Function ReynoldsNumber_m_flow not found in scope VariableRestriction.
Could you help me with this problem?
Thanks in advance.

there are a couple of things you need to take into consideration:
The current version of OpenHydraulics is still the original release from almost 10 years ago.
The library was developed using Dymola which at the time also supported a couple of non-standard Modelica, Dymola-specific constructs that other tools struggle to work with.
The example you are trying to run is the most complex one utilizing almost all of the power of the library and hence has quite a high degree of complexity.
Taking all this together means that OpenModelica is bound to struggle with that example. But all is not lost. If you actually look at the more simple circuit examples (under Circuit) you'll find that they work just fine. And depending on your application area they might already demonstrate a usage that will fit your needs.
I hope this helps.

Related

Can XCUITEST can implement the cucumber Feature files

Can we write the Feature files and step definitions in Swift Automation framework using XCUITEST Framework ?Is yes , Any jar files or plugins we need to install ?
I am unable to find much support in this
While this is not an appropriate question for StackOverflow, I will oblige you an answer with Cucumberish. I have used it in the past, it works, but I generally steer clear of third party frameworks as they add a layer of complexity and leave you in the lurch if they lose support.
I have worked a bit with CucumberSwift and got it to work fine, reading German-language Feature files and letting me define steps in Swift using all the functionality that XCUITest provides.
However, we have not adopted this in the end but are writing Feature files in Gherkin and then write ordinary XCTestCases that we link to the Feature files by mentioning Scenario names in comments. We develop the same functionality for three platforms and it was difficult to see how BDD tooling would work across all three or how we could make it work given the resources we have. Like Mike Collins we also felt that running without the complexity of additional frameworks was an added benefit.
Having said this, CucumberSwift seems promising, perhaps check out this discussion about documentation and add to it?

Running Conversion Script - Modelica 4.0

Does anyone have experience converting Modelica 3.x files to the new 4.0 library standard? There is a link to a script, yet I am not sure how to apply it.
https://github.com/modelica/ModelicaStandardLibrary/blob/master/Modelica/Resources/Scripts/Conversion/ConvertModelica_from_3.2.3_to_4.0.0.mos
I am using Wolfram System Modeller 12.1 on a Mac, yet if needs must, can use OMEdit on either Mac or W10.
Any help to overcome my ignorance would be great.
Thanks for the help.
As far as I understand from discussion with developers conversion scripts aren't supported yet in Wolfram System Modeler.
I haven't heard as much about that topic from OMEdit, but the status seems similar based on https://github.com/OpenModelica/OpenModelica/issues/5297
The MSL 4.0.0 was even delayed a bit to give tools a bit of extra time to implement this feature. (That also allowed the scripts to be checked in additional ways with Dymola.)

Automatic documentation generation for Dymola code

since I could not find an answer to my question neither here nor in other forums, I decided to ask it to the community:
Does anybody know if and how it is possible to realize automatic documentation generation for code generated with Dymola?
The background for this e. g. is that I want/need to store additional information within my model files to explain the concepts of my modelling and to store and get the documentation directly from the model code, which I would later like to be in a convenient way displayable not only from within Dymola, but also by a html and LaTeX documentation.
I know that there exist several tools for automatic documentation generation like e. g. DoxyGen and Python Sphinx, but I could not figure out if the can be used with Dymola code. Plus, I am pretty new to this topic, so that I do not really know how to find out if they will work out.
Thank you people very much for your help!
Greetings, mindm49907
If you mean the Modelica model code, how does the HTML export in Dymola work for you? What's missing?
If you mean the C code generated by Dymola, the source code generation option enables more comments in the code.

Integrating Matlab with C++

I need to localize facial landmarks as a part of my research project and planning to use Supervised Descent Method (SDM) for that. Both the C++ and Matlab versions are available at the following site and when I contacted them they said C++ version is not going to be available until they secure it. So, I had no other option and had to opt for Matlab version.
http://www.humansensing.cs.cmu.edu/intraface/download_functions_matlab.html
The problem is that My project is in C++ and OpenCV. I wonder whether there is a way to access Matlab version of SDM in Visual C++ . I mean, is there an integration mechanism available for that ?
And, the next issue is when executing the "Facial Feature Detection" code available at the above site I get the following error.
I executed it as given below.
[detected_points] = xx_track_detect(Model,[],image,[],options);
and, it says "undefined function or variable named 'model' "
anyone have a solution to this ?
It seems like you need to use Matlab engine to be able to execute Matlab commands from C++. The engine interface allows you to do just so.
Regarding the model variable - it is probably a representation of the learned model for facial landmarks, it should be supplied with the packge or you need to tune it by yourself. Without additional information I suggest you contact the publishers of the package for more information.

Where can I find good open source code flow visualization software?

I am working on an academic research regarding some very long functions in the Linux kernel (link, link).
For that research, I would like to use some code flow visualization tool, that would be able to plot a graph in which each vertex is a decision point and each edge is a piece of code which runs in a consequent way.
Do you know of any good, open source project that can visualize C code?
Perhaps a tool like KCacheGrind would be of help. It generates call graphs based on actual calls and cannot pre-generate a call graph without actually running the program, which may not suit your needs, but then it again it may.
History flow's are very neat for changes/diff across multiple versions.
Codeplex has a project, Dependency Visualizer which does support C also.
Gprof2Dot can render oprofile, this would get you dynamic info also.
CodeViz also (static tool) would work.
If your using gcc, gcc-xml has an introspector plugin also todo this.
You appears to want to acquire a flowchart of C source code ("decisions", "code blocks").
Something like this C flowchart?
To do this correctly, esp. for Linux kernal code, I'd expect you to have to preprocess the code first to get rid of macros and conditionals. I would assume that GCC would construct such a graph internally and that you ought to be able to get your hands on that graph.
Doxygen does some amount of 'visualization',
but you need to work on the code a bit for it to be usable.
Another interesting thing to check would be lxr
Linux Cross Referencer is a software toolset for indexing and presenting source code repositories. LXR was initially targeted at the Linux source code, but has proved usable for a wide range of software projects. lxr.linux.no is currently running an experimental fork of the LXR software.
I can recommend Sourcetrail. Can work with a compile_commands.json. Not sure if it's still maintained, though. But it's foss and you can fork it!