Skip to content

FuelTaxByContractCost-Taylor#144

Open
FedeMedel wants to merge 1 commit intomyflyclub:masterfrom
FedeMedel:FuelTaxByContractPrice-Taylor
Open

FuelTaxByContractCost-Taylor#144
FedeMedel wants to merge 1 commit intomyflyclub:masterfrom
FedeMedel:FuelTaxByContractPrice-Taylor

Conversation

@FedeMedel
Copy link
Copy Markdown

Extracted actual fuel cost per barrel from existing fuelProfit data in AirlineSimulation.scala Formula used: actualFuelCostPerBarrel = actualFuelCost / barrelsUsed Leveraged existing contract calculation logic instead of duplicating it Integrate actual fuel cost into link simulation
Added cache mechanism in LinkSimulation object to store actual fuel costs per airline Modified AirlineSimulation to calculate and store actual fuel cost per barrel Cache is cleared at the beginning of each cycle to ensure fresh data Update tax calculation to use actual fuel cost
Modified computeLinkAndLoungeConsumptionDetail to use actual fuel cost when available Fuel tax now calculated based on actual fuel cost paid by airline (with contracts) rather than standard $70 price Fallback mechanism ensures backward compatibility when actual fuel cost is not available

Extracted actual fuel cost per barrel from existing fuelProfit data in AirlineSimulation.scala
Formula used: actualFuelCostPerBarrel = actualFuelCost / barrelsUsed
Leveraged existing contract calculation logic instead of duplicating it
Integrate actual fuel cost into link simulation
Added cache mechanism in LinkSimulation object to store actual fuel costs per airline
Modified AirlineSimulation to calculate and store actual fuel cost per barrel
Cache is cleared at the beginning of each cycle to ensure fresh data
Update tax calculation to use actual fuel cost
Modified computeLinkAndLoungeConsumptionDetail to use actual fuel cost when available
Fuel tax now calculated based on actual fuel cost paid by airline (with contracts) rather than standard $70 price
Fallback mechanism ensures backward compatibility when actual fuel cost is not available
@spencerm
Copy link
Copy Markdown
Collaborator

spencerm commented Aug 4, 2025

Thanks for the PR!

From a feature POV, personally I don't think this is going in the right direction because having a fixed fuelCost allows a player to compare flight profit between weeks (and graph them) without the huge swings of a fuel contract ending / starting. If we got rid of that, I'm sure players would frequently ask "why did my flight profits decrease 40%" without realizing why. The profit graphs would be less intuitive without a fixed cost.

Technically looks like it'd work! However if we were to go in the above direction, we would have to remove the fuel contract line items from "other income" summing so we don't double count fuel contract revenue both there and in the flights income.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants