[Modeling] Modeling an Agent Class- change of classes

Wagner, G.R. G.R.Wagner@tm.tue.nl
Thu, 26 Jun 2003 14:41:14 +0200

> In dynamic classification, an entity can change its class at 
> run-time. Say, an object of class A becomes an object of class B. 
> That is what I meant by 'change classes'.

OK, I think I see your point. The basic situation is 

   Person [playingTheRoleOf Employee] isPartOf Company 

in a model with two classes (Person and Company) and
an aggregation between them with a role name Employee.

Then, if you destroy a particular company, say Enron, all 
aggregation links involving Enron will be deleted. But the 
involved persons continue to exist. So in this basic
external model (not adopting the view of any particular
company), there is no Employee class, but only a role
name Employee.

You can reify/"objectify" this aggregation into an association
class isEmployedBy/Employment with suitable attributes. So, we 
would get

   Person [playingTheRoleOf Employee] isEmployedBy Company 

But you cannot use an Employee subclass of Person in such
an external (company-independent) model. 

Maybe that's what you wanted to suggest: 

   Person isSuperClassOf Employee isPartOf Company 

But that's not a correct model, because you would need 
several Employee instances for the same person (one for 
each employment of that person), which is not consistent
with the isSubclassOf relationship.

You could use an Employee subclass of Person (associated 
with Company by means of an aggregation) in an internal model 
adopting the perspective of a particular company, such as Enron 
(this class denotes, in fact, "EnronEmployee"). But then 
you would no longe have other (non-Enron) employees in
your model.