目录
3.现有系统模型和计划系统模型 Existing and planned system models
6.图形模型的使用 Use of graphical models
7.2 MHC-PMS 的上下文The context of the MHC-PMS
7.3非自愿拘留的程序模型Process model of involuntary detention
11.数据驱动的建模 Data-driven modeling
11.1胰岛素泵操作的活动图An activity diagram of the insulin pump’s operation
11.2订单处理的序列图Sequence diagram of an order processing
12.事件驱动建模 Event-driven modeling
12.1状态机图 State machine diagram
1.建模的重要性modelling importance
- 建模通过将复杂系统抽象到适当的细节级别,简化了复杂系统。Modelling simplify the complex system by abstracting the complex system into appropriate level of details
- 软件开发失败主要由以下原因导致:Failure of software development mostly contributed by
·需求理解不充分 Poorly understood requirements
·问题通常在开发后期才被发现 Problems often discovered late in the development
·复杂性导致性能问题 Complexity lead to performance issues
2.系统建模 System modeling
- 系统建模是开发系统抽象模型的过程,每个模型展示系统的不同视图或视角。System modeling is the process of developing abstract models of a system, with each model presenting a different view or perspective of that system.
- 系统建模现在通常意味着使用某种图形表示法来表示系统,这种表示法几乎总是基于统一建模语言(UML)中的表示法。System modeling has now come to mean representing a system using some kind of graphical notation, which is now almost always based on notations in the Unified Modeling Language (UML).
- 系统建模帮助分析师理解系统的功能,并且模型用于与客户沟通。System modelling helps the analyst to understand the functionality of the system and models are used to communicate with customers.
- 模型样本

3.现有系统模型和计划系统模型 Existing and planned system models
- 现有系统的模型在需求工程中使用,以帮助澄清现有系统的功能,并可以作为讨论其优缺点的基础。这些讨论最终将导致新系统的需求。Models of the existing system are used during requirements engineering. They help clarify what the existing system does and can be used as a basis for discussing its strengths and weaknesses. These then lead to requirements for the new system.
- 新系统的模型在系统设计过程中使用,以帮助向其他系统利益相关者解释提议的需求。工程师使用这些模型讨论设计方案,并记录系统以便于实施。Models of the new system are used during system design to help explain the proposed requirements to other system stakeholders. Engineers use these models to discuss design proposals and to document the system for implementation.
- 在模型驱动工程过程中,可以从系统模型生成完整或部分系统的实现。In a model-driven engineering process, it is possible to generate a complete or partial system implementation from the system model.
4.系统视角 System perspectives
- 外部视角:从外部环境或上下文的角度建模系统。An external perspective, where you model the context or environment of the system.
- 交互视角:建模系统与其环境之间的交互,或系统各组件之间的交互。An interaction perspective, where you model the interactions between a system and its environment, or between the components of a system.
- 结构视角:建模系统的组织结构或系统处理的数据结构。A structural perspective, where you model the organization of a system or the structure of the data that is processed by the system.
- 行为视角:建模系统的动态行为及其对事件的响应。A behavioral perspective, where you model the dynamic behavior of the system and how it responds to events.
5.UML 图类型UML diagram types
- 活动图:展示过程中或数据处理中的活动。Activity diagrams, which show the activities involved in a process or in data processing .
- 用例图:展示系统与其环境之间的交互。Use case diagrams, which show the interactions between a system and its environment.
- 顺序图:展示参与者和系统之间,以及系统组件之间的交互。Sequence diagrams, which show interactions between actors and the system and between system components
- 类图:展示系统中的对象类及其之间的关联。Class diagrams, which show the object classes in the system and the associations between these classes
- 状态机图:展示系统如何对内部和外部事件作出反应。State machine diagrams, which show how the system reacts to internal and external events
6.图形模型的使用 Use of graphical models
- 作为促进关于现有或 proposed(提议的)系统讨论的手段 As a means of facilitating discussion about an existing or proposed system
·模型可以不完整和不准确,因为它们的角色是支持讨论。Incomplete and incorrect models are OK as their role is to support discussion
- 作为记录现有系统的一种方式 As a way of documenting an existing system
·模型应准确反映系统,但不一定要完整。Models should be an accurate representation of the system but need not be complete
- 作为可用于生成系统实现的详细系统描述 As a detailed system description that can be used to generate a system implementation
·模型必须既正确又完整。Models have to be both correct and complete.
7.上下文模型 Context models
- 上下文模型用于描绘系统的操作上下文——它们展示了系统边界之外的内容。Context models are used to illustrate the operational context of a system - they show what lies outside the system boundaries.
- 社会和组织因素可能会影响系统边界的定位决策。Social and organisational concerns may affect the decision on where to position system boundaries.
7.1系统边界
- 系统边界是为了定义系统内部和外部内容而设立的。System boundaries are established to define what is inside and what is outside the system.
·它们展示了其他系统,这些系统正在使用或依赖于正在开发的系统。They show other systems that are used or depend on the system being developed.
- 系统边界的位置对系统需求有着深远的影响。 The position of the system boundary has a profound effect on the system requirements.
- 定义系统边界是一个政治性的判断。Defining a system boundary is a political judgment
·可能存在压力,促使开发出增加或减少组织不同部分的影响力或工作量的系统边界。There may be pressures to develop system boundaries that increase / decrease the influence or workload of different parts of an organization.
7.2 MHC-PMS 的上下文The context of the MHC-PMS

- 上下文模型仅展示环境中的其他系统,而不展示正在开发的系统在该环境中的使用方式。 Context models simply show the other systems in the environment, not how the system being developed is used in that environment.
- 与其他模型一起使用,例如业务流程模型。 Used along with other models, such as business process models .
- UML 活动图可用于定义业务流程模型。UML activity diagrams may be used to define business process models.
7.3非自愿拘留的程序模型Process model of involuntary detention

8.交互模型Interaction models
- 建模用户交互很重要,因为它有助于识别用户需求。 Modeling user interaction is important as it helps to identify user requirements.
- 建模系统间交互突出了可能出现的通信问题。 Modeling system-to-system interaction highlights the communication problems that may arise.
- 建模组件交互有助于我们理解提议的系统结构是否可能实现所需的系统性能和可靠性Modeling component interaction helps us understand if a proposed system structure is likely to deliver the required system performance and dependability
- 用例图和序列图可用于交互建模。Use case diagrams and sequence diagrams may be used for interaction modeling.
8.1用例图
- 用例最初是为了支持需求获取而开发的,现在已纳入 UML 中。 Use cases were developed originally to support requirements elicitation and now incorporated into the UML
- 每个用例代表一个涉及与系统外部交互的离散任务。 Each use case represents a discrete task that involves external interaction with a system.

- 用例中的参与者可以是人或其他系统。 Actors in a use case may be people or other systems.
- 用图示形式表示,以提供更详细文本形式的用例概述。Represented diagramatically to provide an overview of the use case in a more detailed textual form.

- Transfer数据用例的表格描述Tabular description of the Transfer data usecase

- 在 MHC-PMS 中涉及“医疗接待员”角色的用例 Use cases in the MHC-PMS involving the role ‘Medical Receptionist’

8.2时序图Sequence diagrams
- 时序图是 UML 的一部分,用于建模系统中参与者与对象之间的交互。Sequence diagrams are part of the UML and are used to model the interactions between the actors and the objects within a system
- 时序图展示了在特定用例中发生的交互序列。A sequence diagram shows the sequence of interactions that take place during a particular use case.
- 涉及的对象和参与者列在图的顶部,并从这些对象和参与者处垂直画出虚线。The objects and actors involved are listed along the top of the diagram, with a dotted line drawn vertically from these
- 对象之间的交互通过带注释的箭头表示。Interactions between objects are indicated by annotated arrows.
- 查看患者信息的时序图Sequence diagram for View patient information

9.结构模型 Structural models
- 软件的结构模型展示了系统的组织结构,即构成该系统的组件及其关系。Structural models of software display the organization of a system in terms of the components that make up that system and their relationships.
- 结构模型可以是静态模型,显示系统设计的结构,或者是动态模型,显示系统执行时的组织结构。 Structural models may be static models, which show the structure of the system design, or dynamic models, which show the organization of the system when it is executing.
- 在讨论和设计系统架构时,您会创建系统的结构模型。You create structural models of a system when you are discussing and designing the system architecture.
9.1类图 Class diagrams
- 类图用于开发面向对象的系统模型,以展示系统中的类及这些类之间的关联。Class diagrams are used when developing an object oriented system model to show the classes in a system and the associations between these classes.
- 对象类可以被视为某种系统对象的一般定义。 An object class can be thought of as a general definition of one kind of system object.
- 关联是类之间的链接,表明这些类之间存在某种关系。An association is a link between classes that indicates that there is some relationship between these classes.
- 在软件工程过程的早期阶段,您开发模型时,对象代表现实世界中的某些事物,如患者、处方、医生等。When you are developing models during the early stages of the software engineering process, objects represent something in the real world, such as a patient, a prescription, doctor, etc.
- UML类和关联UML classes and association

- MHC-PMS中的类和关联Classes and associations in the MHC-PMS

- 咨询类The Consultation class
- 带有详细信息的泛化层次结构A generalization hierarchy with added detail


- 聚合关联The aggregation association
10.行为模型Behavioral models
- 行为模型是系统在执行时动态行为的模型。它们展示了系统在响应环境刺激时会发生什么或应该发生什么。Behavioral models are models of the dynamic behavior of a system as it is executing. They show what happens or what is supposed to happen when a system responds to a stimulus from its environment.
- 你可以将这些刺激视为两种类型:You can think of these stimuli as being of two types:
·数据:一些数据到达,需要系统进行处理。Data Some data arrives that has to be processed by the system
·事件:某个事件发生,触发系统处理。事件可能有关联数据,尽管并非总是如此。Events Some event happens that triggers system processing. Events may have associated data, although this is not always the case
11.数据驱动的建模 Data-driven modeling
- 许多业务系统是主要由数据驱动的数据处理系统。它们由系统的数据输入控制,相对较少进行外部事件处理。 Many business systems are data-processing systems that are primarily driven by data. They are controlled by the data input to the system, with relatively little external event processing.
- 数据驱动模型展示了处理输入数据并生成相关输出的动作序列。Data-driven models show the sequence of actions involved in processing input data and generating an associated output.
- 在需求分析阶段,它们特别有用,因为可以用来展示系统中的端到端处理。They are particularly useful during the analysis of requirements as they can be used to show end-to-end processing in a system.
- 活动图和序列图用于数据驱动建模。 Activity diagram and sequence diagram are used in data-driven modelingChap
11.1胰岛素泵操作的活动图An activity diagram of the insulin pump’s operation

11.2订单处理的序列图Sequence diagram of an order processing

12.事件驱动建模 Event-driven modeling
- 实时系统通常是事件驱动的,数据处理最少。例如,有线电话交换系统通过产生拨号音来响应诸如“听筒摘机”的事件。 Real-time systems are often event-driven, with minimal data processing. For example, a landline phone switching system responds to events such as ‘receiver off hook’ by generating a dial tone.
- 事件驱动建模展示了系统如何响应外部和内部事件。 Event-driven modeling shows how a system responds to external and internal events.
- 它基于这样的假设:系统具有有限数量的状态,并且事件(刺激)可能导致从一个状态到另一个状态的转换。It is based on the assumption that a system has a finite number of states and that events (stimuli) may cause a transition from one state to another.
12.1状态机图 State machine diagram
- 这些图模型展示了系统对外部和内部事件的响应行为。 These model the behaviour of the system in response to external and internal events.
- 它们显示了系统对刺激的响应,因此常用于建模实时系统。They show the system’s responses to stimuli so are often used for modelling real-time systems.
- 状态机模型将系统状态显示为节点,将事件显示为这些节点之间的弧线。当事件发生时,系统从一个状态转移到另一个状态。 State machine models show system states as nodes and events as arcs between these nodes. When an event occurs, the system moves from one state to another.
- 状态图(Statecharts)是UML的组成部分,用于表示状态机模型。Statecharts are an integral part of the UML and are used to represent state machine models.
- 微波炉的状态图State diagram of a microwave oven

- 微波炉的状态和刺激States and stimuli for the microwave oven (a)


- 微波炉操作Microwave ovenoperation

13.重点总结
- 模型是对系统的一种抽象视图,忽略了系统的细节。可以开发互补的系统模型来展示系统的上下文、交互、结构和行为。A model is an abstract view of a system that ignores systemdetails. Complementary system models can be developed to show the systems context,interaction,structure and behavior
- 上下文模型展示了被建模系统如何在与其他系统和过程的环境中定位。Context models show how a system that is being modeled is positioned in an environment with other systems andprocesses.
- 用例图和序列图用于描述用户与被设计系统之间的交互。用例描述了系统与外部参与者之间的交互;序列图通过显示系统对象之间的交互来提供更多信息。Use case diagrams and sequence diagrams are used to describe the interactions between users and systems in the system being designed. Use cases describe interactions between a system and external actors; sequence diagrams add more information to these by showing interactions between systemobjects.
- 结构模型展示了系统的组织和架构。类图用于定义系统中类的静态结构及其关联。Structural models show the organization and architecture of a system. Class diagrams are used to define the static structure of classes in a system and theirassociations.
- 行为模型用于描述正在执行的系统的动态行为。这种行为可以从系统处理的数据的角度进行建模,也可以通过刺激系统响应的事件进行建模。Behavioral models are used to describe the dynamic behavior of an executing system. This behavior can be modeled from the perspective of the data processed by the system, or by the events that stimulate responses from asystem.
- 活动图可以用于建模数据的处理,其中每个活动代表一个处理步骤。Activity diagrams may be used to model the processing of data, where each activity represents one process step.
- 状态图用于建模系统对内部或外部事件的响应行为。state diagrams each to model a systems behavior in response to internal or external events.

1842

被折叠的 条评论
为什么被折叠?



