动态规划与静态规划的关系.docx

上传人:博****1 文档编号:558432057 上传时间:2024-02-28 格式:DOCX 页数:6 大小:22.63KB
返回 下载 相关 举报
动态规划与静态规划的关系.docx_第1页
第1页 / 共6页
动态规划与静态规划的关系.docx_第2页
第2页 / 共6页
动态规划与静态规划的关系.docx_第3页
第3页 / 共6页
动态规划与静态规划的关系.docx_第4页
第4页 / 共6页
动态规划与静态规划的关系.docx_第5页
第5页 / 共6页
点击查看更多>>
资源描述

《动态规划与静态规划的关系.docx》由会员分享,可在线阅读,更多相关《动态规划与静态规划的关系.docx(6页珍藏版)》请在金锄头文库上搜索。

1、动态规划与静态规划的关系动态规划与静态规划(线性和非线性规划等)研究的对象本质上都是在若干约束条件下的函数极值问题。两种规划在很多情况下原则上可以相互转换。动态规划可以看作求决策u1,u2,.,un,使指标函数V1n(xl,u1,u2,.,un)达到最优(最大或最小)的极值问题,状态转移方程、端点条件以及允许状态集、允许决策集等是约束条件,原则上可以用非线性规划方法求解。一些静态规划只要适当引入阶段变量、状态、决策等就可以用动态规划方法求解。下面用例子说明:例11用动态规划解下列非线性规划:其中gk(uk)为任意的已知函数。解:按变量uk的序号k划分阶段,看作n段决策过程;设状态为x1,x2,

2、.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 w

3、ould 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 t

4、he 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 won

5、t 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 = 100

6、00); 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 fro

7、m 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)

8、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. 能够得到全局最优解。由于约束条件确定的约束集合往往很复杂,即使指标函数较简单,用非线性规划方法也很难求出全局最优解。而动态规划方法把全过程化为一系列结构相似的子问题,每个子间题的变量个数大

9、大减少,约束集合也简单得多,易于得到全局最优解。特别是对于约束集合、状态转移和指标函数不能用分析形式给出的优化问题,可以对每个子过程用枚举法求解,而约束条件越多,决策的搜索范围越小,求解也越容易。对于这类问题,动态规划通常是求全局最优解的唯一方法。2. 可以得到一族最优解。与非线性规划只能得到全过程的一个最优解不同,动态规划得到的是全过程及所有后部子过程的各个状态的一族最优解。有些实际问题需要这样的解族,即使不需要,它们在分析最优策略和最优值对于状态的稳定性时也是很有用的。当最优策略由于某些原因不能实现时,这样的解族可以用来寻找次优策略。3. 能够利用经验提高求解效率。如果实际问题本身就是动态

10、的,由于动态规划方法反映了过程逐段演变的前后联系和动态特征,在计算中可以利用实际知识和经验提高求解效率。比如在策略迭代法中,实际经验能够帮助选择较好的初始策略,提高收敛速度。动态规划的主要缺点是:1. 没有统一的标准模型,也没有构造模型的通用方法,甚至还没有判断一个问题能否构造动态规划模型的具体准则(大部分情况只能够凭经验判断是否适用动态规划)。这样就只能对每类问题进行具体分析,构造具体的模型。对于较复杂的问题在选择状态、决策、确定状态转移规律等方面需要丰富的想象力和灵活的技巧性,这就带来了应用上的局限性。2. 用数值方法求解时存在维数灾(curse of dimensionality)。若一维状态变量有m个取值,那么对于n维问题,状态xk就有mn个值,对于每个状态值都要计算、存储函数fk(xk),对于n稍大(即使n=3)的实际问题的计算往往是不现实的。目前还没有克服维数灾的有效的一般方法。

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 生活休闲 > 社会民生

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号