Skip to content

Instantly share code, notes, and snippets.

@JackDunnNZ
Last active September 10, 2015 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JackDunnNZ/53b0b9901cfbd7e50b5c to your computer and use it in GitHub Desktop.
Save JackDunnNZ/53b0b9901cfbd7e50b5c to your computer and use it in GitHub Desktop.
Latex optimization example
$\begin{array}{rlllllllll}
\min& \sum\limits_{j=1}^7 x_j \\
{\rm s.t.} &x_1 + & & & x_4 + & x_5 + & x_6 + & x_7 & \geq & d_1 \\
&x_1 + & x_2 & & & x_5 + & x_6 + & x_7 & \geq & d_2 \\
&x_1 + & x_2 + & x_3 & & & x_6 + & x_7 & \geq & d_3 \\
&x_1 + & x_2 + & x_3 + & x_4 + & & & x_7 & \geq & d_4 \\
&x_1 + & x_2 + & x_3 + & x_4 + & x_5 & & & \geq & d_5 \\
& & x_2 + & x_3 + & x_4 + & x_5 + & x_6 & & \geq & d_6 \\
& & & x_3 + & x_4 + & x_5 + & x_6 + & x_7 & \geq & d_7 \\
& x_j \geq 0 & & & & & & & &
\end{array}$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment