Running Conversion Script - Modelica 4.0 - modelica

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.)

Related

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

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.

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?

Which commands and functions are not supported in TCL based on the version

SO far I've been using TCL 8.6 , but recently I had to move back to 8.0 because the program I am using only supports 8.0
The issue is that I can't find a documentation or a comparison between what new commands and functions are compatible and what are not
Are there any websites that contain such info
//please note that I checked the tcl.tk website and it only features what is new per version but not so specific
This page, and the pages it links to, have fairly detailed information on command and syntax changes. You may have to search backwards to find the first version that supports the feature you're wondering about.
http://www.tcl.tk/man/ has links to documentation for Tcl commands in various versions from 7.5 to 8.6, though it skips 8.1 for some reason.
Only supporting 8.0? That's rather old. (I've still got some systems like that, but they're really just on life support.)
The second-most definitive source of what has changed between versions is the changes file in any Tcl source code distribution. (The first most accurate source is comparing the source code, but that's a bit annoying prior to 8.1 for various unimportant reasons.) You can use the current version for this, since those old parts of that file are effectively static; here's the equivalent for Tk. The file includes a lot more information than you probably need, including mentioning many of the more significant bugfixes as well as some cases where functionality flapped a bit during betas (we try to avoid doing that, but it happens occasionally).
However, the big things that far back are fairly simple, so we can probably narrow the things to watch out for to these big-ticket items:
Expansion syntax ({*}...) was introduced in Tcl 8.5. Before that, you use eval a lot more.
There's a large bunch of commands in modern Tcl that simply weren't there back then. There are workarounds for some of these; easier to just try and see what's actually missing that you expect and then ask here again than to try to anticipate them all. Some known exceptions that are known to be entirely unavailable for 8.0:
dictionaries
ensembles
coroutines
the TclOO object system
the Ttk widget set
Tcl 8.0 assumed that characters were always 8-bit quantities and made no attempt to understand encodings. It just slings bytes around. (This also means that the encoding command was absent, and so too was the -encoding option to fconfigure.)
Make sure you only use ASCII in your scripts themselves. Saves pain.
The RE engine in 8.0 was different to the one used from 8.1 onwards. It's much simpler, and supports only a fraction of what the newer engine does.
Threading support in 8.0 and before is not for the faint of heart. Assume your code is single-threaded and avoid a lot of difficult debugging.

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!

what is a good c compiler

i'm using windows xp what would be a good c compiler?
i want to learn c so that i can better understand the objective-c language for the iphone.
i have a great background in php so hopefully something will make sense
ps:
what sections should i put more focus on when learning c in getting prepared for objective-c?
thanks
Duplicate:
c compiler for windows
C/C++ Compiler for windows
Which C Compiler do you recommend for windows
GCC is a free, open source, high quality, compiler. You can get it with cygwin.
Microsoft makes a C compiler that comes with Visual Studio, which is Microsoft's integrated development environment. You can download the "Express" edition of Visual C++ to give it a try.
Also, Intel makes a good compiler.
The iphone uses the gcc compiler. This is available for windows using MinGW/MSYS or other compatibility packages.
Apple has Objective-C tutorials which assume very little C experience; I'd be tempted to just dive in. If you get stuck, then get K&R. (I don't know if php has types and pointers, otherwise you'll get stuck straight away)
Visual C++ express is free, has a really nice IDE and compiles C code.
I'd use gcc by downloading cygwin.
Gcc is the way, you can install mingw which is a native windows port.
I also recommend gcc, but don't get too used to GNU extensions such as asprintf() if you want to write portable code. On some systems, strdup() is lacking, amongst many others. The compiler itself won't spoil you, but glibc will.
On the one hand you have POSIX, on the other hand you have ISO/c89/c99, then you have gcc.
I highly recommend gcc, with the above warnings in mind while you continue to explore other compilers. For instance, it can be fun to code around the limits of Lestes if you enjoy dabbling in C++.
In any event, gcc is very powerful, boasts superior optimizations and can be so -pedantic that you think its out to get you. But, don't forget about portable code .. or where/if portability kludges are actually appropriate.
Cygwin is also highly recommended, as DasBoot posted.
You could have a look at this free e-book Programming in C in 7 days as a starter where they use Dev-CPP for windows
Note
It includes only the first 7 lessons of the more complete e-book “Quickly
Learn Programming in C”
Normally I would recommend Pelles C for programming C in windows. It is a good user friendly programming environment that has the best c99 compliance that i've seen... However, here I'm going to tell you that you should use gcc right off but not on windows. Use Linux (maybe Ubuntu?).
The reason I say to use gcc on Linux is because you want to develop for the iphone. I would suggest getting comfortable with the tools you are likely to use. I don't imagine you using the official iphone sdk (you'd need a Mac for that) so I think you'll be using the free tool chain. It does not compile on windows so switch to a supported platform and get comfortable with the tools.
I personally recommend MinGW. You can download it off SourceForge. It even works on a 64 bit configuration. I don't think it supports objective C. However, I found it useful while running C code on windows.
I don't have any idea about objective C and what parts of C you need to focus on while learning so as to make the transition easy. I'll leave that to someone with more experience.
gcc included in cygwin is a perfect first choice if you want to learn C on your Window XP platform. cygwin/gcc includes a basic Objective-C environment.
Anyway if you want to target iPhone, the best move would be to change to a Mac platform (which can natively run XP for smoothing the switch) in order to get Xcode, the Mac and iPhone development environment. You will also be able to learn CocoaTouch, the iPhone OS.
In parallel, you can register to the iPhone Dev Center for accessing all resources for learning iPhone programming.
If you're after a compiler that can compile both C and Objective-C, a GCC port to Windows is probably your best bet.
When learning C, concentrate on pointers, arrays, strings and memory management - those are the things that will trip you up coming from a managed environment of any kind.
The best thing about gcc is that it has a lot of features and supports the latest language standard. But for fast compilation and a nice programming environment you can't beat Lcc-Win32.
GCC is the cheapest compiler, Intel the fastest, MSVC the most featured.