From e307b38a6158276e13dfaee64f077c73ed17d583 Mon Sep 17 00:00:00 2001
From: sroscher <s.roscher@tu-berlin.de>
Date: Wed, 5 Feb 2025 17:48:57 +0100
Subject: [PATCH 1/2] - Made some bug fixes

---
 .../cost_estimation/getting_started.md        |  14 +-
 .../analysis/cost_estimation/index.md         |   4 +-
 .../cost_estimation/operating_cost_method.md  | 355 ++++++++++--------
 .../run_your_first_cost_estimation.md         |   6 +-
 4 files changed, 210 insertions(+), 169 deletions(-)

diff --git a/docs/documentation/analysis/cost_estimation/getting_started.md b/docs/documentation/analysis/cost_estimation/getting_started.md
index ff94edb..7e1c205 100644
--- a/docs/documentation/analysis/cost_estimation/getting_started.md
+++ b/docs/documentation/analysis/cost_estimation/getting_started.md
@@ -1,5 +1,6 @@
 # Getting started
 This section will guide you through the necessary steps to get the _cost\_estimation_ module up and running. It contains information on tool requirements and design parameters.
+
 - [Aircraft exchange file](#aircraft-exchange-file) - Get information on necessary parameters from the _acXML_.
 - [Module configuration file](#module-configuration-file) - Dive into cost estimation specific parameters.
 - [Additional requirements](#additional-requirements) - Is anything else necessary to get the module running?
@@ -9,6 +10,7 @@ This section will guide you through the necessary steps to get the _cost\_estima
     It is assumed that you have the `UNICADO package` installed including the executables and UNICADO libraries.
 
 Generally, we use two files to set or configure modules in UNICADO:
+
 - The aircraft exchange file (or _acXML_) includes
     - data related inputs (e.g., aircraft configuration, transport task) and
     - data related outputs (e.g., annual direct operating costs).
@@ -22,6 +24,7 @@ In the following sections you will find more information on how to configure the
 Since the _cost\_estimation_ module is an assessment tool, it is assumed that a converged aircraft design and therefore all the necessary data are already available.
 
 The following information is needed from the _acXML_:
+
 1. Design specification
     - Configuration information: Configuration type
     - Transport task: Passenger definition, passenger class definition, and cargo definition
@@ -71,16 +74,13 @@ Program Settings
 |  |  |  |  |  | - Price per operating empty mass
 |  |  |  |  |  | - Rate insurance
 |  |  |  |  |  | - Rate interest
-|  |  |  |  |  | - Residual value factor
-|  |  |  |  | - Crew
-|  |  |  |  |  | - Salary variation
 |  |  |  |  | - Flight cycles
-|  |  |  |  |  | - Block time per flight
+|  |  |  |  |  | - Block time supplement per flight
 |  |  |  |  |  | - Daily night curfew time
 |  |  |  |  |  | - Potential annual operation time
-|  |  |  |  |  | - Annual lay days overhaul
-|  |  |  |  |  | - Annual lay days reserve
-|  |  |  |  |  | - Annual lay days maintenance
+|  |  |  |  |  | - Annual lay hours overhaul
+|  |  |  |  |  | - Annual lay hours reserve
+|  |  |  |  |  | - Annual lay hours maintenance
 |  |  |  |  | - Handling
 |  |  |  |  |  | - Fees handling
 |  |  |  |  | - Landing
diff --git a/docs/documentation/analysis/cost_estimation/index.md b/docs/documentation/analysis/cost_estimation/index.md
index 7446bf1..3a2b1a6 100644
--- a/docs/documentation/analysis/cost_estimation/index.md
+++ b/docs/documentation/analysis/cost_estimation/index.md
@@ -1,5 +1,5 @@
 # Introduction {#mainpage}
-Welcome to the _cost\_estimation_ module in UNICADO – where we take your aircraft operating costs from “hmm… probably a lot?” to laser-accurate precision! This tool is like a financial :crystal_ball for your aircraft, crunching numbers on fuel, maintenance, crew costs, and just about (almost) every other expense you can imagine. Think of it as your budgeting co-pilot, always ready to calculate so you can focus on the skies instead of spreadsheets. With _cost\_estimation_, you stay in control, keep the accountants happy, and land at your bottom line without any turbulence. So buckle up, and let’s start calculating!
+Welcome to the _cost\_estimation_ module in UNICADO – where we take your aircraft operating costs from “hmm… probably a lot?” to laser-accurate precision! This tool is like a financial :crystal_ball: for your aircraft, crunching numbers on fuel, maintenance, crew costs, and just about (almost) every other expense you can imagine. Think of it as your budgeting co-pilot, always ready to calculate so you can focus on the skies instead of spreadsheets. With _cost\_estimation_, you stay in control, keep the accountants happy, and land at your bottom line without any turbulence. So buckle up, and let’s start calculating!
 
 ## Summary of features
 Here’s a quick rundown of what the tool currently does, along with a sneak peek at what's planned:
@@ -15,10 +15,12 @@ Blended-wing-body |...              |...                      |under development
 ## A user's guide to cost calculation
 The _cost\_estimation_ tool is your key to accurately calculating the operating costs of an aircraft. In this user documentation, you’ll find all the information you need to understand the tool, as well as the necessary inputs and configurations to run a cost analysis from the ground up.
 The following sections will walk you through the cost estimation process in UNICADO:
+
 - [Getting started](getting_started.md)
 - [Run your first cost estimation](run_your_first_cost_estimation.md)
 
 For a comprehensive understanding of the tool’s functionality, the documentation is structured into two distinct sections:
+
 - A [method description](operating_cost_method.md) and
 - a [software architecture](software_architecture.md)
 section.
diff --git a/docs/documentation/analysis/cost_estimation/operating_cost_method.md b/docs/documentation/analysis/cost_estimation/operating_cost_method.md
index c323127..9a8afa6 100644
--- a/docs/documentation/analysis/cost_estimation/operating_cost_method.md
+++ b/docs/documentation/analysis/cost_estimation/operating_cost_method.md
@@ -1,88 +1,109 @@
 # Calculation method
 The total operating costs of an aircraft are split into direct operating costs (DOC) and indirect operating costs (IOC).
-$
+$$
   TOC = DOC + IOC
-$
+$$
 
 !!! note
-  Unless explicitly stated, all values are in SI units and all costs in EUR.
+    Unless explicitly stated, all values are in SI units and all costs in EUR.
 
-## Direct operating costs (calculate_direct_operating_costs function)
+## Direct operating costs
 The Direct Operating Costs (DOC) are directly influenced by the parameters and the aircraft's performance and are commonly used for aircraft evaluation. Therefore, a simplified method for DOC estimation, based on „From Aircraft Performance to Aircraft Assessment“ by J. Thorbeck <sup>[1]</sup>, is provided. The DOC are determined for one year and the entire depreciation period.
+
 Two elements are required for the simplified DOC model: The route independent (fixed) costs $C_1$ and route dependent (variable) costs $C_2$:
-$
+$$
   DOC = C_1 + C_2
-$
+$$
 
 
-### Route independent costs (calculate_route_independent_costs function)
+### Route independent costs
 Route-independent costs include all cost components apart from the operation of the aircraft.
 Hence, the route-independent costs are the sum of the capital costs and the crew costs:
-$
-  C_1 = C_{CAP} + C_{crew}
-$
+$$
+  C_1 = C_{\text{capital}} + C_{\text{crew}}
+$$
+
 Those are calculated both, for one year and for the depreciation period.
 
-#### Capital costs (calculate_capital_costs function)
+#### Capital costs
 The capital costs can be assumed to be a linear function of the operating empty mass if the influence of the aircraft market is considered negligible:
-$
-  C_{CAP} = P_{OE} \cdot  m_{OE} \cdot (a+f_I)
-$
+$$
+  C_{\text{capital}} = P_{\text{OE}} \cdot  m_{\text{OE}} \cdot (a + f_{\text{I}})
+$$
+
 In which
-- $P_{OE}$ - price per kg operating empty mass
-- $m_{OE}$ - operating empty mass
+
+- $P_{\text{OE}}$ - price per kg operating empty mass
+- $m_{\text{OE}}$ - operating empty mass
 - $a$ - annuity factor in percent
-- $f_I$ - insurance rate in percent
+- $f_{\text{I}}$ - insurance rate in percent
 
 The annuity formula, which is based on a modified mortgage equation, addresses both yearly depreciation and interest:
-$
-  a = f_{IR} \cdot \frac{1-f_{RV} \cdot \left(\frac{1}{1+f_{IR}}\right)^{t_{DEP}}}{1-\left(\frac{1}{1+f_{IR}}\right)^{t_{DEP}}}
-$
+$$
+  a = f_{\text{IR}} \cdot \frac{1 - f_{\text{RV}} \cdot \left( \frac{1}{1 + f_{\text{IR}}} \right)^{t_{\text{DEP}}}}{1 - \left( \frac{1}{1 + f_{\text{IR}}} \right)^{t_{\text{DEP}}}}
+$$
+
 In which
-- $f_{IR}$ - interest rate in percent
-- $f_{RV}$ - residual value factor in percent
-- $t_{DEP}$ - depreciation period in years
+
+- $f_{\text{IR}}$ - interest rate in percent
+- $f_{\text{RV}}$ - residual value factor in percent
+- $t_{\text{DEP}}$ - depreciation period in years
 
 The reason for the annuity method modification is to include the residual aircraft value at the end of the depreciation period into the capital costs, which is occasionally relevant. This assumes that an operator is purchasing an aircraft at a constant price per kilogram and spends the corresponding capital cost consistently per year throughout the depreciation period.
 
-#### Crew costs (calculate_crew_costs function)
+The residual value factor depends on the depreciation period and can be determined based on the following information:
+
+Depreciation period         | Residual value factor |
+----------------------------|:---------------------:|
+up to 5 years               |          0.7%         |
+up to 10 years              |          0.5%         |
+up to 15 years              |          0.3%         |
+more than 15 years          |          0.1%         |
+
+#### Crew costs
 This method is based on the lecture "J Flugzeugbewertung" by A. Bardenhagen <sup>[2]</sup>.
 The annual crew costs are assumed to be the sum of the flight and cabin crew costs:
-$
-  C_{crew} = C_{FC} + C_{CC}
-$
+$$
+  C_{\text{crew}} = C_{\text{FC}} + C_{\text{CC}}
+$$
 
 both of which are of different levels. There are different approaches here, which must be adapted to the respective cost structure of the airline:
+
 - Some airlines (mainly low-cost carriers) employ and pay pilots and flight attendants on a time basis (block hours).
 - Other airlines hire their personnel permanently and must pay them irrespective of the time they are deployed.
 
-In the first case, the personnel costs belong to the variable in the second case to the fixed direct operating costs. Here, crew costs are assumed to be fixed (route independent) because an airline must provide enough crews to ensure flight operations over the entire service time and therefore are proportional to the payload. 50 passengers per flight attendant are assumed based on certification requirements. Crew costs are constant per year. To calculate the crew cost for several years, the expected salary increase should be considered by an escalation factor. Accordingly, past price levels can be extrapolated to the current level changed according to inflation, price, or salary increase.
+In the first case, the personnel costs belong to the variable in the second case to the fixed direct operating costs. Here, crew costs are assumed to be fixed (route independent) because an airline must provide enough crews to ensure flight operations over the entire service time and therefore are proportional to the payload. 50 passengers per flight attendant are assumed based on certification requirements.
+
+Crew costs are constant per year. To calculate the crew cost for several years, the expected salary increase should be considered by an escalation factor. Accordingly, past price levels can be extrapolated to the current level changed according to inflation, price, or salary increase.
 
 Both cost shares are determined by the same variables:
-- The flight/cabin crew complement (the number of crews per aircraft, dependent on the stage length): $n_{FCC}$/$n_{CCC}$,
-- The number of flight/cabin crew members: $n_{FC}$/$n_{CC}$,
-- The annual salary of a flight/cabin crew member (dependent on the stage length): $S_{FC}$/$S_{CC}$, and
-- The escalation factor in percent: $f_{ESC}$.
+
+- The flight/cabin crew complement (the number of crews per aircraft, dependent on the stage length): $n_{\text{FCC}}$/$n_{\text{CCC}}$,
+- the number of flight/cabin crew members: $n_{\text{FC}}$/$n_{\text{CC}}$,
+- the annual salary of a flight/cabin crew member (dependent on the stage length): $S_{\text{FC}}$/$S_{\text{CC}}$, and
+- the escalation factor in percent: $f_{\text{ESC}}$.
 
 <!-- NOTE: The values of these drivers depend on the stage length. Two modes are implemented. Mode 1 (salary_variation = False, default): To ensure that the values of the above-mentioned parameters are the same for the design mission and mission study, the stage length of the design mission is used to determine the values for the study mission as well. Mode 2 (salary_variation = True): The above-mentioned values are obtained for different stage lengths for the design mission and mission study. -->
 
 That results in the following calculations:
-$
-  C_{FC} = n_{FCC} \cdot n_{FC} \cdot S_{FC} \cdot f_{ESC}
-$
-$
-  C_{CC} = n_{CCC} \cdot n_{CC} \cdot S_{CC} \cdot f_{ESC}
-$
+$$
+  C_{\text{FC}} = n_{\text{FCC}} \cdot n_{\text{FC}} \cdot S_{\text{FC}} \cdot f_{\text{ESC}}
+$$
+
+$$
+  C_{\text{CC}} = n_{\text{CCC}} \cdot n_{\text{CC}} \cdot S_{\text{CC}} \cdot f_{\text{ESC}}
+$$
 
 The escalation factor
-$
-  f_{ESC} = (1+r_{INF})^{y}
-$
+$$
+  f_{\text{ESC}} = (1 + r_{\text{INF}})^{y}
+$$
 
-incorporates the inflation rate ($r_{INF}$), which encompasses both price and salary adjustments, and the number of years elapsed between the calculation year and the base year for salaries ($y$).
+incorporates the inflation rate ($r_{\text{INF}}$), which encompasses both price and salary adjustments, and the number of years elapsed between the calculation year and the base year for salaries ($y$).
 If the depreciation period is used as the time difference, resulting costs are related to the whole depreciation period, whereas a time difference of one year solely results in the costs for the base year.
 
 The crew complements as well as the average annual salaries are dependent on the stage length:
+
 - Regional: ranges less than 500 km
 - Short haul: ranges between 500 km and 1000 km
 - Medium haul: ranges between 1000 km and 4000 km
@@ -91,28 +112,30 @@ The crew complements as well as the average annual salaries are dependent on the
 
 and can be taken from the following tables:
 
-Segment         | Crew complement | $S_{FC}$ in EUR/y | $S_{CC}$ in EUR/y |
-----------------|:---------------:|:-----------------:|:-----------------:|
-Regional        |        5        |       70 000      |       30 000      |
-Short haul      |        5        |      120 000      |       30 000      |
-Medium haul     |        5        |      160 000      |       30 000      |
-Long haul       |        8        |      200 000      |       45 000      |
-Ultra-long haul |        8        |      200 000      |       45 000      |
+Segment         | Crew complement | $S_{\text{FC}}$ in EUR/y | $S_{\text{CC}}$ in EUR/y |
+----------------|:---------------:|:------------------------:|:------------------------:|
+Regional        |        5        |          70,000          |          30,000          |
+Short haul      |        5        |         120,000          |          30,000          |
+Medium haul     |        5        |         160,000          |          30,000          |
+Long haul       |        8        |         200,000          |          45,000          |
+Ultra-long haul |        8        |         200,000          |          45,000          |
 
-### Route dependent costs (calculate_route_dependent_costs function)
+### Route dependent costs
 Route dependent costs $C_2$ include all cost components that are directly attributable to flight operations. These include
-- fuel $C_F$,
-- fees (handling $C_H$, landing $C_L$, air traffic control (ATC) $C_{ATC}$), and
-- maintenance $C_{MRO}$.
+
+- fuel $C_\text{F}$,
+- fees (handling $C_\text{H}$, landing $C_\text{LDG}$, air traffic control (ATC) $C_{\text{ATC}}$), and
+- maintenance $C_{\text{MRO}}$.
 
 Thus, the **annual** route dependent costs can be calculated by
-$
-  C_2 = C_F + C_H + C_{LDG} + C_{ATC} + C_{MRO}
-$
+$$
+  C_2 = C_\text{F} + C_\text{H} + C_\text{LDG} + C_{\text{ATC}} + C_{\text{MRO}}
+$$
 
 #### Flights per year
 Knowing the number of annual flights is mandatory to calculate the above-mentioned cost shares.
 A reliable approximation of the number of annual flights can be found using the following analytical basis:
+
 - Potential flight hours per year: $365 \cdot 24 = 8760$
 - Maintenance lay days per year (C-Check every 15 months for 4 days): $4 \cdot 12/15 = 3.2$
 - Overhaul lay days per year (D-Check every 5 years for 4 weeks): $4 \cdot 7/5 = 5.6$
@@ -124,168 +147,182 @@ A reliable approximation of the number of annual flights can be found using the
 - Yearly operation time in hours: $OT = 8760-2475-273.6 = 6011.4$
 
 Knowing the time for one flight $FT$ and the block time supplement $BT$ (turn around time) per flight, the number of flight cycles $FC$ can be calculated:
-$
+$$
   FC = \frac{OT}{(FT + BT)}
-$
+$$
 It is assumed that one flight cycle consists of an outbound flight, a turnaround time and a return flight. Consequently, the number of annual flights is calculated as follows:
-$
-  n_{flights} = 2 \cdot FC
-$
-
-#### Fuel costs (calculate_fuel_costs function)
-The fuel costs depend on the fuel price $P_F$, the trip fuel mass $m_{TF}$ (which can be obtained from the payload range diagram (PRD)), and the number of yearly flights $n_{flights}$:
-$
-  C_F = P_{F} \cdot m_{TF} \cdot n_{flights}
-$
-
-#### Handling costs (calculate_handling_costs function)
-Handling charges $F_H$ include charges for loading and unloading, use of terminals and passenger boarding bridges, security checks, and ground energy supply.
-The annual handling fees are charged based on the payload mass $m_{PL}$ and the number of flights per year. The resulting handling costs are calculated as follows:
-$
-  C_H = m_{PL} \cdot F_{H} \cdot n_{flights}
-$
-
-#### Landing costs (calcutale_landing_costs function)
-The annual landing fees $F_{LDG}$ are charged based on the maximum (certified) takeoff mass $m_{TO}$ and number of flights per year. The resulting landing costs are calculated as follows:
-$
-  C_{LDG} = m_{TO} \cdot F_L \cdot n_{flights}
-$
-
-#### Air traffic control costs (calculate_air_traffic_control_costs function)
+$$
+  n_{\text{flights}} = 2 \cdot FC
+$$
+
+#### Fuel costs
+The fuel costs depend on the fuel price $P_\text{F}$, the trip fuel mass $m_{\text{TF}}$ (which can be obtained from the payload range diagram (PRD)), and the number of yearly flights $n_{\text{flights}}$:
+$$
+  C_\text{F} = P_{\text{F}} \cdot m_{\text{TF}} \cdot n_{\text{flights}}
+$$
+
+#### Handling costs
+Handling charges $F_\text{H}$ include charges for loading and unloading, use of terminals and passenger boarding bridges, security checks, and ground energy supply.
+The annual handling fees are charged based on the payload mass $m_{\text{PL}}$ and the number of flights per year. The resulting handling costs are calculated as follows:
+$$
+  C_\text{H} = m_{\text{PL}} \cdot F_{\text{H}} \cdot n_{\text{flights}}
+$$
+
+#### Landing costs
+The annual landing fees $F_{\text{LDG}}$ are charged based on the maximum (certified) takeoff mass $m_{\text{TO}}$ and number of flights per year. The resulting landing costs are calculated as follows:
+$$
+  C_{\text{LDG}} = m_{\text{TO}} \cdot F_\text{L} \cdot n_{\text{flights}}
+$$
+
+#### Air traffic control costs
 The calculation of the ATC costs is based on the EUROCONTROL route charge formula <sup>[3]</sup>, more precisely the aircraft weight factor.
 
 > "The weight factor (expressed to two decimals) is determined by dividing, by fifty (50), the certificated Maximum Take-Off Weight (MTOW) of the aircraft (in metric tonnes, to one decimal) and subsequently taking the square root of the result rounded to the second decimal [...]".
 
-The ATC price factor $f_{ATC}$ considers the fact that the price scenarios are varying strongly for each continent (or even region):
-- $f_{ATC} = 1.0$ for domestic europe
-- $f_{ATC} = 0.7$ for transatlantic flights
-- $f_{ATC} = 0.6$ for far east flights (only half of the landings at european airports)
+The ATC price factor $f_{\text{ATC}}$ considers the fact that the price scenarios are varying strongly for each continent (or even region):
+
+- $f_{\text{ATC}} = 1.0$ for domestic europe
+- $f_{\text{ATC}} = 0.7$ for transatlantic flights
+- $f_{\text{ATC}} = 0.6$ for far east flights (only half of the landings at european airports)
 
 The ATC costs are calculated as follows:
-$
-  C_{ATC} = R \cdot f_{ATC} \cdot \sqrt{\frac{m_{TO}[\text t]}{50}} \cdot n_{flights}
-$
+$$
+  C_{\text{ATC}} = R \cdot f_{\text{ATC}} \cdot \sqrt{\frac{m_{\text{TO}}[\text t]}{50}} \cdot n_{\text{flights}}
+$$
 
 with
+
 - $R$ - range in km
-- $m_{TO}$ - maximum takeoff mass (in tonnes)
+- $m_{\text{TO}}$ - maximum takeoff mass (in tonnes)
 
-#### Maintenance costs (calculate_maintenance_costs function)
+#### Maintenance costs
 Maintenance costs are categorized into three components:
+
 - Flight cycle dependent cost: This component primarily accounts for structural fatigue and overhaul burdens.
 - Flight hour dependent cost: This component primarily reflects wear and the associated line maintenance work.
 - Calendar time dependent cost: This component represents a constant share, such as the rectification of corrosion during overhaul.
 
 In the following, only the maintenance costs per flight cycle are considered. Following the JADC method, an approximation for those costs is given by the sum of three parts:
-- Airframe material maintenance cost (repair and replacement): $C_{MRO,AF,MAT}$
-- Airframe personnel maintenance cost (inspection and repair): $C_{MRO,AF,PER}$
-- Engine total maintenance cost: $C_{MRO,ENG}$
+
+- Airframe material maintenance cost (repair and replacement): $C_{\text{MRO,AF,MAT}}$
+- Airframe personnel maintenance cost (inspection and repair): $C_{\text{MRO,AF,PER}}$
+- Engine total maintenance cost: $C_{\text{MRO,ENG}}$
 
 In which
-$
-  C_{MRO,AF,MAT} = m_{OE}[\text t] \cdot (0.2 \cdot t_{flight} + 13.7) + C_{MRO,AF,REP}
-$
-$
-  C_{MRO,AF,PER} = f_{LR} \cdot (1+C_B) \cdot \left[ (0.655 + 0.01 \cdot m_{OE}[\text t]) \cdot t_{flight} + 0.254 + 0.01 \cdot m_{OE}[\text t] \right]
-$
-$
-  C_{MRO,ENG} = n_{ENG} \cdot \left( 1.5 \cdot \frac{T_{0} [\text t]}{n_{ENG}} + 30.5 \cdot t_{flight} + 10.6 \cdot f_{MRO,ENG}\right)
-$
+$$
+  C_{\text{MRO,AF,MAT}} = m_{\text{OE}}[\text t] \cdot (0.2 \cdot t_{\text{flight}} + 13.7) + C_{\text{MRO,AF,REP}}
+$$
+
+$$
+  C_{\text{MRO,AF,PER}} = f_{\text{LR}} \cdot (1+C_\text{B}) \cdot \left[ (0.655 + 0.01 \cdot m_{\text{OE}}[\text t]) \cdot t_{\text{flight}} + 0.254 + 0.01 \cdot m_{\text{OE}}[\text t] \right]
+$$
+
+$$
+  C_{\text{MRO,ENG}} = n_{\text{ENG}} \cdot \left( 1.5 \cdot \frac{T_{0} [\text t]}{n_{\text{ENG}}} + 30.5 \cdot t_{\text{flight}} + 10.6 \cdot f_{\text{MRO,ENG}}\right)
+$$
 
 with
-- $C_{MRO,AF,REP}$ - airframe repair cost per flight
-- $f_{LR}$ - labor rate in EUR/h
-- $C_B$ - cost burden
-- $n_{ENG}$ - number of engines
+
+- $C_{\text{MRO,AF,REP}}$ - airframe repair cost per flight
+- $f_{\text{LR}}$ - labor rate in EUR/h
+- $C_\text{B}$ - cost burden
+- $n_{\text{ENG}}$ - number of engines
 - $T_{0}$ - sea level static thrust per engine
-- $f_{MRO,ENG}$ - engine maintenance factor
+- $f_{\text{MRO,ENG}}$ - engine maintenance factor
 
-The airframe repair cost per flight $C_{MRO,AF,REP}$ equal 57.5 for kerosene-powered aircraft. For hydrogen-powered aircraft, this value is multiplied by the operating empty mass factor $f_{OEM} = 1.1$ to account for an approx. 10% higher operating empty mass.
-The engine maintenance factor is considered $f_{ENG} = 1$ for kerosene-powered aircraft and $f_{ENG} = 0.7$ for hydrogen-powered aircraft.
+The airframe repair cost per flight $C_{\text{MRO,AF,REP}}$ equal `57.5` for kerosene-powered aircraft. For hydrogen-powered aircraft, this value is multiplied by the operating empty mass factor $f_{\text{OEM}} = 1.1$ to account for an approx. 10% higher operating empty mass.
+The engine maintenance factor is considered $f_{\text{ENG}} = 1$ for kerosene-powered aircraft and $f_{\text{ENG}} = 0.7$ for hydrogen-powered aircraft.
 
 Thus, the annual maintenance costs result in
-$
-  C_{MRO} = (C_{MRO,AF,MAT} + C_{MRO,AF,PER} + C_{MRO,ENG}) \cdot n_{flights}
-$
+$$
+  C_{\text{MRO}} = (C_{\text{MRO,AF,MAT}} + C_{\text{MRO,AF,PER}} + C_{\text{MRO,ENG}}) \cdot n_{\text{flights}}
+$$
 
 ## Related direct operating costs
 Absolute DOC are generally unsuitable as an assessment measure because aircraft size and technology strongly influence this figure. They are therefore expressed in differently related quantities, depending on the purpose of the evaluation:
+
   - DOC/Range (Flight Kilometer): Flight Kilometer Costs (FKC)
   - DOC/Seat Kilometer Offered (SKO): Seat Kilometer Costs (SKC)
   - DOC/Seat Kilometer Offered Corrected: Corrected SKC to take account of any freight revenue
   - DOC/Ton Kilometers Offered (TKO): Ton Kilometer Costs (TKC)
   - DOC/Revenue Passenger Kilometer (RPK): Revenue Seat Kilometer Costs (RSKC)
+
 These are described below.
 
-### Flight kilometer costs (calculate_flight_kilometer_costs function)
+### Flight kilometer costs
 The flight kilometer costs are very flexible and suitable for an extended consideration of changed route structures. This parameter allows the range potential of the aircraft to be assessed:
-$
+$$
   FKC = \frac{DOC}{R}.
-$
+$$
+
+### Seat kilometer costs
+The seat kilometer offered (SKO) (or available) is a measure of an aircraft's passenger carrying capacity or, in other words, its potential to generate revenue by providing available seats to passengers. They are calculated by multiplying the number of seats available $n_{\text{seats}}$ by the range:
+$$
+  SKO = n_{\text{seats}} \cdot R.
+$$
 
-### Seat kilometer costs (calculate_seat_kilometer_costs function)
-The seat kilometer offered (SKO) (or available) is a measure of an aircraft's passenger carrying capacity or, in other words, its potential to generate revenue by providing available seats to passengers. They are calculated by multiplying the number of seats available $n_{seats}$ by the range:
-$
-  SKO = n_{seats} \cdot R.
-$
 The seat kilometer costs allow the analysis of a change in seat capacity and thus the assessment of the passenger kilometer potential:
-$
+$$
   SKC = \frac{DOC}{SKO}
-$
+$$
 
-### Corrected seat kilometer costs (calculate_corrected_seat_kilometer_costs function)
+### Corrected seat kilometer costs
 
 !!! note 
-  The calculation of this cost share is not implemented at the moment and set to `0` instead.
+    The calculation of this cost share is not implemented at the moment and set to `0` instead.
 
 A method of freight equivalent passenger seats is applied.
-Cargo revenue from residual cargo payload at maximum zero fuel mass ($m_{PL,max} - m_{PL}$) can be calculated using
-$
-  I_{cargo} = I_{FR} \cdot (W_{PL,max} - W_{PAX})
-$
+Cargo revenue from residual cargo payload at maximum zero fuel mass ($m_{\text{PL,max}} - m_{\text{PL}}$) can be calculated using
+$$
+  I_{\text{cargo}} = I_{\text{FR}} \cdot (W_{\text{PL,max}} - W_{\text{PAX}})
+$$
+
 with
-- $I_{FR}$ - revenue per freight kilometer
-- $W_{PL,max}$ - maximum payload weight
-- $W_{PAX}$ - pax weight
+
+- $I_{\text{FR}}$ - revenue per freight kilometer
+- $W_{\text{PL,max}}$ - maximum payload weight
+- $W_{\text{PAX}}$ - pax weight
 
 The equivalent seat revenue can be derived using the following formula:
-$
-  n_{PAX,cargo} = \frac{I_{cargo}}{I_{PAX}}
-$
-with $I_{PAX}$ as revenue per seat and flight (see following table).
-
-Segment         | $I_{PAX,multi-class}$ in EUR/SO | $I_{PAX,all-economy}$ in EUR/SO |
-----------------|:-------------------------------:|:-------------------------------:|
-Short haul      |               400               |               250               |
-Medium haul     |               450               |               300               |
-Long haul       |               550               |               400               |
-Ultra long haul |               700               |               550               |
+$$
+  n_{\text{PAX,cargo}} = \frac{I_{\text{cargo}}}{I_{\text{PAX}}}
+$$
+
+with $I_{\text{PAX}}$ as revenue per seat and flight (see following table).
+
+Segment         | $I_{\text{PAX,multi-class}}$ in EUR/SO | $I_{\text{PAX,all-economy}}$ in EUR/SO |
+----------------|:--------------------------------------:|:--------------------------------------:|
+Short haul      |                  400                   |                  250                   |
+Medium haul     |                  450                   |                  300                   |
+Long haul       |                  550                   |                  400                   |
+Ultra long haul |                  700                   |                  550                   |
 
 Finally, the SKC correction can be determined as follows:
-$
-  SKC_{cor} = SKC \cdot \frac{n_{PAX}}{n_{PAX} + n_{PAX,cargo}}
-$
+$$
+  SKC_{\text{cor}} = SKC \cdot \frac{n_{\text{PAX}}}{n_{\text{PAX}} + n_{\text{PAX,cargo}}}
+$$
 
-### Ton kilometer costs (calculate_ton_kilometer_costs function)
+### Ton kilometer costs
 The ton kilometer costs (TKC) allow the analysis of a change in payload capacity and thus the assessment of the payload kilometer potential. The Ton Kilometers Offered (TKO) are the product of the payload and the range:
-$
-  TKO = m_{PL} \cdot R
-$
+$$
+  TKO = m_{\text{PL}} \cdot R
+$$
+
 The Ton Kilometer Costs (TKC) are the DOC related to the TKO:
-$
+$$
   TKC = \frac{DOC}{TKO}
-$
+$$
 
-### Revenue seat kilometer costs (calculate_revenue_seat_kilometer_costs)
-Revenue passenger kilometers (RPK) are a measure of how many kilometers the aircraft has carried paying passengers. It is often referred to as "traffic" as it represents the actual demand for air transport. The RPK are determined by multiplying the range by the number of paying passengers. The revenue passenger kilometers are calculated by multiplying the number of revenue passengers with the maximum number of seats and the seat load factor $f_{PL}$:
-$
-  RPK = n_{PAX} \cdot f_{SL} \cdot R
-$
+### Revenue seat kilometer costs
+Revenue passenger kilometers (RPK) are a measure of how many kilometers the aircraft has carried paying passengers. It is often referred to as "traffic" as it represents the actual demand for air transport. The RPK are determined by multiplying the range by the number of paying passengers. The revenue passenger kilometers are calculated by multiplying the number of revenue passengers with the maximum number of seats and the seat load factor $f_{\text{SL}}$:
+$$
+  RPK = n_{\text{PAX}} \cdot f_{\text{SL}} \cdot R
+$$
 
 The DOC per revenue passenger kilometer additionally take into account the overall performance of an airline. Note that revenue is strongly dependent on market situation and therefore varying.
-$
+$$
   RSKC = \frac{DOC}{RPK}
-$
+$$
 
 ## Indirect operating costs (IOC)
 tbd. :construction:
diff --git a/docs/documentation/analysis/cost_estimation/run_your_first_cost_estimation.md b/docs/documentation/analysis/cost_estimation/run_your_first_cost_estimation.md
index a043b4a..7b28393 100644
--- a/docs/documentation/analysis/cost_estimation/run_your_first_cost_estimation.md
+++ b/docs/documentation/analysis/cost_estimation/run_your_first_cost_estimation.md
@@ -3,6 +3,7 @@ Let's dive into the fun part and crunch some numbers! :moneybag:
 
 ## Tool single execution
 The tool can be executed from the console directly if all paths are set. The following will happen:
+
 - [Console output](#console-output)
 - [Generation of reports and plots](#reporting)
 - [Writing output to aircraft exchange file](#write-data-to-acxml)
@@ -45,7 +46,7 @@ The tool continues to check if an off-design study exists and tries to calculate
 
 ```
 2024-12-06 11:37:30,641 - PRINT - Plots are generated and saved...
-2024-12-06 11:37:38,187 - WARNING - Warning: "html_output" switch in module configuration file set to "False". No HTML report generated.
+2024-12-06 11:37:38,187 - PRINT - HTML report is generated and saved...
 2024-12-06 11:37:38,188 - PRINT - Method-specific data are written to 'cost_estimation_results.xml'...
 2024-12-06 11:37:38,192 - WARNING - Warning: "tex_output" switch in module configuration file set to "False". No TeX report file generated.
 2024-12-06 11:37:38,192 - PRINT - Cost estimation finished.
@@ -54,9 +55,10 @@ Finally, you receive information about the reports and plots created (depending
 
 ### Reporting {#reporting}
 In the following, a short overview is given on the generated reports:
+
 - A `cost_estimation.log` file is written within the directory of the executable
 - Depending on your settings, the following output is generated and saved in the `reporting` folder, located in the directory of the aircraft exchange file:
-    - an HTML report in the `report_html` folder (not implemented yet)
+    - an HTML report in the `report_html` folder
     - a TeX report in the `report_tex` folder (not implemented yet)
     - an XML file with additional output data in the `report_xml` folder
     - plots in the `plots` folder
-- 
GitLab


From 542f9238654b6ad3788fde54bd6ad17fe570daec Mon Sep 17 00:00:00 2001
From: sroscher <s.roscher@tu-berlin.de>
Date: Thu, 6 Feb 2025 13:12:01 +0100
Subject: [PATCH 2/2] - Corrected command to run cost_estimation

---
 .../analysis/cost_estimation/run_your_first_cost_estimation.md  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/documentation/analysis/cost_estimation/run_your_first_cost_estimation.md b/docs/documentation/analysis/cost_estimation/run_your_first_cost_estimation.md
index 7b28393..595234b 100644
--- a/docs/documentation/analysis/cost_estimation/run_your_first_cost_estimation.md
+++ b/docs/documentation/analysis/cost_estimation/run_your_first_cost_estimation.md
@@ -10,7 +10,7 @@ The tool can be executed from the console directly if all paths are set. The fol
 
 Some of the above mentioned steps did not work? Check out the [troubleshooting](#troubleshooting) section for advices. Also, if you need some additional information on the underlying methodology, check out the page on the [cost estimation method](operating_cost_method.md).
 
-So, feel free to open the terminal and run `cost_estimation.exe` to see what happens...
+So, feel free to open the terminal and run `python.exe cost_estimation.py` to see what happens...
 
 ### Console output {#console-output}
 Firstly, you see output in the console window. Let's go through it step by step...
-- 
GitLab