HiLeS_To_TimePetriNet/ArcToArc [ Rules ]
[ Top ] [ HiLeS_To_TimePetriNet ] [ Rules ]
SUMMARY
Transform a HiLeS Arc to a TPN Arc ($Rev: 447 $)
DESCRIPTION
Create a TPN Arc equivalent to the HiLeS Arc. The transformation takes into account the hierarchy of the HiLeS Control Net. Thus, arcs conencted to Functional blocks ports are ignored beacuse Functional blocks are not transformed into Petr Net elements. For the case of Arcs conencted to/from Structural blocks' ports or to/from Services, the hierarchy of the Control Net must be removed. Thus, the next place or transition in the hierarchy is searched to connect the TPN Arc.
SEE ALSO
*
DOMAIN
- hiles - https://hiles.uniandes.edu.co/1.0/HiLeS
- tpn - https://hiles.uniandes.edu.co/1.0/TimePetriNet
SPECIFICATION
relation ArcToArc { checkonly domain hiles ha:Arc { from_point = hafp, to_point = hatp, from_node = hafn, to_node = hatn, } enforce domain tpn a:Arc { weight = aw, source = as, target = at, } when { hafp->notEmpty() and not hafp.owner->isTypeOf(Functional); hatp->notEmpty() and not hatp.owner->isTypeOf(Functional); } where { aw = 1; if hafn->notEmpty() and hafn->isTypeOf(Transition) then TransitionToTransition(hafn, as) endif if hafn->notEmpty() and hafn->isTypeOf(Place) then PlaceToPlace(hafn, as) endif if hatn->notEmpty() and hatn->isTypeOf(Transition) then TransitionToTransition(hatn, at) endif if hatn->notEmpty() and hatn->isTypeOf(Place) then PlaceToPlace(hatn, at) endif if hafp->notEmpty() and hafp->isTypeOf(Service) then if hafp.owner.owner.paretArchitecture.petriNet.elements-> select(a : Arc | a.to_point = hafp.owner.owner.ports->select(p | p.name = hafp.name)) .from_node->isTypeOf(Transition) then TransitionToTransition(hafp, select(a : Arc | a.to_point = hafp.owner.owner.ports->select(p | p.name = hafp.name)).from_node ) ... endif } *