Generate code from state diagram - enterprise-architect

I want to generate C++ code from a State Diagram (Harrel FSM) and I'm wondering whether this is possible with EA, and if, how to go about generating code.
I've followed the example at Sparx: Generate From Behavioral Models, but when I look at the generated code it consists of skeleton code that does not include any state transitions etc. I've seen an example of assumedly code generated by EA in their online help, so it does seem to be possible, but I cannot find any concrete examples of how.
Could anyone give me some direction? Thanks.

Are you able to generate behavioral code from the examples in the EAExample model?
If not, you'll need to confirm which edition of Enterprise Architect you are using. Code generation from behavioral models such as State Machines is only available in the Business and Software Engineering, Systems Engineering and Ultimate editions of EA.

Related

I want to use Anylogic as a visualization tool for a big log file? Is it possible?

I asked a similar question to Anylogic linkedin forum so sorry for multiple posting (possibly for some of you). I just heard about the Anylogic program. My purpose is not simulation I want to visualize a log file. I want to allow the admin-user (who will be the user of the Anylogic model) to enter some settings which will cause some filtering and I want to visualize the whole file with Anylogic.
The file is a communication file. Possibly I will show communication attendees and interactions using Anylogic. I want to emphasize unnormal patterns in the log using visual and interactive properties of Anylogic. There may also some need for like zooming in and out during the execution of the model.
Is it something very difficult to do? I am a Java developer. I can understand that I should have to learn Anylogic. What other skills and development and test environments (Ide etc.) do I need?
I plan to do a serial of implementations for several log file types and currently I am trying to find the best tool which will allow me to make changes in visualization part of the models easily till I find the best representation of the data.
There are some examples of Anylogic which are installed built-in but I couldn't see an example which suits my situation. I do not know where to start. If someone helps me to start the design I would be very happy :)
Thank you for your attention..
Edit:
I am attaching a sample stereoscopic view model and a sample view. I want to do something similar to this. Is it ok with AnyLogic?
Ferda
simple answer: yes its possible.
Some more comments:
I am currently working on a very similar project actually. For me as an experienced AnyLogic user, it is very natural and AnyLogic offers all the features you ask for.
Is it something very difficult to do?
That depends on how quickly you can learn AL. But if you are experienced with Java, it will not be too hard, I imagine.
What other skills and development and test environments (Ide etc.) do I need?
None, really. You need to figure out how to use the visual elements of AL. All of them can be changed statically via the AL IDE but you can always change them dynamically via Java code. That is very important to realize and play around with.
I am attaching a sample stereoscopic view model and a sample view. I want to do something similar to this. Is it ok with AnyLogic?
Yes, that can be done.
I suggest you try checking the example models that come with AL. If you find something that looks like what you need, try to figure out how they did it. Then try to recreate it in a simple example model for yourself.

web applications, dynamic charts and simulation tools? (for MATLAB users)

We are a group of students of chemical engineering mostly proficient in MATLAB and Simulink but with almost no clue of web programming.
Our idea is to develop some online examples by using interactive graphics with dynamic effects and 2D/3D simulations. We know that MATLAB has some solutions but the compilers are not available for the student version. Furthermore, we want to promote the use of free open source alternatives (SciLab, Octave, NumPy)
Ideally, we would like to use a 4GL which includes a free library for numeric analysis and combine it with graphic user interface framework for web applications.
An good example will be Easy Java Simulations that generates java code and can be easily implemented online. However, we are looking for something that can be executed without java or another plugin (see google chart tool)
Although we are willing to learn (Python, Java), we would like to start with the easiest solution towards a painless transition for a chemical engineer ;)
We will really appreciate our recommendations and suggestions!
Your best shot is to buy the product Matlab Builder NE. You can use WebFigures to seamlessly create web applications from your Matlab application.

Modelica and CANBus (General, CANOpen, and/or J1939)

I have experience with Simulink and CANbus interfaces for both simulation and code generation... but I really like open source. For quite awhile Octave has qualified as a MATLAB replacement (at my usage level) but I just recently found out about Modelica. I have yet to find any information about any blocksets (what term does Modelica tend to use?) for CANbus other than the broken link for Exite from Extessy.
Can anyone provide personal experience or a reference to information on using Modelica with CANbus? I know that I could write my own blockset, but it seems like the sort of thing someone else would already have done.
The best reference I could find on this topic was this paper. It was apparently developed as part of the EuroSysLib project. I do not know if it is publicly available anywhere. I would suggest you contact the authors.
another option for simulation of entire ECUs, including CAN is described here:
http://qtronic.de/en/index_news_12_6_ATZ.html
See paper "Building Virtual ECUs Quickly and Economically" in the June 2012 issue of ATZ electronic. Use Modelica to build vehicle simulation models for export as FMU,
and the Silver Basic Software (SBS) to configure CAN emulation based on DBC files,
and run both parts closed-loop in Silver.

QP (Quantum Platform) Statecharts with Eclipse rather than QM

Miro Samek's QM graphical modeling tool (http://www.state-machine.com/qm/) seems like a good tool for semi graphical editing of UML statecharts for the QP framework. I would however like to use eclipse papyrus for this task because I have some experience with it.
Does anyone feel in a position to compare papyrus to QM?
Can anyone point me to good literature on code generation from statecharts made with papyrus?
I have never used Papyrus, but I just went through a tutorial for it.
The biggest difference that I see is that Papyrus appears to be primarily a UML modeling tool. Code generation is a "side-component" (The exact term from the penultimate page of A slide-ware tutorial on Papyrus usage for starters (2010-10-01).) Here's a StackOverflow question about code generation with Papyrus... it sounds complicated. I browsed Papyrus' forum and tutorials and didn't find anything immediately helpful related to code generation.
UML is traditionally considered a design phase technology in the Waterfall software development process, so once software is modeled in UML, implementation is a separate process. Not so with QM.
QM, unlike Papyrus, is not a general UML modeling tool; it's for modeling UML Statecharts with the sole purpose of compiling them, within the tool, to traceable C or C++ code. As you know, QM is related to QP, a state machine framework. QM builds code that utilizes QP.
QM's is your modeller and IDE. Your final source code, barring external libraries, is 100% generated by QM. As you graphically develop your UML Statecharts, you're expected to write C or C++ code that runs on transitions to/from your states. When you compile, QM combines your written code with its own generated code to produce a source files that you can compile immediately without making any additional changes.

Need a Visio tutorial for getting started

I am making a design document and I need to draw pictures using Visio. I have searched through the Internet, but there is no getting started guide or tutorial. Can somebody help? I need a tutorial which helps me to draw figures of moderate complexity.
At the surface, this looks like a fairly straightforward question, but I would argue that there are some underlying problems inherent in what you are looking for. There are a couple of ways to address this question:
First, how to use Visio.. Finding that information is fairly straightforward. The documentation via the Help menu is handy when trying to determine how to actually add elements, tie them together and define schemas based on those elements (be it an E-R diagram, UML, or some other architectural diagram). Finding the tutorials you are seeking might be difficult as Microsoft has moved Visio from a standalone product, to a part of the Visual Studio Suite, to part of the Office Suite, back to a standalone product. I would start my search on MSDN. Here are a few resources:
Visio Insight - A blog dedicated to using and modifying Visio
A portion of the Visio documentation
Second, how to you develop diagrams (and perhaps more specifically architectural diagrams). This falls outside of the realm of Visio and moves more towards fundamentals. There are a lot of books on UML and diagramming problem domains. I keep a copy of the UML Cheat Sheet handy. The same goes for E-R diagrams as well as other models.
And finally, with a question: What kind of diagrams are you trying to create? As with all tools, make sure that Visio is the right tool for the job. Would the table diagraming system in SSMS work for you? How about the class diagraming system build into Visual Studio? (and this is just assuming you are using Microsoft technologies in order to develop software). Visio is great for creating flowcharts and systems diagrams as well -- and those are much more straightforward.
As one final note, check out some of the samples that should be included. Here is a link to some (albeit older) sample for Visio that should get you started.
You can always read a book on the tool and that's my personal preference. I learned Visio 2010 by reading the book "Microsoft Press Microsoft Visio 2010 Step by Step"