WUT_Computer_Science/NotProgramming/MOM/sections/01-zadanie-1-siec-przeplywowa/01-model-sieciowy.tex
Krzysztof kuhy Rudnicki ffa5dad02a Split 19 over-cap LaTeX reports, proving each PDF is unchanged
The 250-line cap applies to prose too, and the reports were the worst
offenders -- ENUME's projectA.tex alone was 1,876 lines. Each is now a
preamble plus one \input{} per section, which is how a long LaTeX document is
normally organised; not one byte of prose was rewritten.

"The PDF is unchanged" is checked by a script rather than by eye, because
hashing the PDF cannot work: pdflatex stamps a /CreationDate and an /ID into
every build, so two runs of the SAME source already differ. tex_fingerprint.sh
compares what a reader sees instead -- page count plus a hash of the extracted
text -- and it is stable across rebuilds of untouched sources, which is the
property that makes it usable as a gate.

It earned its keep immediately. Both ECOTE reports quote an example LaTeX
document inside an lstlisting block, so \end{document} appears in the middle
of the file; splitting on the FIRST one stranded everything after it. Same
page count, different text, caught automatically. EOPSY lab3 exposed a second
bug: a \section{} title that runs onto the next line.

Result: 19 .tex over the cap -> 1. The survivor,
ELAC/.../03-building-nfa-...tex, is 418 lines of consecutive tikz figures
with no subsection to split on and needs a hand-placed boundary.

Verified: 29 splits across two passes (section, then subsection for the
pieces still over), every one reporting `unchanged` from
scripts/tex_fingerprint.sh --check.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172dj34FDpao6wsix8ZuCzE
2026-08-28 19:47:12 +02:00

101 lines
2.6 KiB
TeX
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

\subsection{Model sieciowy}
\paragraph{Problem do rozwiązania}
Należy rozwiązać problem najtańszego przepływu \\
\begin{figure}[htb]
\caption{Koszty transportowe i przepustowości na poszczególnych odcinkach}
\begin{center}
\begin{tabular}{ | c | c | c | c | c | c | }
\hline
& D & E & F & G & H \\
\hline
A & 4, 15 & 2, 10 & - & - & -\\
\hline
B & 4, 4 & 3, 9 & - & 8, 9 & - \\
\hline
C & 2, 20 & 6, 10 & - & - & - \\
\hline
D & - & - & 3, 10 & 7, 3 & 2, 2 \\
\hline
E & 5, 20 & - & 7, 5 & 6, 5 & 3, 5 \\
\hline
\end{tabular}
\end{center}
\end{figure}
\begin{figure}[htb]
\caption{Zdolności wydobywcze kopalń (w tys. ton)}
\begin{center}
\begin{tabular}{ | c | c |}
\hline
$W_A$ & 10 \\
\hline
$W_B$ & 13 \\
\hline
$W_C$ & 17 \\
\hline
\end{tabular}
\end{center}
\end{figure}
\begin{figure}[htb]
\caption{Średnie zużycie dobowe węgla przez elektronie (w tys. ton)}
\begin{center}
\begin{tabular}{ | c | c |}
\hline
$Z_F$ & 15 \\
\hline
$Z_G$ & 13 \\
\hline
$Z_H$ & 7 \\
\hline
\end{tabular}
\end{center}
\end{figure}
\paragraph{Sformułowanie}
Matematyczne sformułowanie zadania:
\begin{enumerate}
\item Parametry \\
s - źródło \\
B - Budynki (kopalnie, stacje, elektrownie) \\
K - kopalnie \\
$c_{ij}$ - koszt transportu z budynku i do budynku j ($c_{sk}$ = 0) \\
$W_k$ - zdolność wydobywcza kopalni k [w tonach] \\
$p_{ij}$ - przepustowość transportu z budynku i do budynku j [w tonach] ($u_{sk}$ = $W_k$) \\
E - elektrownie \\
$Z_e$ - średnie zużycie dobowe przez elektrownię e [w tonach] \\
\item Zmienne decyzyjne
$f_{ij}$ - przepływ transportu z budynku i do obiektu j \\
\item Funkcja celu
\begin{align*}
Q &= \min\left(\sum_{(i, j) \in B \backslash \{s\}} c_{ij} f_{ij}\right) \\
&= \min(4f_{AD} + 2f_{AE} + 4f_{BD} + 3f_{BE} + 8f_{BG} + 2f_{CD} \\
&\quad + 6f_{CE} + 3f_{DF} + 7f_{DG} + 2f_{DH} + 5f_{ED} + 7f_{EF} \\
&\quad + 6f_{EG} + 3f_{EH})
\end{align*}
\item Ograniczenia
\begin{equation}
0 \leq f_{sk} \leq W_k, \; k \in K = \{A, B, C\}
\end{equation}
\begin{equation}
f_{si} = 0, \; i \in B \backslash K
\end{equation}
\begin{equation}
f_{is} = 0, \; i \in B
\end{equation}
\begin{equation}
0 \leq f_{ij} \leq p_{uj}, \; (i, j) \in B \backslash \{s\}
\end{equation}
\begin{equation}
f_{is} = 0, \; i \in B
\end{equation}
\begin{equation}
\sum_{b \in B} f_{be} \ge Z_e, \; e \in E = \{F, G, H\}
\end{equation}
\begin{equation}
\sum_{i \in B \backslash \{ s \} } f_{bi} \leq \sum_{j \in B} f_{bn}, \; b \in B \backslash \{s\}
\end{equation}
\end{enumerate}
\paragraph{Narysowanie modelu}
\includepdf[pages=-]{1flow.pdf}