Model Snippet of the Day

Home Forums Executable UML and xtUML Methodology Model Snippet of the Day

This topic contains 44 replies, has 10 voices, and was last updated by  cort 2 years, 4 months ago.

Viewing 15 posts - 16 through 30 (of 45 total)
Author Posts
Author Posts
May 22, 2015 at 2:12 pm #4991

Bob Mulvey
Keymaster

Thanks Cort!

May 25, 2015 at 2:12 pm #5076

cort
Keymaster

Happy Memorial Day (in the USA) and may freedom be enjoyed were you live.

July 21, 2015 at 8:42 pm #5182

cort
Keymaster

An autosampler is a robot used in a laboratory to collect or dispense fluid from a vial. Chemistry, biology and medical labs use these devices. They save time and can be more accurate than non-automated sampling processes.

The model above has classes carousel, row, sampling_probe and probe_assignment. The carousel ‘contains’ row, while the row ‘is rotated by’ the carousel. A sampling_probe ‘is assigned to’ a row.

State machines (not shown) govern the behavior of the class instances. Actions in the states perform the necessary processing for each state of the state machines.

This model mostly supports the concept of multiple sampling probes and multiple rows in a carousel. Although to support multiple rows this model would need to change the cardinality on an association. Can you identify which one?

This UML model is the “source code” of an autosampler in field use since the late 1990s. It is a long-standing example of xtUML Inside!

  • This reply was modified 3 years, 10 months ago by  cort. Reason: added note about device in field
August 7, 2015 at 10:23 am #5200

cort
Keymaster

The Model Snippet of the Day is a fragment of the xtUML metamodel. A Function defines zero to many Function Parameters (R24). Each Function Parameter precedes and/or succeeds another Function Parameter (R54).

August 17, 2015 at 1:16 pm #5230

cort
Keymaster


This Model Snippet shows a small state model that sequences test case execution for a model-based testing harness.

August 19, 2015 at 2:19 am #5236

cort
Keymaster

Yesterday we looked at a state machine traversing the stages of a test case. Here is another view of a system containing that exact model. This system shows a component called ‘ec’ (electrochemical detector) configured together with an ectb (electrochemical testbench) and a test runner. The test case state machine lives in a class inside the ‘ectb’ component. The test case state machine is driving stimulation of the electrochemical detector component and verifying proper response to that stimulation.
Note that this is not a pedagogical example; this is production material for an electrochemistry instrumentation supplier.
[The boxes are UML components. The connections are UML interfaces (provided with ball-end, required with cup end).]

  • This reply was modified 3 years, 9 months ago by  cort.
September 2, 2015 at 3:46 pm #5258

cort
Keymaster

Here is a model of a weather station (Stevenson Screen). It is likely that there will be more of this coming in the future.

http://onefact.net/stevenson-screen-weather-station/

September 3, 2015 at 7:02 pm #5259

cort
Keymaster

The BridgePoint model for the Stevenson Screen (weather station) can be found in the xtuml/models repository in github.
Here: https://github.com/xtuml/models/tree/master/applications/wx

September 17, 2015 at 1:15 pm #5270

cort
Keymaster

Today’s model snippet describes the game of football (fĂștbol, soccer).

class model

state model

A bit more of a write-up is here: http://onefact.net/football-futbol-soccer/

  • This reply was modified 3 years, 8 months ago by  cort.
September 17, 2015 at 11:18 pm #5274

Bob Mulvey
Keymaster

Looking at the class model, and I don’t quite follow. The importance of good relationship phrases is clear :). Each of the places where the relationship phrase is present, I clearly understand the selected cardinality and conditionality. In the places where relationship phrases are missing I don’t understand the selected cardinality and conditionality.

September 18, 2015 at 4:54 am #5277

cort
Keymaster

Thanks for the comment, Bob.

Even though I have mostly taught people to always include phrases on both ends, many times it is redundant. Here is a list of the corresponding phrases for the model above:

R1: kicks, is kicked by
R2: bounds, is bound by
R3: coaches, is coached by
R4: penalizes, is penalized by

Keep in mind that an association has a single meaning. For example, an incorrect association between referee and player would include phrases.

R4: penalizes, yells at

The penalize association and the yells association are actually two different relationships.

The moral? Look closely at models and see if you are being good by placing phrases at both ends, but maybe you are mixing two different associations with one link… which leads to bugs!

September 19, 2015 at 6:14 am #5278

sm4rpq
Participant

Maybe just a confusion due to me not being native english speaking and not fully understanding “in bounds”.

But the state machine for the ball has an “out-of-bounds” state from which it can go to various other states. And the class model specifies it to be unconditionally one in bounds of a field. So I would interpret it as when the ball is kicked out of the field it has to be deleted which is in conflict with the state model.

It may also be that I don’t understand the rules of soccer. A sport I would like to see much less of in the newspapers here in Sweden. Much much less.

September 20, 2015 at 6:17 am #5282

cort
Keymaster

Ah, the amount of news will likely increase before it decreases!

I like your close examination of the model. And your perspective would work. However, in this case, I prefer the idea of having a field that is a preexisting instance that remains for the duration of the game. It is a bit disconcerting to think of the field being deleted.

Let me clarify my use of English in the state model and in the association text phrases.

In the state model I used “out-of-bounds” to mean “outside the lines marked on the field”.
Thus, a ball is out-of-bounds when it is beyond the marking lines on the field. So, the field itself actually includes (some) space outside the bounding lines.

On the class diagram I use “bounds” as a verb synonymous with “provides marking lines”.
A field bounds zero or one ball. In English bounds usually speaks of physically restraining, but here I stretch that meaning just a bit. :)

October 15, 2015 at 1:38 am #5396

cort
Keymaster

Today’s Model Snippet of the Day is Experiment.

Experiment

October 27, 2015 at 3:31 pm #5416

cort
Keymaster

Viewing 15 posts - 16 through 30 (of 45 total)

You must be logged in to reply to this topic.