feat: add wdwr project

This commit is contained in:
Krzysztof Rudnicki 2025-04-20 15:57:04 +02:00
parent 66fcb9ed01
commit 17f13fb587
58 changed files with 12814 additions and 3 deletions

View File

@ -3,7 +3,9 @@
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{svg}
\usepackage[T1]{fontenc}
\usepackage[polish]{babel}
\usepackage[utf8]{inputenc}
\graphicspath{ {./images/} }
\usetheme{Warsaw}
@ -50,7 +52,7 @@
\tableofcontents
\end{frame}
\section{Definicje}
\section{Teoria}
\begin{frame}
\frametitle{Gra komputerowa}
\large Aplikacja dostępna na platformie "Steam" oznaczona typem "Game"
@ -298,7 +300,8 @@
\item Intuicyjność
\item Materiały
\item Zasoby (Assety)
\item Dostępne funkcje
\item Dostępne funkcje}
\item ChatGPT
\end{itemize}
\end{frame}

View File

@ -0,0 +1,4 @@
krotka (!) teoria
jaki jest cel
co zostalo zrobione (NAJWAZNIEJSZE)
czy sie udalo

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 390 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 606 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 408 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

View File

@ -0,0 +1,657 @@
\documentclass{beamer}
\usepackage[fontsize=20pt]{fontsize}
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{svg}
\usepackage[T1]{fontenc}
\usepackage[polish]{babel}
\usepackage[utf8]{inputenc}
\graphicspath{ {./images/} }
\usetheme{Warsaw}
%Information to be included in the title page:
% Custom title page layout adjustments
\title{\large Porównanie wydajności i możliwości współczesnych silników do gier komputerowych}
\author{Krzysztof Rudnicki}
\institute{
\textbf{Promotor} \\
dr inż. Michał Chwesiuk
}
\date{\scriptsize \today} % Adjust the font size here
\setbeamertemplate{footline}[frame number]{}
\beamertemplatenavigationsymbolsempty
\setbeamertemplate{headline}{}
\begin{document}
\begin{frame}
\vspace{-0.5cm} % Adjust vertical space above title
\maketitle
% Alternatively, use a completely custom layout:
%\begin{center}
% {\Large\inserttitle\par}
% \vskip1em
% {\insertauthor\par}
% \vskip1em
% {\insertinstitute\par}
% \vskip1em
% {\insertdate\par}
%\end{center}
\end{frame}
\begin{frame}
\frametitle{Plan prezentacji}
\tableofcontents
\end{frame}
\section{Teoria}
\begin{frame}
\frametitle{Gra komputerowa}
\large Aplikacja dostępna na platformie "Steam" oznaczona typem "Game"
\end{frame}
\begin{frame}
\frametitle{Silnik do gier}
\large Oprogramowanie zaprojektowane i stworzone do kreacji gier komputerowych
\end{frame}
\begin{frame}
\frametitle{Nowoczesne}
\large Ponad 1000 gier w tej dekadzie na platformie "Steam"
\end{frame}
{
\setbeamercolor{footline}{fg=white}
\usebackgroundtemplate{\includegraphics[width=\paperwidth, height=\paperheight]{steamdb_main.png}}
\begin{frame}
\end{frame}
}
{
\usebackgroundtemplate{\includegraphics[width=\paperwidth, height=\paperheight]{steamdb_filter.drawio.pdf}}
\begin{frame}
\end{frame}
}
\begin{frame}
\frametitle{Wybrane silniki - start}
\begin{center}
\includegraphics[width=0.8\paperwidth, height=0.8\paperheight]{usedEngines.pdf}
\end{center}
\end{frame}
\begin{frame}
\frametitle{Wybrane silniki}
\begin{itemize}
\item Wyeliminowanie nie generycznych - Ren'Py, RPGMaker
\item Wybór najpopularniejszych - Unity, Unreal
% Prawie 25k i ponad 7.5k
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Wydajność silnika}
\begin{itemize}
\item Klatki na sekundę (FPS)
\item Zużycie CPU, GPU, RAM i VRAM
\item Liczba draw calls
\item Czas ładowania assetów
\item Czas odpowiedzi na interakcję gracza
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Możliwości Silnika}
\begin{itemize}
\item Renderowanie grafiki
% Ray tracing, HDR lighting, dynamic shadows, particle systems, animacja
\item Silnik Fizyczny
\item Multiplatformowość (VR)
% Linux, Windows, MacOS, Android, IOs, Xbox, PlayStation, Nintendo, VR
\item Skryptowanie logiki gier (AI)
\item Gry online
\item Sklepy z assetami
\end{itemize}
\end{frame}
\section{Narzędzia}
\frametitle{Unity Profiler}
{
\setbeamercolor{footline}{fg=white}
\usebackgroundtemplate{
\includegraphics[width=\paperwidth, height=\paperheight]
{unity_profiler.png}}
\begin{frame}
\end{frame}
}
\frametitle{Unreal Profiler}
{
\setbeamercolor{footline}{fg=white}
\usebackgroundtemplate{
\includegraphics[width=\paperwidth, height=\paperheight]
{unreal_profiler.jpg}}
\begin{frame}
\end{frame}
}
\frametitle{Nvidia nsight}
{
\setbeamercolor{footline}{fg=white}
\usebackgroundtemplate{
\includegraphics[width=\paperwidth, height=\paperheight]
{nvida_nsighty.jpg}}
\begin{frame}
\end{frame}
}
\begin{frame}
\frametitle{Nsight - Analiza FPS}
\center
\includegraphics[width=1\textwidth]{fps_overview.png}
% Ile klatek pokazaliśmy na ile
% ile trwała średnio klatka
% Ile trwała najkrótsza klatka
% Ile trwała najdłuższa klatka
% Przeciętne klatki na sekundę dla pokazanego wycinka
% Tyle lub mniej czasu trwało 99% klatek
\end{frame}
\begin{frame}
\frametitle{Nsight - Analiza FPS}
\center
\includegraphics[width=1\textwidth]{stutter_row.png}
% Wykrywanie "zawieszek"
% Wykrywamy klatki których długość
% jest znacznie dłuższa od długości mediany pobliskich 19 klatek
% zawieszka musi być dłuższa niż 4 milisekundy
\end{frame}
\begin{frame}
\frametitle{Nsight - Analiza FPS}
\center
\includegraphics[width=1\textwidth]{dx12_frame_health.png}
% Możemy sprawdzić jaka klatka miała zawieszkę
% I jaka metoda w api tę zawieszkę spowodowała
\end{frame}
\begin{frame}
\frametitle{Nsight - Zużycie VRAM}
\center
\includegraphics[width=1\textwidth]{memory_utilization.png}
% Zielony -> ile pamięci mamy dostępnej
% Pomarańczowy -> ile pamięci zużyliśmy
\end{frame}
\begin{frame}
\frametitle{Nsight - Zużycie VRAM}
\center
\includegraphics[width=1\textwidth]{memory_utilization_gpu_vram.png}
% VidMm Device Suspension -> okresy kiedy przetransferowano
% Jeden duży zasób pamięci
% Demoted Memory -> w GPU mamy local memory (szybsze) i global memory
% (wolniejsze) to może nam mówić o "wyciekach" pamięci
% źle zooptymalizowanej pamięci itd.
% Allokacja pamięci -> zielone aplikacja, szare -> system
\end{frame}
\begin{frame}
\frametitle{Nsight - Zużycie VRAM}
\center
\includegraphics[width=1\textwidth]{memory_utilization_resource_migrations.png}
% W kolejności co najwięcej zużyło zasobów
% Konkretnie ile i kiedy
\end{frame}
\begin{frame}
\frametitle{Nsight - Zużycie VRAM}
\center
\includegraphics[width=1\textwidth]{memory_utilization_memory_transfer.png}
% W kolejności co najwięcej zużyło zasobów
% Konkretnie ile i kiedy
\end{frame}
\begin{frame}
\frametitle{Jak porównywać?}
\begin{itemize}
\item Stworzenie gry na obu
\item Porównywanie istniejących gier
\item Porównanie samych edytorów
\end{itemize}
\end{frame}
{
\setbeamercolor{footline}{fg=white}
\usebackgroundtemplate{
\includegraphics[width=\paperwidth, height=\paperheight]
{maxresdefault (1).jpg}}
\begin{frame}
\end{frame}
}
\begin{frame}
\frametitle{Wybór gatunku}
FPS:
\begin{itemize}
\item Wystarczająco skomplikowany
\item Grafika
\item Fizyka
\item Klasyczny benchmark
% Wolfenstein, Doom, Quake, Crysis
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Problem}
Inklinacja Silnika \\
\begin{itemize}
\item $ \frac{2478}{39713} \approx 6\% $ gier Unity to FPS \\
\item $ \frac{1765}{11158} \approx 15\% $ gier Unreal to FPS \\
\end{itemize}
Źródło: steamdb.info
\end{frame}
\begin{frame}
\frametitle{Wybór gatunku}
Bullet hell:
\begin{itemize}
\item Wystarczająco skomplikowany
\item Grafika
\item Czas jest ważny
% W Bullet hell czas jest ważny, gra musi być płynna
\end{itemize}
\end{frame}
{
\setbeamercolor{footline}{fg=white}
\usebackgroundtemplate{
\includegraphics[width=\paperwidth, height=\paperheight]
{maxresdefault.jpg}}
\begin{frame}
\end{frame}
}
\begin{frame}
\frametitle{Wyzwania}
\begin{itemize}
\item Sprzęt
% Ten sam, jeden i ten sam komputer użyty w procesie kreacji obu
\item Umiejętności
% Nie mam
\item Podobne wersje silnika
% Użyje ostatniego LTS
\item Inklinacja Silnika \\ (3\% Unity, 2.4\% Unreal)
% ??? Ch
% 1577 FPS UNITY, 271 FPS UNREAL
% 39713 Total Unity, 11158 Total Unreal (proporcjonalnie 2 razy więcej :<)
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Ocena łatwości użycia}
\begin{itemize}
\item Dokumentacja
\item Intuicyjność
\item Materiały
\item Zasoby (Assety)
\item Dostępne funkcje}
\item ChatGPT
\end{itemize}
\end{frame}
\documentclass{beamer}
\usepackage[fontsize=20pt]{fontsize}
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{svg}
\usepackage[polish]{babel}
\graphicspath{ {./images/} }
\usetheme{Warsaw}
%Information to be included in the title page:
% Custom title page layout adjustments
\title{\large Porównanie wydajności i możliwości współczesnych silników do gier komputerowych}
\author{Krzysztof Rudnicki}
\institute{
\textbf{Promotor} \\
dr inż. Michał Chwesiuk
}
\date{\scriptsize \today} % Adjust the font size here
\setbeamertemplate{footline}[frame number]{}
\beamertemplatenavigationsymbolsempty
\setbeamertemplate{headline}{}
\begin{document}
\begin{frame}
\vspace{-0.5cm} % Adjust vertical space above title
\maketitle
% Alternatively, use a completely custom layout:
%\begin{center}
% {\Large\inserttitle\par}
% \vskip1em
% {\insertauthor\par}
% \vskip1em
% {\insertinstitute\par}
% \vskip1em
% {\insertdate\par}
%\end{center}
\end{frame}
\begin{frame}
\frametitle{Plan prezentacji}
\tableofcontents
\end{frame}
\section{Teoria}
\begin{frame}
\frametitle{Gra komputerowa}
\large Aplikacja dostępna na platformie "Steam" oznaczona typem "Game"
\end{frame}
\begin{frame}
\frametitle{Silnik do gier}
\large Oprogramowanie zaprojektowane i stworzone do kreacji gier komputerowych
\end{frame}
\begin{frame}
\frametitle{Nowoczesne}
\large Ponad 1000 gier w tej dekadzie na platformie "Steam"
\end{frame}
{
\setbeamercolor{footline}{fg=white}
\usebackgroundtemplate{\includegraphics[width=\paperwidth, height=\paperheight]{steamdb_main.png}}
\begin{frame}
\end{frame}
}
{
\usebackgroundtemplate{\includegraphics[width=\paperwidth, height=\paperheight]{steamdb_filter.drawio.pdf}}
\begin{frame}
\end{frame}
}
\begin{frame}
\frametitle{Wybrane silniki - start}
\begin{center}
\includegraphics[width=0.8\paperwidth, height=0.8\paperheight]{usedEngines.pdf}
\end{center}
\end{frame}
\begin{frame}
\frametitle{Wybrane silniki}
\begin{itemize}
\item Wyeliminowanie nie generycznych - Ren'Py, RPGMaker
\item Wybór najpopularniejszych - Unity, Unreal
% Prawie 25k i ponad 7.5k
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Wydajność silnika}
\begin{itemize}
\item Klatki na sekundę (FPS)
\item Zużycie CPU, GPU, RAM i VRAM
\item Liczba draw calls
\item Czas ładowania assetów
\item Czas odpowiedzi na interakcję gracza
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Możliwości Silnika}
\begin{itemize}
\item Renderowanie grafiki
% Ray tracing, HDR lighting, dynamic shadows, particle systems, animacja
\item Silnik Fizyczny
\item Multiplatformowość (VR)
% Linux, Windows, MacOS, Android, IOs, Xbox, PlayStation, Nintendo, VR
\item Skryptowanie logiki gier (AI)
\item Gry online
\item Sklepy z assetami
\end{itemize}
\end{frame}
\section{Narzędzia}
\frametitle{Unity Profiler}
{
\setbeamercolor{footline}{fg=white}
\usebackgroundtemplate{
\includegraphics[width=\paperwidth, height=\paperheight]
{unity_profiler.png}}
\begin{frame}
\end{frame}
}
\frametitle{Unreal Profiler}
{
\setbeamercolor{footline}{fg=white}
\usebackgroundtemplate{
\includegraphics[width=\paperwidth, height=\paperheight]
{unreal_profiler.jpg}}
\begin{frame}
\end{frame}
}
\begin{frame}
\frametitle{Nsight - Analiza FPS}
\center
\includegraphics[width=1\textwidth]{fps_overview.png}
% Ile klatek pokazaliśmy na ile
% ile trwała średnio klatka
% Ile trwała najkrótsza klatka
% Ile trwała najdłuższa klatka
% Przeciętne klatki na sekundę dla pokazanego wycinka
% Tyle lub mniej czasu trwało 99% klatek
\end{frame}
\begin{frame}
\frametitle{Nsight - Analiza FPS}
\center
\includegraphics[width=1\textwidth]{stutter_row.png}
% Wykrywanie "zawieszek"
% Wykrywamy klatki których długość
% jest znacznie dłuższa od długości mediany pobliskich 19 klatek
% zawieszka musi być dłuższa niż 4 milisekundy
\end{frame}
\begin{frame}
\frametitle{Nsight - Analiza FPS}
\center
\includegraphics[width=1\textwidth]{dx12_frame_health.png}
% Możemy sprawdzić jaka klatka miała zawieszkę
% I jaka metoda w api tę zawieszkę spowodowała
\end{frame}
\begin{frame}
\frametitle{Nsight - Zużycie VRAM}
\center
\includegraphics[width=1\textwidth]{memory_utilization.png}
% Zielony -> ile pamięci mamy dostępnej
% Pomarańczowy -> ile pamięci zużyliśmy
\end{frame}
\begin{frame}
\frametitle{Nsight - Zużycie VRAM}
\center
\includegraphics[width=1\textwidth]{memory_utilization_gpu_vram.png}
% VidMm Device Suspension -> okresy czasku kiedy przetransferowano
% Jeden duży zasób pamięci
% Demoted Memory -> w GPU mamy local memory (szybsze) i global memory
% (wolniejsze) to może nam mówić o "wyciekach" pamięci
% źle zooptymalizowanej pamięci itd.
% Allokacja pamięci -> zielone aplikacja, szare -> system
\end{frame}
\begin{frame}
\frametitle{Nsight - Zużycie VRAM}
\center
\includegraphics[width=1\textwidth]{memory_utilization_resource_migrations.png}
% W kolejności co najwięcej zużyło zasobów
% Konkretnie ile i kiedy
\end{frame}
\begin{frame}
\frametitle{Nsight - Zużycie VRAM}
\center
\includegraphics[width=1\textwidth]{memory_utilization_memory_transfer.png}
% W kolejności co najwięcej zużyło zasobów
% Konkretnie ile i kiedy
\end{frame}
\begin{frame}
\frametitle{Jak porównywać?}
\begin{itemize}
\item Stworzenie gry na obu
\item Porównywanie istniejących gier
\item Porównanie samych edytorów
\end{itemize}
\end{frame}
{
\setbeamercolor{footline}{fg=white}
\usebackgroundtemplate{
\includegraphics[width=\paperwidth, height=\paperheight]
{maxresdefault (1).jpg}}
\begin{frame}
\end{frame}
}
\begin{frame}
\frametitle{Wybór gatunku}
FPS:
\begin{itemize}
\item Wystarczająco skomplikowany
\item Grafika
\item Fizyka
\item Klasyczny benchmark
% Wolfenstein, Doom, Quake, Crysis
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Problem}
Inklinacja Silnika \\
\begin{itemize}
\item $ \frac{2478}{39713} \approx 6\% $ gier Unity to FPS \\
\item $ \frac{1765}{11158} \approx 15\% $ gier Unreal to FPS \\
\end{itemize}
Źródło: steamdb.info
\end{frame}
\begin{frame}
\frametitle{Wybór gatunku}
Bullet hell:
\begin{itemize}
\item Wystarczająco skomplikowany
\item Grafika
\item Czas jest ważny
% W Bullet hell czas jest ważny, gra musi być płynna
\end{itemize}
\end{frame}
{
\setbeamercolor{footline}{fg=white}
\usebackgroundtemplate{
\includegraphics[width=\paperwidth, height=\paperheight]
{maxresdefault.jpg}}
\begin{frame}
\end{frame}
}
\begin{frame}
\frametitle{Wyzwania}
\begin{itemize}
\item Sprzęt
% Ten sam, jeden i ten sam komputer użyty w procesie kreacji obu
\item Umiejętności
% Nie mam
\item Podobne wersje silnika
% Użyje ostatniego LTS
\item Inklinacja Silnika \\ (3\% Unity, 2.4\% Unreal)
% ??? Ch
% 1577 FPS UNITY, 271 FPS UNREAL
% 39713 Total Unity, 11158 Total Unreal (proporcjonalnie 2 razy więcej :<)
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Ocena łatwości użycia}
\begin{itemize}
\item Dokumentacja
\item Intuicyjność
\item Materiały
\item Zasoby (Assety)
\item Dostępne funkcje}
\item ChatGPT
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Po stworzeniu}
Przejść obie gry, monitorując używając Nvidia Nsight i porównać wyniki
\end{frame}
\section{Źródła}
\begin{frame}
\frametitle{Źródła}
\begin{itemize}
\item \href{https://steamdb.info/}{https://steamdb.info/}
\item \href{https://docs.nvidia.com/nsight-systems}{https://docs.nvidia.com/nsight-systems}
\item An Overview Study of Game Engines, Faizi Noor Ahmad
\item Game Engine Architecture, Jason Gregory
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Źródła obrazów}
\begin{itemize}
\item Crysis - kanał youtube \href{https://www.youtube.com/watch?v=vGjOALIrL_U}{Thronefull}
\item BulletHell - kanał youtube \href{https://www.youtube.com/watch?app=desktop&v=h-wr6LoETA0}{Beat that boss}
\end{itemize}
\end{frame}
\end{document}
\begin{frame}
\frametitle{Po stworzeniu}
Przejść obie gry, monitorując używając Nvidia Nsight i porównać wyniki
\end{frame}
\section{Źródła}
\begin{frame}
\frametitle{Źródła}
\begin{itemize}
\item \href{https://steamdb.info/}{https://steamdb.info/}
\item \href{https://docs.nvidia.com/nsight-systems}{https://docs.nvidia.com/nsight-systems}
\item An Overview Study of Game Engines, Faizi Noor Ahmad
\item Game Engine Architecture, Jason Gregory
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Źródła obrazów}
\begin{itemize}
\item Crysis - kanał youtube \href{https://www.youtube.com/watch?v=vGjOALIrL_U}{Thronefull}
\item BulletHell - kanał youtube \href{https://www.youtube.com/watch?app=desktop&v=h-wr6LoETA0}{Beat that boss}
\end{itemize}
\end{frame}
\end{document}

View File

@ -0,0 +1,15 @@
Dzień dobry państwu, nazywam się Krzysztof Rudnicki i chciałbym opowiedzieć o mojej pracy magisterskiej pod promotorstwem Pana doktora Michała Chwesiuka, o tytule Porównanie wydajnośći i możliwości współczesnych silników gier komputerowych
Jeżeli pojawią się jakieś pytania to można je jak najbardziej zadawać w trakcie
Plan prezentacji wygląda następująco, najpierw omówię krótko co
rozumiem pod pojęciem silnika do gier,
jakie są współczesne silniki do gier,
które z nich będę porównywał,
czym są możliwości i wydajności tych silników
i jak zamierzam je porównywać
Chciałbym aby po tej prezentacji wiedzieli Państwo więcej o tym jak można
porównywać silniki graficzne niż przed nią

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -0,0 +1,4 @@
krotka (!) teoria
jaki jest cel
co zostalo zrobione (NAJWAZNIEJSZE)
czy sie udalo

View File

@ -1,6 +1,7 @@
\documentclass[a4paper, 12pt]{article}
\usepackage{graphicx}
\usepackage[utf8]{inputenc}
\usepackage[polish]{babel} % Add Polish language support
% Default fixed font does not support bold face
\DeclareFixedFont{\ttb}{T1}{txtt}{bx}{n}{12} % for bold
@ -46,6 +47,8 @@ showstringspaces=false
\title{Przetwarzanie strumieni danych i data science, \\ Zajęcia Zintegrowane 1}
\author{Krzysztof Rudnicki, 307585}
\date{\today} % Add today's date in Polish format
\begin{document}
\maketitle
\section{Przygotowanie maszyny wirtualnej}

View File

@ -0,0 +1,36 @@
library(tmvtnorm)
# t-Stutdet parameters
Mu = c(9, 8, 7, 6)
Sigma = matrix(c(16, -2, -1, -3,
-2, 9, -4, -1,
-1, -4, 4, 1,
-3, -1, 1, 1),
nrow=4, ncol=4)
lower_bound = 5
upper_bound = 12
# Generate scenarios
data <- rtmvt(n=10000, mean=mu, sigma=sigma, df=5, lower=rep(lower_bound, 4), upper=rep(upper_bound, 4))
write.table(format(data, digits=15, drop0trailing=F), "data10000.txt", quote=F, sep="\t", eol="\n\t", col.names = F, row.names = T)
mean <- colMeans(data)
E <- function(idx, Mu, Sigma, v, alfa, beta) {
mu = Mu[idx]
sigma = Sigma[idx, idx]
a = (alfa - mu)/sigma
b = (beta - mu)/sigma
nom = gamma((v-1)/2) *
((v+a^2)^(-1*(v-1)/2) -
(v+b^2)^(-1*(v-1)/2)) *
v^(v/2)
den = 2 * (pt(b, v) - pt(a, v)) * gamma(v/2) * gamma(1/2)
return (mu + sigma*(nom/den))
}
ER1 <- E(1, Mu, Sigma, 5, 5, 12)
ER2 <- E(2, Mu, Sigma, 5, 5, 12)
ER3 <- E(3, Mu, Sigma, 5, 5, 12)
ER4 <- E(4, Mu, Sigma, 5, 5, 12)
ER <- c(ER1, ER2, ER3, ER4)
write.table(ER, "ER.txt", sep="\t", col.names=F, row.names=F)

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,127 @@
###########################################################
# WDWR 18042 #
# Planowanie produkcj w warunkach ryzyka. #
# MODEL #
# Autor: Krzysztof Rudnicki #
###########################################################
##########
# Zbiory #
##########
# Produkty
set PRODUCTS = {"P1", "P2", "P3", "P4"};
# Narzedzia
set TOOLS;
# Miesiace
set MONTHS ordered;
# Scenariusze
param scenarioCount = 10000;
set SCENARIOS = {0..scenarioCount};
#############
# Parametry #
#############
# Liczba kazdego z narzedzi
param toolCount {TOOLS} >= 1;
# Dochody ze sprzedazy [pln/szt]
param expectedProfitPerUnit {PRODUCTS} >= 0;
# Scenarios
param scenarioProfitPerUnit {SCENARIOS, PRODUCTS};
# Czasy produkcji [godz]
param toolTimePerUnit {TOOLS, PRODUCTS} >= 0;
# Ograniczenia rynkowe liczby sprzedawanych produktow [szt]
param salesMarketLimit {MONTHS, PRODUCTS} >= 0;
# Ograniczeine liczby magazynowanych produktow [szt]
param storageLimit {PRODUCTS} >= 0;
# Koszt magazynowania produktow [pln/szt per msc]
param storageUnitCost >= 0;
# Aktualny stan magazynowy [szt]
param startingStorage {PRODUCTS} >= 0;
# Pozadany stan magazynowy na koniec symulacji [szt]
param desiredEndStorage {PRODUCTS} >= 0;
# Liczba dni roboczych w miesiacu [d]
param daysPerMonth >= 1;
# Liczba zmian w ciagu jednego dnia roboczego
param shiftsPerDay >= 1;
# Dlugosc zmiany [godz]
param hoursPerShift >= 1;
# Liczba roboczogodzin w miesi<EFBFBD>cu [godz]
param workHoursPerMonth = daysPerMonth*shiftsPerDay*hoursPerShift;
###########
# Zmienne #
###########
# Produkcja produktow
var produced {MONTHS, PRODUCTS} >= 0 integer;
# Sprzedaz produktow w danym miesiacu
var sold {MONTHS,PRODUCTS} >= 0 integer;
var totalSold {p in PRODUCTS} = sum {m in MONTHS} sold[m, p];
# Iloosc produktow przekazanych do magazynu w danym miesiacu
var stored {m in MONTHS, p in PRODUCTS} = produced[m, p] - sold[m, p];
# Stan magazynowy na koniec danego miesiaca
var storage {m in MONTHS, p in PRODUCTS} =
startingStorage[p] + sum {m2 in MONTHS: ord(m2) <= ord(m)} stored[m2, p];
# Czas pracy narzedzi w danym miesi<EFBFBD>cu
var availableToolTime {t in TOOLS} =
toolCount[t]*workHoursPerMonth;
var usedToolTime {m in MONTHS, t in TOOLS} =
sum {p in PRODUCTS} produced[m,p]*toolTimePerUnit[t,p];
# Koszt magazynowania
var monthlyStorageCost {m in MONTHS} =
(sum {p in PRODUCTS} storage[m, p])*storageUnitCost;
var totalStorageCost = sum {m in MONTHS} monthlyStorageCost[m];
# Zysk dla warto<EFBFBD>ci oczekiwanej
var expectedSalesProfit =
sum {p in PRODUCTS} totalSold[p]*expectedProfitPerUnit[p];
var expectedNetProfit =
expectedSalesProfit - totalStorageCost;
#######################
# Ograniczenia modelu #
#######################
# Ograniczenie rynkowe sprzedazy produktow
subject to SalesMarketLimit {m in MONTHS, p in PRODUCTS}:
sold[m, p] <= salesMarketLimit[m, p];
# Ograniczenie magazynowe sprzedazy produktow
subject to SalesLimit1 {p in PRODUCTS}:
sold[first(MONTHS), p] <= produced[first(MONTHS), p];
subject to SalesLimit2 {m in MONTHS, p in PRODUCTS: m != first(MONTHS)}:
sold[m, p] <= produced [m, p] + storage[m, p];
# Powiazanie sprzedazy produktu P4 ze sprzedaza produktow P1 i P2
subject to P4SalesConstraint {m in MONTHS}:
sold[m, "P4"] >= sold[m, "P1"] + sold[m, "P2"];
# Ograniczenie pojemno<EFBFBD>ci magazynowej
subject to StorageLimit {m in MONTHS, p in PRODUCTS}:
storage[m, p] <= storageLimit[p];
# Ograniczenie na po<EFBFBD><EFBFBD>dany stan magazynowy na koniec marca
subject to DesiredStorage {p in PRODUCTS}:
storage[last(MONTHS), p] >= desiredEndStorage[p];
#Ograniczenie czasu pracy narzedzi w miesiacu
subject to ToolWorkTime {m in MONTHS, t in TOOLS}:
usedToolTime[m, t] <= availableToolTime[t];
################
# Funkcje celu #
################
maximize Profit: expectedNetProfit;

View File

@ -0,0 +1,27 @@
###########################################################
# WDWR 18042 #
# Planowanie produkcj w warunkach ryzyka. #
# SKRYPT URUCHAMIAJACY - Metoda punktu odniesienia #
# Autor: Krzysztof Rudnicki #
###########################################################
#######################
# Konfiguracja modelu #
#######################
model WDWR1.mod;
data WDWR1.dat;
option solver cplex;
#############################
# Model jednokryterialny #
#############################
printf "\n#################################################\n";
printf "### Maximize profit for expected profit value ###\n";
printf "#################################################\n";
objective Profit;
solve;
display produced;
display sold;
display stored;
printf "Profit: %f\n", Profit;

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,201 @@
###########################################################
# WDWR 18042 #
# Planowanie produkcj w warunkach ryzyka. #
# MODEL #
# Autor: Krzysztof Rudnicki #
###########################################################
##########
# Zbiory #
##########
# Produkty
set PRODUCTS = {"P1", "P2", "P3", "P4"};
# Narzedzia
set TOOLS;
# Miesiace
set MONTHS ordered;
# Scenariusze
param scenarioCount;
set SCENARIOS = {1..scenarioCount};
#############
# Parametry #
#############
# Liczba kazdego z narzedzi
param toolCount {TOOLS} >= 1;
# Dochody ze sprzedazy [pln/szt]
param expectedProfitPerUnit {PRODUCTS} >= 0;
# Scenarios
param scenarioProfitPerUnit {SCENARIOS, PRODUCTS};
# Czasy produkcji [godz]
param toolTimePerUnit {TOOLS, PRODUCTS} >= 0;
# Ograniczenia rynkowe liczby sprzedawanych produktow [szt]
param salesMarketLimit {MONTHS, PRODUCTS} >= 0;
# Ograniczeine liczby magazynowanych produktow [szt]
param storageLimit {PRODUCTS} >= 0;
# Koszt magazynowania produktow [pln/szt per msc]
param storageUnitCost >= 0;
# Aktualny stan magazynowy [szt]
param startingStorage {PRODUCTS} >= 0;
# Pozadany stan magazynowy na koniec symulacji [szt]
param desiredEndStorage {PRODUCTS} >= 0;
# Liczba dni roboczych w miesiacu [d]
param daysPerMonth >= 1;
# Liczba zmian w ciagu jednego dnia roboczego
param shiftsPerDay >= 1;
# Dlugosc zmiany [godz]
param hoursPerShift >= 1;
# Liczba roboczogodzin w miesi<EFBFBD>cu [godz]
param workHoursPerMonth = daysPerMonth*shiftsPerDay*hoursPerShift;
# Czas pracy narzedzi w danym miesi<EFBFBD>cu
param availableToolTime {t in TOOLS} = toolCount[t]*workHoursPerMonth;
###########
# Zmienne #
###########
# Produkcja produktow
var produced {MONTHS, PRODUCTS} >= 0 integer;
# Sprzedaz produktow w danym miesiacu
var sold {MONTHS,PRODUCTS} >= 0 integer;
var totalSold {p in PRODUCTS} = sum {m in MONTHS} sold[m, p];
# Iloosc produktow przekazanych do magazynu w danym miesiacu
var stored {m in MONTHS, p in PRODUCTS} = produced[m, p] - sold[m, p];
# Stan magazynowy na koniec danego miesiaca
var storage {m in MONTHS, p in PRODUCTS} =
startingStorage[p] + sum {m2 in MONTHS: ord(m2) <= ord(m)} stored[m2, p];
# Wykorzystany czas pracy
var usedToolTime {m in MONTHS, t in TOOLS} =
sum {p in PRODUCTS} produced[m,p]*toolTimePerUnit[t,p];
# Koszt magazynowania
var monthlyStorageCost {m in MONTHS} =
(sum {p in PRODUCTS} storage[m, p])*storageUnitCost;
var totalStorageCost = sum {m in MONTHS} monthlyStorageCost[m];
# Zysk dla warto<EFBFBD>ci oczekiwanej
var expectedSalesProfit =
sum {p in PRODUCTS} totalSold[p]*expectedProfitPerUnit[p];
var expectedNetProfit =
expectedSalesProfit - totalStorageCost;
# Zysk w danym scenariuszu
var scenarioSalesProfit {s in SCENARIOS} =
sum {p in PRODUCTS} totalSold[p]*scenarioProfitPerUnit[s, p];
var scenarioNetProfit {s in SCENARIOS} =
scenarioSalesProfit[s] - totalStorageCost;
# Odchylenie jako miara ryzyka - zlinearyzowana wartosc bezwzgledna
var deviation {s in SCENARIOS} =
expectedNetProfit - scenarioNetProfit[s];
var P {SCENARIOS} >= 0;
var Q {SCENARIOS} >= 0;
subject to deviationLimit {s1 in SCENARIOS, s2 in SCENARIOS}:
deviation[s1]-deviation[s2]+P[s1]-Q[s2] = 0;
#var maxDeviation = max {s in SCENARIOS} deviation[s];
var maxDeviation;
# Linearyzacja maksymalnego odchylenia jako miary ryzyka
param M = 10000;
var Z {SCENARIOS} binary;
subject to mdLimit {s in SCENARIOS}:
maxDeviation >= deviation[s];
subject to mdWhere {s in SCENARIOS}:
maxDeviation <= deviation[s] + M*(1-Z[s]);
subject to mdOS:
sum{s in SCENARIOS} Z[s] = 1;
# Aliasy dla ocenianych warto<EFBFBD>ci
var profit = expectedNetProfit;
var risk = maxDeviation;
#######################
# Ograniczenia modelu #
#######################
# Ograniczenie rynkowe sprzedazy produktow
subject to SalesMarketLimit {m in MONTHS, p in PRODUCTS}:
sold[m, p] <= salesMarketLimit[m, p];
# Ograniczenie magazynowe sprzedazy produktow
subject to SalesLimit1 {p in PRODUCTS}:
sold[first(MONTHS), p] <= produced[first(MONTHS), p];
subject to SalesLimit2 {m in MONTHS, p in PRODUCTS: m != first(MONTHS)}:
sold[m, p] <= produced [m, p] + storage[m, p];
# Powiazanie sprzedazy produktu P4 ze sprzedaza produktow P1 i P2
subject to P4SalesConstraint {m in MONTHS}:
sold[m, "P4"] >= sold[m, "P1"] + sold[m, "P2"];
# Ograniczenie pojemno<EFBFBD>ci magazynowej
subject to StorageLimit {m in MONTHS, p in PRODUCTS}:
storage[m, p] <= storageLimit[p];
# Ograniczenie na po<EFBFBD><EFBFBD>dany stan magazynowy na koniec marca
subject to DesiredStorage {p in PRODUCTS}:
storage[last(MONTHS), p] >= desiredEndStorage[p];
#Ograniczenie czasu pracy narzedzi w miesiacu
subject to ToolWorkTime {m in MONTHS, t in TOOLS}:
usedToolTime[m, t] <= availableToolTime[t];
#############################
# Metoda punktu odniesienia #
#############################
# Skladniki wektora oceny
set RATED = {"PROFIT", "RISK"};
# Wektor oceny
var value {r in RATED} =
if r == "PROFIT" then profit
else if r == "RISK" then risk;
# Wektor aspiracji
param aspiration {RATED};
# Warto<EFBFBD>ci utopii i nadiru
param utopia {RATED};
param nadir {RATED};
# Wspolczynniki normalizujace
param lambda {r in RATED} =
1 / (utopia[r]-nadir[r]);
# Wspolczynnik skladnika regularyzacyjnego
param epsilon;
# Wspolczynnik pomniejszenia warto<EFBFBD>ci ocen ponad poziomem aspiracji
param beta;
# Indywidualne funkcje osiagniec
var individualRating {RATED};
# Zmienna pomocnicza metody punktu odniesienia
var v;
# Skalaryzujaca funkcja osiagniecia
var rating = v + epsilon * (sum {r in RATED} individualRating[r]);
# Odleglo<EFBFBD>c od punktu odniesienia
var distance {r in RATED} = value[r]-aspiration[r];
# Znormalizowana odleglo<EFBFBD>c od punktu odniesienia
var normalizedDistance {r in RATED} = lambda[r]*distance[r];
# Ograniczenia zmiennej v przez indywidualne funkcje osiagniec
subject to VSubject {r in RATED}:
v <= individualRating[r];
# Ograniczenia indywidualnych funkcji osiagniec
subject to IndividualRatingSubjectBeta {r in RATED}:
individualRating[r] <= beta*normalizedDistance[r];
subject to IndividualRatingSubject {r in RATED}:
individualRating[r] <= normalizedDistance[r];
################
# Funkcje celu #
################
minimize MinimizeProfit: profit;
maximize MaximizeProfit: profit;
minimize MinimizeRisk: risk;
maximize MaximizeRisk: risk;
maximize RPM: rating;

View File

@ -0,0 +1,50 @@
###########################################################
# WDWR 18042 #
# Planowanie produkcj w warunkach ryzyka. #
# SKRYPT URUCHAMIAJACY - Metoda punktu odniesienia #
# Autor: Krzysztof Rudnicki #
###########################################################
#######################
# Konfiguracja modelu #
#######################
model WDWR2.mod;
data WDWR2_trunc.dat;
option solver cplex;
#############################
# Metoda punktu odniesienia #
#############################
printf "\n######################################\n";
printf "### RPM solution space calculation ###\n";
printf "######################################\n";
objective RPM;
param steps = 10;
param stepSize {r in RATED} = (utopia[r] - nadir[r]) / (steps-1);
param iteration;
param iterationCount = steps*steps;
set RESULTS = {1..iterationCount};
set VALUES = {"PROFIT", "RISK", "RPM"};
param result {RESULTS, VALUES};
for {i in 0..steps-1} {
for {j in 0..steps-1} {
let iteration := 1 + steps*i + j;
let aspiration["PROFIT"] := nadir["PROFIT"] + i * stepSize["PROFIT"];
let aspiration["RISK"] := nadir["RISK"] + j * stepSize["RISK"];
printf "### %d: Solving model for aspirations: %f, %f\n",
iteration, aspiration["PROFIT"], aspiration["RISK"];
solve;
let result[iteration, "PROFIT"] := profit;
let result[iteration, "RISK"] := risk;
let result[iteration, "RPM"] := RPM;
printf "Profit: %f\n", profit;
printf "Risk: %f\n", risk;
printf "RPM: %f\n", RPM;
}
}
display result;
printf { r in RESULTS } "%f\t%f\t%f\n", result[r,"PROFIT"], result[r, "RISK"], result[r,"RPM"] > ./result.csv ;

View File

@ -0,0 +1,154 @@
###########################################################
# WDWR 18042 #
# Planowanie produkcj w warunkach ryzyka. #
# DANE #
# Autor: Krzysztof Rudnicki #
###########################################################
# Narzedzia
set TOOLS := GRINDER VDRILL HDRILL MILLER LATHE;
# Miesiace
set MONTHS := JAN FEB MAR;
# Licza narzedzi
param toolCount :=
GRINDER 4
VDRILL 2
HDRILL 3
MILLER 1
LATHE 1
;
# Czasy produkcji h
param toolTimePerUnit:
P1 P2 P3 P4 :=
GRINDER 0.4 0.6 0 0
VDRILL 0.2 0.1 0 0.6
HDRILL 0.1 0 0.7 0
MILLER 0.06 0.04 0 0.05
LATHE 0 0.05 0.02 0
;
# Ograniczenia rynkowe liczby sprzedawanych produktow pcs
param salesMarketLimit:
P1 P2 P3 P4 :=
JAN 200 0 100 200
FEB 300 100 200 200
MAR 0 300 100 200
;
# Ograniczeine liczby magazynowanych produktow pcs
param storageLimit :=
P1 200
P2 200
P3 200
P4 200
;
# Koszt magazynowania produktow pln/pcs per month
param storageUnitCost := 1;
# Aktualny stan magazynowy pcs
param startingStorage :=
P1 0
P2 0
P3 0
P4 0
;
# Poz<6F>dany stan magazynowy na koniec marca pcs
param desiredEndStorage :=
P1 50
P2 50
P3 50
P4 50
;
# Liczba dni roboczych w miesiacu d
param daysPerMonth := 24;
# Liczba zmian w ciagu jednego dnia roboczego
param shiftsPerDay := 2;
# Dlugosc zmiany h
param hoursPerShift := 8;
# Zyski warto<74><6F> oczekiwana
param expectedProfitPerUnit :=
P1 8.50944172786882
P2 8.47100593224391
P3 8.1319049712769
P4 6.39446520538826
;
# Metoda punktu odniesienia
param epsilon = 0.000025;
param beta = 0.001;
param utopia :=
PROFIT 11987
RISK 0
;
param nadir :=
PROFIT -2400
RISK 2815
;
# Scenariusze
param scenarioCount := 50;
param scenarioProfitPerUnit:
P1 P2 P3 P4 :=
1 6.78312108289149 5.79640238361981 10.05787433056357 6.57331416435723
2 6.99738290528301 9.01490464757196 5.08481517735633 6.42703739335277
3 5.16730304787176 7.52317923266688 10.72313438657665 7.22667916959417
4 8.52274093276464 11.38240217987188 6.13080610568167 6.43883854824552
5 6.50428131735901 6.61788006135640 7.86111017073128 6.96225068464523
6 5.73487133076911 9.16374087573468 5.52557377604414 6.34042770048443
7 7.57821826531473 5.53212159376577 9.44747152703083 7.92080735281354
8 8.46351060213176 6.67108340536348 7.96447972290298 6.74037823409959
9 10.60705431897493 6.29351506828248 8.08238578885269 6.64513805083938
10 5.49788635095338 8.01657169352075 8.50721094756387 6.32347360999400
11 9.98722514505514 8.89045419912165 7.40638427340367 6.19123907839219
12 7.73547221322455 11.39341677791569 7.08591860802534 6.65287015880773
13 8.00244141512299 7.46013718525416 9.07534043801771 7.01972409076348
14 10.01757296285428 11.16631823758034 5.36427432741987 5.93803320930752
15 8.73982030016946 7.22788862315047 7.52123044637611 6.30583102048732
16 6.74830998356361 5.16961378121024 9.83052665533391 6.97518295642799
17 5.79891835909540 7.62305645016980 7.28259746189341 6.58122366239758
18 5.01746785364914 5.37120611569365 11.37580509674048 7.45754618734148
19 8.84615981059243 10.36884740288172 5.51512168506823 5.14746695259905
20 10.27832406220036 6.26817737098193 6.75980452880535 6.00071122161820
21 9.15464079326701 9.22511946737560 8.59742728186919 5.85941844163078
22 7.41070715265531 9.03326860943882 9.51105396612463 5.95705526059528
23 9.41688054404721 5.48792302160852 8.05314441506622 6.33167522079485
24 7.99636302963949 8.45127363831087 6.80178566896807 6.40796549415317
25 8.77607512859202 9.06083514509964 6.14324653925151 5.73196891114116
26 6.15756683330483 5.81155622391928 8.95298231122791 7.75631798464974
27 8.71820952681711 6.75933713868641 6.20173677287384 5.94931057772569
28 7.50988798239200 8.40250942598753 7.59076793688675 6.83115118367424
29 11.46519479939599 5.34788729417893 7.49642151003498 5.09135446750897
30 9.24470379243678 7.86407386582905 6.91504065225354 5.66423375179536
31 10.11059443261933 5.19726478862852 7.17323727021490 5.35589059533840
32 8.52798709174698 9.92750815054074 7.11656712470230 5.52054849939254
33 10.96107079994176 7.10910792528864 5.70378349251154 5.17164984043314
34 7.06917204470777 7.93024674036222 7.04742602521247 6.02267636557175
35 8.48134255283988 5.85227829193417 5.36851422694765 6.58963142694151
36 10.79598232218280 6.78064186807628 6.45254214496221 6.01773663687229
37 9.31085304521786 7.24038452979960 7.11927599287817 5.94495349693440
38 11.73162984938600 8.89170449659670 7.24145427728390 5.50727529989226
39 9.95614904957837 8.24343617183020 6.08421773053824 5.59097741826648
40 10.84398291202468 5.62144717550252 8.73978776370006 5.90011906694585
41 9.66329756207950 8.71563915673125 8.57471405154024 6.25399915313449
42 11.75197973817904 9.62791703809340 6.15087294856069 5.12525411655807
43 10.21024933655283 5.45043424512963 7.70802205088631 6.26487953122650
44 7.00126415308046 9.52080591709321 6.34678934922762 5.78571635562224
45 10.95808951943000 5.38346727815726 6.12050483571891 7.52568971146160
46 7.24407146573199 10.74100159223745 7.79352388695434 5.86675126000469
47 11.09420218544564 7.58722148021949 10.11955301735720 5.87263773263194
48 6.56196505922266 8.86557049389506 6.68759866488725 6.54786762414447
49 6.36408747696432 9.90697341186375 8.67549323089252 7.10602003316923
50 5.25413960261441 9.86316602732531 6.97502397729463 5.79670081684910
;

View File

@ -0,0 +1,53 @@
###########################################################
# WDWR 18042 #
# Planowanie produkcj w warunkach ryzyka. #
# SKRYPT URUCHAMIAJACY #
# Autor: Krzysztof Rudnicki #
###########################################################
#######################
# Konfiguracja modelu #
#######################
model WDWR2.mod;
data WDWR2.dat;
option solver cplex;
###########################################################
# Rozwiazania optymalne dla wyznaczenia granic zmienno<6E>ci #
# tj wektorow utopii i nadiru #
###########################################################
# Minimalny zysk
printf "\n#########################\n";
printf "### Minimizing profit ###\n";
printf "#########################\n";
objective MinimizeProfit;
solve;
printf "Profit: %f\n", profit;
printf "Risk: %f\n", risk;
# Maksymalny koszt
printf "\n#########################\n";
printf "### Maximizing profit ###\n";
printf "#########################\n";
objective MaximizeProfit;
solve;
printf "Profit: %f\n", profit;
printf "Risk: %f\n", risk;
# Minimalny poziom zanieczyszcze<7A>
printf "\n#######################\n";
printf "### Minimizing risk ###\n";
printf "#######################\n";
objective MinimizeRisk;
solve;
printf "Profit: %f\n", profit;
printf "Risk: %f\n", risk;
# Maksymalny poziom zanieczyszcze<7A>
printf "\n########################\n";
printf "### Maximizing risk k###\n";
printf "########################\n";
objective MaximizeRisk;
solve;
printf "Profit: %f\n", profit;
printf "Risk: %f\n", risk;

View File

@ -0,0 +1,7 @@
Ocenione na 80/100
Uwagi:
- brak wstępu teoretycznego
- brak udowodnienia, że można użyć wartości oczekiwanej w zadaniu 1-wszym - E(R) = E(R1) + E(R2)
- błąd na wykresie z obrazem rozwiązań - pojawiają się rozwiązania zdominowane! - może sugerować błąd w implementacji
- brak odniesienia do przypadku ogólnego i omówienia wyninku w badaniu dominacji stohastycznej

View File

@ -0,0 +1,50 @@
0.020000 11639.667141
0.040000 10292.082599
0.060000 11996.818322
0.080000 11801.202380
0.100000 11047.083018
0.120000 9941.182838
0.140000 12469.184647
0.160000 11749.639752
0.180000 12521.561887
0.200000 10799.437424
0.220000 12250.278054
0.240000 11998.961779
0.260000 12334.974633
0.280000 11748.822489
0.300000 11533.496636
0.320000 11650.567186
0.340000 10505.951816
0.360000 11906.078116
0.380000 10706.762250
0.400000 11469.313644
0.420000 12261.502189
0.440000 11949.591326
0.460000 11684.599720
0.480000 11254.293504
0.500000 11019.077043
0.520000 11660.321693
0.540000 10689.432294
0.560000 11619.454963
0.580000 11509.036663
0.600000 11235.252802
0.620000 10966.519996
0.640000 11355.652416
0.660000 10990.753206
0.680000 10646.294395
0.700000 10464.177226
0.720000 11666.180143
0.740000 11387.100619
0.760000 12471.939730
0.780000 11219.420397
0.800000 12297.869146
0.820000 12590.731969
0.840000 11961.876952
0.860000 11816.323123
0.880000 10514.812398
0.900000 12223.545025
0.920000 11483.289216
0.940000 13326.529017
0.960000 10801.660163
0.980000 12060.838985
1.000000 10142.319128
1 0.020000 11639.667141
2 0.040000 10292.082599
3 0.060000 11996.818322
4 0.080000 11801.202380
5 0.100000 11047.083018
6 0.120000 9941.182838
7 0.140000 12469.184647
8 0.160000 11749.639752
9 0.180000 12521.561887
10 0.200000 10799.437424
11 0.220000 12250.278054
12 0.240000 11998.961779
13 0.260000 12334.974633
14 0.280000 11748.822489
15 0.300000 11533.496636
16 0.320000 11650.567186
17 0.340000 10505.951816
18 0.360000 11906.078116
19 0.380000 10706.762250
20 0.400000 11469.313644
21 0.420000 12261.502189
22 0.440000 11949.591326
23 0.460000 11684.599720
24 0.480000 11254.293504
25 0.500000 11019.077043
26 0.520000 11660.321693
27 0.540000 10689.432294
28 0.560000 11619.454963
29 0.580000 11509.036663
30 0.600000 11235.252802
31 0.620000 10966.519996
32 0.640000 11355.652416
33 0.660000 10990.753206
34 0.680000 10646.294395
35 0.700000 10464.177226
36 0.720000 11666.180143
37 0.740000 11387.100619
38 0.760000 12471.939730
39 0.780000 11219.420397
40 0.800000 12297.869146
41 0.820000 12590.731969
42 0.840000 11961.876952
43 0.860000 11816.323123
44 0.880000 10514.812398
45 0.900000 12223.545025
46 0.920000 11483.289216
47 0.940000 13326.529017
48 0.960000 10801.660163
49 0.980000 12060.838985
50 1.000000 10142.319128

View File

@ -0,0 +1,50 @@
0.020000 8334.413457
0.040000 8815.328577
0.060000 8744.362234
0.080000 10054.734924
0.100000 8531.997783
0.120000 8436.145053
0.140000 9274.773903
0.160000 9048.940981
0.180000 9581.821780
0.200000 8268.608177
0.220000 9781.602957
0.240000 10010.709973
0.260000 9378.021217
0.280000 10110.988008
0.300000 8996.520470
0.320000 8371.333346
0.340000 8311.828619
0.360000 8286.748340
0.380000 9051.369471
0.400000 8977.096282
0.420000 9504.738633
0.440000 9024.825705
0.460000 8785.788983
0.480000 9103.663665
0.500000 9064.958116
0.520000 8759.874949
0.540000 8539.407399
0.560000 9251.416429
0.580000 8613.449292
0.600000 8902.125325
0.620000 8270.820433
0.640000 9178.385113
0.660000 8848.276351
0.680000 8450.073796
0.700000 8528.075255
0.720000 9271.358778
0.740000 8934.054436
0.760000 9916.588628
0.780000 9125.210257
0.800000 9075.712755
0.820000 9760.295161
0.840000 9812.044676
0.860000 8961.520425
0.880000 8673.882341
0.900000 9811.630231
0.920000 9256.374980
0.940000 9798.126373
0.960000 8835.051454
0.980000 9556.205053
1.000000 8267.170403
1 0.020000 8334.413457
2 0.040000 8815.328577
3 0.060000 8744.362234
4 0.080000 10054.734924
5 0.100000 8531.997783
6 0.120000 8436.145053
7 0.140000 9274.773903
8 0.160000 9048.940981
9 0.180000 9581.821780
10 0.200000 8268.608177
11 0.220000 9781.602957
12 0.240000 10010.709973
13 0.260000 9378.021217
14 0.280000 10110.988008
15 0.300000 8996.520470
16 0.320000 8371.333346
17 0.340000 8311.828619
18 0.360000 8286.748340
19 0.380000 9051.369471
20 0.400000 8977.096282
21 0.420000 9504.738633
22 0.440000 9024.825705
23 0.460000 8785.788983
24 0.480000 9103.663665
25 0.500000 9064.958116
26 0.520000 8759.874949
27 0.540000 8539.407399
28 0.560000 9251.416429
29 0.580000 8613.449292
30 0.600000 8902.125325
31 0.620000 8270.820433
32 0.640000 9178.385113
33 0.660000 8848.276351
34 0.680000 8450.073796
35 0.700000 8528.075255
36 0.720000 9271.358778
37 0.740000 8934.054436
38 0.760000 9916.588628
39 0.780000 9125.210257
40 0.800000 9075.712755
41 0.820000 9760.295161
42 0.840000 9812.044676
43 0.860000 8961.520425
44 0.880000 8673.882341
45 0.900000 9811.630231
46 0.920000 9256.374980
47 0.940000 9798.126373
48 0.960000 8835.051454
49 0.980000 9556.205053
50 1.000000 8267.170403

View File

@ -0,0 +1,50 @@
0.020000 8462.904351
0.040000 8887.361263
0.060000 8882.563026
0.080000 10141.687000
0.100000 8634.948985
0.120000 8513.615679
0.140000 9395.675683
0.160000 9153.185821
0.180000 9687.103924
0.200000 8380.711280
0.220000 9881.370022
0.240000 10109.134413
0.260000 9496.385439
0.280000 10188.525618
0.300000 9096.003124
0.320000 8496.469280
0.340000 8408.842845
0.360000 8430.629207
0.380000 9129.919779
0.400000 9066.482113
0.420000 9619.132880
0.440000 9149.991621
0.460000 8889.914639
0.480000 9195.736366
0.500000 9149.737910
0.520000 8875.122293
0.540000 8622.587577
0.560000 9352.908154
0.580000 8710.754238
0.600000 8994.969887
0.620000 8364.096545
0.640000 9275.711427
0.660000 8925.830861
0.680000 8544.573155
0.700000 8600.349704
0.720000 9357.569926
0.740000 9028.726132
0.760000 10014.377784
0.780000 9208.464306
0.800000 9188.211655
0.820000 9873.907368
0.840000 9897.483068
0.860000 9061.467124
0.880000 8761.564619
0.900000 9892.459756
0.920000 9362.638268
0.940000 9929.148231
0.960000 8926.168209
0.980000 9672.217945
1.000000 8362.733857
1 0.020000 8462.904351
2 0.040000 8887.361263
3 0.060000 8882.563026
4 0.080000 10141.687000
5 0.100000 8634.948985
6 0.120000 8513.615679
7 0.140000 9395.675683
8 0.160000 9153.185821
9 0.180000 9687.103924
10 0.200000 8380.711280
11 0.220000 9881.370022
12 0.240000 10109.134413
13 0.260000 9496.385439
14 0.280000 10188.525618
15 0.300000 9096.003124
16 0.320000 8496.469280
17 0.340000 8408.842845
18 0.360000 8430.629207
19 0.380000 9129.919779
20 0.400000 9066.482113
21 0.420000 9619.132880
22 0.440000 9149.991621
23 0.460000 8889.914639
24 0.480000 9195.736366
25 0.500000 9149.737910
26 0.520000 8875.122293
27 0.540000 8622.587577
28 0.560000 9352.908154
29 0.580000 8710.754238
30 0.600000 8994.969887
31 0.620000 8364.096545
32 0.640000 9275.711427
33 0.660000 8925.830861
34 0.680000 8544.573155
35 0.700000 8600.349704
36 0.720000 9357.569926
37 0.740000 9028.726132
38 0.760000 10014.377784
39 0.780000 9208.464306
40 0.800000 9188.211655
41 0.820000 9873.907368
42 0.840000 9897.483068
43 0.860000 9061.467124
44 0.880000 8761.564619
45 0.900000 9892.459756
46 0.920000 9362.638268
47 0.940000 9929.148231
48 0.960000 8926.168209
49 0.980000 9672.217945
50 1.000000 8362.733857

View File

@ -0,0 +1,100 @@
-200.000000 0.000000 0.000153
-200.000000 0.000000 0.000153
-200.000000 0.000000 0.000153
-200.000000 0.000000 0.000153
-200.000000 0.000000 0.000153
-200.000000 0.000000 0.000153
-200.000000 0.000000 0.000153
-200.000000 0.000000 0.000153
-200.000000 0.000000 0.000111
-200.000000 0.000000 0.000000
-200.000000 0.000000 0.000042
-200.000000 0.000000 0.000042
-200.000000 0.000000 0.000042
-200.000000 0.000000 0.000042
-200.000000 0.000000 0.000042
-200.000000 0.000000 0.000042
-200.000000 0.000000 0.000042
-200.000000 0.000000 0.000042
-200.000000 0.000000 0.000042
-200.000000 0.000000 0.000000
5388.280763 673.375180 0.000319
8453.165836 1004.361418 0.000532
7464.470364 888.082372 0.000462
6464.644347 771.022268 0.000393
5456.347323 654.460477 0.000323
4366.632009 549.520402 0.000248
3392.421231 434.063877 0.000179
2374.847064 318.378638 0.000109
1765.371563 240.818335 0.000026
425.448190 72.719700 -0.025835
5388.280763 673.375180 0.000208
9317.090153 1147.518267 0.000481
8301.136529 1036.409118 0.000410
7285.591657 919.291964 0.000340
6361.934765 790.460607 0.000275
5365.283387 669.990504 0.000206
4434.582882 540.004038 0.000142
3373.344061 434.703276 0.000068
2417.827519 311.250020 0.000001
1432.148909 188.510726 -0.066975
5388.280763 673.375180 0.000097
10000.288917 1307.292831 0.000417
9291.427014 1151.339411 0.000368
8439.813809 1007.101848 0.000309
7436.822686 890.327465 0.000239
6344.809413 790.851811 0.000163
5340.293203 671.880254 0.000094
4375.860271 553.674833 0.000026
3444.833709 420.543399 -0.038285
2443.218902 304.590798 -0.108208
9382.134535 1104.116837 0.000263
11040.319690 1435.989662 0.000379
10406.562382 1249.283436 0.000334
9157.108633 1182.543437 0.000247
8243.887310 1046.431089 0.000184
7252.262318 926.566187 0.000115
6114.343105 833.935936 0.000036
5458.235147 652.125451 -0.009439
4451.534428 536.334425 -0.079420
3445.121460 420.374152 -0.149341
9534.263193 1124.891344 0.000163
11623.893720 1629.772538 0.000308
11040.319690 1435.989662 0.000268
10234.420750 1282.152533 0.000212
8955.458871 1217.950976 0.000123
8125.266489 1067.542071 0.000065
7460.723990 888.894318 0.000018
6462.769540 767.700977 -0.050643
5458.235147 652.125451 -0.120556
4451.534428 536.334425 -0.190537
9371.663529 1104.493126 0.000040
11985.535635 1876.338189 0.000222
11623.893720 1629.772538 0.000197
11040.319690 1435.989662 0.000156
10406.562382 1249.283436 0.000112
9479.717395 1116.983538 0.000048
8475.742091 999.775354 -0.021837
7471.207698 883.988876 -0.091810
6462.769540 767.700977 -0.161760
5458.235147 652.125451 -0.231672
10658.420822 1308.556262 0.000019
11973.604069 1746.007712 0.000110
11973.604069 1746.007712 0.000110
11623.893720 1629.772538 0.000086
11040.319690 1435.989662 0.000045
10406.562382 1249.283436 0.000001
9479.717395 1116.983538 -0.063467
8475.742091 999.775354 -0.132953
7471.207698 883.988876 -0.202927
6462.481788 767.807980 -0.272896
11984.113511 1748.047892 -0.000201
11987.418989 2046.236151 0.000000
11987.418989 2046.236151 0.000000
11984.113511 1748.047892 -0.000201
11634.403161 1632.508345 -0.024509
11040.697227 1435.311557 -0.065778
10399.451279 1248.963735 -0.110354
9479.717395 1116.983538 -0.174583
8475.454340 999.671406 -0.244090
7471.207698 883.988876 -0.314044
1 -200.000000 0.000000 0.000153
2 -200.000000 0.000000 0.000153
3 -200.000000 0.000000 0.000153
4 -200.000000 0.000000 0.000153
5 -200.000000 0.000000 0.000153
6 -200.000000 0.000000 0.000153
7 -200.000000 0.000000 0.000153
8 -200.000000 0.000000 0.000153
9 -200.000000 0.000000 0.000111
10 -200.000000 0.000000 0.000000
11 -200.000000 0.000000 0.000042
12 -200.000000 0.000000 0.000042
13 -200.000000 0.000000 0.000042
14 -200.000000 0.000000 0.000042
15 -200.000000 0.000000 0.000042
16 -200.000000 0.000000 0.000042
17 -200.000000 0.000000 0.000042
18 -200.000000 0.000000 0.000042
19 -200.000000 0.000000 0.000042
20 -200.000000 0.000000 0.000000
21 5388.280763 673.375180 0.000319
22 8453.165836 1004.361418 0.000532
23 7464.470364 888.082372 0.000462
24 6464.644347 771.022268 0.000393
25 5456.347323 654.460477 0.000323
26 4366.632009 549.520402 0.000248
27 3392.421231 434.063877 0.000179
28 2374.847064 318.378638 0.000109
29 1765.371563 240.818335 0.000026
30 425.448190 72.719700 -0.025835
31 5388.280763 673.375180 0.000208
32 9317.090153 1147.518267 0.000481
33 8301.136529 1036.409118 0.000410
34 7285.591657 919.291964 0.000340
35 6361.934765 790.460607 0.000275
36 5365.283387 669.990504 0.000206
37 4434.582882 540.004038 0.000142
38 3373.344061 434.703276 0.000068
39 2417.827519 311.250020 0.000001
40 1432.148909 188.510726 -0.066975
41 5388.280763 673.375180 0.000097
42 10000.288917 1307.292831 0.000417
43 9291.427014 1151.339411 0.000368
44 8439.813809 1007.101848 0.000309
45 7436.822686 890.327465 0.000239
46 6344.809413 790.851811 0.000163
47 5340.293203 671.880254 0.000094
48 4375.860271 553.674833 0.000026
49 3444.833709 420.543399 -0.038285
50 2443.218902 304.590798 -0.108208
51 9382.134535 1104.116837 0.000263
52 11040.319690 1435.989662 0.000379
53 10406.562382 1249.283436 0.000334
54 9157.108633 1182.543437 0.000247
55 8243.887310 1046.431089 0.000184
56 7252.262318 926.566187 0.000115
57 6114.343105 833.935936 0.000036
58 5458.235147 652.125451 -0.009439
59 4451.534428 536.334425 -0.079420
60 3445.121460 420.374152 -0.149341
61 9534.263193 1124.891344 0.000163
62 11623.893720 1629.772538 0.000308
63 11040.319690 1435.989662 0.000268
64 10234.420750 1282.152533 0.000212
65 8955.458871 1217.950976 0.000123
66 8125.266489 1067.542071 0.000065
67 7460.723990 888.894318 0.000018
68 6462.769540 767.700977 -0.050643
69 5458.235147 652.125451 -0.120556
70 4451.534428 536.334425 -0.190537
71 9371.663529 1104.493126 0.000040
72 11985.535635 1876.338189 0.000222
73 11623.893720 1629.772538 0.000197
74 11040.319690 1435.989662 0.000156
75 10406.562382 1249.283436 0.000112
76 9479.717395 1116.983538 0.000048
77 8475.742091 999.775354 -0.021837
78 7471.207698 883.988876 -0.091810
79 6462.769540 767.700977 -0.161760
80 5458.235147 652.125451 -0.231672
81 10658.420822 1308.556262 0.000019
82 11973.604069 1746.007712 0.000110
83 11973.604069 1746.007712 0.000110
84 11623.893720 1629.772538 0.000086
85 11040.319690 1435.989662 0.000045
86 10406.562382 1249.283436 0.000001
87 9479.717395 1116.983538 -0.063467
88 8475.742091 999.775354 -0.132953
89 7471.207698 883.988876 -0.202927
90 6462.481788 767.807980 -0.272896
91 11984.113511 1748.047892 -0.000201
92 11987.418989 2046.236151 0.000000
93 11987.418989 2046.236151 0.000000
94 11984.113511 1748.047892 -0.000201
95 11634.403161 1632.508345 -0.024509
96 11040.697227 1435.311557 -0.065778
97 10399.451279 1248.963735 -0.110354
98 9479.717395 1116.983538 -0.174583
99 8475.454340 999.671406 -0.244090
100 7471.207698 883.988876 -0.314044