\documentclass[a4paper]{article}

% Format
\usepackage{a4}

% Font
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage{textcomp}

% Maths
\usepackage{amsfonts}
\usepackage{amstext}
\usepackage{amsmath}
\usepackage{empheq}

% Encoding
\usepackage{ucs}
\usepackage[utf8x]{inputenc}

% Graphics
\usepackage{graphicx}
\usepackage{color}

\usepackage[normalem]{ulem}

% Floats inside Floats
\usepackage{subfig}

% Prevent Floating outside of Section
\usepackage[section]{placeins}

% Nice Header
\usepackage{fancyhdr}

% Clickable URLs and references
\usepackage{hyperref}

% Bibliography
\usepackage[comma,sort&compress]{natbib}

% Proper units
\usepackage{units}

\usepackage{array}

\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}

% Custom packages
% Nicer paragraphs
\parskip 12pt
\parindent 0pt
\usepackage[margin=1in]{geometry}
\usepackage{multirow}
\usepackage{booktabs}

% This command computes and creates a vertical space
% depending on the number of rows to compensate for.
% It makes use of the counter verticalcompensationrows
% and the length \verticalcompensationlength which equals
% \aboverulesep plus \belowrulesep
\newlength{\verticalcompensationlength}
\setlength{\verticalcompensationlength}{\aboverulesep}
\addtolength{\verticalcompensationlength}{\belowrulesep}
\newcounter{verticalcompensationrows}
\newcommand{\verticalcompensation}[1]{%
\setcounter{verticalcompensationrows}{#1}%
\addtocounter{verticalcompensationrows}{-1}%
\vspace*{-\value{verticalcompensationrows}\verticalcompensationlength}%
}

% This command reimplements \multirow to compensate
% for the vertical offset, but looses some functionality
% of the \multirow command (not discussed here).
\newcommand{\multirowbt}[3]{%
\multirow{#1}{#2}{\verticalcompensation{#1}#3}%
}

%
\begin{document}
{\Huge Formulas for EVE Industry}\\
Made by Qoi - Version 2.2 - 2016-03-11

\emph{Note:} Teams have been removed in 2015.

\section{Manufacturing}
Items can be manufactured from a BPO (Blueprint Original) or BPC (Blueprint Copy), in the later case the number of runs will be deduced from the BPC. The maximum number of runs is such that it is one higher than the number of runs that would fit into 30 days, as such it depends on the same modifiers as $productionTime$ below.

{\large Required Materials for Production Job}
\begin{align*}
required &= \max( runs, \mathrm{ceil}( \mathrm{round}(runs * baseQuantity * materialModifier, 2))) \\
\end{align*}
$materialModifier$ is a product of the ME modifier (1.0 to 0.90 or 0\% to 10\% reduction) and the facility modifier (1.05 for Rapid Assembly Arrays, 1.0 for NPC Station, 0.98 for most POS arrays etc). \sout{and potentially two team modifiers. Two team members can affect the same job, one with a broad specialisation (modifier down to 0.975 or 2.5\% reduction) and one with narrow specialisation (modifier down to 0.95 or 5\% reduction). All four modifiers are multiplied together.}

{\large Production Time}
\begin{align*}
productionTime &= baseProductionTime * timeModifier * skillModifier * runs \\
skillModifier &= \prod_{k=1}^{d}\left[1 - 0.01*Level(k)\right]
\end{align*}
Where $d$ is the number of science skills listed in Table \ref{tab:science-skills} that are required for manufacturing this particular item, k is indexing those skills and Level(k) is the currently trained level of that skill. This currently mostly applies to Tech II manufacturing.

$timeModifier$ is a product of the TE modifier (1.0 to 0.80 or 0\% to 20\% reduction), the facility modifier (1.0 for NPC Station, 0.75 for many POS assembly arrays etc), and potentially two team modifiers. \sout{Again, two team members can affect the same job, with one having up to 5\% reduction (modifier 0.95) and the other having up to 10\% reduction (modifier 0.90).} Also the skills Industry (4\% per level, down to modifier 0.80) and Advanced Industry (3\% per level, down to modifier 0.85) affect it. Furthermore the BX-801 (1\% reduction, modifier 0.99), BX-802 (2\% reduction, modifier 0.98) or BX-804 (4\% reduction, modifier 0.96) implants can have an effect, only one implant can be active at the same time. All five \sout{seven} modifiers are multiplied together.

{\large Job Installation Fee}
\begin{align*}
jobFee &= baseJobCost * systemCostIndex * runs \\
\end{align*}
The $baseJobCost$ and $systemCostIndex$ can be acquired via CREST and are explained in a later section.

\section{ME \& TE Research}
Blueprints can have 11 different ME and TE levels. ME ranges from 0 to 10 in steps of 1, TE from 0 to 20 in steps of 2. In the following we assume that TE 20 is level 10, TE 18 level 9 etc. This research can only be done on BPOs (Blueprint Originals).

{\large Research Time from level 0 to level n}
\begin{align*}
researchTime_n &= baseResearchTime * timeModifier * levelModifier_n/105
\end{align*}
The $timeModifier$ is calculated the same as for Manufacturing, with the following changes:
The implants are XX-701 (1\% reduction, 0.99 modifier), XX-703 (3\% reduction, 0.97 modifier) or XX-705 (5\% reduction, 0.95 modifier), where XX has to be replaced with RR for TE research and MY for ME research. Instead of the Industry skill the Research (TE research) and Metallurgy (ME research) skills apply, with a 5\% per level reduction and a modifier down to 0.75 at level V. The advanced industry skill, the facility modifier and the team boni apply exactly as before.

{\large Research Costs from level 0 to level n}
\begin{align*}
jobFee &= baseJobCost * systemCostIndex * 0.02 * levelModifier_n/105
\end{align*}

The $levelModifier$s are 0, 105, 250, 595, 1414, 3360, 8000, 19000, 45255, 107700, 256000 respectively for level 0 to 10.
\section{Copying}
Copying creates a BPC (Blueprint Copy) from a BPO (Blueprint Original). The copy only has a limited number of runs remaining and the same ME/TE levels as the original.

{\large Copying Time}
\begin{align*}
copyTime &= baseCopyTime * runs * runsPerCopy * timeModifier
\end{align*}
The $timeModifier$ is calculated exactly like in the ME \& TE Research section, replace the XX in the Implant names with SC and the Research/Metallurgy skill with the Science skill.

{\large Copying Fees}
\begin{align*}
jobFee &= baseJobCost * systemCostIndex * 0.02 * runs * runsPerCopy
\end{align*}

\section{Invention (PHOEBE)}
Tech II Invention subtracts runs from a T1 BPC and potentially produces one BPC for each run for the T2 version with ME -2\%, TE -4\% and a number of runs remaining that is type specific. For ships, rigs and Perpetual Motion Unit II there is one run remaining, Rapid Heavy Missile Launcher II has 20, all other blueprints have 10. 

Tech III Invention consumes an ancient relic and potentially produces a T3 BPC with 3, 10 or 20 runs remaining for wrecked, malfunctioning or intact ancient relics respectively.

Invention requires data cores as input and optionally allows decryptors to be used.
If decryptors are used, they can also change the ME/TE values as well as the number of runs remaining on the T2 BPC. The ME/TE of the input blueprint have no effect on invention.

{\large Chance of Success}
\begin{align*}
inventionChance &= baseChance * SkillModifier * DecryptorModifier \\
SkillModifier &= 1 + EncryptionLevel/40 + (Datacore1Level + Datacore2Level)/30 \\
\end{align*}
The $baseChance$ is listed in Table \ref{tab:invention}.

{\large Invention Time}
\begin{align*}
inventionTime &= baseInventionTime * facilityModifier * (1- 0.03*AdvancedIndustryLevel)
\end{align*}

{\large Invention Fees}
\begin{align*}
jobFee &= baseJobCost * systemCostIndex * 0.02 * runs
\end{align*}
The $baseJobCost$ is that of the output blueprint.

\section{Job Installation Costs}
For the Job Installation Costs the adjusted prices and the system cost indices \sout{and the team cost modifiers} are required. These can be imported with a JSON parser from 
\begin{itemize}
\item https://public-crest.eveonline.com/market/prices/
\item https://public-crest.eveonline.com/industry/systems/
\item \sout{https://public-crest.eveonline.com/industry/teams/}
\end{itemize}
respectively.

There are several options available to get this data other than building a CREST importer yourself, some of them are:
\begin{itemize}
\item http://eve-prosper.blogspot.co.uk/2014/07/building-better-spreadsheets-crius.html For Google Spreadsheets
\item https://www.fuzzwork.co.uk/2014/07/26/excel-and-crest/ For Excel
\item http://api.eve-industry.org A XML API made by yours truly, similar in usage to the eve-central API.
\end{itemize}


The $baseJobCost$ for a blueprint is calculated using the materials required for manufacturing.
\begin{align*}
baseJobCost &= \underbrace{\sum\left( baseQuantity * adjustedPrice \right)}_{\text{All manufacturing materials}} \\
\end{align*}
Generally the baseJobCost is then multiplied with the activity specific System Cost Index and an activity specific multiplier to get the $jobFee$. See the individual activities for details.

{\large Total Job Installation Costs}
\begin{align*}
facilityTax &= jobFee * taxRate/100 \\
totalInstallationCost &= jobFee + facilityTax
\end{align*}
The $taxRate$ is 10 for NPC Stations and can be set for each facility individually for corporation owned facilities.

\section{Reprocessing}
{\large Reprocessing Rate for Ore \& Ice (including Compressed)}
\begin{align*}
rate &= facilityModifier * (1+0.03*ReprocessingLevel) * (1+0.02*ReprocessingEfficiencyLevel) * \\ 
& (1+ 0.02*OreSpecificSkillLevel)* implantModifier * (1 - StationTax)
\end{align*}
The $facilityModifier$ is 0.5 for most NPC stations, 0.52 for Reprocessing Arrays anchorable in highsec, 0.54 for Reprocessing Arrays anchorable in lowsec/nullsec and 0.50 to 0.60 in nullsec Outposts.
The $implantModifier$ is 1.01, 1.02 and 1.04 for RX-801, RX-802 and RX-804 respectively.

{\large Reprocessing Rate for everything else (including unrefined Alchemy products)}
\begin{align*}
rate &= facilityModifier * (1+ 0.02*ScrapMetalProcessingLevel) * (1 - StationTax)
\end{align*}
The $facilityModifier$ is 0.5 for most NPC stations as well as for all nullsec outposts. There are no anchorable arrays for this activity.

{\bf The reprocessing output is obtained by multiplying the reprocessing rate with the base material amounts and then rounding down (POS) or rounding to nearest integer (Station).}

{\large NPC Station Tax for Reprocessing}
\begin{align*}
StationTax &= 5.0\% - (0.75\% * YourCorporationStanding)
\end{align*}
You need $5\%/0.75\% = 6.67$ Standing to pay no Station Tax. 
\appendix
\section{Appendix}
\begin{figure}[htb]
\begin{center}
\input{researchLevel.tex}
\end{center}
\caption{Level Modifiers for ME/TE Research}
\label{fig:researchLevel}
\end{figure}

\begin{table}[htb]
\begin{center}
\caption{Invention Base Chance}
\label{tab:invention}
\begin{tabular}{R{4cm} L{8cm}}
\toprule
\bf{Chance of Success} & \bf{Blueprints} \\
\midrule
18\% & Freighter\\
\midrule
22\% & Battleship, Wrecked Ancient Relict\\
\midrule
26\% & Cruiser, Battlecruiser, Mining Barge, Industrial \\
\midrule
30\% & Frigate, Destroyer, Malfunctioning Ancient Relict\\
\midrule
34\% & Modules, Rigs, Ammunition, Intact Ancient Relict \\
\midrule
100\% &  Perpetual Motion Unit I \\
\bottomrule
\end{tabular}
\end{center}
\end{table}

\begin{table}[htb]
\begin{center}
\caption{Science skills with 1\% reduction in manufacturing time per level}
\label{tab:science-skills}
\begin{tabular}{L{8cm}}
\toprule
\bf{Skill} \\
\midrule
Advanced Small Ship Construction \\
\midrule
Advanced Medium Ship Construction \\
\midrule
Advanced Large Ship Construction \\
\midrule
Avanced Industrial Ship Construction \\
\midrule
Amarr Starship Engineering \\
\midrule
Caldari Starship Engineering \\
\midrule
Gallente Starship Engineering \\
\midrule
Minmatar Starship Engineering \\
\midrule
Electromagnetic Physics \\
\midrule
Electronic Engineering \\
\midrule
Graviton Physics \\
\midrule
High Energy Physics \\
\midrule
Hydromagnetic Physics \\
\midrule
Laser Physics \\
\midrule
Mechanical Engineering \\
\midrule
Molecular Engineering \\
\midrule
Nuclear Physics \\
\midrule
Plasma Physics \\
\midrule
Quantum Physics \\
\midrule
Rocket Science \\
\bottomrule
\end{tabular}
\end{center}
\end{table}

\begin{table}[htb]
\begin{center}
\caption{Invention Outcomes (Proposed in DevBlog - NOT IMPLEMENTED IN PHOEBE)}
\label{tab:invention-outcomes}
\begin{tabular}{L{2cm} L{4cm} L{8cm}}
\toprule
\bf{Name} & \bf{Output} \\
\midrule
\multirowbt{4}{*}{Success} & exceptional & Yields a ME 2 and TE 3 bonus to the outcome. \\
\cmidrule{2-3}
& great & Yields a ME 1 and TE 2 bonus to the outcome. \\
\cmidrule{2-3}
& good & Yields a TE 1 bonus to the outcome. \\
\cmidrule{2-3}
& standard & Basic unmodified outcome. \\
\midrule
\multirowbt{4}{*}{Failure} & standard & 50\% of datacores returned \\
\cmidrule{2-3}
& poor & 25\% of datacores returned \\
\cmidrule{2-3}
& terrible & 10\% of datacores returned \\
\cmidrule{2-3}
& critical & No datacore returned \\
\bottomrule
\end{tabular}
\end{center}
\end{table}

\begin{table}
\begin{center}
\caption{Team Specializations}
\label{tab:teamspecializations}
\begin{tabular}{L{3cm} L{5cm} L{5cm}}
\toprule
\bf{Category} & \bf{Broad Specialization} & \bf{Narrow Specialization} \\
\midrule
\multirowbt{12}{*}{Structure} & \multirowbt{2}{*}{Deployables} & Mobile Disruption \\
\cmidrule{3-3}
& & Mobile Structures \\
\cmidrule{2-3}
& \multirowbt{3}{*}{Sovereignty} & I-Hubs \\
\cmidrule{3-3}
& & SBUs \\
\cmidrule{3-3}
& & TCUs \\
\cmidrule{2-3}
& \multirowbt{6}{*}{Starbase} & Starbase Defense \\
\cmidrule{3-3}
& & Starbase Processing \\
\cmidrule{3-3}
& & Starbase Storage \\
\cmidrule{3-3}
& & Starbase Weapons \\
\cmidrule{3-3}
& & Starbase Production \\
\cmidrule{3-3}
& & Starbase Core \\
\cmidrule{2-3}
& Containers & \\
\midrule
\multirowbt{11}{*}{Component} & Capital Construction \\
\cmidrule{2-3}
& Construction Components \\
\cmidrule{2-3}
& Data Interfaces      \\
\cmidrule{2-3}
& Hybrid               \\
\cmidrule{2-3}
& Outpost Components   \\
\cmidrule{2-3}
& \multirowbt{5}{*}{Subsystem} & Propulsion Systems \\
\cmidrule{3-3}
& & Electronics Systems \\
\cmidrule{3-3}
& & Offensive Systems \\
\cmidrule{3-3}
& & Defensive Systems \\
\cmidrule{3-3}
& & Engineering Systems \\
\cmidrule{2-3}
& Tools                \\
 \midrule
\multirowbt{10}{*}{Consumable} & \multirowbt{6}{*}{Ammo} & Projectile Ammo \\
\cmidrule{3-3}
& & Bombs \\
\cmidrule{3-3}
& & Hybrid Ammo \\
\cmidrule{3-3}
& & Crystals \\
\cmidrule{3-3}
& & Interdiction Probe \\
\cmidrule{3-3}
& & Missiles \& Rockets \\
\cmidrule{2-3}
& Capacitor Boosters \\
\cmidrule{2-3}
& Fuel Blocks \\
\cmidrule{2-3}
& Nanite Repair Paste \\
\cmidrule{2-3}
& Neural Boosters \\
\bottomrule
\end{tabular}
\end{center}
\end{table}

\begin{table}
\begin{center}
\begin{tabular}{L{3cm} L{5cm} L{5cm}}
\toprule
\bf{Category} & \bf{Broad Specialization} & \bf{Narrow Specialization} \\
\midrule
\multirowbt{28}{*}{Ship} & \multirowbt{6}{*}{Capital class} & Supercarrier \\
\cmidrule{3-3}
& & Freighters \\
\cmidrule{3-3}
& & Dreadnought \\
\cmidrule{3-3}
& & Carrier \\
\cmidrule{3-3}
& & Capital Industrial Ship \\
\cmidrule{3-3}
& & Titan \\
\cmidrule{2-3}
& \multirowbt{4}{*}{Large class} & Battleship \\
\cmidrule{3-3}
& & Industrial Command Ship \\
\cmidrule{3-3}
& & Black Ops \\
\cmidrule{3-3}
& & Marauder \\
\cmidrule{2-3}
& \multirowbt{10}{*}{Medium class} & Mining Barges \\
\cmidrule{3-3}
& & Heavy Assault Cruisers \\
\cmidrule{3-3}
& & Strategic Cruiser \\
\cmidrule{3-3}
& & Logistics \\
\cmidrule{3-3}
& & Recon Ships \\
\cmidrule{3-3}
& & Heavy Interdiction Cruisers \\
\cmidrule{3-3}
& & Cruiser \\
\cmidrule{3-3}
& & Battlecruisers \\
\cmidrule{3-3}
& & Command Ship \\
\cmidrule{3-3}
& & Industrial Ships \\
\cmidrule{2-3}
& \multirowbt{8}{*}{Small class} & Covert Ops \\
\cmidrule{3-3}
& & Electronic Attack Ship \\
\cmidrule{3-3}
& & Interceptor \\
\cmidrule{3-3}
& & Interdictor \\
\cmidrule{3-3}
& & Assault Frigate \\
\cmidrule{3-3}
& & Frigate \\
\cmidrule{3-3}
& & Shuttle \\
\cmidrule{3-3}
& & Destroyer \\
\midrule
\multirowbt{11}{*}{Mobile} & \multirowbt{3}{*}{Disruption Drones} & Stasis Webifying Drone \\
\cmidrule{3-3}
& & Cap Drain Drone \\
\cmidrule{3-3}
& & EW Drone \\
\cmidrule{2-3}
& \multirowbt{2}{*}{Fighters} & Fighter Bomber \\
\cmidrule{3-3}
& & Fighter Drone \\
\cmidrule{2-3}
& \multirowbt{3}{*}{Utility Drones} & Mining Drone \\
\cmidrule{3-3}
& & Salvage Drone \\
\cmidrule{3-3}
& & Logistic Drone \\
\cmidrule{2-3}
& Scanner Probe \\
\cmidrule{2-3}
& Survey Probe \\ 
\cmidrule{2-3}
& Warfare Drone & Combat Drone \\ 
 \bottomrule
\end{tabular}
\end{center}
\end{table}

\begin{table}
\begin{center}
\begin{tabular}{L{3cm} L{5cm} L{5cm}}
\toprule
\bf{Category} & \bf{Broad Specialization} & \bf{Narrow Specialization} \\
\midrule
\multirowbt{42}{*}{Equipment} & \multirowbt{3}{*}{Armor} & Armor Active Modules \\
\cmidrule{3-3}
& & Armor Passive Expanders \\
\cmidrule{3-3}
& & Armor Passive Resistance \\
\cmidrule{2-3}
& \multirowbt{6}{*}{Damage} & Damage Amplifiers \\
\cmidrule{3-3}
& & Missile Launchers \\
\cmidrule{3-3}
& & Smart Bomb \\
\cmidrule{3-3}
& & Energy Weapon \\
\cmidrule{3-3}
& & Hybrid Weapon \\
\cmidrule{3-3}
& & Projectile Weapon \\
\cmidrule{2-3}
& \multirowbt{2}{*}{Drone Modules} & Drone Effectiveness Modules \\
\cmidrule{3-3}
& & Drone Operation Modules \\
\cmidrule{2-3}
& \multirowbt{4}{*}{Electronic Warfare} & Energy Drain Modules \\
\cmidrule{3-3}
& & Warp Scrambling Modules \\
\cmidrule{3-3}
& & ECM \& ECCM \\
\cmidrule{3-3}
& & Tracking Disruptor \\
\cmidrule{2-3}
& \multirowbt{6}{*}{Engineering} & Capacitor Passive \\
\cmidrule{3-3}
& & Capacitor Active \\
\cmidrule{3-3}
& & Capital Modules \\
\cmidrule{3-3}
& & Hull Modules \\
\cmidrule{3-3}
& & Damage Control \\
\cmidrule{3-3}
& & Fitting Modules \\
\cmidrule{2-3}
& Implants & \\
\cmidrule{2-3}
& \multirowbt{5}{*}{Navigation} & Propulsion Modules \\
\cmidrule{3-3}
& & Jump Modules \\
\cmidrule{3-3}
& & Cloaking Device \\
\cmidrule{3-3}
& & Stasis Web \\
\cmidrule{3-3}
& & Stabilizer Modules \\
\cmidrule{2-3}
& Rigs \\
\cmidrule{2-3}
& \multirowbt{3}{*}{Scanners \& Harvesting} & Harvesting  Modules \\
\cmidrule{3-3}
& & Scanning Modules \\
\cmidrule{3-3}
& & Surveying Modules \\
\cmidrule{2-3}
& Scripts \\
\cmidrule{2-3}
& \multirowbt{5}{*}{Sensors \& Targeting} & Fleet Coordinator \\
\cmidrule{3-3}
& & Remote Modules \\
\cmidrule{3-3}
& & Tractor Beam \\
\cmidrule{3-3}
& & Targeting Modules \\
\cmidrule{3-3}
& & Tracking Modules \\
\cmidrule{2-3}
& \multirowbt{4}{*}{Shields} & Shield Passive Recharge \\
\cmidrule{3-3}
& & Shield Active Modules \\
\cmidrule{3-3}
& & Shield Passive Extenders \\
\cmidrule{3-3}
& & Shield Passive Resistance \\
\bottomrule
\end{tabular}
\end{center}
\end{table}
\end{document}
