"""Author: Changbeom Choi (@cbchoi)Copyright (c) 2014-2020 Handong Global UniversityCopyright (c) 2021-2024 Hanbat National UniversityLicense: MIT. The full license text is available at:https://github.com/eventsim/pyjevsim/blob/main/LICENSEThis module contains Structural Model"""frompyjevsim.structural_modelimportStructuralModelfrom.model_pegimportPEGfrom.model_msg_recvimportMsgRecv
[docs]classSTM(StructuralModel):def__init__(self,name):super().__init__(name)self.insert_input_port("start")self.insert_output_port("output")# Model Creationpeg=PEG("GEN")#PEG Model(Behavior Model type)proc=MsgRecv("Proc")# Register Model to StructuralModelself.register_entity(peg)self.register_entity(proc)# Set up relation among modelsself.coupling_relation(self,"start",peg,"start")self.coupling_relation(peg,"process",proc,"recv")