1

I'm working on my thesis and i have several problems.... I try to build those equations which I put in the picture the same way on latex in my thesis but it doesn't work!

Here I give you my little code

\documentclass[a4paper, 12pt]{article}
\usepackage[fleqn]{amsmath}
\usepackage{parskip}
\setlength{\mathindent}{0pt}
%\setlength{\parindent}{0pt}

\begin{document}
\textbf{Minimiere:} 
\begin{flalign}
\label{eq:eins}Z=c_{max} 
\end{flalign}

\textbf{unter der Nebenbedingungen}  
\begin{flalign}
\label{eq:fuenf}\hat{c}_{r,m,i}-\lambda{j,n}\cdot T_{n,m,i}-S_{m,i,n,p}-\Omega\cdot \bigl\lbrace\big(\sum\nolimits^{J_p}_{s=1}   \chi_{r-1,m,i,s,p}\big)+\chi_{r,m,i,j,n}\bigr\rbrace && \\
+2\Omega \geq \hat{c}_{r-1,m,i};\ \ \forall({r,m,i,j,n,p})|r>1 && \nonumber \\
\label{eq:sechs}\hat{c}_{1,m,i}-\lambda{j,n}-S_{m,i,n,0}\cdot A_{n,i}-\Omega(\chi_{u,k,l,j,n}+\chi_{1,m,i,j,n})+2\Omega \geq \hat{c}_{u,k,l}; && \\
\forall({u,k,m,l,i,j,n}|(l,i)\in E_{n}&& \nonumber 
\end{flalign}


Die Zielfunktion in Gleichung \eqref{eq:eins} soll die Produktionsdauer des Programms(schedule) minimieren, welches der Fertigstellungszeit des letzten zu bearbeitenden Sublots im System entspricht.Die Bedingungen in Gleichung \eqref{eq:fuenf} und \eqref{eq:sechs} sagen beide aus

\end{document}

This what i want to build

I'm totally new with latex and its hard for me with those special things to build.... Thanks!

  • dont understand your edit? can you tell me what you did ? – Milo Li Dec 2 '16 at 22:40
  • For code blocks use the {} button (which indents by 4 spaces) not back ticks (which Zarko did for you this time:-) – David Carlisle Dec 2 '16 at 22:42
  • ah thank you, i just read code and then i used the other button! – Milo Li Dec 2 '16 at 22:45
1

You don't want alignment at the top level so use gather not flalign, normally I'd use split for the two line terms but that doesn't flush left so I use aligned here although i have to say the layout seems very odd with the wrapped terms flush left and the \sum\nolimits Also don't use math italic for words such as max.

enter image description here

\documentclass[a4paper, 12pt]{article}

\usepackage[fleqn]{amsmath}
\usepackage{parskip}
\setlength{\mathindent}{0pt}
%\setlength{\parindent}{0pt}

\begin{document}
\textbf{Minimiere:} 
\begin{equation}
\label{eq:eins}Z=c_{\max} 
\end{equation}

\textbf{unter der Nebenbedingungen}  
\begin{gather}
\!\begin{aligned}&\label{eq:fuenf}\hat{c}_{r,m,i}-\lambda{j,n}\cdot
 T_{n,m,i}-S_{m,i,n,p}-\Omega\cdot \bigl\lbrace\bigl(\sum\nolimits^{J_p}_{s=1}   \chi_{r-1,m,i,s,p}\bigr)+\chi_{r,m,i,j,n}\bigr\rbrace \\
&+2\Omega \geq \hat{c}_{r-1,m,i};\ \ \forall({r,m,i,j,n,p})|r>1 \end{aligned}
\\
\!\begin{aligned}&\label{eq:sechs}\hat{c}_{1,m,i}-\lambda{j,n}-S_{m,i,n,0}\cdot
 A_{n,i}-\Omega(\chi_{u,k,l,j,n}+\chi_{1,m,i,j,n})+2\Omega \geq \hat{c}_{u,k,l};\\
&\forall({u,k,m,l,i,j,n}|(l,i)\in E_{n}\end{aligned}
\end{gather}


Die Zielfunktion in Gleichung \eqref{eq:eins} soll die Produktionsdauer des Programms(schedule) minimieren, welches der Fertigstellungszeit des letzten zu bearbeitenden Sublots im System entspricht.Die Bedingungen in Gleichung \eqref{eq:fuenf} und \eqref{eq:sechs} sagen beide aus

\end{document}
| improve this answer | |
  • hey thank you David! Now my Question is: is it possible to put all my equations in one gather environment? or how should i go on, because i want all the 16 equations labeld and written.. or just after \textbf{unter den Nebenbedingungen} everyone is telling me another solution, im totally frustrated :/ – Milo Li Dec 2 '16 at 23:03
  • yes that;s the whole point any consecutive run of equations should go in a single environment gather if there are no alignment points align if not (flalign is f ull l ength alignment and rather specialist, although over used:-) – David Carlisle Dec 2 '16 at 23:06
  • thanks but now how can i get the vertical space between those equations bigger? – Milo Li Dec 2 '16 at 23:21
  • @MiloLi you can increase \baselineskip or individually use \\[20pt] or whatever length you want to add at the end of each row – David Carlisle Dec 2 '16 at 23:26
  • i worked with jot and that destroyed it in equation 5 and 6, but thanks for that solution! Thumbs up! i was sitting 3 days at this problem! should have met you before =) or get to know this nice community before. one other question how can i write \baselineskip like you ? – Milo Li Dec 2 '16 at 23:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.