The following metamodels have been used for our small case study:
The following constraints are set for this model (in Pseudo-OCL)
1 2 3 4 5 |
--Cables have the correct type context GlassFiberCable: self.speed >= 4 context CopperCable: self.speed <= 4 |
1 2 3 |
--Routers can serve output context Router: self.maxSpeed >= self.outgoing.speed->sum() |
1 2 3 |
--Input can serve output context Router: self.incoming.speed->sum() >= self.outgoing.speed->sum() |
1 2 3 |
--Corresponding cables have the same speed context Connection: self.rightcon.speed = self.speed |
1 2 3 |
--Corresponding Devices have the same name context Device: self.rightdev.name = self.name |
1 2 3 4 5 6 |
--Computers with fixed attribute set have exactly those connections context Device: fixed implies (outgoing.rightcon = rightdev.outgoing and incoming.rightcon = incoming.outgoing) -- Implemented in ASP-Expressions as: -- Device.allInstances()->select(fixed)->forAll(outgoing.rightcon = rightdev.outgoing) -- Device.allInstances()->select(fixed)->forAll(incoming.rightcon = rightdev.incoming) |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
--Servers have only 1 outgoing connection, computer only 1 incoming, routers both context Server: self.incoming->isEmpty() context Computer: self.outgoing->isEmpty() context Server: self.outgoing->size() = 1 --Implemented in ASP-Expressions as self.outgoing->forAllAndExists(x,y | x = y) context Computer: self.incoming->size() = 1 --Implemented in ASP-Expressions as self.incoming->forAllAndExists(x,y | x = y) context Router: not self.outgoing->isEmpty() context Router: not self.incoming->isEmpty() |
1 2 3 4 5 |
--Computers and servers must be mapped back context Server: not self.leftdev->isEmpty() context Computer: not self.leftdev->isEmpty() |
The following costs models have been used:
Configuration: There was only a single operation availabe: To create the left server
Transformation and Reconfiguration: Twere no costs associated with building correspondance links and copying computers, but there were costs for creating additional servers, routers and cables. Additionally, operations were defined to set certain attributes without costs. Disconnection was not possible in the transformation scenario.
Errandum: Unfortunately, the last graphics in the paper was wrong. This is the correct graphic displaying the new router needed:
Example files:
These are the example files which should be solveable by clingo 4.4 (note that the linux version seems to perform better than the windows version):
Configuration (requires clingo 4.3, 4.4 gives wrong solutions): Download ASP file
Transformation (requires clingo 4.3, 4.4 gives wrong solutions): Download ASP file
Reconfiguration: Download ASP file
Synchronization: Download ASP file