用右括号将方程分组并给出单个方程编号

用右括号将方程分组并给出单个方程编号

我想写这样的方程式在此处输入图片描述

右括号覆盖这些方程式并用单个方程式编号标记它们

我的代码需要做哪些修改?

\begin{flalign*}
&Y \Longleftarrow minimize\\
&\text{Subject to:}\\
&x_i+z_ih_{mi}+(1-z_i)w_{mi}\le W &1\le i \le m\\
&y_i+z_iw_{mi}+(1-z_i)h_{mi}\le Y &1\le i \le m\\
&x_i+z_ih_{mi}+(1-z_i)w_{mi}\le x_j+M(x_{ij}+y_{ij}) &1\le i \le j \le m\\
&x_i+z_jh_{mj}-(1-z_j)w_{mj}\ge x_j-M(1-x_{ij}+y_{ij})&1\le i \le j \le m\\
&y_i+z_iw_{mi}+(1-z_i)h_{mi}\ge y_j+M(1+x_{ij}-y_{ij})&1\le i \le j \le m\\
&y_i-z_jw_{mj}-(1-z_j)h_{mj}\ge y_j-M(2-x_{ij}-y_{ij})&1\le i \le j \le m\\
&x_i\ge 0, y_i\ge 0 &1\le i \le m\\
\end{flalign*}

谢谢...

答案1

\documentclass{article}
\usepackage{amsmath}

\begin{document}
  \begin{flalign}
  \left.\begin{aligned}
&Y \Longleftarrow \text{minimize}\\
&\text{Subject to:}\\
&x_i+z_ih_{mi}+(1-z_i)w_{mi}\le W &1\le i \le m\\
&y_i+z_iw_{mi}+(1-z_i)h_{mi}\le Y &1\le i \le m\\
&x_i+z_ih_{mi}+(1-z_i)w_{mi}\le x_j+M(x_{ij}+y_{ij}) &1\le i \le j \le m\\
&x_i+z_jh_{mj}-(1-z_j)w_{mj}\ge x_j-M(1-x_{ij}+y_{ij})&1\le i \le j \le m\\
&y_i+z_iw_{mi}+(1-z_i)h_{mi}\ge y_j+M(1+x_{ij}-y_{ij})&1\le i \le j \le m\\
&y_i-z_jw_{mj}-(1-z_j)h_{mj}\ge y_j-M(2-x_{ij}-y_{ij})&1\le i \le j \le m\\
&x_i\ge 0, y_i\ge 0 &1\le i \le m
\end{aligned}\right\}
\end{flalign}
\end{document}

同样也可以做到align

\documentclass{article}
\usepackage{amsmath}

\begin{document}
  \begin{align}
  \left.\begin{aligned}
&Y \Longleftarrow \text{minimize}\\
&\text{Subject to:}\\
&x_i+z_ih_{mi}+(1-z_i)w_{mi}\le W &1\le i \le m\\
&y_i+z_iw_{mi}+(1-z_i)h_{mi}\le Y &1\le i \le m\\
&x_i+z_ih_{mi}+(1-z_i)w_{mi}\le x_j+M(x_{ij}+y_{ij}) &1\le i \le j \le m\\
&x_i+z_jh_{mj}-(1-z_j)w_{mj}\ge x_j-M(1-x_{ij}+y_{ij})&1\le i \le j \le m\\
&y_i+z_iw_{mi}+(1-z_i)h_{mi}\ge y_j+M(1+x_{ij}-y_{ij})&1\le i \le j \le m\\
&y_i-z_jw_{mj}-(1-z_j)h_{mj}\ge y_j-M(2-x_{ij}-y_{ij})&1\le i \le j \le m\\
&x_i\ge 0, y_i\ge 0 &1\le i \le m
\end{aligned}\right\}
\end{align}
\end{document}

在此处输入图片描述

如果您只想对条件进行编号,请执行以下操作:

\documentclass{article}
\usepackage{amsmath}

\begin{document}
  \begin{align}
&Y \Longleftarrow \text{minimize} \notag \\
&\text{Subject to:} \notag\\
&\left.\kern-\nulldelimiterspace\!\!\begin{aligned}
&x_i+z_ih_{mi}+(1-z_i)w_{mi}\le W &1\le i \le m\\
&y_i+z_iw_{mi}+(1-z_i)h_{mi}\le Y &1\le i \le m\\
&x_i+z_ih_{mi}+(1-z_i)w_{mi}\le x_j+M(x_{ij}+y_{ij}) &1\le i \le j \le m\\
&x_i+z_jh_{mj}-(1-z_j)w_{mj}\ge x_j-M(1-x_{ij}+y_{ij})&1\le i \le j \le m\\
&y_i+z_iw_{mi}+(1-z_i)h_{mi}\ge y_j+M(1+x_{ij}-y_{ij})&1\le i \le j \le m\\
&y_i-z_jw_{mj}-(1-z_j)h_{mj}\ge y_j-M(2-x_{ij}-y_{ij})&1\le i \le j \le m\\
&x_i\ge 0, y_i\ge 0 &1\le i \le m
\end{aligned}\right\}
\end{align}
\end{document}

在此处输入图片描述

相关内容