Iso19011@126.com Crystal Ball
Page 1
Monte-Carlo Simulation with Crystal Ball?
用水晶球软件进行蒙特卡洛模拟
To run a simulation using Crystal Ball?:
1. Setup Spreadsheet 1.设定数据表
Build a spreadsheet that will calculate the performance measure (e.g., profit) in terms of the inputs (random or not). For random inputs, just enter any number.
通过建立数据表可以对输入数据(随机的,非随机)进行评估。随机数据的输入,输入任意数即可。
2. Define Assumptions—i.e., random variables
Define which cells are random, and what distribution they should follow. 2.定义假设的前提—例如,随机变量
确定那些单元格的数据时随机的,这些数据应该服从什么样的分布
3. Define Forecast—i.e., output or performance measure
Define which cell(s) you are interested in forecasting (typically the performance measure, e.g., profit).
3.预测结果的确定—例如,数据输出或者性能的测定
确定哪些单元格的数据是你想预测的(典型的性能指标,例如,利润)
4. Choose Number of Trials
Select the number of trials. If you would later like to generate the Sensitivity Analysis chart, choose ―Sensitivity Analysis‖ under Options in Run Preferences. 4. 选择试验的次数
选择试验的次数。如果 要生成敏感度分析图表,选择优先运行下的“敏感度分析”
5. Run Simulation
Run the simulation. If you would like to change parameters and re-run the simulation, you should ―reset‖ the simulation (click on the ―Reset Simulation‖ button on the toolbar or in the Run menu) first.
运行模拟
运行模拟。如果要改变参数重新进行模拟,需要首先重置模拟(点击运行菜单工具栏或者运行菜单下的“重置模拟”按钮)。 6. View Results
The forecast window showing the results of the simulation appears automatically after (or during) the simulation. Many different results are available (frequency chart,
Iso19011@126.com Crystal Ball
Page 2
cumulative chart, statistics, percentiles, sensitivity analysis, and trend chart). The results can be copied into the worksheet.
查看结果
在模拟最后或者运行的过程中,预测窗口会自动显示模拟的结果。可以获得不同的结果(频率图,累计图,统计图,百分比图,模拟分析图和趋势图),结果可以复制到工作表中。
Crystal Ball Toolbar:(水晶球的工具栏)
Define Define Assumptions Forecast
Run Start Reset Forecast Trend Preferences Simulation Simulation Window Chart
(确定假设)确定预测结果 优先运行 开始模拟 模拟重置 预测窗口 趋势图
Iso19011@126.com Crystal Ball
Page 3
Walton Bookstore Simulation with Crystal Ball?
水晶球在Walton书店模拟中的应用
Recall the Walton Bookstore example: It is August, and they must decide how many of next year’s nature calendars to order. Each calendar costs the bookstore $7.50 and is sold for $10. After February, all unsold calendars are returned to the publisher for a refund of $2.50 per calendar. Suppose
Walton predicts demand will be somewhere between 100 and 300 (discrete uniform).
回想Walton书店的例子。在八月份,书店需要确定订购的明年的日历的数量。单个日历的进价是7.5美元,售价是10美元。二月份之后,所有未售的日历将会以2.5美元的价格退还给出版商。假设Walton 日历的销售量在100~300之间(离散型均匀分布)
Demand = d ~ Uniform[100, 300] Order Quantity = Q (decision variable)
Revenue = $10 * Min(Q, d) Cost = $7.50 * Q Refund = $2.50 * Max(Q–d, 0) Profit = Revenue – Cost + Refund 需求量= d ~ Uniform[100, 300] 订购量= Q (随决定变化) 收入 = $10 * Min(Q, d) 成本 =$7.50 * Q
退款 = $2.50 * Max(Q–d, 0) 利润 =收入-成本+退款 Step #1 (Setup Spreadsheet) 第一步(制作电子表格)
Iso19011@126.com Crystal Ball
Page 4
ABCDEF1Simulation of Walton's Bookstore23Data4Unit Cost =$7.505Unit Price =$10.006Unit Refund =$2.5078Demand Distribution (Uniform)9Minimum =10010Maximum =3001112Decision Variable13Order Quantity =2001415Simulation16DemandRevenueCost17200$2,000.00$1,500.00B15Simulation16Demand17200CRevenue=C5*MIN(C13,B17)DCost=C4*C13ERefund$0.00Profit$500.00FProfit=C17-D17+E17 Refund=C6*MAX(C13-B17,0)
Iso19011@126.com Crystal Ball
Page 5
Walton Bookstore Simulation with Crystal Ball?
用水晶球对Walton书店进行模拟
Step #2 (Define Assumptions—i.e., random variables) 第二步(定义假设-例如,随机变量)
Select the cell that contains the random variable (B17) — color code (blue): 选择包含随机变量的单元(B17)—色标(蓝色)
1617BDemand200 and click on the ―Define Assumptions‖ button in toolbar (or in the Cell menu):、 点击在工具栏中(单元格菜单)的“定义假设”按钮
选择分布类型
Select type of distribution:
提供分布的参数
Provide parameters of distributions: