查看完整版本: Excel2007 “规划求解”

jinwyp 2008-9-24 16:07

Excel2007 “规划求解”

[url=http://www.officeba.com.cn/article/htmldata/detail/2008/6/7/2186.html]http://www.officeba.com.cn/article/htmldata/detail/2008/6/7/2186.html[/url]

Excel2007 “规划求解”
关于[url=http://www.officeba.com.cn/article/htmldata/list/2/1.html][color=#0000ff]Excel2007[/color][/url]”规划求解”的基础性知识,请参阅本站文章:[url=http://www.officeba.com.cn/article/htmldata/detail/2007/7/10/1033.html][size=3][color=#800080]运用[/color][color=#c60a00]Excel[/color][color=#800080] [/color][color=#c60a00]2007[/color][color=#800080]“[/color][color=#c60a00]规划求解[/color][color=#800080]”定义并解答问题[/color][/size][/url]
先安装好“规划求解”加载宏,怎么安装“规划求解”可以参见此贴:[url=http://bbs.officeba.com.cn/topic.aspx?topicid=15][color=#800080]http://bbs.officeba.com.cn/topic.aspx?topicid=15[/color][/url]
学习“规划求解”,基本理论知识请参考帮助文件。我认为最好是有一个好的例子,理解透,是学习的最好方法。
下面是一个很简单的例子:
你的工资是每月3000元,工资系数(即工资增加率)是0.12,那么你的工资应该是多少?
在excel2007中,这是很简单的。表示如图1:
[url=http://www.officeba.com.cn/article/htmldata/list/2/1.html][img=508,298]http://blog.officeba.com.cn/upload/200806070919531260.gif[/img][/url]
图1

图1中只有B3:D4共6个单元格有数据,另外没有数据。其中只有D4单元格(黄色的那个单元格)有公式,在编辑栏可以看到这个公式。结果为3360元。
假设新工资要为3660元(即D4单元格为3360元),基础工资3000元不变,那么系数C4单元格为多少?
执行  数据---分析---规划求解,如图2:
[url=http://www.officeba.com.cn/article/htmldata/list/2/1.html][img=600,343]http://blog.officeba.com.cn/upload/200806070919422677.gif[/img][/url]
图2
可以看到,没有约束条件,单击“求解”即可以得出答案。如图3:
[img=600,377]http://blog.officeba.com.cn/upload/200806070919340210.gif[/img]
图3

可以看出,D4单元格(黄色),是目标[url=http://www.officeba.com.cn/article/htmldata/detail/2008/2/27/1722.html][color=#0000ff]单元格[/color][/url],是包含公式的。
C4单元格(灰色),是可变单元格,是一个数值,没有公式。求解过程:
规划求解就是给C4单元格一个值0.12,看D4单元格等于3360,把它和结果3660比较,计算机发现它不是答案,返回给C4赋予一个新值0.121,结果D4单元格为3363,不对,计算机又给C4赋予另一值,这样不断尝试,直到得到符合计算机要求的答案出现,才停止尝试。其实这个过程对人来说是很漫长和枯燥的,但是对计算机是非常快速和高效的,一下就完成了。这是规划求解采用的基本计算方法,它就是“[b]牛顿逼近法[/b]”。
可以看出这个过程实际是一个[url=http://www.officeba.com.cn/article/htmldata/detail/2008/4/25/2026.html][color=#0000ff]公式[/color][/url],从它的结果---y,去反方向推测它的变量---x为多少的过程。
这个例子告诉我们,使用“规划求解”必须首先确定“目标单元格”。即对话框中第1个项,如图4:
[img=600,379]http://blog.officeba.com.cn/upload/200806070919288785.gif[/img]

图4

即黄色的那个单元格,它里面一定要包含公式。把它设置为黄色,这是我的习惯,可以让自己清楚知道“包含公式的单元格”,并且看一眼就能发现。你可以根据自己的习惯,设置一种自己喜欢的颜色填充。
其次,确定“可变单元格”,如图5,用红线圈住的部分:
[url=http://www.officeba.com.cn/article/htmldata/list/2/1.html][img=600,373]http://blog.officeba.com.cn/upload/200806070919204856.gif[/img][/url]

图5

可以看出,可变单元格C4,灰色的那个单元格,没有公式,是一个普通的数值。在求解过程中,excel会不断改变C4单元格的值,直到满足要求为止。我用灰色表示,是我的习惯,关键是让自己能一眼发现它。excel2007要求可变单元格最多为200个。
再看看D4单元格的公式为=B4*(1+C4),能从这个公式里面发现C4单元格(一定能发现可变单元格),即灰色的那个单元格。如果你把公式中C4单元格用数值0.12代替它,再运行规划求解,你会发现,无法得出答案。
但是如果你把公式中B4单元格用3000去替换,一样能采用”规划求解“得出正确答案。
可以得到这样一个结论:目标单元格(黄色的)和可变单元格(灰色的)是通过目标单元格的公式联系在一起的。就像函数y=f(x)一样,目标单元格就是y,可变单元格就是x,而=f(x)就是公式。
你懂了“目标单元格”和“可变单元格”,那么“规划求解”就已经知道了大部分了。我认为这是“规划求解”最重要和基础的东西。

yanshen 2008-9-24 16:55

割腕者的天堂

jinwyp 2008-9-24 22:11

ls什么意思

yanshen 2008-9-24 22:44

下这个电影  记录一下

yanshen 2008-10-14 18:32

ear Mr. Bentley ,
I am writing to express my strong interest in the position of Director of Human Resources at your company, as described in an advertisement on jobsearch.com. I am interested in your company, which has a reputation for company loyalty and the professional development of its staff. I believe that my background in personnel administration, my excellent communication skills, and my knowledge of your industry make me a strong candidate for the position.

As the assistant manager in the Human Resources department of my present company, I have had many responsibilities. I have researched legal matters, wrote reports for company policy, hired and trained new employees. Last year I organized an important project to analyze and make recommendations on the health care policy of our international employees. Since I have previously worked in both product development and sales and marketing. I have a wider range of experience than many others in my field. I believe that I apply this to my day-to-work in ways that make me a more effective leader of a diverse staff...
页: [1]
查看完整版本: Excel2007 “规划求解”