目录
1、概述
3、Yalmip+Cplex 解决机组组合(YYDS)
3.1 算例
1、概述
(1)电力调度优化理论及其应用
(2)电力调度的机组组合UC
(3)组合模型及算法
2、人性化的Yalmip+Cplex
(1)热身运动——线性规划
尽管 python 比较火,cplex 对 python 的支持目前还不是太全,相关的学习资料比较少,ibm 自己 出的资料对 python 包的介绍也很简略,例子及相关类方法的介绍也不详细,这一点远没有对 java 或 c++ 支持地好。cplex 在 python 中没有重载加减乘除符号吗?目前给的例子都是输入系数矩阵这种形式。使用起来非常不方便的。
所以推出了Yalmip+Cplex(matlab),matlab中这个库的下载方法,后面的文章会讨论matlab中Yalmip+Cplex这个强大的库在我们电力系统中的强大作用(噢头曼!!!),虽然我很喜欢用Python,但是python是这几年才火起来,所以这个Cplex库还不是很完善,所以对于这个库强烈推荐matlab。下面先来点简单的线性规划,让大家热身。
3、Yalmip+Cplex解决机组组合(YYDS)
3.1 算例
基于已知的系统数据,求解计划时间内的6机30节点41支路的功率情况与机组的开停机情况,使得系统总成本达到最小。该问题的决策变量由两类,第一类是各时段机组的出力,为连续变量。第二类是各时段机组的启停状态,为整数变量,0表示关停,1表示启动。
本问题属于混合整数规划(MIP)问题,即要在决策变量的可行解空间里找到一组最优解,使得目标函数尽可能取得极值。对于混合整数规划,CPLEX提供了快速的MIP求解方法。
3.2 目标函数
3.3 约束条件
3.4 模型约束条件处理
模型中有许多约束条件,这些约束条件不能用程序直接表达,只能用变换来表达。
3.5 Matlab代码实现
本文只给出部分代码