feat: work in progress mom

This commit is contained in:
Krzysztof R. 2023-11-17 21:14:01 +01:00
parent c77e3038cc
commit dfc7714201
10 changed files with 666 additions and 5 deletions

View File

@ -0,0 +1,141 @@
\documentclass[12pt]{article}
\usepackage[polish]{babel}
\usepackage{float}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{pdfpages}
\usepackage[T1]{fontenc} % Add this line
\title{Sprawozdanie z projektu MOM}
\author{Krzysztof Rudnicki, 307585}
\date{\today}
\begin{document}
\maketitle
\section{Zadanie 1. Sieć przepływowa}
\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}
\subsection{Rozwiązanie}Z
\paragraph{Metoda }
\subsection{Zadanie programowania liniowego}
\section{Zadanie 2. Zadanie przydziału}
\subsection{Zadanie 2.1 Planowanie realizacji portfela przy ograniczonych kompetencjach}
\paragraph{Model sieciowy rysunek}
\subsubsection{Problem do rozwiązania}
\paragraph{Rozwiazanie}
\paragraph{Przydział zespołów do projektów}
\subsection{Zadanie 2.2 Minimalizacja kosztów realizacji projektów}
\paragraph{Model sieciowy rysunek}
\paragraph{Problem do rozwiązania}
\paragraph{Rozwiazanie}
\subsection{Zadanie 2.3 Minimalizacja terminu realizacji puli projektów}
\paragraph{Model programowania liniowego}
\section{Zadanie 3}
\paragraph{Model programowania liniowego}
\end{document}

Binary file not shown.

49
NotProgramming/MOM/1glpk Normal file
View File

@ -0,0 +1,49 @@
set StartObiekty;
set Obiekty;
set Elektrownie;
param c{i in StartObiekty, j in Obiekty};
param u{i in StartObiekty, j in Obiekty};
param Z{p in Elektrownie};
var f{i in StartObiekty, j in Obiekty}, >= 0;
minimize Q: sum {i in Obiekty, j in Obiekty} c[i,j] * f[i,j];
subject to
Ogr_1{i in StartObiekty, j in Obiekty}:
f[i,j] >= 0;
Ogr_2{i in StartObiekty, j in Obiekty}:
f[i,j] <= u[i,j];
Ogr_3{p in Elektrownie}:
sum {n in StartObiekty} f[n,p] >= Z[p];
Ogr_4{n in Obiekty}:
sum {i in Obiekty} f[n,i] <= sum {j in StartObiekty} f[j,n];
solve;
display {i in Obiekty, j in Obiekty: f[i,j] > 0}: f[i,j];
data;
set StartObiekty := s, A, B, C, D, E, F, G, H;
set Obiekty := A, B, C, D, E, F, G, H;
set Elektrownie := F, G, H;
param c :=
s A 0 s B 0 s C 0 A D 3 B D 6 B E 2 C D 4 C H 5 D E 3 D F 5 D G 7 D H 3
E D 3 E F 2 E G 4 s D 0 s E 0 s F 0 s G 0 s H 0 A A 0 A B 0 A C 0 A E 0
A F 0 A G 0 A H 0 B A 0 B B 0 B C 0 B F 0 B G 0 B H 0 C A 0 C B 0 C C 0
C E 0 C F 0 C G 0 D A 0 D B 0 D C 0 D D 0 E A 0 E B 0 E C 0 E E 0 E H 0
F A 0 F B 0 F C 0 F D 0 F E 0 F F 0 F G 0 F H 0 G A 0 G B 0 G C 0 G D 0
G E 0 G F 0 G G 0 G H 0 H A 0 H B 0 H C 0 H D 0 H E 0 H F 0 H G 0 H H 0;
param u :=
s A 10 s B 13 s C 17 A D 9 B D 5 B E 13 C D 6 C H 7 D E 15 D F 11 D G 7 D H 4
E D 15 E F 10 E G 14 s D 0 s E 0 s F 0 s G 0 s H 0 A A 0 A B 0 A C 0 A E 0
A F 0 A G 0 A H 0 B A 0 B B 0 B C 0 B F 0 B G 0 B H 0 C A 0 C B 0 C C 0
C E 0 C F 0 C G 0 D A 0 D B 0 D C 0 D D 0 E A 0 E B 0 E C 0 E E 0 E H 0
F A 0 F B 0 F C 0 F D 0 F E 0 F F 0 F G 0 F H 0 G A 0 G B 0 G C 0 G D 0
G E 0 G F 0 G G 0 G H 0 H A 0 H B 0 H C 0 H D 0 H E 0 H F 0 H G 0 H H 0;
param Z := F 15 G 12 H 8;
end;

View File

@ -0,0 +1,31 @@
data;
set BudynkiNaStart := s, A, B, C, D, E, F, G, H;
set Budynki := A, B, C, D, E, F, G, H;
set Elektrownie := F, G, H;
param c :=
s A 0 s B 0 s C 0 s D 0 s E 0 s F 0 s G 0 s H 0
A A 0 A B 0 A C 0 A D 4 A E 2 A F 0 A G 0 A H 0
B A 0 B B 0 B C 0 B D 4 B E 3 B F 0 B G 8 B H 0
C A 0 C B 0 C C 0 C D 2 C E 6 C F 0 C G 0 C H 0
D A 0 D B 0 D C 0 D D 0 D E 0 D F 3 D G 7 D H 2
E A 0 E B 0 E C 0 E D 5 E E 0 E F 7 E G 6 E H 3
F A 0 F B 0 F C 0 F D 0 F E 0 F F 0 F G 0 F H 0
G A 0 G B 0 G C 0 G D 0 G E 0 G F 0 G G 0 G H 0
H A 0 H B 0 H C 0 H D 0 H E 0 H F 0 H G 0 H H 0;
param p :=
s A 10 s B 13 s C 17 s D 0 s E 0 s F 0 s G 0 s H 0
A A 0 A B 0 A C 0 A D 15 A E 10 A F 0 A G 0 A H 0
B A 0 B B 0 B C 0 B D 4 B E 9 B F 0 B G 9 B H 0
C A 0 C B 0 C C 0 C D 20 C E 10 C F 0 C G 0 C H 0
D A 0 D B 0 D C 0 D D 0 D E 0 D F 10 D G 3 D H 2
E A 0 E B 0 E C 0 E D 20 E E 0 E F 5 E G 5 E H 5
F A 0 F B 0 F C 0 F D 0 F E 0 F F 0 F G 0 F H 0
G A 0 G B 0 G C 0 G D 0 G E 0 G F 0 G G 0 G H 0
H A 0 H B 0 H C 0 H D 0 H E 0 H F 0 H G 0 H H 0;
param Z := F 15 G 13 H 7;
end;

View File

@ -0,0 +1,24 @@
set BudynkiNaStart;
set Budynki;
set Elektrownie;
param c{i in BudynkiNaStart, j in Budynki};
param u{i in BudynkiNaStart, j in Budynki};
param Z{e in Elektrownie};
var f{i in BudynkiNaStart, j in Budynki}, >= 0;
minimize Q: sum {i in Budynki, j in Budynki} c[i,j] * f[i,j];
subject to
Ogr_1{i in BudynkiNaStart, j in Budynki}:
f[i,j] >= 0;
Ogr_2{i in BudynkiNaStart, j in Budynki}:
f[i,j] <= u[i,j];
Ogr_3{e in Elektrownie}:
sum {n in BudynkiNaStart} f[n,e] >= Z[e];
Ogr_4{n in Budynki}:
sum {i in Budynki} f[n,i] <= sum {j in BudynkiNaStart} f[j,n];
solve;
display {i in Budynki, j in Budynki: f[i,j] > 0}: f[i,j];

View File

@ -0,0 +1,49 @@
set StartObiekty;
set Obiekty;
set Elektrownie;
param c{i in StartObiekty, j in Obiekty};
param u{i in StartObiekty, j in Obiekty};
param Z{p in Elektrownie};
var f{i in StartObiekty, j in Obiekty}, >= 0;
minimize Q: sum {i in Obiekty, j in Obiekty} c[i,j] * f[i,j];
subject to
Ogr_1{i in StartObiekty, j in Obiekty}:
f[i,j] >= 0;
Ogr_2{i in StartObiekty, j in Obiekty}:
f[i,j] <= u[i,j];
Ogr_3{p in Elektrownie}:
sum {n in StartObiekty} f[n,p] >= Z[p];
Ogr_4{n in Obiekty}:
sum {i in Obiekty} f[n,i] <= sum {j in StartObiekty} f[j,n];
solve;
display {i in Obiekty, j in Obiekty: f[i,j] > 0}: f[i,j];
data;
set StartObiekty := s, A, B, C, D, E, F, G, H;
set Obiekty := A, B, C, D, E, F, G, H;
set Elektrownie := F, G, H;
param c :=
s A 0 s B 0 s C 0 A D 3 B D 6 B E 2 C D 4 C H 5 D E 3 D F 5 D G 7 D H 3
E D 3 E F 2 E G 4 s D 0 s E 0 s F 0 s G 0 s H 0 A A 0 A B 0 A C 0 A E 0
A F 0 A G 0 A H 0 B A 0 B B 0 B C 0 B F 0 B G 0 B H 0 C A 0 C B 0 C C 0
C E 0 C F 0 C G 0 D A 0 D B 0 D C 0 D D 0 E A 0 E B 0 E C 0 E E 0 E H 0
F A 0 F B 0 F C 0 F D 0 F E 0 F F 0 F G 0 F H 0 G A 0 G B 0 G C 0 G D 0
G E 0 G F 0 G G 0 G H 0 H A 0 H B 0 H C 0 H D 0 H E 0 H F 0 H G 0 H H 0;
param u :=
s A 10 s B 13 s C 17 A D 9 B D 5 B E 13 C D 6 C H 7 D E 15 D F 11 D G 7 D H 4
E D 15 E F 10 E G 14 s D 0 s E 0 s F 0 s G 0 s H 0 A A 0 A B 0 A C 0 A E 0
A F 0 A G 0 A H 0 B A 0 B B 0 B C 0 B F 0 B G 0 B H 0 C A 0 C B 0 C C 0
C E 0 C F 0 C G 0 D A 0 D B 0 D C 0 D D 0 E A 0 E B 0 E C 0 E E 0 E H 0
F A 0 F B 0 F C 0 F D 0 F E 0 F F 0 F G 0 F H 0 G A 0 G B 0 G C 0 G D 0
G E 0 G F 0 G G 0 G H 0 H A 0 H B 0 H C 0 H D 0 H E 0 H F 0 H G 0 H H 0;
param Z := F 15 G 12 H 8;
end;

View File

@ -0,0 +1,24 @@
set BudynkiNaStart;
set Budynki;
set Elektrownie;
param c{i in BudynkiNaStart, j in Budynki};
param p{i in BudynkiNaStart, j in Budynki};
param Z{e in Elektrownie};
var f{i in BudynkiNaStart, j in Budynki}, >= 0;
minimize Q: sum {i in Budynki, j in Budynki} c[i,j] * f[i,j];
subject to
Ograniczenie_1{i in BudynkiNaStart, j in Budynki}:
f[i,j] >= 0;
Ograniczenie_2{i in BudynkiNaStart, j in Budynki}:
f[i,j] <= p[i,j];
Ograniczenie_3{e in Elektrownie}:
sum {n in BudynkiNaStart} f[n,e] >= Z[e];
Ograniczenie_4{n in Budynki}:
sum {i in Budynki} f[n,i] <= sum {j in BudynkiNaStart} f[j,n];
solve;
display {i in Budynki, j in Budynki: f[i,j] > 0}: f[i,j];

Binary file not shown.

243
NotProgramming/MOM/graphs Normal file
View File

@ -0,0 +1,243 @@
<mxfile host="app.diagrams.net" modified="2023-11-17T19:00:41.991Z" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36" etag="cnp7cgBkCr5KXAtPrHL_" version="22.1.3" type="device">
<diagram name="Page-1" id="8QQrMdNaT32kPHTfEJmi">
<mxGraphModel dx="1642" dy="787" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" background="#ffffff" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="ZybQ-fv8Gocl7lNzSQPM-46" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;jumpStyle=arc;jumpSize=12;fillColor=#f8cecc;strokeColor=#b85450;" edge="1" parent="1" source="ZybQ-fv8Gocl7lNzSQPM-3" target="ZybQ-fv8Gocl7lNzSQPM-7">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="190" y="310" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="ZybQ-fv8Gocl7lNzSQPM-69" value="4, 4" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=14;fontColor=#F19C99;" vertex="1" connectable="0" parent="ZybQ-fv8Gocl7lNzSQPM-46">
<mxGeometry x="-0.0298" y="1" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="ZybQ-fv8Gocl7lNzSQPM-47" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fillColor=#f8cecc;strokeColor=#b85450;" edge="1" parent="1" source="ZybQ-fv8Gocl7lNzSQPM-3" target="ZybQ-fv8Gocl7lNzSQPM-11">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="ZybQ-fv8Gocl7lNzSQPM-70" value="3, 9" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=14;fontColor=#F19C99;" vertex="1" connectable="0" parent="ZybQ-fv8Gocl7lNzSQPM-47">
<mxGeometry x="-0.5404" y="3" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="ZybQ-fv8Gocl7lNzSQPM-48" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fillColor=#f8cecc;strokeColor=#b85450;" edge="1" parent="1" source="ZybQ-fv8Gocl7lNzSQPM-3" target="ZybQ-fv8Gocl7lNzSQPM-5">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="190" y="540" />
<mxPoint x="600" y="540" />
<mxPoint x="600" y="390" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="ZybQ-fv8Gocl7lNzSQPM-71" value="8, 9" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=14;fontColor=#F19C99;" vertex="1" connectable="0" parent="ZybQ-fv8Gocl7lNzSQPM-48">
<mxGeometry x="-0.4174" y="-2" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="ZybQ-fv8Gocl7lNzSQPM-3" value="B" style="whiteSpace=wrap;html=1;aspect=fixed;shape=ellipse;perimeter=ellipsePerimeter;fontSize=48;fillColor=#f8cecc;strokeColor=#b85450;" vertex="1" parent="1">
<mxGeometry x="150" y="350" width="80" height="80" as="geometry" />
</mxCell>
<mxCell id="ZybQ-fv8Gocl7lNzSQPM-4" value="H" style="whiteSpace=wrap;html=1;aspect=fixed;shape=ellipse;perimeter=ellipsePerimeter;fontSize=48;fillColor=#fff2cc;strokeColor=#d6b656;" vertex="1" parent="1">
<mxGeometry x="620" y="550" width="80" height="80" as="geometry" />
</mxCell>
<mxCell id="ZybQ-fv8Gocl7lNzSQPM-5" value="G" style="whiteSpace=wrap;html=1;aspect=fixed;shape=ellipse;perimeter=ellipsePerimeter;fontSize=48;fillColor=#fff2cc;strokeColor=#d6b656;" vertex="1" parent="1">
<mxGeometry x="620" y="350" width="80" height="80" as="geometry" />
</mxCell>
<mxCell id="ZybQ-fv8Gocl7lNzSQPM-6" value="F" style="whiteSpace=wrap;html=1;aspect=fixed;shape=ellipse;perimeter=ellipsePerimeter;fontSize=48;fillColor=#fff2cc;strokeColor=#d6b656;" vertex="1" parent="1">
<mxGeometry x="620" y="140" width="80" height="80" as="geometry" />
</mxCell>
<mxCell id="ZybQ-fv8Gocl7lNzSQPM-56" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fillColor=#dae8fc;strokeColor=#6c8ebf;" edge="1" parent="1" target="ZybQ-fv8Gocl7lNzSQPM-6">
<mxGeometry relative="1" as="geometry">
<mxPoint x="465" y="296" as="sourcePoint" />
<mxPoint x="620" y="166" as="targetPoint" />
<Array as="points">
<mxPoint x="543" y="296" />
<mxPoint x="543" y="180" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="ZybQ-fv8Gocl7lNzSQPM-74" value="3, 10" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontColor=#A9C4EB;fontSize=14;" vertex="1" connectable="0" parent="ZybQ-fv8Gocl7lNzSQPM-56">
<mxGeometry x="-0.8376" y="-1" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="ZybQ-fv8Gocl7lNzSQPM-57" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fillColor=#dae8fc;strokeColor=#6c8ebf;" edge="1" parent="1" source="ZybQ-fv8Gocl7lNzSQPM-7" target="ZybQ-fv8Gocl7lNzSQPM-5">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="ZybQ-fv8Gocl7lNzSQPM-75" value="7, 3" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontColor=#A9C4EB;fontSize=14;" vertex="1" connectable="0" parent="ZybQ-fv8Gocl7lNzSQPM-57">
<mxGeometry x="-0.7191" y="-3" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="ZybQ-fv8Gocl7lNzSQPM-58" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;fillColor=#dae8fc;strokeColor=#6c8ebf;jumpStyle=arc;jumpSize=12;" edge="1" parent="1" target="ZybQ-fv8Gocl7lNzSQPM-4">
<mxGeometry relative="1" as="geometry">
<mxPoint x="465" y="320" as="sourcePoint" />
<mxPoint x="700" y="600" as="targetPoint" />
<Array as="points">
<mxPoint x="780" y="320" />
<mxPoint x="780" y="590" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="ZybQ-fv8Gocl7lNzSQPM-76" value="2, 2" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontColor=#A9C4EB;fontSize=14;" vertex="1" connectable="0" parent="ZybQ-fv8Gocl7lNzSQPM-58">
<mxGeometry x="-0.1368" y="-2" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="ZybQ-fv8Gocl7lNzSQPM-7" value="D" style="whiteSpace=wrap;html=1;aspect=fixed;shape=ellipse;perimeter=ellipsePerimeter;fontSize=48;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
<mxGeometry x="385" y="270" width="80" height="80" as="geometry" />
</mxCell>
<mxCell id="ZybQ-fv8Gocl7lNzSQPM-43" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fillColor=#f8cecc;strokeColor=#b85450;" edge="1" parent="1" source="ZybQ-fv8Gocl7lNzSQPM-8" target="ZybQ-fv8Gocl7lNzSQPM-7">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="190" y="130" />
<mxPoint x="425" y="130" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="ZybQ-fv8Gocl7lNzSQPM-67" value="4, 15" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=14;fontColor=#F19C99;" vertex="1" connectable="0" parent="ZybQ-fv8Gocl7lNzSQPM-43">
<mxGeometry x="0.0805" y="-4" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="ZybQ-fv8Gocl7lNzSQPM-45" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;jumpStyle=arc;jumpSize=12;fillColor=#f8cecc;strokeColor=#b85450;" edge="1" parent="1" source="ZybQ-fv8Gocl7lNzSQPM-8" target="ZybQ-fv8Gocl7lNzSQPM-11">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="350" y="199" />
<mxPoint x="350" y="410" />
<mxPoint x="425" y="410" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="ZybQ-fv8Gocl7lNzSQPM-68" value="2, 10" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=14;fontColor=#F19C99;" vertex="1" connectable="0" parent="ZybQ-fv8Gocl7lNzSQPM-45">
<mxGeometry x="-0.5088" y="-3" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="ZybQ-fv8Gocl7lNzSQPM-8" value="A" style="whiteSpace=wrap;html=1;aspect=fixed;shape=ellipse;perimeter=ellipsePerimeter;fontSize=48;fillColor=#f8cecc;strokeColor=#b85450;" vertex="1" parent="1">
<mxGeometry x="150" y="140" width="80" height="80" as="geometry" />
</mxCell>
<mxCell id="ZybQ-fv8Gocl7lNzSQPM-41" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" edge="1" parent="1" source="ZybQ-fv8Gocl7lNzSQPM-9" target="ZybQ-fv8Gocl7lNzSQPM-3">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="ZybQ-fv8Gocl7lNzSQPM-65" value="0, 13" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=14;fontColor=#B9E0A5;" vertex="1" connectable="0" parent="ZybQ-fv8Gocl7lNzSQPM-41">
<mxGeometry x="-0.3333" y="-5" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="ZybQ-fv8Gocl7lNzSQPM-52" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fillColor=#d5e8d4;strokeColor=#82b366;" edge="1" parent="1" source="ZybQ-fv8Gocl7lNzSQPM-9" target="ZybQ-fv8Gocl7lNzSQPM-8">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="50" y="180" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="ZybQ-fv8Gocl7lNzSQPM-64" value="0, 10" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=14;fontColor=#B9E0A5;" vertex="1" connectable="0" parent="ZybQ-fv8Gocl7lNzSQPM-52">
<mxGeometry x="-0.2074" y="-2" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="ZybQ-fv8Gocl7lNzSQPM-53" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fillColor=#d5e8d4;strokeColor=#82b366;" edge="1" parent="1" source="ZybQ-fv8Gocl7lNzSQPM-9" target="ZybQ-fv8Gocl7lNzSQPM-10">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="50" y="590" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="ZybQ-fv8Gocl7lNzSQPM-66" value="0, 17" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=14;fontColor=#B9E0A5;" vertex="1" connectable="0" parent="ZybQ-fv8Gocl7lNzSQPM-53">
<mxGeometry x="-0.2769" y="3" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="ZybQ-fv8Gocl7lNzSQPM-9" value="s" style="whiteSpace=wrap;html=1;aspect=fixed;shape=ellipse;perimeter=ellipsePerimeter;fontSize=48;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="1">
<mxGeometry x="10" y="350" width="80" height="80" as="geometry" />
</mxCell>
<mxCell id="ZybQ-fv8Gocl7lNzSQPM-50" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;jumpStyle=arc;jumpSize=12;fillColor=#f8cecc;strokeColor=#b85450;" edge="1" parent="1" source="ZybQ-fv8Gocl7lNzSQPM-10" target="ZybQ-fv8Gocl7lNzSQPM-7">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="190" y="640" />
<mxPoint x="500" y="640" />
<mxPoint x="500" y="370" />
<mxPoint x="425" y="370" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="ZybQ-fv8Gocl7lNzSQPM-73" value="2, 20" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=14;fontColor=#F19C99;" vertex="1" connectable="0" parent="ZybQ-fv8Gocl7lNzSQPM-50">
<mxGeometry x="-0.6993" y="-5" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="ZybQ-fv8Gocl7lNzSQPM-51" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;jumpStyle=arc;jumpSize=12;fillColor=#f8cecc;strokeColor=#b85450;" edge="1" parent="1" source="ZybQ-fv8Gocl7lNzSQPM-10" target="ZybQ-fv8Gocl7lNzSQPM-11">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="ZybQ-fv8Gocl7lNzSQPM-72" value="6, 10" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=14;fontColor=#F19C99;" vertex="1" connectable="0" parent="ZybQ-fv8Gocl7lNzSQPM-51">
<mxGeometry x="-0.5564" y="-3" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="ZybQ-fv8Gocl7lNzSQPM-10" value="C" style="whiteSpace=wrap;html=1;aspect=fixed;shape=ellipse;perimeter=ellipsePerimeter;fontSize=48;fillColor=#f8cecc;strokeColor=#b85450;" vertex="1" parent="1">
<mxGeometry x="150" y="550" width="80" height="80" as="geometry" />
</mxCell>
<mxCell id="ZybQ-fv8Gocl7lNzSQPM-60" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=1;entryDx=0;entryDy=0;jumpStyle=arc;fillColor=#dae8fc;strokeColor=#6c8ebf;jumpSize=12;" edge="1" parent="1" source="ZybQ-fv8Gocl7lNzSQPM-11" target="ZybQ-fv8Gocl7lNzSQPM-7">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="480" y="470" />
<mxPoint x="480" y="338" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="ZybQ-fv8Gocl7lNzSQPM-78" value="5, 20" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontColor=#A9C4EB;fontSize=14;" vertex="1" connectable="0" parent="ZybQ-fv8Gocl7lNzSQPM-60">
<mxGeometry x="-0.1581" y="3" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="ZybQ-fv8Gocl7lNzSQPM-61" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;jumpStyle=arc;jumpSize=12;fillColor=#dae8fc;strokeColor=#6c8ebf;" edge="1" parent="1" target="ZybQ-fv8Gocl7lNzSQPM-6">
<mxGeometry relative="1" as="geometry">
<mxPoint x="465" y="462" as="sourcePoint" />
<mxPoint x="660" y="132" as="targetPoint" />
<Array as="points">
<mxPoint x="570" y="462" />
<mxPoint x="570" y="112" />
<mxPoint x="660" y="112" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="ZybQ-fv8Gocl7lNzSQPM-79" value="7, 5" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontColor=#A9C4EB;fontSize=14;" vertex="1" connectable="0" parent="ZybQ-fv8Gocl7lNzSQPM-61">
<mxGeometry x="-0.7208" y="-1" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="ZybQ-fv8Gocl7lNzSQPM-62" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;jumpStyle=arc;jumpSize=12;" edge="1" parent="1" target="ZybQ-fv8Gocl7lNzSQPM-5">
<mxGeometry relative="1" as="geometry">
<mxPoint x="465" y="480" as="sourcePoint" />
<mxPoint x="660" y="440" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="ZybQ-fv8Gocl7lNzSQPM-80" value="6, 5" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontColor=#A9C4EB;fontSize=14;" vertex="1" connectable="0" parent="ZybQ-fv8Gocl7lNzSQPM-62">
<mxGeometry x="-0.3237" y="-5" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="ZybQ-fv8Gocl7lNzSQPM-63" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;jumpStyle=arc;jumpSize=12;fillColor=#dae8fc;strokeColor=#6c8ebf;" edge="1" parent="1" source="ZybQ-fv8Gocl7lNzSQPM-11" target="ZybQ-fv8Gocl7lNzSQPM-4">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="660" y="500" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="ZybQ-fv8Gocl7lNzSQPM-81" value="3, 5" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontColor=#A9C4EB;fontSize=14;" vertex="1" connectable="0" parent="ZybQ-fv8Gocl7lNzSQPM-63">
<mxGeometry x="0.5127" y="3" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="ZybQ-fv8Gocl7lNzSQPM-11" value="E" style="whiteSpace=wrap;html=1;aspect=fixed;shape=ellipse;perimeter=ellipsePerimeter;fontSize=48;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
<mxGeometry x="385" y="430" width="80" height="80" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>

View File

@ -1,6 +1,10 @@
\documentclass[12pt]{article} \documentclass[12pt]{article}
\usepackage[polish]{babel} \usepackage[polish]{babel}
\usepackage{float}
\usepackage[utf8]{inputenc} \usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{pdfpages}
\usepackage[T1]{fontenc} % Add this line
\title{Sprawozdanie z projektu MOM} \title{Sprawozdanie z projektu MOM}
\author{Krzysztof Rudnicki, 307585} \author{Krzysztof Rudnicki, 307585}
\date{\today} \date{\today}
@ -8,12 +12,108 @@
\maketitle \maketitle
\section{Zadanie 1. Sieć przepływowa} \section{Zadanie 1. Sieć przepływowa}
\subsection{Model sieciowy}
\paragraph{Sformułowanie}
\paragraph{Narysowanie modelu}
\paragraph{Problem do rozwiązania}
\subsection{Rozwiązanie} \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}
\subsection{Rozwiązanie}Z
\paragraph{Metoda } \paragraph{Metoda }