template_HCMUT
Autor
Chìu Tuấn Bình
Last Updated
hace 7 años
License
Creative Commons CC BY 4.0
Resumen
Template for HCMUT Report
Template for HCMUT Report
\documentclass[a4paper]{article}
\usepackage{vntex}
%\usepackage[english,vietnam]{babel}
%\usepackage[utf8]{inputenc}
%\usepackage[utf8]{inputenc}
%\usepackage[francais]{babel}
\usepackage{a4wide,amssymb,epsfig,latexsym,multicol,array,hhline,fancyhdr}
\usepackage{booktabs}
\usepackage{amsmath}
\usepackage{lastpage}
\usepackage[lined,boxed,commentsnumbered]{algorithm2e}
\usepackage{enumerate}
\usepackage{color}
\usepackage{graphicx} % Standard graphics package
\usepackage{array}
\usepackage{tabularx, caption}
\usepackage{multirow}
\usepackage[framemethod=tikz]{mdframed}% For highlighting paragraph backgrounds
\usepackage{multicol}
\usepackage{rotating}
\usepackage{graphics}
\usepackage{geometry}
\usepackage{setspace}
\usepackage{epsfig}
\usepackage{tikz}
\usepackage{listings}
\usetikzlibrary{arrows,snakes,backgrounds}
\usepackage{hyperref}
\hypersetup{urlcolor=blue,linkcolor=black,citecolor=black,colorlinks=true}
%\usepackage{pstcol} % PSTricks with the standard color package
\newtheorem{theorem}{{\bf Định lý}}
\newtheorem{property}{{\bf Tính chất}}
\newtheorem{proposition}{{\bf Mệnh đề}}
\newtheorem{corollary}[proposition]{{\bf Hệ quả}}
\newtheorem{lemma}[proposition]{{\bf Bổ đề}}
\everymath{\color{blue}}
%\usepackage{fancyhdr}
\setlength{\headheight}{40pt}
\pagestyle{fancy}
\fancyhead{} % clear all header fields
\fancyhead[L]{
\begin{tabular}{rl}
\begin{picture}(25,15)(0,0)
\put(0,-8){\includegraphics[width=8mm, height=8mm]{hcmut.png}}
%\put(0,-8){\epsfig{width=10mm,figure=hcmut.eps}}
\end{picture}&
%\includegraphics[width=8mm, height=8mm]{hcmut.png} & %
\begin{tabular}{l}
\textbf{\bf \ttfamily Trường Đại Học Bách Khoa Tp.Hồ Chí Minh}\\
\textbf{\bf \ttfamily Khoa Khoa Học và Kỹ Thuật Máy Tính}
\end{tabular}
\end{tabular}
}
\fancyhead[R]{
\begin{tabular}{l}
\tiny \bf \\
\tiny \bf
\end{tabular} }
\fancyfoot{} % clear all footer fields
\fancyfoot[L]{\scriptsize \ttfamily Bài tập lớn môn Mô Hình Hoá Toán Học - Niên khóa 2016-2017}
\fancyfoot[R]{\scriptsize \ttfamily Trang {\thepage}/\pageref{LastPage}}
\renewcommand{\headrulewidth}{0.3pt}
\renewcommand{\footrulewidth}{0.3pt}
%%%
\setcounter{secnumdepth}{4}
\setcounter{tocdepth}{3}
\makeatletter
\newcounter {subsubsubsection}[subsubsection]
\renewcommand\thesubsubsubsection{\thesubsubsection .\@alph\c@subsubsubsection}
\newcommand\subsubsubsection{\@startsection{subsubsubsection}{4}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\normalfont\normalsize\bfseries}}
\newcommand*\l@subsubsubsection{\@dottedtocline{3}{10.0em}{4.1em}}
\newcommand*{\subsubsubsectionmark}[1]{}
\makeatother
\definecolor{dkgreen}{rgb}{0,0.6,0}
\definecolor{gray}{rgb}{0.5,0.5,0.5}
\definecolor{mauve}{rgb}{0.58,0,0.82}
\lstset{frame=tb,
language=Matlab,
aboveskip=3mm,
belowskip=3mm,
showstringspaces=false,
columns=flexible,
basicstyle={\small\ttfamily},
numbers=none,
numberstyle=\tiny\color{gray},
keywordstyle=\color{blue},
commentstyle=\color{dkgreen},
stringstyle=\color{mauve},
breaklines=true,
breakatwhitespace=true,
tabsize=3,
numbers=left,
stepnumber=1,
numbersep=1pt,
firstnumber=1,
numberfirstline=true
}
\begin{document}
\begin{titlepage}
\begin{center}
ĐẠI HỌC QUỐC GIA THÀNH PHỐ HỒ CHÍ MINH \\
TRƯỜNG ĐẠI HỌC BÁCH KHOA \\
KHOA KHOA HỌC - KỸ THUẬT MÁY TÍNH
\end{center}
\vspace{1cm}
\begin{figure}[h!]
\begin{center}
\includegraphics[width=3cm]{hcmut.png}
\end{center}
\end{figure}
\vspace{1cm}
\begin{center}
\begin{tabular}{c}
\multicolumn{1}{l}{\textbf{{\Large MÔ HÌNH HOÁ TOÁN HỌC}}}\\
~~\\
\hline
\\
\multicolumn{1}{l}{\textbf{{\Large Xử lý tối ưu bài toán}}}\\
\\
\textbf{{\Huge Hospitals \& Residents trên Matlab}}\\
\\
\hline
\end{tabular}
\end{center}
\vspace{3cm}
\begin{table}[h]
\begin{tabular}{rrl}
\hspace{5 cm} & GVHD: &Lê Hồng Trang\\
& SV: & Chìu Tuấn Bình - 1510221\\
& & Mai Đức Tú - 1513924 \\
& & Phồng Quang Tuấn - 1513865\\
& & Lê Duy Hiển - 1511057 \\
& & Nguyễn Đỗ Đức Anh - 1510062\\
\end{tabular}
\end{table}
\begin{center}
{\footnotesize TP. HỒ CHÍ MINH, THÁNG 4/2017}
\end{center}
\end{titlepage}
\thispagestyle{empty}
\newpage
\tableofcontents
\newpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{mdframed}[hidealllines=true,backgroundcolor=magenta!10]
\begin{lstlisting}
% ------------------------------- %
% XOA MAN HINH VA CAC BIEN %
% ------------------------------- %
clear
clc
% ------------------------------- %
% NHAP DU LIEU BAI TOAN %
% ------------------------------- %
n = ...; % So nguoi dan
m = ...; % So benh vien
% Ma tran D bieu dien thu tu uu tien cua benh vien doi voi benh nhan
% ung voi tung hang
D = [...];
% Ma tran B bieu dien thu tu uu tien cua benh nhan doi voi benh vien
% ung voi tung cot
B = [...];
% Ma tran c bieu dien suc chua cua tung benh vien
c = [...];
% Ma tran a bieu dien moi benh nhan chi duoc chon lua mot benh vien
a = ones(n,1);
% ------------------------------- %
% GIAI BAI TOAN BANG SOLVER MOSEK %
% ------------------------------- %
cvx_begin
cvx_solver mosek
% Bien x(i,j) chi nhan gia tri 0 hoac 1
% ung voi su ghep goi benh nhan r_i voi benh vien h_j
variable x(n,m) binary
% Toi da tong cac bien x(i,j)
% tuc la cang nhieu cap duoc ghep doi cang tot
maximize( 0 )
subject to
% Tong cac hang trong cung mot cot (so benh nhan duoc chon)
% nho hon hoac bang suc chua cua benh vien
sum(x,1) <= c;
% Tong cac cot trong cung mot cot (so benh vien duoc chon)
% nho hon hoac bang 1
sum(x,2) <= a;
% Bao dam khong co cac cap chan
for u = 1:n
for v = 1:m
%Tinh so hang dau tien trong ham dieu kien on dinh
t1 = 0;
for j = 1:m
t1 = t1 + lt(D(u,j),D(u,v)) * x(u,j);
end
%Tinh so hang thu hai trong ham dieu kien on dinh
t2 = 0;
for i = 1:n
t2 = t2 + lt(B(i,v),B(u,v)) * x(i,v) / c(v);
end
%Xac lap ham dieu kien on dinh
t1 + t2 + x(u,v) >= 1;
%Ham dam bao cac cap (r_u,h_v) duoc xet nam trong A, neu
%cap do khong nam trong A thi x_uv = 0
if D(u,v) == m+n+1 || B(u,v) == m+n+1
(eq(D(u,v),m+n+1) + eq(B(u,v),m+n+1)) * x(u,v) == 0;
end
end
end
cvx_end
% ------------------------------- %
% HIEN THI KET QUA RA MAN HINH %
% ------------------------------- %
D
B
c
x % Cac cap duoc ghep doi
\end{lstlisting}
\end{mdframed}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{thebibliography}{80}
\bibitem{CVX}
CVX Introduction
``\textbf{link: http://cvxr.com/cvx/doc/intro.html/}'',
\textit{What is CVX}, lần truy cập cuối: 15/04/2017.
\end{thebibliography}
\end{document}