Compare commits
40 Commits
feature/37
...
57-feat-ad
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
63da3b6308 | ||
|
|
07ed6a9a13 | ||
|
|
1b20376700 | ||
|
|
104b72e624 | ||
|
|
e9568583e4 | ||
|
|
ae201d61fa | ||
|
|
921dc9245c | ||
|
|
bf3c43639d | ||
|
|
f38d44df1d | ||
|
|
5c70d7db51 | ||
|
|
702760cc5e | ||
|
|
43a0f40182 | ||
|
|
92a7143d90 | ||
|
|
5e08d4f8c6 | ||
|
|
907f725fa7 | ||
|
|
676b2b1a87 | ||
|
|
e0fbc23257 | ||
|
|
39f966e71b | ||
|
|
740680d1c7 | ||
|
|
2db5170366 | ||
|
|
f83b890055 | ||
|
|
7820dd580a | ||
|
|
6c0fb67b86 | ||
|
|
792ed64027 | ||
|
|
c57a916a1a | ||
|
|
ca668ffc5f | ||
|
|
8d09adefd4 | ||
|
|
05926e3857 | ||
|
|
d13dfdc34e | ||
|
|
6b866b9ed5 | ||
|
|
4a796694bf | ||
|
|
6357136e6c | ||
|
|
c7584e2dd8 | ||
|
|
80ee9a3ec4 | ||
|
|
f9f346a57e | ||
|
|
cb380219f9 | ||
|
|
804c178175 | ||
|
|
28681017ad | ||
|
|
ff64f3a3ab | ||
|
|
58a316d9c8 |
@@ -324,9 +324,9 @@
|
|||||||
"import pandas as pd\n",
|
"import pandas as pd\n",
|
||||||
"import matplotlib.pyplot as plt\n",
|
"import matplotlib.pyplot as plt\n",
|
||||||
"ready_data1 = []\n",
|
"ready_data1 = []\n",
|
||||||
"for file in os.listdir('D:/thesis/data/working/sensor1'):\n",
|
"for file in os.listdir('D:/thesis/data/converted/raw/sensor1'):\n",
|
||||||
" ready_data1.append(pd.read_csv(os.path.join('D:/thesis/data/working/sensor1', file)))\n",
|
" ready_data1.append(pd.read_csv(os.path.join('D:/thesis/data/converted/raw/sensor1', file)))\n",
|
||||||
"# ready_data1[1]\n",
|
"ready_data1[0]\n",
|
||||||
"# colormesh give title x is frequency and y is time and rotate/transpose the data\n",
|
"# colormesh give title x is frequency and y is time and rotate/transpose the data\n",
|
||||||
"# Plotting the STFT Data"
|
"# Plotting the STFT Data"
|
||||||
]
|
]
|
||||||
@@ -362,8 +362,8 @@
|
|||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"ready_data2 = []\n",
|
"ready_data2 = []\n",
|
||||||
"for file in os.listdir('D:/thesis/data/working/sensor2'):\n",
|
"for file in os.listdir('D:/thesis/data/converted/raw/sensor2'):\n",
|
||||||
" ready_data2.append(pd.read_csv(os.path.join('D:/thesis/data/working/sensor2', file)))\n",
|
" ready_data2.append(pd.read_csv(os.path.join('D:/thesis/data/converted/raw/sensor2', file)))\n",
|
||||||
"ready_data2[5]"
|
"ready_data2[5]"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -407,6 +407,13 @@
|
|||||||
"print(x2)"
|
"print(x2)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"### Appending"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": null,
|
"execution_count": null,
|
||||||
@@ -448,15 +455,10 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "markdown",
|
||||||
"execution_count": null,
|
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
|
||||||
"source": [
|
"source": [
|
||||||
"y_1 = [1,1,1,1]\n",
|
"### Labeling"
|
||||||
"y_2 = [0,1,1,1]\n",
|
|
||||||
"y_3 = [1,0,1,1]\n",
|
|
||||||
"y_4 = [1,1,0,0]"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -492,6 +494,16 @@
|
|||||||
" print(ready_data1[i].shape[0])"
|
" print(ready_data1[i].shape[0])"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"for i in range(len(y_data)):\n",
|
||||||
|
" print(ready_data2[i].shape[0])"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": null,
|
"execution_count": null,
|
||||||
@@ -509,7 +521,8 @@
|
|||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"y_data"
|
"# len(y_data[0])\n",
|
||||||
|
"y_data[0]"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -793,7 +806,6 @@
|
|||||||
"\n",
|
"\n",
|
||||||
" # df1['s1'] = sensor1[sensor1.columns[-1]]\n",
|
" # df1['s1'] = sensor1[sensor1.columns[-1]]\n",
|
||||||
" # df1['s2'] = sensor2[sensor2.columns[-1]]\n",
|
" # df1['s2'] = sensor2[sensor2.columns[-1]]\n",
|
||||||
"ed\n",
|
|
||||||
" # # Combined Plot for sensor 1 and sensor 2 from data1 file in which motor is operated at 800 rpm\n",
|
" # # Combined Plot for sensor 1 and sensor 2 from data1 file in which motor is operated at 800 rpm\n",
|
||||||
"\n",
|
"\n",
|
||||||
" # plt.plot(df1['s2'], label='sensor 2')\n",
|
" # plt.plot(df1['s2'], label='sensor 2')\n",
|
||||||
@@ -823,14 +835,19 @@
|
|||||||
" # plt.show()"
|
" # plt.show()"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"## Test with Outside of Its Training Data"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": null,
|
"execution_count": null,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": []
|
||||||
"spectograph('D:/thesis/data/converted/raw')"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"metadata": {
|
"metadata": {
|
||||||
|
|||||||
@@ -1,25 +1,275 @@
|
|||||||
import pandas as pd
|
import pandas as pd
|
||||||
import os
|
import os
|
||||||
|
import re
|
||||||
import sys
|
import sys
|
||||||
from colorama import Fore, Style, init
|
from colorama import Fore, Style, init
|
||||||
|
from typing import TypedDict, Dict, List
|
||||||
|
from joblib import load
|
||||||
|
from pprint import pprint
|
||||||
|
|
||||||
|
# class DamageFilesIndices(TypedDict):
|
||||||
|
# damage_index: int
|
||||||
|
# files: list[int]
|
||||||
|
OriginalSingleDamageScenarioFilePath = str
|
||||||
|
DamageScenarioGroupIndex = int
|
||||||
|
OriginalSingleDamageScenario = pd.DataFrame
|
||||||
|
SensorIndex = int
|
||||||
|
VectorColumnIndex = List[SensorIndex]
|
||||||
|
VectorColumnIndices = List[VectorColumnIndex]
|
||||||
|
DamageScenarioGroup = List[OriginalSingleDamageScenario]
|
||||||
|
GroupDataset = List[DamageScenarioGroup]
|
||||||
|
|
||||||
|
|
||||||
|
class DamageFilesIndices(TypedDict):
|
||||||
|
damage_index: int
|
||||||
|
files: List[str]
|
||||||
|
|
||||||
|
|
||||||
|
def generate_damage_files_index(**kwargs) -> DamageFilesIndices:
|
||||||
|
prefix: str = kwargs.get("prefix", "zzzAD")
|
||||||
|
extension: str = kwargs.get("extension", ".TXT")
|
||||||
|
num_damage: int = kwargs.get("num_damage")
|
||||||
|
file_index_start: int = kwargs.get("file_index_start")
|
||||||
|
col: int = kwargs.get("col")
|
||||||
|
base_path: str = kwargs.get("base_path")
|
||||||
|
|
||||||
|
damage_scenarios = {}
|
||||||
|
a = file_index_start
|
||||||
|
b = col + 1
|
||||||
|
for i in range(1, num_damage + 1):
|
||||||
|
damage_scenarios[i] = range(a, b)
|
||||||
|
a += col
|
||||||
|
b += col
|
||||||
|
|
||||||
|
# return damage_scenarios
|
||||||
|
|
||||||
|
x = {}
|
||||||
|
for damage, files in damage_scenarios.items():
|
||||||
|
x[damage] = [] # Initialize each key with an empty list
|
||||||
|
for i, file_index in enumerate(files, start=1):
|
||||||
|
if base_path:
|
||||||
|
x[damage].append(
|
||||||
|
os.path.normpath(
|
||||||
|
os.path.join(base_path, f"{prefix}{file_index}{extension}")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
# if not os.path.exists(file_path):
|
||||||
|
# print(Fore.RED + f"File {file_path} does not exist.")
|
||||||
|
# continue
|
||||||
|
else:
|
||||||
|
x[damage].append(f"{prefix}{file_index}{extension}")
|
||||||
|
return x
|
||||||
|
|
||||||
|
# file_path = os.path.join(base_path, f"zzz{prefix}D{file_index}.TXT")
|
||||||
|
# df = pd.read_csv( file_path, sep="\t", skiprows=10) # Read with explicit column names
|
||||||
|
|
||||||
|
|
||||||
|
class DataProcessor:
|
||||||
|
def __init__(self, file_index: DamageFilesIndices, cache_path: str = None):
|
||||||
|
self.file_index = file_index
|
||||||
|
if cache_path:
|
||||||
|
self.data = load(cache_path)
|
||||||
|
else:
|
||||||
|
self.data = self._load_all_data()
|
||||||
|
|
||||||
|
def _extract_column_names(self, file_path: str) -> List[str]:
|
||||||
|
"""
|
||||||
|
Extracts column names from the header of the given file.
|
||||||
|
Assumes the 6th line contains column names.
|
||||||
|
|
||||||
|
:param file_path: Path to the data file.
|
||||||
|
:return: List of column names.
|
||||||
|
"""
|
||||||
|
with open(file_path, "r") as f:
|
||||||
|
header_lines = [next(f) for _ in range(12)]
|
||||||
|
|
||||||
|
# Extract column names from the 6th line
|
||||||
|
channel_line = header_lines[10].strip()
|
||||||
|
tokens = re.findall(r'"([^"]+)"', channel_line)
|
||||||
|
if not channel_line.startswith('"'):
|
||||||
|
first_token = channel_line.split()[0]
|
||||||
|
tokens = [first_token] + tokens
|
||||||
|
|
||||||
|
return tokens # Prepend 'Time' column if applicable
|
||||||
|
|
||||||
|
def _load_dataframe(self, file_path: str) -> OriginalSingleDamageScenario:
|
||||||
|
"""
|
||||||
|
Loads a single data file into a pandas DataFrame.
|
||||||
|
|
||||||
|
:param file_path: Path to the data file.
|
||||||
|
:return: DataFrame containing the numerical data.
|
||||||
|
"""
|
||||||
|
col_names = self._extract_column_names(file_path)
|
||||||
|
df = pd.read_csv(
|
||||||
|
file_path, delim_whitespace=True, skiprows=11, header=None, memory_map=True
|
||||||
|
)
|
||||||
|
df.columns = col_names
|
||||||
|
return df
|
||||||
|
|
||||||
|
def _load_all_data(self) -> GroupDataset:
|
||||||
|
"""
|
||||||
|
Loads all data files based on the grouping dictionary and returns a nested list.
|
||||||
|
|
||||||
|
:return: A nested list of DataFrames where the outer index corresponds to group_idx - 1.
|
||||||
|
"""
|
||||||
|
data = []
|
||||||
|
# Find the maximum group index to determine the list size
|
||||||
|
max_group_idx = max(self.file_index.keys()) if self.file_index else 0
|
||||||
|
|
||||||
|
# Initialize empty lists
|
||||||
|
for _ in range(max_group_idx):
|
||||||
|
data.append([])
|
||||||
|
|
||||||
|
# Fill the list with data
|
||||||
|
for group_idx, file_list in self.file_index.items():
|
||||||
|
# Adjust index to be 0-based
|
||||||
|
list_idx = group_idx - 1
|
||||||
|
data[list_idx] = [self._load_dataframe(file) for file in file_list]
|
||||||
|
|
||||||
|
return data
|
||||||
|
|
||||||
|
def get_group_data(self, group_idx: int) -> List[pd.DataFrame]:
|
||||||
|
"""
|
||||||
|
Returns the list of DataFrames for the given group index.
|
||||||
|
|
||||||
|
:param group_idx: Index of the group.
|
||||||
|
:return: List of DataFrames.
|
||||||
|
"""
|
||||||
|
return self.data.get([group_idx, []])
|
||||||
|
|
||||||
|
def get_column_names(self, group_idx: int, file_idx: int = 0) -> List[str]:
|
||||||
|
"""
|
||||||
|
Returns the column names for the given group and file indices.
|
||||||
|
|
||||||
|
:param group_idx: Index of the group.
|
||||||
|
:param file_idx: Index of the file in the group.
|
||||||
|
:return: List of column names.
|
||||||
|
"""
|
||||||
|
if group_idx in self.data and len(self.data[group_idx]) > file_idx:
|
||||||
|
return self.data[group_idx][file_idx].columns.tolist()
|
||||||
|
return []
|
||||||
|
|
||||||
|
def get_data_info(self):
|
||||||
|
"""
|
||||||
|
Print information about the loaded data structure.
|
||||||
|
Adapted for when self.data is a List instead of a Dictionary.
|
||||||
|
"""
|
||||||
|
if isinstance(self.data, list):
|
||||||
|
# For each sublist in self.data, get the type names of all elements
|
||||||
|
pprint(
|
||||||
|
[
|
||||||
|
(
|
||||||
|
[type(item).__name__ for item in sublist]
|
||||||
|
if isinstance(sublist, list)
|
||||||
|
else type(sublist).__name__
|
||||||
|
)
|
||||||
|
for sublist in self.data
|
||||||
|
]
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
pprint(
|
||||||
|
{
|
||||||
|
key: [type(df).__name__ for df in value]
|
||||||
|
for key, value in self.data.items()
|
||||||
|
}
|
||||||
|
if isinstance(self.data, dict)
|
||||||
|
else type(self.data).__name__
|
||||||
|
)
|
||||||
|
|
||||||
|
def _create_vector_column_index(self) -> VectorColumnIndices:
|
||||||
|
vector_col_idx: VectorColumnIndices = []
|
||||||
|
y = 0
|
||||||
|
for data_group in self.data: # len(data_group[i]) = 5
|
||||||
|
for j in data_group: # len(j[i]) =
|
||||||
|
c: VectorColumnIndex = [] # column vector c_{j}
|
||||||
|
x = 0
|
||||||
|
for _ in range(6): # TODO: range(6) should be dynamic and parameterized
|
||||||
|
c.append(x + y)
|
||||||
|
x += 5
|
||||||
|
vector_col_idx.append(c)
|
||||||
|
y += 1
|
||||||
|
return vector_col_idx
|
||||||
|
|
||||||
|
def create_vector_column(self, overwrite=True) -> List[List[List[pd.DataFrame]]]:
|
||||||
|
"""
|
||||||
|
Create a vector column from the loaded data.
|
||||||
|
|
||||||
|
:param overwrite: Overwrite the original data with vector column-based data.
|
||||||
|
"""
|
||||||
|
idx = self._create_vector_column_index()
|
||||||
|
# if overwrite:
|
||||||
|
for i in range(len(self.data)):
|
||||||
|
for j in range(len(self.data[i])):
|
||||||
|
# Get the appropriate indices for slicing from idx
|
||||||
|
indices = idx[j]
|
||||||
|
|
||||||
|
# Get the current DataFrame
|
||||||
|
df = self.data[i][j]
|
||||||
|
|
||||||
|
# Keep the 'Time' column and select only specified 'Real' columns
|
||||||
|
# First, we add 1 to all indices to account for 'Time' being at position 0
|
||||||
|
real_indices = [index + 1 for index in indices]
|
||||||
|
|
||||||
|
# Create list with Time column index (0) and the adjusted Real indices
|
||||||
|
all_indices = [0] + real_indices
|
||||||
|
|
||||||
|
# Apply the slicing
|
||||||
|
self.data[i][j] = df.iloc[:, all_indices]
|
||||||
|
# TODO: if !overwrite:
|
||||||
|
|
||||||
|
def create_limited_sensor_vector_column(self, overwrite=True):
|
||||||
|
"""
|
||||||
|
Create a vector column from the loaded data.
|
||||||
|
|
||||||
|
:param overwrite: Overwrite the original data with vector column-based data.
|
||||||
|
"""
|
||||||
|
idx = self._create_vector_column_index()
|
||||||
|
# if overwrite:
|
||||||
|
for i in range(len(self.data)):
|
||||||
|
for j in range(len(self.data[i])):
|
||||||
|
# Get the appropriate indices for slicing from idx
|
||||||
|
indices = idx[j]
|
||||||
|
|
||||||
|
# Get the current DataFrame
|
||||||
|
df = self.data[i][j]
|
||||||
|
|
||||||
|
# Keep the 'Time' column and select only specified 'Real' columns
|
||||||
|
# First, we add 1 to all indices to account for 'Time' being at position 0
|
||||||
|
real_indices = [index + 1 for index in indices]
|
||||||
|
|
||||||
|
# Create list with Time column index (0) and the adjusted Real indices
|
||||||
|
all_indices = [0] + [real_indices[0]] + [real_indices[-1]]
|
||||||
|
|
||||||
|
# Apply the slicing
|
||||||
|
self.data[i][j] = df.iloc[:, all_indices]
|
||||||
|
# TODO: if !overwrite:
|
||||||
|
|
||||||
|
|
||||||
def create_damage_files(base_path, output_base, prefix):
|
def create_damage_files(base_path, output_base, prefix):
|
||||||
# Initialize colorama
|
# Initialize colorama
|
||||||
init(autoreset=True)
|
init(autoreset=True)
|
||||||
|
|
||||||
# Generate column labels based on expected duplication in input files
|
|
||||||
columns = ['Real'] + [f'Real.{i}' for i in range(1, 30)] # Explicitly setting column names
|
|
||||||
|
|
||||||
sensor_end_map = {1: 'Real.25', 2: 'Real.26', 3: 'Real.27', 4: 'Real.28', 5: 'Real.29'}
|
# Generate column labels based on expected duplication in input files
|
||||||
|
columns = ["Real"] + [
|
||||||
|
f"Real.{i}" for i in range(1, 30)
|
||||||
|
] # Explicitly setting column names
|
||||||
|
|
||||||
|
sensor_end_map = {
|
||||||
|
1: "Real.25",
|
||||||
|
2: "Real.26",
|
||||||
|
3: "Real.27",
|
||||||
|
4: "Real.28",
|
||||||
|
5: "Real.29",
|
||||||
|
}
|
||||||
|
|
||||||
# Define the damage scenarios and the corresponding original file indices
|
# Define the damage scenarios and the corresponding original file indices
|
||||||
damage_scenarios = {
|
damage_scenarios = {
|
||||||
1: range(1, 6), # Damage 1 files from zzzAD1.csv to zzzAD5.csv
|
1: range(1, 6), # Damage 1 files from zzzAD1.csv to zzzAD5.csv
|
||||||
2: range(6, 11), # Damage 2 files from zzzAD6.csv to zzzAD10.csv
|
2: range(6, 11), # Damage 2 files from zzzAD6.csv to zzzAD10.csv
|
||||||
3: range(11, 16), # Damage 3 files from zzzAD11.csv to zzzAD15.csvs
|
3: range(11, 16), # Damage 3 files from zzzAD11.csv to zzzAD15.csvs
|
||||||
4: range(16, 21), # Damage 4 files from zzzAD16.csv to zzzAD20.csv
|
4: range(16, 21), # Damage 4 files from zzzAD16.csv to zzzAD20.csv
|
||||||
5: range(21, 26), # Damage 5 files from zzzAD21.csv to zzzAD25.csv
|
5: range(21, 26), # Damage 5 files from zzzAD21.csv to zzzAD25.csv
|
||||||
6: range(26, 31) # Damage 6 files from zzzAD26.csv to zzzAD30.csv
|
6: range(26, 31), # Damage 6 files from zzzAD26.csv to zzzAD30.csv
|
||||||
}
|
}
|
||||||
damage_pad = len(str(len(damage_scenarios)))
|
damage_pad = len(str(len(damage_scenarios)))
|
||||||
test_pad = len(str(30))
|
test_pad = len(str(30))
|
||||||
@@ -27,29 +277,36 @@ def create_damage_files(base_path, output_base, prefix):
|
|||||||
for damage, files in damage_scenarios.items():
|
for damage, files in damage_scenarios.items():
|
||||||
for i, file_index in enumerate(files, start=1):
|
for i, file_index in enumerate(files, start=1):
|
||||||
# Load original data file
|
# Load original data file
|
||||||
file_path = os.path.join(base_path, f'zzz{prefix}D{file_index}.TXT')
|
file_path = os.path.join(base_path, f"zzz{prefix}D{file_index}.TXT")
|
||||||
df = pd.read_csv(file_path, sep='\t', skiprows=10) # Read with explicit column names
|
df = pd.read_csv(
|
||||||
|
file_path, sep="\t", skiprows=10
|
||||||
|
) # Read with explicit column names
|
||||||
|
|
||||||
top_sensor = columns[i-1]
|
top_sensor = columns[i - 1]
|
||||||
print(top_sensor, type(top_sensor))
|
print(top_sensor, type(top_sensor))
|
||||||
output_file_1 = os.path.join(output_base, f'DAMAGE_{damage}', f'DAMAGE{damage}_TEST{i}_01.csv')
|
output_file_1 = os.path.join(
|
||||||
|
output_base, f"DAMAGE_{damage}", f"DAMAGE{damage}_TEST{i}_01.csv"
|
||||||
|
)
|
||||||
print(f"Creating {output_file_1} from taking zzz{prefix}D{file_index}.TXT")
|
print(f"Creating {output_file_1} from taking zzz{prefix}D{file_index}.TXT")
|
||||||
print("Taking datetime column on index 0...")
|
print("Taking datetime column on index 0...")
|
||||||
print(f"Taking `{top_sensor}`...")
|
print(f"Taking `{top_sensor}`...")
|
||||||
os.makedirs(os.path.dirname(output_file_1), exist_ok=True)
|
os.makedirs(os.path.dirname(output_file_1), exist_ok=True)
|
||||||
df[['Time', top_sensor]].to_csv(output_file_1, index=False)
|
df[["Time", top_sensor]].to_csv(output_file_1, index=False)
|
||||||
print(Fore.GREEN + "Done")
|
print(Fore.GREEN + "Done")
|
||||||
|
|
||||||
bottom_sensor = sensor_end_map[i]
|
bottom_sensor = sensor_end_map[i]
|
||||||
output_file_2 = os.path.join(output_base, f'DAMAGE_{damage}', f'DAMAGE{damage}_TEST{i}_02.csv')
|
output_file_2 = os.path.join(
|
||||||
|
output_base, f"DAMAGE_{damage}", f"DAMAGE{damage}_TEST{i}_02.csv"
|
||||||
|
)
|
||||||
print(f"Creating {output_file_2} from taking zzz{prefix}D{file_index}.TXT")
|
print(f"Creating {output_file_2} from taking zzz{prefix}D{file_index}.TXT")
|
||||||
print("Taking datetime column on index 0...")
|
print("Taking datetime column on index 0...")
|
||||||
print(f"Taking `{bottom_sensor}`...")
|
print(f"Taking `{bottom_sensor}`...")
|
||||||
os.makedirs(os.path.dirname(output_file_2), exist_ok=True)
|
os.makedirs(os.path.dirname(output_file_2), exist_ok=True)
|
||||||
df[['Time', bottom_sensor]].to_csv(output_file_2, index=False)
|
df[["Time", bottom_sensor]].to_csv(output_file_2, index=False)
|
||||||
print(Fore.GREEN + "Done")
|
print(Fore.GREEN + "Done")
|
||||||
print("---")
|
print("---")
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
if len(sys.argv) < 2:
|
if len(sys.argv) < 2:
|
||||||
print("Usage: python convert.py <path_to_csv_files>")
|
print("Usage: python convert.py <path_to_csv_files>")
|
||||||
@@ -66,5 +323,6 @@ def main():
|
|||||||
create_damage_files(base_path, output_base, prefix)
|
create_damage_files(base_path, output_base, prefix)
|
||||||
print(Fore.YELLOW + Style.BRIGHT + "All files have been created successfully.")
|
print(Fore.YELLOW + Style.BRIGHT + "All files have been created successfully.")
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|||||||
8
data/QUGS/test.py
Normal file
8
data/QUGS/test.py
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
from convert import *
|
||||||
|
from joblib import dump, load
|
||||||
|
|
||||||
|
# a = generate_damage_files_index(
|
||||||
|
# num_damage=6, file_index_start=1, col=5, base_path="D:/thesis/data/dataset_A"
|
||||||
|
# )
|
||||||
|
# dump(DataProcessor(file_index=a), "D:/cache.joblib")
|
||||||
|
a = load("D:/cache.joblib")
|
||||||
41
latex/appendix/important/abdeljaber2017.tex
Normal file
41
latex/appendix/important/abdeljaber2017.tex
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
2 %Nomor
|
||||||
|
|
||||||
|
%for mult rows
|
||||||
|
|
||||||
|
& %Judul Jurnal
|
||||||
|
Real-time vibration-based structural damage detection using one-dimensional convolutional neural networks \href{https://doi.org/10.1016/j.jsv.2016.10.043}{10.1016/j.jsv.
|
||||||
|
2016.10.043}
|
||||||
|
|
||||||
|
%for mult rows
|
||||||
|
|
||||||
|
% & %Author
|
||||||
|
% % Satish B Satpal; Yogesh Khandare; Anirban Guha; Sauvik Banerjee
|
||||||
|
|
||||||
|
% %for mult rows
|
||||||
|
|
||||||
|
% & %Nama Jurnal
|
||||||
|
% International Journal of Advanced Structural Engineering (IJASE)
|
||||||
|
|
||||||
|
% %for mult rows
|
||||||
|
|
||||||
|
% & %Sumber
|
||||||
|
% \href{http://dx.doi.org/10.1186/2008-6695-5-2}{ResearchGate}
|
||||||
|
|
||||||
|
% %for mult rows
|
||||||
|
|
||||||
|
% & %Tahun
|
||||||
|
% 2020
|
||||||
|
|
||||||
|
% %for mult rows
|
||||||
|
|
||||||
|
& %Tujuan penelitian
|
||||||
|
Mengidentifikasi lokasi kerusakan struktur secara \textit{real-time} dengan memproses sinyal getaran mentah yang diambil dari jaringan-jaringan akselerometer pada setiap titik tanpa proses tambahan atau ekstraksi fitur.
|
||||||
|
|
||||||
|
& %Kesimpulan
|
||||||
|
% Studi ini menilai kemampuan mesin vektor pendukung untuk memprediksi intensitas kerusakan dan lokasi pada balok kantilever. Meskipun berhasil memprediksi kerusakan dengan sedikit kesalahan, tingkat kebisingan dan lokasi kerusakan memengaruhi keakuratan. Tingkat kebisingan yang tinggi mempengaruhi kinerja secara signifikan, terutama pada intensitas kerusakan yang lebih rendah.
|
||||||
|
& % Gap Research
|
||||||
|
\begin{enumerate}
|
||||||
|
\item Riset ini hanya dilakukan dengan \textit{full-grid array} akselerometer yang diletakkan pada setiap \textit{node} kerusakan, sehingga memerlukan banyak perangkat akselerometer.
|
||||||
|
|
||||||
|
\item Tidak ada komparasi performa efisiensi dan akurasi dengan algoritma pembelajaran mesin lain yang lebih populer sebelumnya.
|
||||||
|
\end{enumerate}
|
||||||
68
latex/appendix/important/van2020.tex
Normal file
68
latex/appendix/important/van2020.tex
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
1
|
||||||
|
|
||||||
|
%for mult rows
|
||||||
|
|
||||||
|
&
|
||||||
|
Statistical Feature Extraction in Machine Fault Detection using Vibration Signal (\href{https://doi.org/10.1109/ICTC49870.2020.9289285}{10.1109/ICTC49870.
|
||||||
|
2020.9289285})
|
||||||
|
%for mult rows
|
||||||
|
|
||||||
|
% &
|
||||||
|
% Donghui Xu; Xiang Xu; Michael C. Forde; Antonio Caballero
|
||||||
|
|
||||||
|
%for mult rows
|
||||||
|
|
||||||
|
% &
|
||||||
|
% Construction and Building Materials
|
||||||
|
|
||||||
|
% %for mult rows
|
||||||
|
|
||||||
|
% &
|
||||||
|
% \href{https://doi.org/10.1016/j.conbuildmat.2023.132596}{ScienceDirect}
|
||||||
|
|
||||||
|
% %for mult rows
|
||||||
|
|
||||||
|
% &
|
||||||
|
% 2023
|
||||||
|
|
||||||
|
% %for mult rows
|
||||||
|
|
||||||
|
&
|
||||||
|
\begin{enumerate}[series=enum]
|
||||||
|
\item Menginvestigasi cara mengklasifikasi kondisi \textit{gearbox} normal dan rusak menggunakan sinyal getaran berbasis pada kombinasi antara analisis statistik dan FFT dengan algoritma pembelajaran mesin (ANN, Logistic Regression, dan SVM)
|
||||||
|
|
||||||
|
\item Mengurangi waktu latih dan kompleksitas kalkulasi dengan analisis statistik sebagai input data meliputi sembilan fitur: mean, median, min, max, kurtosis, \textit{skewness}, \textit{standard deviation}, and \textit{range}.
|
||||||
|
\end{enumerate}
|
||||||
|
|
||||||
|
&
|
||||||
|
\begin{enumerate}[series=enum2]
|
||||||
|
\item Nilai \textit{maximum} dan kurtosis adalah fitur yang paling signifikan untuk mengklasifikasi kelas label pembelajaran mesin.
|
||||||
|
|
||||||
|
\item ANN meraih akurasi 100\% pada input FFT penuh dan analisis statistik, sedangkan Regresi Logistik (LR) dan SVM meraih akurasi 100\% dengan input FFT penuh namun hanya mendapat akurasi 91\% dengan input analisis statistik
|
||||||
|
\end{enumerate}
|
||||||
|
|
||||||
|
&
|
||||||
|
\begin{enumerate}
|
||||||
|
\item Lorem
|
||||||
|
\item Ipsum
|
||||||
|
\end{enumerate}
|
||||||
|
|
||||||
|
%-------------page break----------------
|
||||||
|
% \\
|
||||||
|
% &
|
||||||
|
% &
|
||||||
|
% &
|
||||||
|
% &
|
||||||
|
% &
|
||||||
|
% &
|
||||||
|
% &
|
||||||
|
% \begin{enumerate}[resume=enum]
|
||||||
|
% \item Menyajikan berbagai perkembangan penelitian, mendiskusikan dan membandingkannya kelebihan dan kekurangannya
|
||||||
|
% \item Meringkas kesesuaian berbagai metode pembelajaran mesin untuk masalah SHM yang berbeda
|
||||||
|
% \item Terakhir, tren masa depan
|
||||||
|
% \end{enumerate}
|
||||||
|
% &
|
||||||
|
% \begin{enumerate}[resume=enum2]
|
||||||
|
% \item SVM dan hutan acak kurang mendapat perhatian dibandingkan dengan jaringan saraf. Ini digunakan untuk klasifikasi kerusakan. Namun, pemrosesan awal data jauh lebih rumit.
|
||||||
|
|
||||||
|
% \end{enumerate}
|
||||||
509
latex/appendix/summary_related_paper.tex
Normal file
509
latex/appendix/summary_related_paper.tex
Normal file
@@ -0,0 +1,509 @@
|
|||||||
|
\documentclass[12pt,a4paper]{report}
|
||||||
|
\usepackage{hyperref}
|
||||||
|
\usepackage[top=1cm,right=3cm,bottom=1cm,left=3cm]{geometry}
|
||||||
|
\usepackage{multirow}
|
||||||
|
\usepackage{array}
|
||||||
|
% \usepackage{makecell}
|
||||||
|
\usepackage{pdflscape}
|
||||||
|
\usepackage{longtable,booktabs}
|
||||||
|
\usepackage{colortbl,xcolor}
|
||||||
|
\usepackage{enumitem}
|
||||||
|
\usepackage{pdfpages}
|
||||||
|
\usepackage{caption}
|
||||||
|
\usepackage[bahasa]{babel}
|
||||||
|
\usepackage{xpatch,csquotes}
|
||||||
|
\usepackage[backend=biber]{biblatex}
|
||||||
|
\addbibresource{export.bib}
|
||||||
|
\DeclareSourcemap{
|
||||||
|
\maps[datatype = bibtex]{
|
||||||
|
\map{
|
||||||
|
\step[fieldsource = abstract,
|
||||||
|
match = \regexp{([^\\])\%},
|
||||||
|
replace = \regexp{\$1\\\%}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
% \usepackage{tablefootnote}
|
||||||
|
% \usepackage{showframe}
|
||||||
|
\definecolor{Gray}{gray}{0.95}
|
||||||
|
\newcolumntype{a}{>{\columncolor{Gray}}p}
|
||||||
|
\renewcommand{\thefootnote}{\textit{\alph{footnote}}}
|
||||||
|
% \newcolumntype{b}{>{\raggedright\arraybackslash}p}
|
||||||
|
|
||||||
|
\title{Tugas 2 \\ Metode Penelitian}
|
||||||
|
\author{Rifqi Damar Panuluh \\ 20210110224}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
\maketitle
|
||||||
|
\begin{landscape}
|
||||||
|
% Table generated by Excel2LaTeX from sheet 'Sheet1'
|
||||||
|
% \begin{table}[h]
|
||||||
|
\centering
|
||||||
|
\begin{longtable}{
|
||||||
|
>{\raggedleft\arraybackslash}p{0.02\linewidth} %1
|
||||||
|
>{\raggedright\arraybackslash}a{0.1\linewidth} %2
|
||||||
|
% >{\raggedright\arraybackslash}p{0.1\linewidth} %3
|
||||||
|
% >{\raggedright\arraybackslash}a{0.075\linewidth} %4
|
||||||
|
% p{0.065\linewidth} %5
|
||||||
|
% >{\raggedleft\arraybackslash}p{0.05\linewidth} %6
|
||||||
|
>{\raggedright\arraybackslash}p{0.25\linewidth} %7
|
||||||
|
>{\raggedright\arraybackslash}a{0.25\linewidth} %8
|
||||||
|
>{\raggedright\arraybackslash}p{0.25\linewidth} %9
|
||||||
|
}
|
||||||
|
|
||||||
|
\caption{Tinjauan pustaka, topik: pemanfaatan data getaran untuk monitor kesehatan struktur jembatan}
|
||||||
|
\label{tab:my_label}
|
||||||
|
\\
|
||||||
|
\toprule
|
||||||
|
\toprule
|
||||||
|
\rowcolor{white}
|
||||||
|
No. %1
|
||||||
|
&
|
||||||
|
Judul %2
|
||||||
|
% &
|
||||||
|
% Nama Penulis %3
|
||||||
|
% &
|
||||||
|
% Nama Jurnal %4
|
||||||
|
% &
|
||||||
|
% Sumber %5
|
||||||
|
% &
|
||||||
|
% Tahun %6
|
||||||
|
&
|
||||||
|
Tujuan Penelitian %7
|
||||||
|
&
|
||||||
|
Kesimpulan %8
|
||||||
|
&
|
||||||
|
Gap Research %9
|
||||||
|
|
||||||
|
\\\midrule
|
||||||
|
\endfirsthead
|
||||||
|
\toprule
|
||||||
|
\rowcolor{white}
|
||||||
|
No. %1
|
||||||
|
&
|
||||||
|
Judul %2
|
||||||
|
% &
|
||||||
|
% Nama Penulis %3
|
||||||
|
% &
|
||||||
|
% Nama Jurnal %4
|
||||||
|
% &
|
||||||
|
% Sumber %5
|
||||||
|
% &
|
||||||
|
% Tahun %6
|
||||||
|
&
|
||||||
|
Tujuan Penelitian %7
|
||||||
|
&
|
||||||
|
Kesimpulan %8
|
||||||
|
|
||||||
|
\\\midrule
|
||||||
|
\endhead
|
||||||
|
\midrule
|
||||||
|
\multicolumn{4}{r}{\textit{berlanjut di halaman berikutnya}}
|
||||||
|
\endfoot
|
||||||
|
\bottomrule
|
||||||
|
\bottomrule
|
||||||
|
\endlastfoot
|
||||||
|
|
||||||
|
%-----1
|
||||||
|
\input{important/van2020}
|
||||||
|
\\
|
||||||
|
%-----2
|
||||||
|
\input{important/abdeljaber2017}
|
||||||
|
\\
|
||||||
|
%------3
|
||||||
|
\\
|
||||||
|
3
|
||||||
|
|
||||||
|
& %Judul Jurnal
|
||||||
|
Real-time nondestructive structural health monitoring using support vector machines and wavelets (Ahmet Bulut; Ambuj K. Singh; Peter Shin; Tony Fountain; Hector Jasso; Linjun Yan; Ahmed Elgamal)
|
||||||
|
|
||||||
|
%for mult rows
|
||||||
|
|
||||||
|
% & %Author
|
||||||
|
% Ahmet Bulut; Ambuj K. Singh; Peter Shin; Tony Fountain; Hector Jasso; Linjun Yan; Ahmed Elgamal
|
||||||
|
|
||||||
|
%for mult rows
|
||||||
|
|
||||||
|
% & %Nama Jurnal
|
||||||
|
% Case Studies in Construction Materials 13 (2020) e00406
|
||||||
|
|
||||||
|
% %for mult rows
|
||||||
|
|
||||||
|
% & %Sumber
|
||||||
|
% SPIE
|
||||||
|
|
||||||
|
% %for mult rows
|
||||||
|
|
||||||
|
% & %Tahun
|
||||||
|
% 2005
|
||||||
|
|
||||||
|
%for mult rows
|
||||||
|
|
||||||
|
& %Tujuan penelitian
|
||||||
|
Eksplorasi efektivitas SVM dalam deteksi kerusakan; Validasi model SVM dengan data nyata jembatan
|
||||||
|
|
||||||
|
& %Kesimpulan
|
||||||
|
\begin{enumerate} [series=enum]
|
||||||
|
\item SVM menunjukkan akurasi tinggi dalam mengidentifikasi lokasi kerusakan
|
||||||
|
\item Rekomendasi untuk penyetelan parameter SVM
|
||||||
|
\end{enumerate}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%-----------4
|
||||||
|
\\
|
||||||
|
4
|
||||||
|
|
||||||
|
& %Judul Jurnal
|
||||||
|
A novel approach of Structural Health Monitoring by the application of FFT and wavelet transform using an index of frequency dispersion (Fragkiskos P. Pentaris; John Stonham; John P. Makris)
|
||||||
|
|
||||||
|
%for mult rows
|
||||||
|
|
||||||
|
% & %Author
|
||||||
|
% Fragkiskos P. Pentaris; John Stonham; John P. Makris
|
||||||
|
|
||||||
|
%for mult rows
|
||||||
|
|
||||||
|
% & %Nama Jurnal
|
||||||
|
% International Journal of Geology
|
||||||
|
|
||||||
|
% %for mult rows
|
||||||
|
|
||||||
|
% & %Sumber
|
||||||
|
% Research Gate
|
||||||
|
|
||||||
|
% %for mult rows
|
||||||
|
|
||||||
|
% & %Tahun
|
||||||
|
% 2013
|
||||||
|
|
||||||
|
%for mult rows
|
||||||
|
|
||||||
|
& %Tujuan penelitian
|
||||||
|
\begin{enumerate}
|
||||||
|
\item Memeriksa peran FFT dalam pemrosesan awal data getaran
|
||||||
|
\item Menilai dampak FFT terhadap keakuratan deteksi kerusakan
|
||||||
|
\end{enumerate}
|
||||||
|
|
||||||
|
& %Kesimpulan
|
||||||
|
\begin{enumerate} [series=enum]
|
||||||
|
\item FFT meningkatkan rasio \textit{signal-to-noise} dan meningkatkan deteksi kerusakan.
|
||||||
|
\item Menyarankan integrasi dengan algoritme lain untuk meningkatkan akurasi.
|
||||||
|
\end{enumerate}
|
||||||
|
|
||||||
|
\\ %-------------page break----------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%-----------4
|
||||||
|
\\
|
||||||
|
5
|
||||||
|
|
||||||
|
& %Judul Jurnal
|
||||||
|
Review of Vibration-Based Structural Health Monitoring Using Deep Learning (Gyungmin Toh; Junhong Park)
|
||||||
|
|
||||||
|
%for mult rows
|
||||||
|
|
||||||
|
% & %Author
|
||||||
|
% Gyungmin Toh;
|
||||||
|
% Junhong Park
|
||||||
|
|
||||||
|
% %for mult rows
|
||||||
|
|
||||||
|
% & %Nama Jurnal
|
||||||
|
% Apllied Sciences
|
||||||
|
|
||||||
|
% %for mult rows
|
||||||
|
|
||||||
|
% & %Sumber
|
||||||
|
% MDPI
|
||||||
|
|
||||||
|
% %for mult rows
|
||||||
|
|
||||||
|
% & %Tahun
|
||||||
|
% 2020
|
||||||
|
|
||||||
|
%for mult rows
|
||||||
|
|
||||||
|
& %Tujuan penelitian
|
||||||
|
\begin{enumerate}
|
||||||
|
\item ringkasan studi penerapan algoritma pembelajaran mesin untuk kesalahan pemantauan (\textit{monitoring}) menggunakan faktor getaran untuk mengkategorikan penelitian.
|
||||||
|
\item Menyediakan interpretasi singkat tentang jaringan saraf dalam untuk pengaplikasian lebih lanjut dalam analisis getaran struktural.
|
||||||
|
\end{enumerate}
|
||||||
|
|
||||||
|
& %Kesimpulan
|
||||||
|
\begin{enumerate} [series=enum]
|
||||||
|
\item Deep learning has the advantage of being able to perform health monitoring on complex structures with high accuracy.
|
||||||
|
\end{enumerate}
|
||||||
|
%-------------page break----------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%-----------4
|
||||||
|
\\
|
||||||
|
6
|
||||||
|
|
||||||
|
& %Judul Jurnal
|
||||||
|
A deep learning approach to condition monitoring of cantilever beams via time-frequency extended signatures (Habil. Darian M. Onchis)
|
||||||
|
|
||||||
|
%for mult rows
|
||||||
|
|
||||||
|
% & %Author
|
||||||
|
% Habil. Darian M. Onchis
|
||||||
|
|
||||||
|
% %for mult rows
|
||||||
|
|
||||||
|
% & %Nama Jurnal
|
||||||
|
% Computers in Industry
|
||||||
|
|
||||||
|
% %for mult rows
|
||||||
|
|
||||||
|
% & %Sumber
|
||||||
|
% Science Direct
|
||||||
|
|
||||||
|
% %for mult rows
|
||||||
|
|
||||||
|
% & %Tahun
|
||||||
|
% 2019
|
||||||
|
|
||||||
|
%for mult rows
|
||||||
|
|
||||||
|
& %Tujuan penelitian
|
||||||
|
\begin{enumerate}
|
||||||
|
\item ringkasan studi penerapan algoritma pembelajaran mesin untuk kesalahan pemantauan (\textit{monitoring}) menggunakan faktor getaran untuk mengkategorikan penelitian.
|
||||||
|
\item Menyediakan interpretasi singkat tentang jaringan saraf dalam untuk pengaplikasian lebih lanjut dalam analisis getaran struktural.
|
||||||
|
\end{enumerate}
|
||||||
|
|
||||||
|
& %Kesimpulan
|
||||||
|
\begin{enumerate} [series=enum]
|
||||||
|
\item Deep learning has the advantage of being able to perform health monitoring on complex structures with high accuracy.
|
||||||
|
\end{enumerate}
|
||||||
|
|
||||||
|
\\ %-------------page break----------------
|
||||||
|
|
||||||
|
|
||||||
|
% %------------5
|
||||||
|
% 5
|
||||||
|
|
||||||
|
% & %Judul Jurnal
|
||||||
|
% Advances and development trends in eco-friendly pavements
|
||||||
|
|
||||||
|
% %for mult rows
|
||||||
|
|
||||||
|
% & %Author
|
||||||
|
% Aimin Sha, Zhuangzhuang Liu, Wei Jiang, Lin Qi, Liqun Hu, Wenxiu Jiao ,Diego Maria Barbieri
|
||||||
|
|
||||||
|
% %for mult rows
|
||||||
|
|
||||||
|
% & %Nama Jurnal
|
||||||
|
% Journal of Road Engineering 1 (2021)
|
||||||
|
|
||||||
|
% %for mult rows
|
||||||
|
|
||||||
|
% & %Sumber
|
||||||
|
% ScienceDirect
|
||||||
|
|
||||||
|
% %for mult rows
|
||||||
|
|
||||||
|
% & %Tahun
|
||||||
|
% 2021
|
||||||
|
|
||||||
|
% %for mult rows
|
||||||
|
|
||||||
|
% & %Tujuan penelitian
|
||||||
|
% Mengembangkan solusi teknis untuk mengatasi tantangan yang terkait dengan penciptaan infrastruktur hijau dan berkelanjutan, misalnya, pengurangan dampak lingkungan, peningkatan keselamatan lalu lintas, dan efisiensi transportasi, dll.\cite{Sha2021}
|
||||||
|
% &
|
||||||
|
% \begin{enumerate} [series=enum]
|
||||||
|
% \item Temuan penelitian terbaru terkait jalan ramah lingkungan
|
||||||
|
% trotoar diringkas dan dibahas sesuai dengan enam kunci yang berbeda
|
||||||
|
% karakteristik: permeabel, pengurangan kebisingan, luminescence diri, knalpot
|
||||||
|
% dekomposisi, penyerapan panas rendah serta \textit{anti-icing} / \textit{de-icing}.\cite{Sha2021}
|
||||||
|
% \end{enumerate}
|
||||||
|
% \\
|
||||||
|
% & %Judul Jurnal
|
||||||
|
% Advances and development trends in eco-friendly pavements
|
||||||
|
|
||||||
|
% %for mult rows
|
||||||
|
|
||||||
|
% & %Author
|
||||||
|
% Aimin Sha, Zhuangzhuang Liu, Wei Jiang, Lin Qi, Liqun Hu, Wenxiu Jiao ,Diego Maria Barbieri
|
||||||
|
|
||||||
|
% %for mult rows
|
||||||
|
|
||||||
|
% & %Nama Jurnal
|
||||||
|
% Journal of Road Engineering 1 (2021)
|
||||||
|
|
||||||
|
% %for mult rows
|
||||||
|
|
||||||
|
% & %Sumber
|
||||||
|
% ScienceDirect
|
||||||
|
|
||||||
|
% %for mult rows
|
||||||
|
|
||||||
|
% & %Tahun
|
||||||
|
% 2021
|
||||||
|
|
||||||
|
% %for mult rows
|
||||||
|
|
||||||
|
% & %Tujuan penelitian
|
||||||
|
% Mengembangkan solusi teknis untuk mengatasi tantangan yang terkait dengan penciptaan infrastruktur hijau dan berkelanjutan, misalnya, pengurangan dampak lingkungan, peningkatan keselamatan lalu lintas, dan efisiensi transportasi, dll.\cite{Sha2021}
|
||||||
|
% &
|
||||||
|
% \begin{enumerate}[resume=enum]
|
||||||
|
% \item Teknologi ini dapat memecahkan beberapa tantangan utama yang terkait dengan konstruksi jalan dan lalu lintas (misalnya, kebisingan, efek pulau panas, dan pembangkitan polusi). Sebagian besar solusi saat ini hanya tersedia menampilkan satu fungsi ramah lingkungan pada satu waktu.\cite{Sha2021}
|
||||||
|
% \end{enumerate}
|
||||||
|
|
||||||
|
% %-----------5
|
||||||
|
% \\
|
||||||
|
% 5
|
||||||
|
|
||||||
|
% & %Judul Jurnal
|
||||||
|
% Micromobility injury events: Motor vehicle crashes and other transportation systems factors
|
||||||
|
|
||||||
|
% %for mult rows
|
||||||
|
|
||||||
|
% & %Author
|
||||||
|
% Kevin Fang
|
||||||
|
|
||||||
|
% %for mult rows
|
||||||
|
|
||||||
|
% & %Nama Jurnal
|
||||||
|
% Transportation Research Interdisciplinary Perspectives 14 (2022) 100574
|
||||||
|
|
||||||
|
% %for mult rows
|
||||||
|
|
||||||
|
% & %Sumber
|
||||||
|
% ScienceDirect
|
||||||
|
|
||||||
|
% %for mult rows
|
||||||
|
|
||||||
|
% & %Tahun
|
||||||
|
% 2022
|
||||||
|
|
||||||
|
% %for mult rows
|
||||||
|
|
||||||
|
% & %Tujuan penelitian
|
||||||
|
% Menginformasikan transportasi strategi kebijakan untuk mencoba dan meningkatkan kinerja keselamatan, Dengan cara mengeksplorasi keadaan di mana cedera pengendara mikromobilitas mengalami cederanya, dengan fokus pada faktor-faktor yang berkaitan dengan sistem transportasi.\cite{Fang2022}
|
||||||
|
% &
|
||||||
|
% \begin{enumerate} [series=enum]
|
||||||
|
% \item Kecelakaan kendaraan bermotor secara mengejutkan menjulang sebagai sesuatu yang kemungkinan adalah faktor umum dalam cedera mikromobilitas. Masalah perkerasan, konflik
|
||||||
|
% dengan pengguna non-otomatis, dan medan juga muncul sebagai faktor cedera yang terukur.\cite{Fang2022}
|
||||||
|
% \end{enumerate}
|
||||||
|
% \\
|
||||||
|
% & %Judul Jurnal
|
||||||
|
% Micromobility injury events: Motor vehicle crashes and other transportation systems factors
|
||||||
|
|
||||||
|
% %for mult rows
|
||||||
|
|
||||||
|
% & %Author
|
||||||
|
% Kevin Fang
|
||||||
|
|
||||||
|
% %for mult rows
|
||||||
|
|
||||||
|
% & %Nama Jurnal
|
||||||
|
% Transportation Research Interdisciplinary Perspectives 14 (2022) 100574
|
||||||
|
|
||||||
|
% %for mult rows
|
||||||
|
|
||||||
|
% & %Sumber
|
||||||
|
% ScienceDirect
|
||||||
|
|
||||||
|
% %for mult rows
|
||||||
|
|
||||||
|
% & %Tahun
|
||||||
|
% 2022
|
||||||
|
|
||||||
|
% %for mult rows
|
||||||
|
|
||||||
|
% & %Tujuan penelitian
|
||||||
|
% Menginformasikan transportasi strategi kebijakan untuk mencoba dan meningkatkan kinerja keselamatan, Dengan cara mengeksplorasi keadaan di mana cedera pengendara mikromobilitas mengalami cederanya, dengan fokus pada faktor-faktor yang berkaitan dengan sistem transportasi.\cite{Fang2022}
|
||||||
|
% &
|
||||||
|
% \begin{enumerate} [resume=enum]
|
||||||
|
% \item Di antara faktor-faktor yang berhubungan dengan transportasi, analisis regresi
|
||||||
|
% menunjukkan bahwa terluka dalam kecelakaan kendaraan bermotor atau di medan berbukit
|
||||||
|
% sesuai dengan kemungkinan yang lebih besar dari rawat inap dan cedera kepala.\cite{Fang2022}
|
||||||
|
% \end{enumerate}
|
||||||
|
% \\
|
||||||
|
% & %Judul Jurnal
|
||||||
|
% Micromobility injury events: Motor vehicle crashes and other transportation systems factors
|
||||||
|
|
||||||
|
% %for mult rows
|
||||||
|
|
||||||
|
% & %Author
|
||||||
|
% Kevin Fang
|
||||||
|
|
||||||
|
% %for mult rows
|
||||||
|
|
||||||
|
% & %Nama Jurnal
|
||||||
|
% Transportation Research Interdisciplinary Perspectives 14 (2022) 100574
|
||||||
|
|
||||||
|
% %for mult rows
|
||||||
|
|
||||||
|
% & %Sumber
|
||||||
|
% ScienceDirect
|
||||||
|
|
||||||
|
% %for mult rows
|
||||||
|
|
||||||
|
% & %Tahun
|
||||||
|
% 2022
|
||||||
|
|
||||||
|
% %for mult rows
|
||||||
|
|
||||||
|
% & %Tujuan penelitian
|
||||||
|
% Menginformasikan transportasi strategi kebijakan untuk mencoba dan meningkatkan kinerja keselamatan, Dengan cara mengeksplorasi keadaan di mana cedera pengendara mikromobilitas mengalami cederanya, dengan fokus pada faktor-faktor yang berkaitan dengan sistem transportasi.\cite{Fang2022}
|
||||||
|
% &
|
||||||
|
% \begin{enumerate} [resume=enum]
|
||||||
|
% \item Mitigasi yang berhasil yang memaksimalkan kinerja mode keselamatan mikromobilitas dapat membantu menarik dan mempertahankan pengguna dan menjaga kepercayaan dari pembuat kebijakan yang peduli keselamatan.\cite{Fang2022}
|
||||||
|
% \end{enumerate}
|
||||||
|
% \end{tabular}
|
||||||
|
\end{longtable}
|
||||||
|
% \end{table}
|
||||||
|
\end{landscape}
|
||||||
|
\clearpage
|
||||||
|
\pagenumbering{roman}
|
||||||
|
\setcounter{page}{2}
|
||||||
|
\thispagestyle{empty}
|
||||||
|
\printbibliography
|
||||||
|
|
||||||
|
\clearpage
|
||||||
|
\begin{titlepage}
|
||||||
|
\
|
||||||
|
\vfill
|
||||||
|
\centering\noindent \Huge{LAMPIRAN}
|
||||||
|
\vfill
|
||||||
|
\
|
||||||
|
\end{titlepage}
|
||||||
|
|
||||||
|
|
||||||
|
% \clearpage
|
||||||
|
% \thispagestyle{empty}
|
||||||
|
% \centering
|
||||||
|
% \frame{\includegraphics[page=1,scale=.7]{assets/1-s2.0-S2095756420300295-main.pdf}}
|
||||||
|
% \captionof{figure}{Halaman pertama jurnal pertama}
|
||||||
|
|
||||||
|
% \clearpage
|
||||||
|
% \thispagestyle{empty}
|
||||||
|
% \centering
|
||||||
|
% \frame{\includegraphics[page=1,scale=.7]{assets/1-s2.0-S2214509520300024-main.pdf}}
|
||||||
|
% \captionof{figure}{Halaman pertama jurnal kedua}
|
||||||
|
|
||||||
|
% \clearpage
|
||||||
|
% \thispagestyle{empty}
|
||||||
|
% \centering
|
||||||
|
% \frame{\includegraphics[page=1,scale=.7]{assets/1-s2.0-S2214509520300784-main.pdf}}
|
||||||
|
% \captionof{figure}{Halaman pertama jurnal ketiga}
|
||||||
|
|
||||||
|
% \clearpage
|
||||||
|
% \thispagestyle{empty}
|
||||||
|
% \centering
|
||||||
|
% \frame{\includegraphics[page=1,scale=.7]{assets/1-s2.0-S2097049821000044-main.pdf}}
|
||||||
|
% \captionof{figure}{Halaman pertama jurnal keempat}
|
||||||
|
|
||||||
|
% \clearpage
|
||||||
|
% \thispagestyle{empty}
|
||||||
|
% \centering
|
||||||
|
% \frame{\includegraphics[page=1,scale=.7]{assets/1-s2.0-S2590198222000379-main.pdf}}
|
||||||
|
% \captionof{figure}{Halaman pertama jurnal kelima}
|
||||||
|
\end{document}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
\chapter{PENDAHULUAN}
|
||||||
|
\section{Latar Belakang}
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc consequat lectus dolor, a commodo odio suscipit nec. Aliquam posuere elit eget tellus dapibus, auctor ornare mi porttitor. Donec auctor aliquet nisl, quis convallis ligula rutrum id. Duis tortor ipsum, scelerisque vestibulum viverra eu, maximus vel mi. Nullam volutpat nunc et varius tempor. Vivamus convallis mi eros, aliquam semper dui tincidunt a. Morbi nunc dui, accumsan ac arcu nec, condimentum efficitur mauris. Etiam sed mauris semper, volutpat justo eu, placerat mauris. Suspendisse at erat eu arcu gravida mattis et id nunc. Aliquam malesuada magna odio, ac dictum erat vestibulum a. Mauris vel nisi sit amet elit tempor bibendum sit amet a velit. Morbi dignissim facilisis placerat.\par
|
||||||
|
|
||||||
|
Pellentesque vel accumsan lorem, id vulputate metus. Nulla mollis orci ante, et euismod erat venenatis eget. Proin tempus lobortis feugiat. Fusce vitae sem quis lacus iaculis dignissim ut eget turpis. Vivamus ut nisl in enim porttitor fringilla vel et mauris. Mauris quis porttitor magna. Pellentesque molestie viverra arcu at tincidunt. Maecenas non elit arcu.\par
|
||||||
|
|
||||||
|
Etiam feugiat enim sit amet tortor interdum lobortis. Curabitur elementum faucibus sapien. Morbi eget facilisis lorem. In sed suscipit metus. Etiam porttitor, libero sit amet sodales hendrerit, libero dolor hendrerit nulla, sed convallis risus leo posuere metus. Cras gravida ac elit viverra ultrices. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Maecenas dictum urna elit, nec eleifend nulla mattis sit amet. Pellentesque suscipit metus vitae leo suscipit, a vehicula quam pretium. Sed eu est ut risus convallis hendrerit a vulputate justo. Nulla sollicitudin quam ut risus euismod, quis consequat dui mattis. Mauris id eros varius, pellentesque quam quis, venenatis tellus. Nulla vitae condimentum nisl. Vestibulum suscipit scelerisque dui, non posuere purus finibus nec. Nulla ultrices felis quis vestibulum porta. Suspendisse potenti.\par
|
||||||
|
|
||||||
|
Nam tempus tincidunt interdum. Pellentesque at ligula ac massa semper efficitur vitae non ante. Suspendisse potenti. Cras vitae interdum erat, nec facilisis urna. Nulla commodo porttitor tellus non posuere. Vestibulum tristique ut urna quis porttitor. Sed pellentesque lectus sit amet ultrices aliquam. Aliquam erat volutpat. Nam dictum eu erat a mollis. Donec eget nulla vel risus aliquet suscipit sed at libero.\par
|
||||||
|
|
||||||
|
Maecenas hendrerit pharetra bibendum. Donec ut tortor ac augue aliquam ullamcorper nec id eros. Quisque consectetur elementum ipsum vitae posuere. Sed ultricies ipsum nibh, vitae volutpat neque bibendum at. Morbi dictum metus eu bibendum malesuada. Nam scelerisque purus erat, id dictum nisl pretium vitae. Curabitur finibus commodo dui ac molestie. In sed sem ac dui dapibus ullamcorper. Aenean molestie nulla eu lorem maximus hendrerit. Vivamus viverra velit dolor, in vehicula eros facilisis at. Vivamus in rhoncus sem.
|
||||||
|
\section{Lingkup Penelitian}
|
||||||
|
\section{Tujuan Penelitian}
|
||||||
|
\section{Manfaat Penelitian}
|
||||||
|
% \subsubsection{Dolor}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
\chapter{TINJAUAN PUSTAKA DAN LANDASAN TEORI}
|
||||||
|
\section{Tinjauan Pustaka}
|
||||||
|
\section{Dasar Teori}
|
||||||
|
\subsection{Short-Time Fourier Transform}
|
||||||
|
\subsection{Machine Learning}
|
||||||
|
% \subsubsection{Dolor}
|
||||||
64
latex/frontmatter/endorsement.tex
Normal file
64
latex/frontmatter/endorsement.tex
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
% frontmatter/endorsement.tex
|
||||||
|
\setmainfont{Times New Roman}
|
||||||
|
|
||||||
|
\begin{center}
|
||||||
|
\textbf{\Large LEMBAR PENGESAHAN TUGAS AKHIR} \\[0.5em]
|
||||||
|
\textit{APPROVAL SHEET}
|
||||||
|
\end{center}
|
||||||
|
|
||||||
|
\vspace{1em}
|
||||||
|
|
||||||
|
\renewcommand{\arraystretch}{1.2}
|
||||||
|
\begin{tabular}{llp{10cm}}
|
||||||
|
\textbf{Judul} & : & \thesistitle \\
|
||||||
|
\textit{Title} & & \\
|
||||||
|
|
||||||
|
\textbf{Mahasiswa} & : & \studentname \\
|
||||||
|
\textit{Student} & & \\
|
||||||
|
|
||||||
|
\textbf{Nomor Mahasiswa} & : &\studentid \\
|
||||||
|
\textit{Student ID.} & & \\
|
||||||
|
|
||||||
|
\textbf{Dosen Pembimbing} & : & 1. \firstadvisor \\
|
||||||
|
\textit{Advisors} & & 2. \secondadvisor
|
||||||
|
\end{tabular}
|
||||||
|
|
||||||
|
\vspace{1em}
|
||||||
|
\textbf{Telah disetujui oleh Tim Penguji:} \\
|
||||||
|
\textit{Approved by the Committee on Oral Examination}
|
||||||
|
|
||||||
|
\vspace{1em}
|
||||||
|
\begin{tabular}{lp{5cm}}
|
||||||
|
\textbf{\firstadvisor} &:
|
||||||
|
% \vspace{2cm} % signature space
|
||||||
|
% \\[1em] % pull up next row
|
||||||
|
\\
|
||||||
|
\textit{Ketua Tim Penguji} &
|
||||||
|
\noindent\makebox[5cm]{\hrulefill}\\[-0.5em]
|
||||||
|
\textit{\small Chair} & \small Yogyakarta, \dotfill 2020
|
||||||
|
\\
|
||||||
|
\textbf{\secondadvisor} &:
|
||||||
|
% \vspace{2cm} % signature space
|
||||||
|
% \\[1em] % pull up next row
|
||||||
|
\\
|
||||||
|
\textit{Ketua Tim Penguji} &
|
||||||
|
\noindent\makebox[5cm]{\hrulefill}\\[-0.5em]
|
||||||
|
\textit{\small Chair} & \small Yogyakarta, \dotfill 2020 \\
|
||||||
|
\end{tabular}
|
||||||
|
|
||||||
|
\vspace{1em}
|
||||||
|
\noindent
|
||||||
|
\textbf{Diterima dan disetujui sebagai persyaratan untuk memperoleh gelar Sarjana Teknik} \\
|
||||||
|
\textit{Accepted in partial fulfillment of the requirements for the degree of Bachelor of Engineering}
|
||||||
|
|
||||||
|
\vspace{2em}
|
||||||
|
\begin{center}
|
||||||
|
\textbf{Ketua Program Studi} \\
|
||||||
|
\textit{Head of Department}
|
||||||
|
\end{center}
|
||||||
|
|
||||||
|
\vspace{3em}
|
||||||
|
\begin{center}
|
||||||
|
\textbf{\headdepartement} \\
|
||||||
|
NIK. \headdepartementid
|
||||||
|
\end{center}
|
||||||
BIN
latex/frontmatter/img/logo.png
Normal file
BIN
latex/frontmatter/img/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 253 KiB |
31
latex/frontmatter/maketitle.tex
Normal file
31
latex/frontmatter/maketitle.tex
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
\begin{titlepage}
|
||||||
|
\centering
|
||||||
|
\vspace*{1cm}
|
||||||
|
|
||||||
|
{\fontsize{14pt}{16pt}\selectfont \textbf{\MakeUppercase{Tugas Akhir}}\par}
|
||||||
|
\vspace{1.5cm}
|
||||||
|
|
||||||
|
{\fontsize{14pt}{16pt}\selectfont \textbf{\MakeUppercase{\thesistitle}}\par}
|
||||||
|
\vspace{1.5cm}
|
||||||
|
|
||||||
|
\includegraphics[width=5cm]{frontmatter/img/logo.png}
|
||||||
|
\vspace{1.5cm}
|
||||||
|
|
||||||
|
|
||||||
|
\textbf{Disusun oleh:} \\
|
||||||
|
{\fontsize{14pt}{16pt}\selectfont \textbf{\studentname}} \\
|
||||||
|
{\fontsize{14pt}{16pt}\selectfont \textbf{\studentid}} \\
|
||||||
|
|
||||||
|
|
||||||
|
\vfill
|
||||||
|
|
||||||
|
{\fontsize{12pt}{14pt}\selectfont
|
||||||
|
\textbf{\program} \\
|
||||||
|
\textbf{\faculty} \\
|
||||||
|
\textbf{\university} \\
|
||||||
|
\textbf{\yearofsubmission}
|
||||||
|
}
|
||||||
|
|
||||||
|
\end{titlepage}%
|
||||||
|
|
||||||
|
|
||||||
0
latex/frontmatter/originality.tex
Normal file
0
latex/frontmatter/originality.tex
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
\documentclass[draftmark]{thesis}
|
||||||
|
|
||||||
|
% Title Information
|
||||||
|
\setthesisinfo
|
||||||
|
{Prediksi Lokasi Kerusakan dengan Machine Learning}
|
||||||
|
{Rifqi Damar Panuluh}
|
||||||
|
{20210110224}
|
||||||
|
{PROGRAM STUDI TEKNIK SIPIL}
|
||||||
|
{FAKULTAS TEKNIK}
|
||||||
|
{UNIVERSITAS MUHAMMADIYAH YOGYAKARTA}
|
||||||
|
{2025}
|
||||||
|
|
||||||
|
% Input preamble
|
||||||
|
\input{preamble/packages}
|
||||||
|
% \input{preamble/fonts}
|
||||||
|
\input{preamble/macros}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
|
||||||
|
\maketitle
|
||||||
|
\frontmatter
|
||||||
|
\setcounter{page}{1}
|
||||||
|
\theendorsementpage{toc}
|
||||||
|
\originalitystatement{toc}
|
||||||
|
\tableofcontents
|
||||||
|
\clearpage
|
||||||
|
\mainmatter
|
||||||
|
\pagestyle{fancyplain}
|
||||||
|
% Include content
|
||||||
|
\include{content/abstract}
|
||||||
|
\include{content/introduction}
|
||||||
|
\include{chapters/01_introduction}
|
||||||
|
\include{content/chapter2}
|
||||||
|
\include{content/conclusion}
|
||||||
|
|
||||||
|
% Bibliography
|
||||||
|
% \bibliographystyle{IEEEtran}
|
||||||
|
% \bibliography{references}
|
||||||
|
|
||||||
|
\end{document}
|
||||||
11
latex/metadata.tex
Normal file
11
latex/metadata.tex
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
\newcommand{\studentname}{Rifqi Damar Panuluh}
|
||||||
|
\newcommand{\studentid}{20210110224}
|
||||||
|
\newcommand{\thesistitle}{Prediksi Lokasi Kerusakan dengan Machine Learning}
|
||||||
|
\newcommand{\firstadvisor}{Ir. Muhammad Ibnu Syamsi, Ph.D.}
|
||||||
|
\newcommand{\secondadvisor}{}
|
||||||
|
\newcommand{\headdepartement}{Puji Harsanto, S.T. M.T., Ph.D.}
|
||||||
|
\newcommand{\headdepartementid}{19740607201404123064}
|
||||||
|
\newcommand{\faculty}{Fakultas Teknik}
|
||||||
|
\newcommand{\program}{Teknik Sipil}
|
||||||
|
\newcommand{\university}{Universitas Muhammadiyah Yogyakarta}
|
||||||
|
\newcommand{\yearofsubmission}{2025}
|
||||||
5
latex/preamble/macros.tex
Normal file
5
latex/preamble/macros.tex
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
\newcommand{\eg}{\textit{e.g.},\ }
|
||||||
|
\newcommand{\ie}{\textit{i.e.},\ }
|
||||||
|
\newcommand{\etal}{\textit{et al.}}
|
||||||
|
|
||||||
|
\let\oldtableofcontents\tableofcontents % backup
|
||||||
3
latex/preamble/packages.tex
Normal file
3
latex/preamble/packages.tex
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
\usepackage{amsmath, amssymb, siunitx}
|
||||||
|
\usepackage{caption}
|
||||||
|
\usepackage{subcaption}
|
||||||
134
latex/thesis.cls
Normal file
134
latex/thesis.cls
Normal file
@@ -0,0 +1,134 @@
|
|||||||
|
\NeedsTeXFormat{LaTeX2e}
|
||||||
|
\ProvidesClass{thesis}[2025/05/10 Bachelor Thesis Class]
|
||||||
|
|
||||||
|
\newif\if@draftmark
|
||||||
|
\@draftmarkfalse
|
||||||
|
|
||||||
|
\DeclareOption{draftmark}{\@draftmarktrue}
|
||||||
|
\ProcessOptions \relax
|
||||||
|
\LoadClass[a4paper,12pt,oneside]{book}
|
||||||
|
|
||||||
|
% Load common packages
|
||||||
|
\RequirePackage{fontspec}
|
||||||
|
\RequirePackage{titlesec}
|
||||||
|
\RequirePackage{fancyhdr}
|
||||||
|
\RequirePackage{geometry}
|
||||||
|
\RequirePackage{setspace}
|
||||||
|
\RequirePackage{graphicx}
|
||||||
|
\RequirePackage{hyperref}
|
||||||
|
\RequirePackage{etoolbox}
|
||||||
|
\RequirePackage{tocloft}
|
||||||
|
\RequirePackage{tocbibind}
|
||||||
|
|
||||||
|
% Conditionally load the watermark package and settings
|
||||||
|
\if@draftmark
|
||||||
|
\RequirePackage{draftwatermark}
|
||||||
|
\SetWatermarkText{Draft: \today [wip]}
|
||||||
|
\SetWatermarkColor[gray]{0.7}
|
||||||
|
\SetWatermarkFontSize{2cm}
|
||||||
|
\SetWatermarkAngle{90}
|
||||||
|
\SetWatermarkHorCenter{1.5cm}
|
||||||
|
\fi
|
||||||
|
|
||||||
|
% Page layout
|
||||||
|
\geometry{left=3cm, top=3cm, right=3cm, bottom=3cm}
|
||||||
|
\setlength{\parskip}{0.5em}
|
||||||
|
\setlength{\parindent}{0pt}
|
||||||
|
\onehalfspacing
|
||||||
|
|
||||||
|
% Fonts
|
||||||
|
\defaultfontfeatures{Ligatures=TeX}
|
||||||
|
\setmainfont{Times New Roman}
|
||||||
|
\setsansfont{Arial}
|
||||||
|
\setmonofont{Courier New}
|
||||||
|
|
||||||
|
% Metadata commands
|
||||||
|
\input{metadata} % Load metadata from external file
|
||||||
|
|
||||||
|
\newcommand{\setthesisinfo}[7]{%
|
||||||
|
\renewcommand{\thesistitle}{#1}%
|
||||||
|
\renewcommand{\studentname}{#2}%
|
||||||
|
\renewcommand{\studentid}{#3}%
|
||||||
|
\renewcommand{\program}{#4}%
|
||||||
|
\renewcommand{\faculty}{#5}%
|
||||||
|
\renewcommand{\university}{#6}%
|
||||||
|
\renewcommand{\yearofsubmission}{#7}%
|
||||||
|
}
|
||||||
|
|
||||||
|
% Header and footer
|
||||||
|
\fancypagestyle{fancy}{%
|
||||||
|
\fancyhf{}
|
||||||
|
\fancyhead[R]{\nouppercase{\rightmark}}
|
||||||
|
\fancyhead[L]{\nouppercase{\leftmark}}
|
||||||
|
\fancyfoot[C]{\thepage}
|
||||||
|
}
|
||||||
|
\fancypagestyle{fancyplainfrontmatter}{%
|
||||||
|
\renewcommand{\headrulewidth}{0pt}
|
||||||
|
\fancyfoot[C]{\thepage}
|
||||||
|
}
|
||||||
|
\fancypagestyle{fancyplain}{%
|
||||||
|
\fancyhf{}
|
||||||
|
\renewcommand{\headrulewidth}{0pt}
|
||||||
|
\fancyhead[R]{\thepage}
|
||||||
|
}
|
||||||
|
|
||||||
|
% Chapter formatting
|
||||||
|
\titleformat{\chapter}[display]
|
||||||
|
{\bfseries\Large\centering}
|
||||||
|
{BAB~\Roman{chapter}} % << display format
|
||||||
|
{1ex}
|
||||||
|
{\MakeUppercase}
|
||||||
|
|
||||||
|
% Ensure chapter reference in TOC matches
|
||||||
|
\renewcommand{\cftchappresnum}{BAB~}
|
||||||
|
\renewcommand{\cftchapaftersnum}{\quad}
|
||||||
|
|
||||||
|
% \titlespacing*{\chapter}{0pt}{-10pt}{20pt}
|
||||||
|
|
||||||
|
% Redefine \maketitle
|
||||||
|
\renewcommand{\maketitle}{\input{frontmatter/maketitle}}
|
||||||
|
|
||||||
|
% Chapter & Section format
|
||||||
|
\renewcommand{\cftchapfont}{\bfseries\MakeUppercase}
|
||||||
|
% \renewcommand{\cftsecfont}{}
|
||||||
|
% \renewcommand{\cftsubsecfont}{\itshape}
|
||||||
|
% \renewcommand{\thesection}{\textup{\Roman{chapter}}.\arabic{section}}
|
||||||
|
|
||||||
|
|
||||||
|
% Dot leaders, spacing, indentation
|
||||||
|
\setlength{\cftbeforechapskip}{0em}
|
||||||
|
\setlength{\cftchapindent}{0pt}
|
||||||
|
\setlength{\cftsecindent}{0em}
|
||||||
|
\setlength{\cftsubsecindent}{3em}
|
||||||
|
\setlength{\cftchapnumwidth}{4em}
|
||||||
|
\setlength{\cftsecnumwidth}{2.5em}
|
||||||
|
\setlength{\cftsubsecnumwidth}{2.5em}
|
||||||
|
\renewcommand \cftchapdotsep{4.5} % https://tex.stackexchange.com/a/273764
|
||||||
|
\renewcommand{\cftchapleader}{\normalfont\cftdotfill{\cftsecdotsep}}
|
||||||
|
\renewcommand{\cftchappagefont}{\normalfont}
|
||||||
|
|
||||||
|
% Ensure TOC and References Respect Custom Numbering
|
||||||
|
\renewcommand{\thechapter}{\Roman{chapter}}
|
||||||
|
\renewcommand\thesection{\arabic{chapter}.\arabic{section}}
|
||||||
|
|
||||||
|
|
||||||
|
% Table of Contents (TOC) Title styling
|
||||||
|
\renewcommand{\contentsname}{DAFTAR ISI}
|
||||||
|
\renewcommand{\cfttoctitlefont}{\bfseries\MakeUppercase}
|
||||||
|
\renewcommand{\cftaftertoctitle}{\hfill} % https://tex.stackexchange.com/a/255699/394075
|
||||||
|
% \renewcommand{\cftaftertoctitle}{\vskip 2em}
|
||||||
|
|
||||||
|
% Frontmatter Macro (Toggle TOC Inclusion)
|
||||||
|
\newcommand{\frontmattersection}[3]{%
|
||||||
|
\centering
|
||||||
|
\ifstrequal{#1}{toc}{\thispagestyle{fancyplainfrontmatter}\addcontentsline{toc}{chapter}{#2}}{\chapter*{#2}}%
|
||||||
|
\input{frontmatter/#3}
|
||||||
|
\clearpage
|
||||||
|
}
|
||||||
|
|
||||||
|
% Wrapper Command for Each Page
|
||||||
|
\newcommand{\theendorsementpage}[1]{\frontmattersection{#1}{Pengesahan}{endorsement}}
|
||||||
|
\newcommand{\originalitystatement}[1]{\frontmattersection{#1}{Pernyataan Keaslian}{originality}}
|
||||||
|
|
||||||
|
|
||||||
|
\endinput
|
||||||
Reference in New Issue
Block a user