第5讲 用AnyLogic进行多智能体仿真

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

state
State represents a location of control with a particular set of reactions to conditions and/or events. A state can be either simple or, if it contains other states, composite. Control always resides in one of simple states, but the current set of reactions is a union of those of the current simple state and of all composite states containing it – i.e., a transition exiting any of these states may be taken.
5.1 例子:熟读唐诗三百首,不会作诗也会呤 例子:熟读唐诗三百首, 销售渠道的模拟: 销售渠道的模拟: 背景: 背景:This is an Agent Based model of a sales process in a business where clients are to be reviewed by the company: e.g. this could be insurance, banking,leasing, etc. The process has several stages that are modeled by different states in the statechart of a Customer object: initial contact, quote, credit review. The customer may leave on each stage, and the company, in turn, may reject the customer. The model helps you to examine how the skill level and size of the sales force and the credit review team affect the efficiency of the whole process.
在mainmodel中进行调用 中进行调用
用get返回对模型中各种对象的引用 返回对模型中各种对象的引用 在不同的状态图中对这些对象进行编程和调用
各种变量和参数(二者有何区别?) 各种变量和参数(二者有何区别?)
Main model中的参数与变量 中的参数与变量 各个不同的状态图中的参变量 统计状态与表示 思考:哪些变量要放在 中哪些要放在Main 思考:哪些变量要放在state chart中哪些要放在 中哪些要放在 model中? 中
Βιβλιοθήκη Baidu
General properties of statechart entry point
Name – The name of the statechart entry point. The name is used to identify and access the entry point from code. Show name – If selected, the name of the statechart entry point is displayed on a presentation diagram. Ignore – If selected, the statechart entry point is excluded from the model. Public – Defines, whether the statechart entry point is visible on a presentation diagram of the owner of this active object class. Since statechart elements cannot appear on owner class' presentation, this checkbox is always deselected and disabled. Show at runtime – If selected, the statechart entry point is visible on a presentation at runtime. Action – Sequence of Java statements executed when the statechart entry point forwards the control to an initial state.
Transition
denotes a switch from one state to another. A transition indicates that if the specified trigger event occurs and the specified guard condition is true, the statechart switches from one state to another and performs the specified action. When this occurs, the transition is taken.
来一个: 来一个:hello world
顾客到来 统计顾客 顾客走了
进行MAS仿真 第5讲 用AnyLogic进行 讲 进行 仿真
5.1 5.2 5.3 5.4 5.5 先看一个例子 对此例子进行概览 具体的学习 主要的state chart components 动画的表示
之前的之前要看的视频
观看视频:航天神五、神六发射时,飞行控制室实况录相。 观看视频:航天神五、神六发射时,飞行控制室实况录相。 注意, 注意,哪些地方应用了仿真技术 为什么要用?不用行不行? 为什么要用?不用行不行?
分支选择: 分支选择:branch
represents a transition branching and/or connection point. Using branches , can create a transition that has more than one destination state, as well as several transitions that merge together to perform a common action. When control passes a branch, its action is executed, and then the guards of transitions exiting the branch are evaluated. The first enabled transition – i.e., the transition whose guard evaluates to true – is taken.
5.2 Agent的形成 的形成
A初始状态和属性 初始状态和属性 Prospect的最初位置: 的最初位置: 的最初位置 Getx和getY 和
状态图
State chart: Agent的各种状态在这里用图形方式表达, 的各种状态在这里用图形方式表达, 的各种状态在这里用图形方式表达 状态图中, 状态图中,将各种状态变化时的行为或者属性更改在此处 写出,这里(可能需要用到各种Anylogic里的编程对象) 里的编程对象) 写出,这里(可能需要用到各种 里的编程对象 例如:潜在客户prospect 的变化状态。 例如:潜在客户 的变化状态。
转移发生时, 转移发生时,执行的事件选择
A transition may freely cross simple state and composite state borders. If the source of a transition lies either on or inside a state, and the destination of that transition lies outside of the state, then that state is considered exited by the transition. If such a transition is taken, the exit action of the exited state is executed. If the source of a transition lies outside a state, and the destination of that transition lies either on or inside the state, then that state is considered entered by the transition. If such a transition is taken, the entry action of the entered state is executed. In case a part of a transition lies inside a state, but both source and destination are outside the state, this state is considered neither entered nor exited
集成运行
展示: 展示:sales funnel
5.3具体的学习 具体的学习
State chart Entry Point、Final state 、 Statechart entry point is used to indicate the initial state of the statechart. There should be exactly one statechart entry point defined for each statechart. You may define several independent statecharts for the same active object, each one describing some particular process. In this case AnyLogic will distinguish how many distinct statecharts there are by analyzing the number of statechart entry points.
相关文档
最新文档