380 likes | 646 Views
Comet, a Case Study. Distributed Factory Automation System. Software Engineering 2000-2001 Petta Davide. Summary. Problem description Requirements modeling Use case model Analysis modeling Conceptual static model Object structuring Finite state machine modeling Dynamic model
E N D
Comet, a Case Study Distributed Factory Automation System Software Engineering 2000-2001 Petta Davide
Summary • Problem description • Requirements modeling • Use case model • Analysis modeling • Conceptual static model • Object structuring • Finite state machine modeling • Dynamic model • Design modeling • Subsystem structuring • Distributed software architecture • System configuration
Problem Description • Workstations on an assembly line • Programmable WSs: different parts can be processed • Part moving on a conveyor belt Processed in sequence • Two kinds of workstations: • Receiving (the first one), shipping (the last one) • Pick & place robot • Assembly • Pick & place robot, assembly robot • One operation per workstation • Factory operators, one per workstation • Views workstation status and alarms • Process engineer • Creates process plan to define mfg (manufacturing) steps for a part • Production manager • Creates work orders to process new parts (work order: # of parts of a type) • Robots have sensors and actuators
Problem Description • Workstations on an assembly line • Programmable WSs: different parts can be processed • Partmoving on a conveyor belt Processed in sequence • Two kinds of workstations: • Receiving (the first one), shipping (the last one) • Pick & place robot • Assembly • Pick & place robot, assembly robot • One operation per workstation • Factory operators, one per workstation • Views workstationstatus and alarms • Process engineer • Creates process plan to define mfg(manufacturing) steps for a part • Production manager • Creates work orders to process new parts (work order: # of parts of a type) • Robots have sensors and actuators Noun Identification Technique
Use Case Model Grouped by actors: • Factory operator • View alarms • View workstation status • Generate workstation status and notify (with factory robot) • Generate alarm and notify (with factory robot) • Process engineer • Create/update process plan • Create/update operation • Production mgr • Create/modify work order • Manufacture part (with pick&place, assembly robot) • Receive part • Process part at workstation • Ship part Use just-in-time algorithm: ws receive part only when ready to process
Use Case Model <<use case package>> FactoryOperatorUseCasePackage <<use case package>> ProcessEngineerUseCasePackage View alarms Create/Update Operation View ws status Process Engineer Generate ws Status And Notify <<extend>> Factory Operator Create/Update Process Plan Generate Alarm And Notify FactoryRobot
Use Case Model <<use case package>> ProductionManagerUseCasePackage Receive Part Process Part At Workstation Ship Part <<include>> <<include>> <<include>> Pick & Place Robot Manufacture Part Production Manager Assembly Robot Create/Modify Work Order
Conceptual Static Model Is very important for this case: it’s an information-intensive application • Factory consists of WSs • Aggregate Factory class, composed of WS classes • Three types of WSs: Receiving, Line, Shipping • Generalization/specialization hierarchy • Line WSs have Pick&Place and Assembly robots • Receiving, shipping have only Pick&Place robots • WS generates one Status and multiple Alarms • Both viewed from Factory Operator • Process plan defines with operations all parts of a given type • Operation defines a single step carried out at a WS • Work order: number of parts to be manufactured of a given type
ConceptualStaticModel <<user>> Process Engineer 1 <<aggregate>> Factory 1 Creates * Creates <<entity>> Process Plan 1 Contains 1 Defines 1..* 1..* * 1 Processes <<composite>> Factory Workstation <<entity>> Operation 1..* Generates 1 Generates 1 * 1 <<entity>> Part 1..* <<entity>> Workstation Status <<entity>> Alarm 1..* * 1 Defines # of * <<entity>> Work Order Views Views * 1 0..1 * <<external system>> Pick&Place Robot <<external system>> Assembly Robot <<user>> Factory Operator <<composite>> Receiving Workstation <<composite>> Line Workstation <<composite>> Shipping Workstation * Creates 1 <<user>> Production Manager Composite classes
Classes and Their Attributes <<user>> ProductionManager <<entity>> ProcessPlan <<user>> FactoryOperator <<user>> ProcessEngineer partType : String rawMaterialType:String numberOfSteps : Integer userID : String password : String shift : Integer factoryArea : String userID : String password : String engineerPrivileges:String userID : String password : String shift : Integer <<entity>> Alarm <<entity>> Part <<entity>> WorkOrder <<entity>> Operation partType: String partID : String status : PartStatusType location : String priority : Integer nextOperation#:Integer startDate : Date finishDate : Date workOrderID : String customerName : String partType: String quantity : Integer priority : Integer startDate : Date shipmentDate : Date status : WoStatusType alarmNumber : Integer alarmType : String alarmMessage : String operation# : Integer operationName: String workstationType:WsType programName : String cycleTime : Integer <<entity>> WorkstationStatus <<external system>> Pick&PlaceRobot <<external system>> AssemblyRobot workstationID : String factoryArea : String location : String state : WorkstationState robotID : Integer state : RobotState maxWeight : Integer robotID : Integer state : RobotState
System Context Model One external class per actor: <<external user>> ProcessEngineer <<external user>> FactoryOperator 1..* 1..* Interacts with Interacts with 1 1 <<system>> Factory Automation System 1 1 Interacts with Interfaces to 1 1..* Interfaces to <<external user>> Production Manager 1 <<external system>> Pick&PlaceRobot 1..* <<external system>> AssemblyRobot
Object Structuring Idea: we determine the objects that participate in each use case dividing the system into objects: • Entity objects for data storing objects: Process Plan, Operation, Work Order, Part, Workstation Status, Alarm • They are all server corresponding serverobjects on collaboration diagrams • For each Human actor: user interface object • Factory Operator Interface, Production Manager Interface, Process Engineer Interface • Adding controllers objects • Receiving/Line/Shipping Workstation controller to control manufacturing workstation • Each robot has a controller and its mfg operations are downloaded from the Factory AutomationSystem
Finite State Machine Modeling • There is a state-dependent object: the WS controller • More in detail, each Workstation • Requests a part only if ready • Completes a part • Waits for message from successor workstation • When received, says pick&place robot to place part on the conveyor belt • Send part coming message to successor • Send part request message to predecessor • Receiving ws controller counts remaining number of parts • Shipping ws controller • Removes part from conveyor belt • Send part complete message to production manager interface • For this state-dependent object: statecharts
Line W.S. Controller Statechart Line Workstation Controller Superstate Part Processing Part Processing Superstate B1: Workstation Startup Part Requesting Part Requesting Superstate B1: Workstation Startup Part Processing Superstate Part not Requested B15: Part Coming C2: Part Request Part has been Requested
Line W.S. Controller Statechart B3:Part Coming/ B4: Next Operation Request B10:Part Ready/ B11: Start Assembly B1:WS startup / B2: Part Request B8:Part Arrived/ B9: Robot Pick Assembling Part Part Arriving Robot Picking Awaiting Part From Predecessor WS B12: Operation End [Part Has Been Requested] / B13: Robot Place B14:Part Placed/ B15: Part Coming B15a: Part Request B12: Operation End [Part Not Requested] C2: Part Request / B13: Robot Place Robot Placing Awaiting Part Request from Successor WS Part Processing Superstate
Dynamic Model Idea: we refine use cases using collaboration diagrams • Factory operator has client/server use cases • Client: OperatorInterface • Server: AlarmHandlingServer, WSStatusServer • Process Engineer has client/server use cases • Client: ProcessEngineerInterface • Server: ProcessPlanServer, OperationServer • Production Manager has: • client/server use case: Create/Modify Work Order • Client: ProductionManagerInterface • Server: ProcessPlanServer, WorkOrderServer • distributed control use case: Manufacture Part
Collab. Diagrams: View Alarms, View WS Status S1: Operator Request <<actor>> <<user interface>> : OperatorInterface S1.3: Display Info : FactoryOperator S1.1: Alarm Request S1.2: Alarm Data <<entity>> : AlarmHandlingServer V1: Operator Request <<actor>> <<user interface>> : OperatorInterface V1.3: Display Info : FactoryOperator V1.2: Workstation Data V1.1: WS Status Request <<entity>> : WorkstationStatusServer Use Cases
Collab. Diagrams: Generate Alarm and Notify <<external system>> : Robot M1: Workstation Input <<state dependent control>> : WorkstationController M2: Alarm <<entity>> : AlarmHandlingServer M3: Alarm Multicast M4: Display Info <<actor>> <<user interface>> : OperatorInterface Use Cases : FactoryOperator
Collab. Diagrams: Generate WS Status and Notify <<external system>> : Robot N1: Workstation Input <<state dependent control>> : WorkstationController N2: Workstation Data <<entity>> : WorkstationStatusServer N3: Workstation Status Multicast N4: Display Info <<actor>> <<user interface>> : OperatorInterface Use Cases : FactoryOperator
Collab. Diagrams: Create/Update Operation, Create/Update Process Plan O1: Operation Input, P2: Process Plan Input <<actor>> <<user interface>> : ProcessEngineerInterface O1.3: Operation Info, P2.5: Process Plan Info : ProcessEngineer O1.2: Operation Info P2.4: Process Plan Info P2.1: Create Process Plan O1.1: Create Operation P2.2: Operation Request <<entity>> : ProcessPlanServer <<entity>> : OperationServer P2.3: Operation Info Use Cases
Collab. Diagrams: Create/Modify Work Order <<actor>> R1, R2: Production Input <<user interface>> : ProcessEngineerInterface : ProductionManager R1.3, R2.5: Production Info R2.4: Work Order Info R1.2: Process Plan Info R1.1: Process Plan Request R2.1: Create <<entity>> : ProcessPlanServer <<entity>> : WorkOrderServer R2.3: Part Info R2.2: Create <<entity>> : PartServer Use Cases
Collaboration Diagrms: Receive Part A1: Production Input <<actor>> <<user interface>> : ProductionManager Interface Note: it isn’t an UML notation : ProductionManager A2: Start Part A5 = B3: Part Coming <<state dependent ctrl>> : ReceivingWS Controller <<state dependent ctrl>> firstLineWS Controller B2: Part Request A3: Pick & Place Robot Command A4: Pick & Place Robot Status <<external system>> : Pick&PlaceRobot Use Cases
Collaboration Diagrams: Process Part at WS C2, C15a: Part Request B2, B15a: Part Request <<state dependent ctrl>> predecessorLine WorkStationController <<state dependent ctrl>> aLineWorkStation Controller <<state dependent ctrl>> successorLine WorkStationController A15=B3: Part Coming B15=C3: Part Coming B4: Next Operation Request B7: Operation Info B8: Part Arrived, B10: Part Ready, B14: Part Placed <<entity>> : ProcessPlanServer B11: Start Assembly B12: Operation End B9: Robot Pick, B13: Robot Place B5: Operation Request B6: Operation Info <<external system>> : Pick&PlaceRobot <<external system>> : AssemblyRobot <<entity>> : OperationServer
Collaboration Diagrams: Ship Part C2: Part Request C7: Part Complete <<state dependent ctrl>> lastLineWorkStation Controller <<state dependent ctrl>> : ShippingWorkStation Controller <<user interface>> : ProductionManager Interface B15=C3: Part Coming C4: Part Arrived C8: Production Info C5: Pick & Place Robot Command C6: Pick & Place Robot Status <<actor>> <<external system>> : Pick&PlaceRobot : ProductionManager Use Cases
Subsystem Structuring Idea: we structure the system in subsystems and then develop the subsystem collaboration diagrams Two things to considerate: Geographical distribution (e.g. client/server) Use-case-based collaboration diagrams • From View alarms: alarm handler server, operator interface • From View ws status: ws status server • From Create/update operation/process plan: process engineer interface, operation server and process plan server • Two servers used together process planning server • Process planning server + process engineer interface process planning subsystem • From Create/modify work order: production manager interface, part server, work order server • Two servers production management server • From Manufacture part: Receiving/Line/Shipping Workstation controller, ws status server • All in a part processing subsystem
Factory Automation System <<system>> : FactoryAutomationSystem <<actor>> Process Plan Input <<aggregate subsystem>> : ProcessPlanning <<server subsystem>> : AlarmHandling Server : Process Engineer Process Plan Info Process Plan Info Alarm Data Operation Info Alarm Request Process Plan Request Next Operation Request Alarm Operator Request Production Input WS Request <<actor>> <<actor>> <<user interface>> : Operator Interface Start Part <<aggregate subsystem>> : Production Management <<aggregate subsystem>> : PartProcessing WS Data Part Complete Display Info Production Info : Operator : Production Manager Assembly Robot Command Pick & Place Robot Status Assembly Robot Status Pick & Place Robot Command <<external system>> : AssemblyRobot <<external system>> : Pick&PlaceRobot Tasks
Process Planning Subsystem <<aggregate subsystem>> : ProcessPlanning <<actor>> Process Plan Input <<user interface>> : ProcessEngineer Interface : Process Engineer Process Plan Info Create Process Plan Create Operation Operation Info Process Plan Info <<server subsystem>> : ProcessPlanningServer Operation Request <<entity>> : Operation Server <<entity>> : ProcessPlan Server Operation Info Process Plan Request Process Plan Info Operation Info Next Operation Request <<aggregate subsystem>> : Production Management <<aggregate subsystem>> : PartProcessing Tasks
Production Management Subsystem <<aggregate subsystem>> : ProductionManagement Production Input <<actor>> Start Part <<user interface>> : Production Manager Interface <<aggregate subsystem>> : PartProcessing Part Complete Production Info : Production Manager Work Order Info Create Process Plan Request <<server subsystem>> : ProductionManagementServer Process Plan Info <<entity>> : WorkOrder Server <<server subsystem>> : ProcessPlanning Server Part Info Create <<entity>> : PartServer Tasks
Part Processing Subsystem <<server subsystem>> : AlarmHandling Server <<aggregate subsystem>> : Process Planning Alarm Alarm Next Operation Request Operation Info Alarm Tasks <<aggregate subsystem>> : PartProcessing Part Complete Part Coming Part Coming Start Part <<aggregate subsystem>> : Production Management <<ctrl subsystem>> : Receiving Workstation Controller <<ctrl subsystem>> : Line Workstation Controller <<ctrl subsystem>> : Shipping Workstation Controller Part Request Part Request WS Status Pick & Place Robot Command <<server subsystem>> : Workstation StatusServer Pick & Place Robot Status Pick & Place Robot Command Assembly Robot Command Pick & Place Robot Command WS Data Pick & Place Robot Status WS Request Assembly Robot Status Pick & Place Robot Status <<external system>> : Pick&Place Robot <<external system>> : Pick&Place Robot <<user interface>> : Operator Interface <<external system>> : Assembly Robot <<external system>> : Pick&Place Robot
1 Is Client of <<user interface>> Process Engineer Interface <<server subsystem>> Process Planning Server Static Model of Composite Classes 1..* 1 1 Is Client of Is Client of Sends Part to 1 1..* 1 1 1 <<user interface>> Production Manager Interface <<control subsystem>> Receiving WS Controller <<control subsystem>> Line WS Controller <<control subsystem>> Shipping WS Controller Starts Part at 1 Sends Part to Sends Part to 1 1 1 1 1 1 1 1 1 1 Sends WS status to 1 <<server subsystem>> Workstation Status Server Is Client of Sends Message to 1..* Is Client of 1 1 <<server subsystem>> Production Management Server <<user interface>> Operator Interface Sends Alarm to 1..* Is Client of 1 1 <<server subsystem>> AlarmHandling Server 1 Sends Alarm to 1 Conceptual model Sends Alarm to
Distributed Software Architecture Idea: each component of a distributed architecture executes on its own physical node and communicates with other components with messages. Steps: 1. Splitting system in separate nodes; can operate separately • Each ws controller: each one can operate if others are unavailable (sensors and actuators associated to them) • Process planning server, production management s., alarm handling s.: if separated can respond quickly to requests • Ws status server; two possibilities: • One server for the whole system • One per ws • The second one is better for two reasons: • High message traffic between this server and corresponding line ws controller • Each ws node can supply both controller and server • Interfaces subsystems: production manager (1), process engineer (1 each), operator(1 each)
Distributed Software Architecture 2. Design precise message communication • Synchronous msg for client/server communication • Loosely coupled msg for alarms, … • For greatest flexibility, loosely coupled msg for communication between various ws controller components, production manager interface, robots and alarm handling server 3. Multiple-client/multiple-server communication • Operator interface – ws status server: • Status displayed not only when requested, but on change • Can receive data from differents workstations concurrently
Factory Automation System: Subsystem Interfaces <<system>> : FactoryAutomationSystem <<actor>> Process Plan Input <<aggregate subsystem>> : ProcessPlanning <<server subsystem>> : AlarmHandling Server : Process Engineer Process Plan Info next Operation Request (in request, out operation Info) alarm Request (in request, out alarmData) processPlan Request (in request, out processPlan Info) alarmNotification (alarmData) alarm (alarmData) WS_Request (in request, out wsData) Operator Request Production Input <<actor>> <<actor>> startPart (partInfo) <<user interface>> : Operator Interface <<aggregate subsystem>> : Production Management <<aggregate subsystem>> : PartProcessing part Complete (partInfo) WS Notification (wsData) Display Info Production Info : Operator : Production Manager assembly RobotCommand pick&place Robot Status assembly RobotStatus pick&place Robot Command <<external system>> : AssemblyRobot <<external system>> : Pick&PlaceRobot Back
Process Planning Subsystem: Subs. Interfaces <<aggregate subsystem>> : ProcessPlanning Process Plan Input <<actor>> <<user interface>> : ProcessEngineer Interface : Process Engineer Process Plan Info createProcess PlanRequest (in request, out processPlanInfo) createOperation Request (in request, out operationInfo) <<server subsystem>> : ProcessPlanningServer operationRequest (in request, out operationInfo) <<entity>> : Operation Server <<entity>> : ProcessPlan Server processPlanRequest (in request, out processPlanInfo) nextOperation Request (in request, out operationInfo) <<aggregate subsystem>> : Production Management <<aggregate subsystem>> : PartProcessing Back
Production Management Subsystem: S. Interfaces <<aggregate subsystem>> : ProductionManagement Production Input startPart (partInfo) <<actor>> <<user interface>> : Production Manager Interface <<aggregate subsystem>> : PartProcessing partComplete (partInfo) Production Info : Production Manager workOrderRequest (in request, out workOrderInfo) processPlanRequest (in request, out processPlanInfo) <<server subsystem>> : ProductionManagementServer <<entity>> : WorkOrder Server <<server subsystem>> : ProcessPlanning Server partInfoRequest (in request, out partInfo) <<entity>> : PartServer Back
Part Processing Subsystem:Subsystem Interfaces <<server subsystem>> : AlarmHandling Server <<aggregate subsystem>> : Process Planning alarm (alarmData) alarm (alarmData) nextOperation Request (in request, out operationInfo) alarm (alarmData) Back <<aggregate subsystem>> : PartProcessing part Coming (partInfo) part Coming (partInfo) part Complete (partInfo) startPart (partInfo) <<aggregate subsystem>> : Production Management <<ctrl subsystem>> : Receiving Workstation Controller <<ctrl subsystem>> : Line Workstation Controller <<ctrl subsystem>> : Shipping Workstation Controller part Request (partInfo) part Request (partInfo) ws Status (status) pick&Place Robot Command <<server subsystem>> : Workstation StatusServer pick&Place RobotStatus pick&Place Robot Command ws Notification (wsData) pick&Place Robot Command assembly Robot Status wsRequest (in request, out wsData) assembly Robot Command pick&Place Robot Status pick&Place RobotStatus <<external system>> : Pick&Place Robot <<external system>> : Pick&Place Robot <<user interface>> : Operator Interface <<external system>> : Assembly Robot <<external system>> : Pick&Place Robot
System Configuration • To configure individual target systems we may • Define different workastations • Define parameters such as wsID, alarm name, … for parameterized components • Connect component instance and allocate them to phisical nodes • There are different target configurations • Highly distributed: see next slide • Localized autonomy • Adequate performance • Failure of a node not impacting on another immediately • Grouping process planning server, production management s., alarm handling server • As above + Process engineer interface + production manager interface in a single node • Multiuser interactive node
System Configuration : ProcessEngineer Interface {1 per Engineer} : Prodution ManagerInterface {1 node} <<Internet>> : ProcessPlanning Server {1 node} : ProductionMa- nagementServer {1 node} : Operator Interface {1 per operator} : AlarmHandling Server {1 node} <<factory LAN>> : Receiving WS Controller {1 node} : Line WS Node {1 node} : Shipping WS Controller {1 node}