\( %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Mes commandes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newcommand{\multirows}[3]{\multirow{#1}{#2}{$#3$}}%pour rester en mode math \renewcommand{\arraystretch}{1.3}%pour augmenter la taille des case \newcommand{\point}[1]{\marginnote{\small\vspace*{-1em} #1}}%pour indiquer les points ou le temps \newcommand{\dpl}[1]{\displaystyle{#1}}%megamode \newcommand{\A}{\mathscr{A}} \newcommand{\LN}{\mathscr{N}} \newcommand{\LL}{\mathscr{L}} \newcommand{\K}{\mathbb{K}} \newcommand{\N}{\mathbb{N}} \newcommand{\Z}{\mathbb{Z}} \newcommand{\Q}{\mathbb{Q}} \newcommand{\R}{\mathbb{R}} \newcommand{\C}{\mathbb{C}} \newcommand{\M}{\mathcal{M}} \newcommand{\D}{\mathbb{D}} \newcommand{\E}{\mathcal{E}} \renewcommand{\P}{\mathcal{P}} \newcommand{\G}{\mathcal{G}} \newcommand{\Kk}{\mathcal{K}} \newcommand{\Cc}{\mathcal{C}} \newcommand{\Zz}{\mathcal{Z}} \newcommand{\Ss}{\mathcal{S}} \newcommand{\B}{\mathbb{B}} \newcommand{\inde}{\bot\!\!\!\bot} \newcommand{\Proba}{\mathbb{P}} \newcommand{\Esp}[1]{\dpl{\mathbb{E}\left(#1\right)}} \newcommand{\Var}[1]{\dpl{\mathbb{V}\left(#1\right)}} \newcommand{\Cov}[1]{\dpl{Cov\left(#1\right)}} \newcommand{\base}{\mathcal{B}} \newcommand{\Som}{\textbf{Som}} \newcommand{\Chain}{\textbf{Chain}} \newcommand{\Ar}{\textbf{Ar}} \newcommand{\Arc}{\textbf{Arc}} \newcommand{\Min}{\text{Min}} \newcommand{\Max}{\text{Max}} \newcommand{\Ker}{\text{Ker}} \renewcommand{\Im}{\text{Im}} \newcommand{\Sup}{\text{Sup}} \newcommand{\Inf}{\text{Inf}} \renewcommand{\det}{\texttt{det}} \newcommand{\GL}{\text{GL}} \newcommand{\crossmark}{\text{\ding{55}}} \renewcommand{\checkmark}{\text{\ding{51}}} \newcommand{\Card}{\sharp} \newcommand{\Surligne}[2]{\text{\colorbox{#1}{ #2 }}} \newcommand{\SurligneMM}[2]{\text{\colorbox{#1}{ #2 }}} \newcommand{\norm}[1]{\left\lVert#1\right\rVert} \renewcommand{\lim}[1]{\underset{#1}{lim}\,} \newcommand{\nonor}[1]{\left|#1\right|} \newcommand{\Un}{1\!\!1} \newcommand{\sepon}{\setlength{\columnseprule}{0.5pt}} \newcommand{\sepoff}{\setlength{\columnseprule}{0pt}} \newcommand{\flux}{Flux} \newcommand{\Cpp}{\texttt{C++\ }} \newcommand{\Python}{\texttt{Python\ }} %\newcommand{\comb}[2]{\begin{pmatrix} #1\\ #2\end{pmatrix}} \newcommand{\comb}[2]{C_{#1}^{#2}} \newcommand{\arrang}[2]{A_{#1}^{#2}} \newcommand{\supp}[1]{Supp\left(#1\right)} \newcommand{\BB}{\mathcal{B}} \newcommand{\arc}[1]{\overset{\rotatebox{90}{)}}{#1}} \newcommand{\modpi}{\equiv_{2\pi}} \renewcommand{\Re}{Re} \renewcommand{\Im}{Im} \renewcommand{\bar}[1]{\overline{#1}} \newcommand{\mat}{\mathcal{M}} \newcommand{\und}[1]{{\mathbf{\color{red}\underline{#1}}}} \newcommand{\rdots}{\text{\reflectbox{$\ddots$}}} \newcommand{\Compa}{Compa} \newcommand{\dint}{\dpl{\int}} \newcommand{\intEFF}[2]{\left[\!\left[#1 ; #2\right]\!\right]} \newcommand{\intEFO}[2]{\left[\!\left[#1 ; #2\right[\!\right[} \newcommand{\intEOF}[2]{\left]\!\left]#1 ; #2\right]\!\right]} \newcommand{\intEOO}[2]{\left]\!\left]#1 ; #2\right[\!\right[} \newcommand{\ou}{\vee} \newcommand{\et}{\wedge} \newcommand{\non}{\neg} \newcommand{\implique}{\Rightarrow} \newcommand{\equivalent}{\Leftrightarrow} \newcommand{\Ab}{\overline{A}} \newcommand{\Bb}{\overline{B}} \newcommand{\Cb}{\overline{C}} \newcommand{\Cl}{\texttt{Cl}} \newcommand{\ab}{\overline{a}} \newcommand{\bb}{\overline{b}} \newcommand{\cb}{\overline{c}} \newcommand{\Rel}{\mathcal{R}} \newcommand{\superepsilon}{\varepsilon\!\!\varepsilon} \newcommand{\supere}{e\!\!e} \makeatletter \newenvironment{console}{\noindent\color{white}\begin{lrbox}{\@tempboxa}\begin{minipage}{\columnwidth} \ttfamily \bfseries\vspace*{0.5cm}} {\vspace*{0.5cm}\end{minipage}\end{lrbox}\colorbox{black}{\usebox{\@tempboxa}} } \makeatother \def\ie{\textit{i.e. }} \def\cf{\textit{c.f. }} \def\vide{ { $ {\text{ }} $ } } %Commande pour les vecteurs \newcommand{\grad}{\overrightarrow{Grad}} \newcommand{\Vv}{\overrightarrow{v}} \newcommand{\Vu}{\overrightarrow{u}} \newcommand{\Vw}{\overrightarrow{w}} \newcommand{\Vup}{\overrightarrow{u'}} \newcommand{\Zero}{\overrightarrow{0}} \newcommand{\Vx}{\overrightarrow{x}} \newcommand{\Vy}{\overrightarrow{y}} \newcommand{\Vz}{\overrightarrow{z}} \newcommand{\Vt}{\overrightarrow{t}} \newcommand{\Va}{\overrightarrow{a}} \newcommand{\Vb}{\overrightarrow{b}} \newcommand{\Vc}{\overrightarrow{c}} \newcommand{\Vd}{\overrightarrow{d}} \newcommand{\Ve}[1]{\overrightarrow{e_{#1}}} \newcommand{\Vf}[1]{\overrightarrow{f_{#1}}} \newcommand{\Vn}{\overrightarrow{0}} \newcommand{\Mat}{Mat} \newcommand{\Pass}{Pass} \newcommand{\mkF}{\mathfrak{F}} \renewcommand{\sp}{Sp} \newcommand{\Co}{Co} \newcommand{\vect}[1]{\texttt{Vect}\dpl{\left( #1\right)}} \newcommand{\prodscal}[2]{\dpl{\left\langle #1\left|\vphantom{#1 #2}\right. #2\right\rangle}} \newcommand{\trans}[1]{{\vphantom{#1}}^{t}{#1}} \newcommand{\ortho}[1]{{#1}^{\bot}} \newcommand{\oplusbot}{\overset{\bot}{\oplus}} \SelectTips{cm}{12}%Change le bout des flèches dans un xymatrix \newcommand{\pourDES}[8]{ \begin{itemize} \item Pour la ligne : le premier et dernier caractère forment $#1#2$ soit $#4$ en base 10. \item Pour la colonne : les autres caractères du bloc forment $#3$ soit $#5$ en base 10. \item A l'intersection de la ligne $#4+1$ et de la colonne $#5+1$ de $S_{#8}$ se trouve l'entier $#6$ qui, codé sur $4$ bits, est \textbf{\texttt{$#7$}}. \end{itemize} } \)

Généralités

Définition


La programmation linéaire est une méthode permettant d'optimiser (maximiser ou minimiser) une fonction linéaire sous certaines contraintes linéaires définies par des inégalités. La fonction linéaire à optimiser s'appelle la fonction objectif ou la fonction de coût ou la fonction économique. Un problème linéaire est un problème pouvant être résolu par de la programmation linéaire.

Remarque

Dans la suite de ce chapitre, on émet une hypothèse de continuité : les solutions d'un problème linéaire peuvent prendre n'importe quelles valeurs réelles. Dans le chapitre suivant, on s'intéressera aux problèmes linéaires en nombres entiers.
Les contraintes peuvent être définies par des égalités et des inégalités large de sens différent (\( \leqslant\) et \( \geqslant\) ).

Définition


Étant donné un problème linéaire, on dira qu'une solution est admissible ou réalisable si les valeurs numériques associées aux variables satisfont à l'ensemble des contraintes. L'ensemble des solutions forme la région admissible également appelé le simplexe. Une solution admissible sera dite optimale si elle optimise la fonction objectif.

Remarque

Étant donné un problème linéaire, plusieurs situations sont possibles :
\( \bullet\)
Il n'existe aucune solution.
\( \left\{ \begin{array}{rcl} A&\geqslant&0\\ B&\geqslant&0\\ B&\geqslant&1\\ A+B&\leqslant&\dfrac{1}{2}\\ Max(A+2B)&& \end{array} \right.\)

\( \bullet\)
Il existe une unique solution.
\( \left\{ \begin{array}{rcl} A&\geqslant&0\\ B&\geqslant&0\\ A+2B&\leqslant&4\\ 2A+B&\leqslant&6\\ Max(A+B)&& \end{array} \right. \)
\( \bullet\)
Il existe plusieurs solutions.
\( \left\{ \begin{array}{rcl} A&\geqslant&0\\ B&\geqslant&0\\ A+2B&\leqslant&4\\ 2A+B&\leqslant&6\\ Max(2A+B)&& \end{array} \right.\)

\( \bullet\)
Parmi les solutions, l'optimum n'est pas borné.
\( \left\{ \begin{array}{rcl} A&\geqslant&0\\ B&\geqslant&0\\ A-B&\geqslant&1\\ A-B&\leqslant&-1\\ Max(A)&& \end{array} \right.\)
Le langage le mieux adapté pour la formulation des problèmes linéaires est celui des matrices.

Définition


Soient \( n\) et \( p\) deux entiers strictement positifs, \( A\in\M_{(p,n)}(\R)\) , \( B\in \M_{(p,1)}(\R)\) , \( C\in\M_{(1,n)}(\R)\) et \( X={}^t(X_i)_{i\in[\![1 ; n]\!]}\) le vecteur colonne des indéterminées. Un problème de la forme%1 \( \left\{\begin{array}{c} A.X\leqslant B\\ X\geqslant 0\\ Max(C.X) \end{array} \right.\) est un problème linéaire sous forme normale.

Proposition


Tout problème linéaire est équivalent à un problème linéaire sous forme normale.

Démonstration

En conservant les notations de la définition précédente, les équivalents sont donnés par les règles suivantes :
\( \bullet\)
La recherche du \( \Min(C.X)\) équivaut à la recherche du \( \Max(C'.X)\) où \( C'=-C\) .

\( \bullet\)
Si la \( k^{\text{ième}}\) contrainte est de la forme \( \dpl{\sum_{i=1}^{n}A_{k,i}X_i\geqslant B_k}\) alors cela équivaut à \( \dpl{\sum_{i=1}^{n}A'_{k,i}X_i\leqslant B'_k}\) où pour tout \( i\in[\![1 ; n]\!]\) , \( A'_{k,i}=-A_{k,i}\) et \( B'_k=-B_k\) .

\( \bullet\)
Si la \( k^{\text{ième}}\) contrainte est de la forme \( \dpl{\sum_{i=1}^{n}A_{k,i}X_i = B_k}\) alors cela équivaut aux deux contraintes suivantes : \( \dpl{\sum_{i=1}^{n}A_{k,i}x_i \leqslant B_k}\) et \( \dpl{\sum_{i=1}{n}A_{k,i}x_i \geqslant B_k}\) (et on transforme cette dernière par la technique précédente).

\( \bullet\)
Si \( X_k\leqslant 0\) , on pose \( X'_k=-X_k\) .

\( \bullet\)
Si \( X_k\) n'est pas distingué, on décompose cette variable en deux nouvelles variables \( X_k=X_k^+-X_k^-\) où \( X_k^+\) et \( X_k^-\) sont tous deux positifs.

Théorème


Soient \( n\) et \( p\) deux entiers strictement positifs, \( A\in\M_{(p,n)}(\R)\) , \( B\in \M_{(p,1)}(\R)\) , \( C\in\M_{(1,n)}(\R)\) , \( X={}^t(X_i)_{i\in[\![1 ; n]\!]}\) le vecteur colonne des indéterminées et \( \left\{\begin{array}{c} A.X\leqslant B\\ X\geqslant 0\\ Max(C.X) \end{array} \right.\) un problème linéaire sous forme normal. Le simplexe forme un polyèdre convexe de \( \R^n\) . La(Les) solution(s) optimale(s), si elle(s) existe(nt), se trouve(nt) toujours sur la frontière du simplexe, précisément sur un des sommets du simplexe.




1Les inégalités entre matrices se réalisent ligne par ligne.