https://forum.paradoxplaza.com/forum/developer-diary/co-word-of-the-week-11.1622876/
https://forum.paradoxplaza.com/forum/developer-diary/co-word-of-the-week-12.1623714/
https://forum.paradoxplaza.com/forum/developer-diary/co-word-of-the-week-12.1623714/page-2#post-29405140
Accidentaly, I was digging into profitability logic only yesterday. This description is very shallow and inprecise, I am really starting to wonder if you actually know what you implemented and how it works. As a test, maybe you should try to explain why oh why virtually ALL companies have maximum profitability of 255? You can easily check it in DeveloperInfo. Really, I was browsing my city of 65k, that has like 500 companies, and I wasn't able to find a single company with profitability less than 255.
So, let's look into the code. m_Profitability is kept in Profitability component and updated in 3 jobs, each for a specific type if company (commercial, industry and extractor). For simplicity let's focus on industrial i.e. IndustrialAISystem.CompanyAITickJob.
The formula is simple:
m_Profitability = (byte)math.min(255f, math.max(0f, 127f + (num - (float)rent) / (float)(8 * building.m_LotSize.x * building.m_LotSize.y)))
num is DailyProfit, rent is well Rent.
So, yes technically Profitability depends on many factors you mentioned, but this formula clearly shows that its philosphy and meaning is different. It basically says if you earn more than rent or not... <127 means less then Rent, >127 means more than Rent.
Then, you should probably also explain why is Profitability actually calculated at all? We have a number that noone knows what it means and where is it actually used?
And here is the funny part - not counting UI and serialization, there is literally one place where it is used - PropertyRenterSystem.PayRentJob. It influences how much Rent is paid.
(int)((float)num3 * (1f + (float)(math.max(spawnableBuildingData.m_Level - 1, 0) * m_Profitabilities[renter].m_Profitability) / 255f));
This formula basically makes companies pay more Rent that is actually required. Why? Idk. But this is one of the reasons of quick leveling and Land Value problems. Company with profitability 0 (which means it cannot even earn Rent) still pays that Rent, ok, but company with Profitability 255 pays N-times more. So, the higher level, the more rent it pays thus speeding up leveling even more.