Tag: travel

Barcelonaaaaa ( & Rhapsody 10 )

Travel is entirely back now. COVID is over. Well, it’s still there, but nobody cares anymore. So after the worldwide TechXChange in @#$%^&* Las Vegas ( See “I hate Las Vegas“), it was now the European version held in Barcelona.
I’ve been to Barcelona before (incidentally, that was where I got my own COVID infection…). I really like that city; it has beautiful architecture, a nice buzz, great food, and much, much more.

So I went to my second home (Schiphol Airport) by train, checked in, did the security check, and then went straight to the KLM Crown Lounge. I’m a luxury traveler; I have had a KLM Platinum badge for five years (and counting), which is so cool. It makes traveling (almost) bearable..

The flight was as it should be: quiet and fast. It takes only 2 hours from gate to gate. Love that. Then, the Uber to the hotel. We live in a beautiful time. The only thing I used was my phone. Everything I needed was there, and I did it on the phone. I booked the flight with the KLM App, Called Uber with the Uber App, and booked the hotel with the Hilton App. I checked the locations with maps; the IBM App had my entry ticket. The only thing you need is, of course, the phone and enough battery… And sometimes a connection. But that is only a problem in Germany; it all worked fine in Barcelona.

The venue was on a great location, near the sea, next to one of the recommended hotels. I wasn’t in that hotel, I booked too late. But I don’t mind a small ride in the morning/evening.

As in Vegas, there was also a sandbox where partners and IBM had booths and the Champions Lounge. Yes, I have been an IBM Champion for 4 years now! It’s like being KLM Platinum but even better!
Champions are treated as kings by IBM! Front-row seats and people who do nothing else than care for our wellbeing. Thanks Libby, Cathryn, Amy and all others!

Unfortunately there was not much ELM, most was, “the ol’ Hardware” I learned that Mainframes are not dead, on the contrary! One of the things I started with after I graduated was the IBM AS/400, now SystemZ. Still cool stuff. I also learned there are “open source” Mainframes.

Some small items were there on ELM, there was a small item about Rhapsody, the new version was coming. And loo and behold: on February 29, 2024 Rhapsody 10 was officially released!!!!

What is new: Actually all is new… The GUI is changed and therefor all under the hood needed a thorough make-over. And the IBM boys and girls did the magic, just like on the TV make-over programs for houses or people: the result is stunning.
Here is the official IBM “WhatIsNew“.
Soon I get back to you guys with more news about Rhapsody 10!

Also new is the HarmonyMBE profile. Yes that is our work, Andy made that and it’s part of Rhapsody! We have a BLOG about it, we will fill that with more information soon.

So. Have fun with Rhapsody (10, but also with the older versions)

Walter (wvdheiden@sodiuswillert.com)

State-chart

USA

Screen Shot 2017-10-22 at 13.35.47

Table of states visited

My first visit to the US was in november 1999. I had to be in Salt Lake City for work and took the opportunity to visit my friend Arno, who lived in Philadelphia back then. He worked in DC and I flew there to drive with him to Philly.
From there I went to Utah but  on the way back l took a small stop in New York to complete a real cool trip with a visit to already a number of states.

Cancelled flight

From that moment on I flew to the US almost once a year on average. And kept on visiting states. In 2004 I was on the way to Las Vegas together with Andreas Willert for the I-Logix Kick-Off Event. We booked the flight from Amsterdam via Minneapolis. We travelled a few days before the conference and wanted to drive around Las Vegas to see some of the Parks there. I already booked a hotel for the first night in Vegas and we planned on driving around and find ourselves places to stay on the go.
Unfortunately, KLM/North-West were not able to produce a working plane on the day we were supposed to fly so we had a forced night out in Amsterdam.
I phoned the hotel in LV to shift our stay for one day, just to find out that the next night was “Superbowl night” and the hotel price would not be $49,- but $249,-…
So I told the to shove their room somewhere dark and let KLM deal with it. It was their fault. (But my problem……as I found out later)
Luckily a have a friend who lives in “020”(As we from Rotterdam call our Capital, it’s the telephone area code) guided us through the city and after some beers (and some more) the next day we stood, slighty hangovered, before the KLM desk to get a room in LV for the next night.
They could not help us, this would have to be sorted out in Minneapolis they said.
So we first flew to Minnesota and went to the KLM desk over there to find out how they planned to get us in LV. It turned out to be a quite late flight that would arrive in LV on 00:30. They also told us to sort the hotel thing out when we arrived in Las Vegas.
This is where I intervened and said: no way I fly to LV without a hotel room.
So after some negotiations KLM booked us a room in Minneapolis and we rented a car to drive to LV because: What’s the difference? We wanted to drive around in LV and now we were driving around in the USA. No difference?

A small difference…

As it turned out, there was a small difference. We landed in Minneapolis, we noticed that it was snowing there. What we first noticed after we rented a car and went to five (5!) sliding doors to pick up our rental car. After each door the temperature dropped for more than 10ºC….
It was cold there. And I mean really cold. On the way to the hotel we were overtaken by a snowmobile. That was the first time I saw a sno-bolie in my entire life….
In the hotel we watched television just to find out that the USA was in something they called “The Blizzard of the Century”….
So the driving thing turned out to be a co-called “Bad Idea”
( “Bad Idea” is a trademark of  Microsoft Corporation )
So we decided to drive south as soon as possible to find better weather and to avoid going through the Rocky Mountains where this would certainly be worse.
So we did 3500 kilometers USA with at least 95% of that through the snow. Even on the Grand Canyon there was 50cm of snow. We have seen more crashed trucks and cars than in the rest of my life.
But we arrived in LV where is was nice and warm. And we passed about 12 states on the go.

State Count

As you can see in the state-chart, my current state count is 33, I hope that the next trip will bring me at least 2 more.

State-machines

OK, now a little about UML and Rhapsody. State-charts or state-machines are an important part of UML but certainly of Rhapsody. This, of course, stems from the fact that Mr. State-machine, David Harel, is the founder of I-Logix, and one of the fathers of Rhapsody and Statemate, it’s predecessor.
Although it is said that David Harel invented state-machines, this is not true, he merely described them thoroughly for the first time. His definition was take into the UML.
There are many more implementations and definitions of state-machines.

State-machines are excellent when you implement behavior that has discrete logic. For Control loops, it may look tempting to use a state-chart but that is a mistake. There are far better mechanisms to model continuous behavior.

Example

Picture: You have a new job at the software department of “El Cheapo” a manufacturer of computer LCD monitors, know for it’s really good value for money displays.
Your new boss gives you the assignment to make the software for a new monitor that El Cheapo will release soon. The monitor is aimed at the lower end of the market so it has only 4 buttons: one for on/off, one for switching between brightness and contrast and 2 to control whatever you have selected (plus and minus)
You remember from your last job that you had a UML Training with Rhapsody (from some Dutch guy…) and decide to use that for your new job.
After 2 hours of thinking you have your first version ready:

Monitor Statechart

Not bad for a new guy, you think and you are on your way to your boss to tell him about your success.

Your boss is impressed until he starts asking you about the “evMode”, “evDown” and “evUp”. “Where are these events coming from?” he asks.
“Easy”, you say, “The hardware guys have to send these events from the button interrupts when they program the hardware drivers”.
Your new boss starts rolling his eyes and drops backwards back in his chair. “INTERRUPTS???” he shouts! “No interrupts allowed over here!”. “Do you have any idea how dangerous interrupts are??”.
You ask: “But how do you detect that buttons are pressed then?”. “The safe way”, your boss replies, “by polling all inputs every 100 milliseconds”. “Sigh”, you think.
But no matter how you try to explain that this is so wrong, you are eventually forced to curb your enthusiasm and go back to the drawing board.

But… you never give up without a fight and you come back with another plan. You have learned in your Rhapsody Training (from that vague Dutch guy…) that you can tweak the generated code from Rhapsody using properties (see Properties. Stairway to heaven, highway to hell….) and you start tweaking the state-chart. You ignore the Framework (see Real-Time Framework, the robust base for your embedded applications. ) and you come up with this solution:

Monitor Statechart 2

All events are replaced by guards. The state-chart code is now tweaked so that the generated function (rootstate_dispatchevent() ) can be called by the 100mS loop.
Some quick tests prove that this also works and now without interrupts.

Really???

Is the second state-chart really a functional copy of the first?

NO!!! it is not. In this example nobody would notice because 100mS is fast enough to fool humans. But suppose you press both the “mode” and the “up” button within the 100mS time frame. Which one is pressed first?
You can never know since you were not looking. The first state-chart knows while that uses interrupts and the framework. Events are stored in the queue and processed according to the FIFO principle.

You have to choose which of the variables “mode”, “up”, and “down” has the highest priority. And react too that. So the state-machine should actually look like this:
That is the big difference between these methods.

You have to take the priority into account and then create the state-chart like this:

Monitor Statechart 3

If I show this state-chart during training, people tell me: “Walter… you always told us to use state-charts because they make it easier to understand your application.”, “This is not understandable”.
And they are right… this is not what I call a good and understandable state-chart. It’s a chaos. I checked it multiple times but I’m still not convinced that it is really 100% OK…

An easier way!

What!!?!! there is an easier way? Yes, there is… This is actually the state-chart that does the exact same as the one above here.

Monitor Statechart 4

Does that state-chart remind you of something? Another diagram maybe?

It should… It is an activity diagram. Or flow chart (As the activity diagram of an operation is called in Rhapsody). Check it out here:

activityDiagram

An activity diagram…. does the exact same that the state-chart does. And.. If you compare the LOC (Lines Of Code) you will see that the real state-chart (the first example with the events) uses more code then the activity diagram but it is more correct. The other examples (And certainly the incomprehensible one) use way more code and are much slower!

Conclusion

Use state-charts when you have discrete logic. For continuous logic or polling solutions: use activity diagrams or flow charts. Or use Matlab Simulink for control loops.

That’s it for today, happy modeling with Rhapsody

Walter van der Heiden (wvdheiden@willert.de)

 

AUTOSAR meets Fjällbacka

The Willert AUTOSAR Team (Clemens Maas and me) regularly visit the AUTOSAR meetings. (See: AUTOSAR WebSite)

Since our succesful introduction of Rhapsody @ Marquardt (See: Referenzstudie (German) ) we do more and more Automotive. The increase of software in cars is helping us to more and more Automotive customers that are all struggling to create their software in time and without (greater) errors.

AUTOSAR is the Automotive worlds standard to improve software development. It is an organisation that is founded by the major (mostly German) Car manufacturers. You can become a member and in that way cooperate and contribute to the software standard.

What does this have to do with Rhapsody? Good question…. I’d say: everything. With Rhapsody (UML or SysML) yo can also improve your software quality, time to market, re-use and more. The combination of both worlds is, however, not really easy.

Many AUTOSAR artefacts look like UML or SysML artefacts but are different. Rhapsody is used to store everything in its own database (not a real database but it’s own file format) and not used to export stuff to cooperate with other tools like MatLab. This is something that is defined in AUTOSAR, the ARXML files that you exchange on all levels for information interchange between tools.

Rhapsody has an AUTOSAR profile that allows the import and export of ARXML files. When you want to use Rhapsody for Architecture you can then export your Rhapsody model as ARXML to do further work in other tools. The other way around is also possible, you can draw your architecture in a Vector or Elektrobit tool, export ARXML, import that in Rhapsody and then create RIMBOs to add behavioral elements.

Sounds complicated and… unfortunately…. it is. We at Willert have designed an “AUTOSAR light” solution that allows the use of Rhapsody on a much simpler level. We import ARXML but convert all items to standard UML items. You can add behavior in a normal Rhapsody way, generate code and… it works. in the current version you have to do some stuff by hand but we are working on automating that as well.

So….back to Fjällbacka… a very nice town, we can recommend a visit!

 

Happy Modeling with Rhapsody!

Walter van der Heiden (wvdheiden@willert.de)

© 2025 Rhapsody TechBlog

Theme by Anders NorenUp ↑