Comet, a Case Study
Distributed Factory Automation System
Software Engineering 2000-2001Petta Davide
Summary Problem description Requirements modeling
Use case model Analysis modeling
Conceptual static modelObject structuringFinite state machine modelingDynamic model
Design modelingSubsystem structuringDistributed software architectureSystem configuration
Problem DescriptionWorkstations on an assembly lineProgrammable 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
AssemblyPick & place robot, assembly robot
One operation per workstationFactory operators, one per workstation
Views workstation status and alarmsProcess 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 DescriptionWorkstations on an assembly lineProgrammable 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
AssemblyPick & place robot, assembly robot
One operation per workstationFactory operators, one per workstation
Views workstation status and alarmsProcess engineer
Creates process plan to define mfg (manufacturing) steps for a part
Production managerCreates work orders to process new parts (work order: # of parts of a type)
Robots have sensors and actuators
Noun Identification
Technique
Use Case ModelGrouped by actors:
Factory operatorView alarmsView workstation statusGenerate workstation status and notify (with factory robot)Generate alarm and notify (with factory robot)
Process engineerCreate/update process planCreate/update operation
Production mgrCreate/modify work orderManufacture part (with pick&place, assembly robot)
Receive partProcess part at workstationShip part
Use just-in-time algorithm: ws receive part only when ready to process
Use Case Model
View alarms
Generate ws StatusAnd Notify
View ws status
Generate AlarmAnd Notify
<<use case package>>FactoryOperatorUseCasePackage
FactoryOperator
FactoryRobot
Create/UpdateOperation
Create/UpdateProcess Plan
<<use case package>>ProcessEngineerUseCasePackage
ProcessEngineer
<<extend>>
Use Case Model
ManufacturePart
Create/ModifyWork Order
<<use case package>>ProductionManagerUseCasePackage
<<include>>
ShipPart
Process PartAt Workstation
ReceivePart
<<include>><<include>>
ProductionManager Assembly
Robot
Pick & PlaceRobot
Conceptual Static ModelIs very important for this case: it’s an information-intensive application Factory consists of WSs
Aggregate Factory class, composed of WS classesThree types of WSs: Receiving, Line, Shipping
Generalization/specialization hierarchyLine WSs have Pick&Place and Assembly robotsReceiving, shipping have only Pick&Place robots
WS generates one Status and multiple AlarmsBoth viewed from Factory Operator
Process plan defines with operations all parts of a given type
Operation defines a single step carried out at a WSWork order: number of parts to be manufactured of a given type
<<user>>Process
Engineer
<<entity>>Process
Plan
<<entity>>Operation
<<entity>>Part
<<entity>>Work Order
<<user>>Production Manager
<<aggregate>>Factory
<<composite>>Factory
Workstation
<<composite>>Shipping
Workstation
<<entity>>Alarm
<<user>>Factory Operator
<<entity>>Workstation
Status
<<composite>>Line
Workstation
<<composite>>
ReceivingWorkstation
<<externalsystem>>
AssemblyRobot
<<externalsystem>>
Pick&PlaceRobot
1 0..1
1..*
Views
*
*Views
*
*
11
1Processes
GeneratesGenerates
* 1
1..*
Creates*
1
Defines # of1..*1
1
*
Creates
11..*
Contains
Creates
1
*Defines
1
1..*
Conceptual
StaticModel
Composite classes
<<user>>ProductionManager
<<external system>>AssemblyRobot
workOrderID : StringcustomerName : String
partType: Stringquantity : Integerpriority : IntegerstartDate : Date
shipmentDate : Datestatus : WoStatusType
partType: StringpartID : String
status : PartStatusTypelocation : Stringpriority : Integer
nextOperation#:IntegerstartDate : Date
finishDate : Date
<<user>>ProcessEngineer
Classes and Their Attributes
<<entity>>ProcessPlanpartType : String
rawMaterialType:StringnumberOfSteps : Integer
<<entity>>Alarm
<<user>>FactoryOperator
<<entity>>Part
<<entity>>WorkstationStatus
<<entity>>WorkOrder
<<entity>>Operation
<<external system>>Pick&PlaceRobot
userID : Stringpassword : String
shift : IntegerfactoryArea : String
userID : Stringpassword : String
shift : Integer
userID : Stringpassword : String
engineerPrivileges:String
alarmNumber : IntegeralarmType : String
alarmMessage : String
workstationID : StringfactoryArea : String
location : Stringstate : WorkstationState
robotID : Integerstate : RobotState
robotID : Integerstate : RobotState
maxWeight : Integer
operation# : IntegeroperationName: String
workstationType:WsTypeprogramName : String
cycleTime : Integer
<<external user>>ProductionManager
System Context Model
<<system>>Factory
AutomationSystem
1..* <<external user>>FactoryOperator
<<external system>>Pick&PlaceRobot
<<external system>>AssemblyRobot
<<external user>>ProcessEngineer
1..*
1..*
1..*
1
1
1
1
1
1
Interactswith
Interactswith
Interfacesto
Interfacesto
Interactswith
One external class per actor:
Object StructuringIdea: 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, AlarmThey are all server corresponding server objects on collaboration diagrams
For each Human actor: user interface objectFactory Operator Interface, Production Manager Interface, Process Engineer Interface
Adding controllers objectsReceiving/Line/Shipping Workstation controllerto control manufacturing workstationEach robot has a controller and its mfg operations are downloaded from the Factory Automation System
Finite State Machine ModelingThere is a state-dependent object: the WS controllerMore in detail, each Workstation
Requests a part only if readyCompletes a partWaits for message from successor workstationWhen received, says pick&place robot to place part on the conveyor beltSend part coming message to successorSend part request message to predecessor
Receiving ws controller counts remaining number of partsShipping ws controller
Removes part from conveyor beltSend part complete message to production manager interface
For this state-dependent object: statecharts
Line W.S. Controller Statechart
Line Workstation Controller Superstate
B1: WorkstationStartup
Part ProcessingSuperstate
Part RequestingSuperstate
Part Requesting
Part Processing
Part ProcessingSuperstate Part not
Requested
Part has beenRequested
B1: WorkstationStartup
B15: Part Coming C2: Part Request
Line W.S. Controller Statechart
Awaiting PartFrom
Predecessor WS
RobotPicking
AssemblingPart
Awaiting Part Request fromSuccessor WS
PartArriving
RobotPlacing
B1:WS startup /B2: Part Request
B3:Part Coming/B4: Next Operation
Request
Part Processing Superstate
B8:Part Arrived/B9: Robot
Pick
B10:Part Ready/B11: Start Assembly
B14:Part Placed/B15: Part ComingB15a: Part Request
B12: Operation End[Part Has Been Requested] /
B13: Robot Place
B12: Operation End[Part Not Requested]
C2: Part Request /B13: Robot Place
Dynamic ModelIdea: we refine use cases using collaboration
diagramsFactory operator has client/server use cases
Client: OperatorInterfaceServer: AlarmHandlingServer, WSStatusServer
Process Engineer has client/server use casesClient: ProcessEngineerInterfaceServer: ProcessPlanServer, OperationServer
Production Manager has:client/server use case: Create/Modify Work Order
Client: ProductionManagerInterfaceServer: ProcessPlanServer, WorkOrderServer
distributed control use case: Manufacture Part
S1.1: AlarmRequest
Collab. Diagrams: View Alarms, View WS Status
<<user interface>>: OperatorInterface
<<entity>>: AlarmHandlingServer
<<actor>>
: FactoryOperator
S1: OperatorRequest
<<user interface>>: OperatorInterface
<<entity>>: WorkstationStatusServer
<<actor>>
: FactoryOperator
S1.3: DisplayInfo S1.2: Alarm
Data
V1: OperatorRequest
V1.3: DisplayInfo V1.1: WS
Status RequestV1.2: Workstation
Data
Use Cases
Collab. Diagrams: Generate Alarm and Notify
M1: WorkstationInput
<<external system>>: Robot
<<state dependent control>>: WorkstationController
<<actor>>
: FactoryOperator
M4: DisplayInfo
<<entity>>: AlarmHandlingServer
<<user interface>>: OperatorInterface
M2: Alarm
M3: AlarmMulticast
Use Cases
Collab. Diagrams: Generate WS Status and Notify
N1: WorkstationInput
<<external system>>: Robot
<<state dependent control>>
: WorkstationController
<<actor>>
: FactoryOperator
N4: DisplayInfo
<<entity>>: WorkstationStatusServer
<<user interface>>: OperatorInterface
N2: WorkstationData
N3: WorkstationStatus Multicast
Use Cases
Collab. Diagrams: Create/Update Operation,
Create/Update Process Plan
<<user interface>>: ProcessEngineerInterface
<<entity>>: ProcessPlanServer
<<actor>>
: ProcessEngineer
O1: Operation Input,P2: Process Plan Input
<<entity>>: OperationServer
P2.2: OperationRequest
P2.3: OperationInfo
O1.3: Operation Info,P2.5: Process Plan Info
P2.1: CreateProcess Plan
P2.4: ProcessPlan Info
O1.1: CreateOperation
O1.2: OperationInfo
Use Cases
Collab. Diagrams: Create/Modify Work Order
<<user interface>>: ProcessEngineerInterface
<<entity>>: ProcessPlanServer
<<actor>>
: ProductionManager
R1, R2: Production Input
<<entity>>: WorkOrderServer
R2.2: Create R2.3: PartInfo
R1.3, R2.5: Production Info
R1.1: Process Plan Request
R1.2: ProcessPlan Info
R2.1: Create
R2.4: WorkOrder Info
<<entity>>: PartServer
Use Cases
Collaboration Diagrms: Receive Part
<<user interface>>: ProductionManager
Interface
<<external system>>: Pick&PlaceRobot
<<state dependent ctrl>>firstLineWSController
<<state dependent ctrl>>: ReceivingWS
Controller
<<actor>>
: ProductionManager
A1: ProductionInput
A5 = B3: PartComing
A3: Pick & PlaceRobot Command
A4: Pick & PlaceRobot Status
A2: Start Part
B2: Part Request
Use Cases
Note: it isn’t an UML notation
Collaboration Diagrams: Process Part at WS
<<external system>>: AssemblyRobot
<<state dependent ctrl>>successorLine
WorkStationController
<<state dependent ctrl>>aLineWorkStation
Controller
C2, C15a: PartRequest
B11: StartAssembly
B2, B15a: Part Request
<<external system>>: Pick&PlaceRobot
<<entity>>: OperationServer
<<state dependent ctrl>>predecessorLine
WorkStationController
<<entity>>: ProcessPlanServer
A15=B3: Part Coming
B15=C3: Part Coming
B5: OperationRequest
B6: OperationInfo
B12: OperationEnd
B4: Next OperationRequest
B7: OperationInfo
B9: Robot Pick, B13: Robot Place
B8: Part Arrived,B10: Part Ready, B14: Part Placed
Collaboration Diagrams: Ship Part
<<user interface>>: ProductionManager
Interface
<<state dependent ctrl>>: ShippingWorkStation
Controller
C2: Part Request<<state dependent ctrl>>
lastLineWorkStationController B15=C3: Part
Coming
<<external system>>: Pick&PlaceRobot
<<actor>>
: ProductionManager
C7: Part Complete
C5: Pick & PlaceRobot Command
C4: Part Arrived
C6: Pick & PlaceRobot Status
C8: Production Info
Use Cases
Subsystem StructuringIdea: we structure the system in subsystems and then develop the
subsystem collaboration diagramsTwo things to considerate:
Geographical distribution (e.g. client/server)Use-case-based collaboration diagrams
From View alarms: alarm handler server, operator interfaceFrom View ws status: ws status serverFrom Create/update operation/process plan: process engineer interface, operation server and process plan server
Two servers used together process planning serverProcess 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 serverFrom Manufacture part: Receiving/Line/Shipping Workstation controller, ws status server
All in a part processing subsystem
Factory Automation System
<<actor>>
: ProductionManager
<<actor>>
: ProcessEngineer
<<aggregatesubsystem>>
: ProcessPlanning
<<actor>>
: Operator
Start Part
<<serversubsystem>>
: AlarmHandlingServer
<<aggregatesubsystem>>: ProductionManagement
<<aggregatesubsystem>>
: PartProcessing
<<user interface>>: OperatorInterface
<<externalsystem>>
: Pick&PlaceRobot
<<externalsystem>>
: AssemblyRobot
<<system>>: FactoryAutomationSystem
ProcessPlan Input
ProcessPlan Info Process
Plan Info
ProcessPlan Request
Production Input
Production Info
Operation Info
Display Info
AlarmAlarm
Request
AlarmData
Part Complete
WSRequest
WSData
OperatorRequest
AssemblyRobot Command Assembly
Robot StatusPick & Place
Robot Command
Pick & PlaceRobot Status
NextOperationRequest
Tasks
Process Planning Subsystem
: ProcessEngineer
OperationRequest
<<aggregate subsystem>>: ProcessPlanning
ProcessPlan Input
ProcessPlan Info
ProcessPlan Info
CreateProcess Plan
Operation Info
<<aggregatesubsystem>>: ProductionManagement
<<aggregatesubsystem>>
: PartProcessing
NextOperationRequest
Operation Info
ProcessPlan Request
ProcessPlan Info
CreateOperation
Operation Info
<<server subsystem>>: ProcessPlanningServer
<<actor>>
<<user interface>>: ProcessEngineer
Interface
Tasks
<<entity>>: ProcessPlan
Server
<<entity>>: Operation
Server
Production Management Subsystem
<<actor>>Start Part
<<aggregatesubsystem>>
: PartProcessing
Production Input
Production Info
Part Complete
<<aggregate subsystem>> : ProductionManagement
<<user interface>>: Production
ManagerInterface
<<entity>>: WorkOrder
Server
<<entity>>: PartServer
<<serversubsystem>>
: ProcessPlanningServer
Process Plan Request
Process Plan Info
: ProductionManager
Create
Create
Work OrderInfo
PartInfo
<<server subsystem>>: ProductionManagementServer
Tasks
Part Processing Subsystem
<<serversubsystem>>
: AlarmHandlingServer
<<aggregatesubsystem>>
: ProcessPlanning
<<aggregatesubsystem>>: ProductionManagement
<<ctrl subsystem>>: ReceivingWorkstationController
<<ctrl subsystem>>: Shipping
WorkstationController
<<ctrl subsystem>>: Line Workstation
Controller
<<serversubsystem>>: WorkstationStatusServer
<<user interface>>: OperatorInterface
<<externalsystem>>
: AssemblyRobot
<<externalsystem>>
: Pick&PlaceRobot
<<externalsystem>>
: Pick&PlaceRobot
<<externalsystem>>
: Pick&PlaceRobot
Alarm
Alarm
Alarm
WSRequest
WSData
StartPart
PartComing
PartRequest
PartComing
PartComplete
PartRequest
Pick & PlaceRobot
CommandPick & Place
Robot Command
Pick & PlaceRobot
Command
Operation Info
NextOperationRequest
Pick & PlaceRobot Status
Pick & PlaceRobot Status
Pick & PlaceRobot Status
AssemblyRobot
CommandAssembly
Robot Status
WSStatus
Tasks<<aggregate subsystem>>
: PartProcessing
Static Model of Composite Classes
<<serversubsystem>>
AlarmHandlingServer
<<user interface>>OperatorInterface
<<serversubsystem>>Workstation
Status Server
<<controlsubsystem>>
Line WSController
<<controlsubsystem>>Shipping WS
Controller
<<controlsubsystem>>Receiving WS
Controller
<<user interface>>ProductionManagerInterface
<<serversubsystem>>
Process PlanningServer
<<user interface>>Process
EngineerInterface
<<serversubsystem>>Production
ManagementServer
Is Client of 1
11
1
1
11
1
1
1
1
1
11
1
1
1
1..*
1..*1
1 1
1
1..*
1
1..*
11
1
Is Client of
Is Client of Is Client of
Is Client of
Is Client of
Starts Part at Sends Part to Sends Part to
Sends Part to
Sends WSstatus to
Sends Alarm to
Sends Alarm to
Sends Alarm to
Sends Message
to
Conceptual model
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 separatelyEach 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 requestsWs status server; two possibilities:
One server for the whole systemOne per ws The second one is better for two reasons:
High message traffic between this server and corresponding line ws controllerEach 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 communicationSynchronous msg for client/server communicationLoosely 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 communicationOperator interface – ws status server:
Status displayed not only when requested, but on changeCan receive data from differents workstations concurrently
alarmRequest
(in request, out alarmData)
Factory Automation System: Subsystem Interfaces
<<actor>>
: ProductionManager
<<actor>>
: ProcessEngineer
<<aggregatesubsystem>>
: ProcessPlanning
<<actor>>
: Operator
startPart(partInfo)
<<serversubsystem>>
: AlarmHandlingServer
<<aggregatesubsystem>>: ProductionManagement
<<aggregatesubsystem>>
: PartProcessing
<<user interface>>: OperatorInterface
<<externalsystem>>
: Pick&PlaceRobot
<<externalsystem>>
: AssemblyRobot
<<system>>: FactoryAutomationSystem
ProcessPlan Input
ProcessPlan Info processPlan
Request (in request, out processPlan
Info)
Production Input
Production Info
Display Info
alarm(alarmData)
alarmNotification(alarmData)
part Complete(partInfo)
WS_Request(in request,out wsData)
WSNotification
(wsData)
OperatorRequest
assemblyRobotCommand assembly
RobotStatuspick&place
Robot Command
pick&placeRobot Status
nextOperation
Request (inrequest, out
operationInfo)
Back
createProcess PlanRequest (in
request, outprocessPlanInfo)
Process Planning Subsystem: Subs. Interfaces
: ProcessEngineer
<<entity>>: ProcessPlan
Server
<<entity>>: Operation
Server
<<aggregate subsystem>>: ProcessPlanning
ProcessPlan Input
ProcessPlan Info
<<aggregatesubsystem>>: ProductionManagement
<<aggregatesubsystem>>
: PartProcessing
<<server subsystem>>: ProcessPlanningServer
<<actor>><<user interface>>: ProcessEngineer
Interface
createOperationRequest (in request, out operationInfo)
operationRequest (in request, out operationInfo)
processPlanRequest (in request, out processPlanInfo)
nextOperationRequest (in request, out operationInfo)
Back
workOrderRequest(in request, outworkOrderInfo)
Production Management Subsystem: S. Interfaces
<<actor>> startPart(partInfo)
<<aggregatesubsystem>>
: PartProcessing
Production Input
Production Info
partComplete(partInfo)
<<aggregate subsystem>> : ProductionManagement
<<user interface>>: Production
ManagerInterface
<<entity>>: WorkOrder
Server
<<entity>>: PartServer
<<serversubsystem>>
: ProcessPlanningServer
processPlanRequest(in request, out
processPlanInfo)
: ProductionManager
partInfoRequest(in request, out
partInfo)
<<server subsystem>>: ProductionManagementServer
Back
wsStatus(status)
Part Processing Subsystem:Subsystem Interfaces
<<serversubsystem>>
: AlarmHandlingServer
<<aggregatesubsystem>>
: ProcessPlanning
<<aggregatesubsystem>>: ProductionManagement
<<ctrl subsystem>>: ReceivingWorkstationController
<<ctrl subsystem>>: Shipping
WorkstationController
<<ctrl subsystem>>: Line Workstation
Controller
<<serversubsystem>>: WorkstationStatusServer
<<user interface>>: OperatorInterface
<<externalsystem>>
: AssemblyRobot
<<externalsystem>>
: Pick&PlaceRobot
<<externalsystem>>
: Pick&PlaceRobot
<<externalsystem>>
: Pick&PlaceRobot
alarm(alarmData)
wsNotification
(wsData)
wsRequest(in request, out wsData)
startPart(partInfo)
partComing
(partInfo)
partRequest
(partInfo)
pick&PlaceRobot
Command
pick&PlaceRobot
Command
nextOperationRequest
(in request, out operationInfo)
pick&PlaceRobot Status
pick&PlaceRobotStatus
assemblyRobot Status
alarm(alarmData)
alarm(alarmData)
partComing
(partInfo)
partRequest
(partInfo)
partComplete(partInfo)
pick&PlaceRobot
Commandpick&PlaceRobotStatus
assemblyRobot
Command
Back<<aggregate subsystem>>
: PartProcessing
System ConfigurationTo configure individual target systems we may
Define different workastationsDefine parameters such as wsID, alarm name, … for parameterized componentsConnect component instance and allocate them to phisical nodes
There are different target configurationsHighly distributed: see next slide
Localized autonomyAdequate performanceFailure of a node not impacting on another immediately
Grouping process planning server, production management s., alarm handling serverAs above + Process engineer interface + production manager interface in a single node
Multiuser interactive node
System Configuration: ProcessEngineer
Interface{1 per Engineer}
: ProdutionManagerInterface
{1 node}
<<Internet>>
: Receiving WSController{1 node}
<<factory LAN>>: AlarmHandling
Server{1 node}
: OperatorInterface
{1 per operator}
: Line WSNode
{1 node}
: Shipping WSController{1 node}
: ProcessPlanningServer
{1 node}
: ProductionMa-nagementServer
{1 node}