频道栏目
首页 > 资讯 > 其他综合 > 正文

软件工程:DFD、决策树、E-R图、FSM、Petri网介绍

17-11-22        来源:[db:作者]  
收藏   我要投稿

data flow diagram (DFD)数据流图

这里写图片描述

Sally has a collection of cards and a list of names of customers with credit status信用度 for storing customers data. She has some 900 wrapped boxes for storing software package. When a customer order a software package, Sally should look for the package in the boxes, then find the card and the name of the customer. If possible, Sally will invoice开发票 to the customer.

萨利有一系列的卡片和客户名单,用于存储客户数据的信用状态。 她有大约900个包装盒用于存储软件包。 当客户订购一个软件包时,Sally应该在包装箱中寻找包装,然后找到该卡和客户的名字。 如果可能的话,莎莉会向客户开具发票。
这里写图片描述

when the customer requests a package Sally doesn’t have on hand
当顾客要求包裹萨利没有在手边
a logical flow of data is added
数据的逻辑流程被添加
这里写图片描述

the logical flow of datarelating to accounts receivable is added.
增加了应收账款数据的逻辑流程。
这里写图片描述

图书馆自动循环系统
这里写图片描述

decision tree决策树

We have process“give educational discount”
Sally must explain the discount she gives to educational institutions
10% on up to 4 packages
15% on 5 or more
Using a decision tree
我们有过程“给教育折扣”
莎莉必须解释她给教育机构的折扣
10%,最多4个包裹
15% 5个包裹及以上

这里写图片描述

Draw a decision tree for defining the logic of the process of the following description.
The seating prices for college soccer game is determined by rules as following:
For faculty, 20isfor40?yardlineseatsand12 is for end zone seats.
For undergraduate, 2isforallseats.Foralumnus,40 is for 40-yard line seats.
绘制一个决策树来定义下面的描述过程的逻辑。
大学生足球比赛的座位价格由以下规则决定:
对于教员来说,20美元是40码的座位,12美元是座位。
对于大学生来说,所有的座位都是2美元。
对于校友来说,40美元就是40码的座位。
这里写图片描述

Entity-Relationship实体-关系 Modeling模型

elationship
one-to-one
one-to-many
many-to-many
关系
一对一
多对多
这里写图片描述
这里写图片描述
这里写图片描述

Finite State Machines (FSM)有限状态机

Case study: A safe保险箱 has a combination lock that can be in one of three positions, labeled 1, 2, and 3. The dial转盘 can be turned left or right (L or R). Thus there are six possible dial movements, namely 1L, 1R, 2L, 2R, 3L, and 3R. The combination to the safe is 1L, 3R, 2L; any other dial movement will cause the alarm to go off.
案例研究:一个安全的保险箱有一个组合锁可以在三个位置之一,标记为1,2和3.拨号转盘可以左转或右转(L或R)。 因此有六种可能的拨号动作,即1L,1R,2L,2R,3L和3R。 安全的组合是1L,3R,2L; 任何其他的拨号动作都会导致警报。
这里写图片描述

Petri Nets (Petri网)

four parts:
1. a set of places P= { p1, p2, p3, p4 }
2. a set of transitions转换 T= { t1, t2 }
3. an input function I
I(t1)={p2, p4}, I(t2)={p2}
4. an output function O
O(t1)={p1}, O(t2)={p3,p3}
四个部分:
1.一组位置集合P = {p1,p2,p3,p4}
2.一组转换集合T = {t1,t2}
3.一个输入函数I
I(t1)= {p2,p4},I(t2)= {p2}
4.输出函数O
O(t1)= {p1},O(t2)= {p3,p3}
这里写图片描述

Marked带标记的 Petri Nets

a Petri net with 4 tokens令牌
represented by the vector向量 (1,2,0,1)
a transition转换 is enabled激活
each input place has as many tokens as arcs弧 from the place to that transition
number of tokens is not conserved守恒,
Petri nets are indeterminate不确定
(1,2,0,1)->(2,1,0,0)->(2,0,2,0)
(1,2,0,1)->(1,1,2,1)->(2,0,2,0)

一个带有4个令牌的Petri网
由向量(1,2,0,1)
启用转换
每个输入位置都有与从该位置到该过渡位置的弧形一样多的令牌
令牌的数量不被保留
Petri网是不确定的
(1,2,0,1) - >(2,1,0,0) - >(2,0,2,0)
(1,2,0,1) - >(1,1,2,1) - >(2,0,2,0)
这里写图片描述

Petri Nets with an inhibitor禁止 arc弧

a transition is enabled
at least one token on each (normal) input arc, and no tokens on any inhibitor input arcs
Petri net: (0,0,1)->(1,0,0)
启用转换
每个(正常)输入弧上至少有一个令牌,并且任何禁止输入弧上都不会有令牌
Petri网:(0,0,1)->(1,0,0)
这里写图片描述

单本书的循环系统
这里写图片描述

相关TAG标签
上一篇:在Mac OS上Build、配置和使用LLVM
下一篇:编程开发并查集解析
相关文章
图文推荐

关于我们 | 联系我们 | 广告服务 | 投资合作 | 版权申明 | 在线帮助 | 网站地图 | 作品发布 | Vip技术培训 | 举报中心

版权所有: 红黑联盟--致力于做实用的IT技术学习网站