[Modeling] Modeling an Agent Class- composition

Joaquin Peņa joaquinp@us.es
Thu, 26 Jun 1997 20:48:56 +0200


Sorry, but I'm not a good ascii artist. I have painted the diagram
again:
 
         play           interact           play
CLASS  -------> ROLE  ------------ ROLE  <------  CLASS
Person          employee           Manager        Department

Notice that roles can be also classes.

Joaquin.

> 
> Hi all:
> 
> I agree someway with you Hong.
> 
> I think, an employee can not be a class. It is a role that 
> object in the class person can perform.
> 
> Can be a solution to put such kind of relations between 
> roles? That it is to say, our idea is:
> 
> ********  play  -----------         interact    ----------  play
> *************
> CLASS  *------->* ROLE    * ------------------- * ROLE   
> *<------  CLASS
> Person *        * employee*                     * Manager*
> Department
> ********        -----------                     ----------
> *************
> 
> Thus, the implementation of Role is a set of method-calls of 
> the class person (note if you are a person who works for a 
> company and you lose your job, you still knows how to work, 
> thus, method for work must be maintain in class person). 
> Then, if you destroy the department, you can delete such roles.
> 
> Thus, we decouple behaviour from functionality. We need a 
> relation interact, and a relation play (can be also uses).
> 
> Does it makes sense?
> 
> 
> 
> > Hi, Gerd, and All,
> > 
> > It is so good that you agreed with me that there is a new
> > property of the part-whole relationship that we should look at.
> > 
> > > > Shared or not shared is about whether one entity can be 
> a part of
> > > > many others entities. Lifetime is about whether the 
> part will be 
> > > > killed when the whole is killed. Am I right?
> > >
> > > Yes, you are.
> > >
> > > > If yes, then, none of the above features tells that if a
> > part quit
> > > > from the whole or the whole is destroyed (it is possible
> > in dynamic
> > > > classification), what happens to its roles played in the whole.
> > >
> > > Yes, this question refers to additional properties of the
> > aggregation
> > > relationship.
> > 
> > Thank you. This property has not been recognised before. I
> > believe it is important for AUML because I found it is common 
> > in role modelling.
> > 
> > > An aggregation, and also a compositiom,
> > > can have lifetime dependency (= inseparability of parts) or
> > not. What
> > > is your problem? Would you like to be able to specify 
> this lifetime
> > > dependency in a model? Then you can use a Boolean- valued tag 
> > > "inseparable=true" for the part association end (as 
> proposed in the 
> > > paper mentioned below).
> > >
> > >
> > > -Gerd
> > >
> > 
> > The problem is that existing part-whole relations in UML is
> > inadequate. What I want is a more clear definition of 
> > part-whole relation in AUML and take the new property into 
> > consideration. Explicitly defining such properties can be a 
> > way to solve the promblem.
> > 
> > Hong
> > 
> > 
> > 
> > _______________________________________________
> > Modeling mailing list
> > Modeling@www.fipa.org http://fipa.org/mailman/listinfo/modeling
> > 
> 
> _______________________________________________
> Modeling mailing list
> Modeling@www.fipa.org
> http://fipa.org/mailman/listinfo/modeling
>