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, 7 months ago.

Viewing 15 posts - 1 through 15 (of 45 total)
Author Posts
Author Posts
December 1, 2014 at 5:22 pm #1954

cort
Keymaster

We teach Executable UML Modeling. We teach engineers and computer scientists, but we also teach managers, accountants, teachers and even nurses. In fact, it was a high school aged nurse-to-be that modeled the blood pressure cuff shown above on paper. The next day in class we entered the model into BridgePoint as shown below.

It is really fun to see someone grasp the concept of abstraction. Some people have knack for it and quickly learn to capture and communicate ideas with models. The nurse who built this model really disliked computer science and was mildly annoyed that she was so good at modeling!

Notice the “Class Blitz” list in upper left corner to assist in her brain-storming.

Look for another “model snippet of the day” like this in future posts.

[originally posted at http://onefact.net/blood-pressure-cuff/%5D

  • This topic was modified 4 years, 8 months ago by  cort.
  • This topic was modified 4 years, 8 months ago by  cort.
December 9, 2014 at 4:36 pm #1975

cort
Keymaster


In today’s model snippet of the day I post a first draft class diagram of an electric parking brake. The classes are rotor, caliper, gear box and motor. Attributes are placed such that the rotor has a diameter. The caliper is in a current_position. The gear box must have gears that provide a reduction. The motor has a power rating and generates a quantity of torque.

Although not shown, the motor and caliper have lifecycles defined by state machines. You can tell this because of the state machine glyph on the classes. The associations labeled R1, R2 and R3 relate instances of the classes together.

When the brake motor is activated it drives the gear box providing mechanical advantage through its reduction. The gear box closes the caliper changing its current_position. The caliper squeezes the rotor providing frictional forces to prevent the rotor from turning, and thus keeping the car in its parking space. Note that we can read the associations in the opposite direction and state that the rotor is squeezed by the caliper which is closed by the gear box which is driven by the motor.

  • This reply was modified 4 years, 8 months ago by  cort.
December 9, 2014 at 11:49 pm #1981

Dan George
Participant

Thanks, Cort. I hope we get to see the revised draft to get a sense of how models evolve incrementally.

Something I find challenging is coming up with asymmetric verb phrases. Lahman provides paid by/hires in contrast to employed by/employs. Another example can be taken from Balcer, Mellor, page 90. I think Lahman would have used one association with is rented by/lives in and then realized the need for a second association (for the reasons stated in the related text). Above, I wonder if

drags surface of/wears down

,

applies force to/is closed by

,

drives/multiplies torque of

would be appropriate and useful. I tried to think of phrased more pertinent that mechanical connectivity. I don’t intend any criticism; just looking to expand on the simple example. Thoughts?

Thanks again, Dan

December 10, 2014 at 3:13 am #1982

Lee Riemenschneider
Participant

I added a wrong comment on the One Fact blog, so if you go over there, ignore it. I plead temporary insanity. :-)

+Dan one thing you don’t need to do is model every thing that is occuring in the system, only the things you want to control. The caliper wearing down the rotor is irrelevant to control of the brakes.

If there was a way to dynamically check the thickness of the rotor, then a minimum thickness attribute would probably exist in the model (most likely in a specification class for the rotor rather than the Rotor class. A sensor would also have to be added. If this dynamic sensing isn’t in the system, then the minimum thickness would not be needed in the model, so it would better reside in a service manual.

I’m not sure all of your verb phrases were targeted at additional relationships. The “drives/multiplies torque of” might be considered a better verb phrase for R3, because it helps to illustrate the need for the reduction and torque attributes.

For R2, “closes” is more descriptive than “applies force to”, because “applies force to” doesn’t give a reason. As an additional relationship, it would be redundant.

December 10, 2014 at 6:18 pm #1986

Dan George
Participant

Thanks, Lee. Ya, I was making things up with my examples trying to think of reverse roles. The R3 asymmetric phrases was the only one that didn’t feel forced.

I’m a little bugged about including both phrases when they are symmetric. On the plus side, you don’t have to wonder if the omitted one was an oversight or intentionally implied symmetric. On the down side, it clutters the model and violates, ironically, one fact, one place.

Another thing that I run into is not knowing how to say what’s in or out of scope for the model. IOW, just by looking at a model, how can I tell some aspect has been overlooked or if it is intentionally left out? My guess is that the domain diagram and descriptions resolve this issue.

Thanks again, Cort, for providing an example for us to discuss and learn from. I suspect that there are more would-be-xtUML users that struggle to learn because of isolation and lack of mentors.

December 11, 2014 at 1:36 pm #1991

cort
Keymaster

Good thoughts on symmetric versus asymmetric verb phrases. You can get yourself into trouble getting too creative trying to come up with the “other direction verb phrase”. In this particular model, I think it may be cleaner to leave some of the verb phrases off. Choose the direction of traversal and provide that verb phrase only.

My favorite example of multiple verb phrases deals with the relationship(s) between “car” and “person”. A rel-phrase combination “owns”/”transports” is just such a problem. I own the car in my garage, but my rental transports me. So, there would be 2 separate associations to link 2 separate instances of “car”.

December 11, 2014 at 7:46 pm #2005

Domonkos Asztalos
Participant

Dan, one must have a bunch of requiremnets specifying the scope of the model.

December 11, 2014 at 9:02 pm #2006

Dan George
Participant

Domonkos, well, at least some requirements, anyway :). Remember that Stephen Mellor is an original signatory of the Agile Manifesto for Software Development.

He expressed disappointment that the industry focused on 3GL Agile instead of Model Driven Agile here: http://www.softed.com/resources/docs/stephen%20mellor%20agile%20manifesto%2010%20years%20on.pdf

I suppose the answer to my question is “it depends” and you really cannot validate a model just by looking at it. You have to know the context and the purpose of the model. The insight can be gained face-to-face, from model notes, requirements, etc.

Cort, it would be great if you could give us a little blurb on the purpose of a particular snippet in future postings. It will help me learn how to do that for my own models.

December 11, 2014 at 9:16 pm #2007

poj
Participant

When it comes to asymmetrical phrases on relations, many of the best examples are just a tiny bit asymmetrical.
A Waypoint is first in a Route, but a Route starts with a Waypoint.

Remember to keep your phrases in the domain you’re modelling. Cort’s example of “owns”/”transports” somewhat mixes two things into the same relation. The ownership of a car is one kind of a relation to a Person, the actual ongoing transportation of Persons are another thing.

When trying to decide if phrases are correctly paired, I try to read it in one direction and then in the other and see if the statements contradict, have nothing to do with each other, or if they supports each other. Non-supporting phrases is an indication of domain mixup in the relation.

January 1, 2015 at 4:52 pm #2387

cort
Keymaster

January 2, 2015 at 4:29 pm #2438

Lee Riemenschneider
Participant

Domain mixup or an unspecified relationship within the domain. In either case, there’s an indication that the model needs to be revisited.

January 2, 2015 at 4:51 pm #2439

Lee Riemenschneider
Participant

On requirements and Agile: One of the discussions I’ve frequently had with co-workers concerns invariants in the system and known requirements. Most people could probably tell you a number of requirements for a (e.g.) radio off the top of their head, but I’ve heard developers claim those requirements don’t exist until a systems engineer writes them down. Not only that, but those known requirements are often not viewed as invariants that can be modeled and reused in every radio under development. The major problems with requirements change is the lack of recognition and capture of the invariants in the system and poor separation of concerns.

January 19, 2015 at 3:13 pm #3864

cort
Keymaster

January 24, 2015 at 3:51 pm #3878

Travis London
Participant

Father’s Day

Just thinking about how may day goes, and figured I would have some state machine fun :).

Maybe I could extend on this a build a robot to help out.

Enjoy,
Travis

May 15, 2015 at 6:23 pm #4638

cort
Keymaster

See Revision Control model snippet here: http://onefact.net/revision-control/

  • This reply was modified 4 years, 3 months ago by  cort.
Viewing 15 posts - 1 through 15 (of 45 total)

You must be logged in to reply to this topic.