动态规划与静态规划的关系.docx_第1页
动态规划与静态规划的关系.docx_第2页
动态规划与静态规划的关系.docx_第3页
动态规划与静态规划的关系.docx_第4页
动态规划与静态规划的关系.docx_第5页
已阅读5页,还剩1页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

动态规划与静态规划的关系动态规划与静态规划(线性和非线性规划等)研究的对象本质上都是在若干约束条件下的函数极值问题。两种规划在很多情况下原则上可以相互转换。动态规划可以看作求决策u1,u2,.,un,使指标函数V1n(xl,u1,u2,.,un)达到最优(最大或最小)的极值问题,状态转移方程、端点条件以及允许状态集、允许决策集等是约束条件,原则上可以用非线性规划方法求解。一些静态规划只要适当引入阶段变量、状态、决策等就可以用动态规划方法求解。下面用例子说明:例11用动态规划解下列非线性规划:其中gk(uk)为任意的已知函数。解:按变量uk的序号k划分阶段,看作n段决策过程;设状态为x1,x2,.xn,取问题中的变量u1,u2,.,un为决策;状态转移方程为:取gk(uk)为阶段指标,最优值函数的基本方程为(注意到xn+1=0):解此动态规划即可得到原静态规划的解。上面这个静态规划的模型有很多实际应用,比如下面这个问题:例12 InflateThe more points students score in our contests, the happier we here at the USACO are. We try to design our contests so that people can score as many points as possible, and would like your assistance.We have several categories from which problems can be chosen, where a category is an unlimited set of contest problems which all require the same amount of time to solve and deserve the same number of points for a correct solution. Your task is write a program which tells the USACO staff how many problems from each category to include in a contest so as to maximize the total number of points in the chosen problems while keeping the total solution time within the length of the contest.The input includes the length of the contest, M (1 = M = 10,000) (dont worry, you wont have to compete in the longer contests until training camp) and N, the number of problem categories, where 1 = N = 10,000.Each of the subsequent N lines contains two integers describing a category: the first integer tells the number of points a problem from that category is worth (1 = points = 10000); the second tells the number of minutes a problem from that category takes to solve (1 = minutes = 10000).Your program should determine the number of problems we should take from each category to make the highest-scoring contest solvable within the length of the contest. Remember, the number from any category can be any nonnegative integer (0, one, or many). Calculate the maximum number of possible points.PROGRAM NAME: inflateINPUT FORMATLine 1: M, N - contest minutes and number of problem classesLines 2-N+1: Two integers: the points and minutes for each classSAMPLE INPUT (file inflate.in)300 4100 60250 120120 10035 20OUTPUT FORMATA single line with the maximum number of points possible given the constraints.SAMPLE OUTPUT (file inflate.out)605显而易见,上面这个例题的数学模型就是例11的规划模型。与静态规划相比,动态规划的优越性在于:1. 能够得到全局最优解。由于约束条件确定的约束集合往往很复杂,即使指标函数较简单,用非线性规划方法也很难求出全局最优解。而动态规划方法把全过程化为一系列结构相似的子问题,每个子间题的变量个数大大减少,约束集合也简单得多,易于得到全局最优解。特别是对于约束集合、状态转移和指标函数不能用分析形式给出的优化问题,可以对每个子过程用枚举法求解,而约束条件越多,决策的搜索范围越小,求解也越容易。对于这类问题,动态规划通常是求全局最优解的唯一方法。2. 可以得到一族最优解。与非线性规划只能得到全过程的一个最优解不同,动态规划得到的是全过程及所有后部子过程的各个状态的一族最优解。有些实际问题需要这样的解族,即使不需要,它们在分析最优策略和最优值对于状态的稳定性时也是很有用的。当最优策略由于某些原因不能实现时,这样的解族可以用来寻找次优策略。3. 能够利用经验提高求解效率。如果实际问题本身就是动态的,由于动态规划方法反映了过程逐段演变的前后联系和动态特征,在计算中可以利用实际知识和经验提高求解效率。比如在策略迭代法中,实际经验能够帮助选择较好的初始策略,提高收敛速度。动态规划的主要缺点是:1. 没有统一的标准模型,也没有构造模型的通用方法,甚至还没有判断一个问题能否构造动态规划模型的具体准则(大部分情况只能够凭经验判断是否适用动态规划)。这样就只能对每类问题进行具体分析,构造具体的模型。对于较复杂的问题在选择状态、决策、确定状态转移规律等方面需要丰富的想象力和灵活的技巧性,这就带

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论