Defining Attributes
You will now add some properties to each class. To do this, you will use the class inspector.
-
Double-click on the Network class to open the class inspector and select the Properties tab.
-
Using the right mouse button, insert a new property named identifier.
-
Double click on it to open the Property Specification inspector.
-
Select String from the Type menu.
-
Because we want this property to be an Server entry, add the following tag in the Documentation editor of this property:
ilog.server.type="entry"
Property Specification Inspector
-
Click OK in the Property Specification inspector, then again in the class inspector.
-
Repeat steps Click on the Class button in the main toolbar and create four empty classes in a new diagram. to Click OK in the Property Specification inspector, then again in the class inspector. to define the following attributes in the other classes of the Network model:
-
Class Domain
-
name: String
-
-
Class Node
-
name: String
-
x: Integer
-
y: Integer
-
inputCapacity: Integer
-
outputCapacity: Integer
-
-
Class Line
-
name: String
-
capacity: Integer
Specify each property as Server entries, except inputCapacity and outputCapacity, which must be defined as derived attributes using the following tag:
ilog.server.type="derived".
-
You must now specify a computation method for each derived attribute. This task is described in Defining Computation Methods.
At the end of this task, you obtain the following model:
Network Object Model with Completed Classes
The next step consists in defining the relations between the classes fo your model.