《量化投资:以MATLAB为工具》

MATLAB技术论坛

 找回密码
 注册账号
查看: 353|回复: 0
收起左侧

[提问] 1stopt 规划问题

[复制链接]
发表于 2017-10-15 17:25:58 | 显示全部楼层 |阅读模式
Title "vpp";
Parameters sbpower(1:24);
Parameters windpower(1:24);
Parameters sunpower(1:24);
Parameters V(1:24);
Parameters Q(1:24);
Constant c1 = 0.61, c2 = 1.0, c3 = 0.2, Am = 352.8, J = 23.7*3600, waterpower=Am*Q/1000;
Constant c(1:24) =[0.26, 0.26, 0.26, 0.26, 0.26, 0.26, 0.26, 0.26, 0.59, 0.59, 0.59, 0.59, 0.59, 0.59, 0.59, 0.59, 0.59, 0.92, 0.92, 0.92, 0.92, 0.92, 0.59, 0.59];
Constant wp(1:24)=[3.2,5.4,4.3,2.9,4.5,3.0,2.2,3.2,2.9,2.0,3.0,1.8,2.0,2.9,2.6,3.0,3.4,3.8,3.6,3.5,3.2,2.9,2.6,3.4];
Constant sp(1:24)=[0,0,0,0,0,0,0.1,0.2,0.4,0.9,0.8,1.4,2.2,1.2,1.0,1.2,0.3,0.2,0.1,0,0,0,0,0];

MinFunction -Sum(j=1:24)(c1*1000*windpower[j] + c2*1000*sunpower[j] + c3*1000*waterpower[j]-850*abs(sbpower[j] - windpower[j] - sunpower[j] - waterpower[j])- 350*(sbpower[j] - windpower[j] - sunpower[j] - waterpower[j]));
   for(j=1:24)(windpower[j] <= wp[j]);
   for(j=1:24)(sunpower[j] <= sp[j])
   Sum(i=1:24)(windpower[j]) >= 0.95*Sum(i=1:24)(wp[j]);
   Sum(i=1:24)(sunpower[j]) >= 0.95*Sum(i=1:24)(sp[j]);
   for(j=1:23)(V[j + 1] = V[j] + J - Q[j]*3600);
   V[1] = V[24] + J - Q[24]*3600;
   for(j=1:24)(V[j] >= 2*10^7);
   for(j=1:24)(V[j] <= 2.073*10^8);
   V[24] = 1.43*10^8;
   for(j=1:24)(Q[j] >= 3);
   for(j=1:24)(Q[j] <= 42);


大神求教:上面代码在1.5破解版上运行不出来,是参数限制的原因吗?
您需要登录后才可以回帖 登录 | 注册账号

本版积分规则

QQ|网站地图|MATLAB技术论坛|Simulink仿真论坛 ( 蜀ICP备19014457号 

GMT+8, 2019-8-20 05:33 , Processed in 0.073433 second(s), 12 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表