Defining Attributes

You will now add some properties to each class. To do this, you will use the class inspector.

  1. Double-click on the Network class to open the class inspector and select the Properties tab.

  2. Using the right mouse button, insert a new property named identifier.

  3. Double click on it to open the Property Specification inspector.

  4. Select String from the Type menu.

  5. 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

  6. Click OK in the Property Specification inspector, then again in the class inspector.

  7. 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:

  8. Class Domain

    • name: String

  9. Class Node

    • name: String

    • x: Integer

    • y: Integer

    • inputCapacity: Integer

    • outputCapacity: Integer

  10. 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.