在matlab中,linprog函数可以求解线性规划问题,用于寻找目标函数的最小值
matlab中,规划模型的标注写法如下
\[
min\ f\,^Tx\;\; such \ that
\begin{equation}
\left\{
\begin{array}{**lr**}
A \cdot x \leq b \\
Aeq\cdot x =beq\\
lb \leq x \leq ub
\end{array}
\right.
\end{equation}
\]
\[ f,x,b,beq,lb,ub是向量;A和Aeq是矩阵 \]
用于求解
\[
min\ f\ ^Tx\; such\ that\ A\cdot x
\]
用于求解
\[
min\ f\,^Tx\;\; such \ that
\begin{equation}
\left\{
\begin{array}{**lr**}
A \cdot x \leq b \\
Aeq\cdot x =beq\\
\end{array}
\right.
\end{equation}
\]
如果没有等式存在,就用[]代替Aeq和beq
用于求解
\[
min\ f\,^Tx\;\; such \ that
\begin{equation}
\left\{
\begin{array}{**lr**}
A \cdot x \leq b \\
Aeq\cdot x =beq\\
lb \leq x \leq ub
\end{array}
\right.
\end{equation}
\]
可以约束决策变量的范围在[lb,ub]内
原文:https://www.cnblogs.com/goodtwo/p/11141969.html