News:

Simutrans Tools
Know our tools that can help you to create add-ons, install and customize Simutrans.

Company takeover discussion

Started by Sirius, June 06, 2021, 08:47:28 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Sirius

I couldn't find the old thread about company mergers/takeovers, so I started a new one.

On BB, we have seen an issue with the takeoveer system: It can be abused to generate free money at the moment.

The most obvious issue is the free starting money on newly founded companies, which allows companies to get the starting capital again and again.
This will be fixed in the long-term, but there might be a short-term solution to this.

Further, calculation of takeovers seems to be quite broken at the moment.

Have a look at the following example:
Company A is a newly founded company. 250000 starting capital.
Company B is by 86000 in the reds. Assets are exactly 0.
- The takeover cost displayed was 172000
- After the takeover, company B had an acount balance of 336000

We briefly discussed this on Discord and so far concluded the following:
In the above example
- a takeover cost of 86000 should be displayed.
- Company As account balance should be 164000 after the takeover.
That means, the displayed and actually booked cost of a takeover should be assets+liabilities, which is the same as (pseudo code) A.account_balance + B.account_balance - B.assets , given a negative account balance.

How to handle takeovers when the company being taken over has a positive account balance?
Quote
It could be that you'll have to pay off the magnitude of the balance, independent if it is credit or debt

Of course if it is offered you could also say that the money on the balance is gifted to the new owner...
These are the options I can think of
In my opinion, that money should be transfered to the new company.
From the code, I guess this is the intended behavior, except in case of companies in liquidation.
It doesn't work that way however, due to wrong calculations in the takeover cost calculation.

I am wondering why the exception of not booking account balance of companies in liquidation exists.



One issue still remains: Can we prevent players from exploiting the free starting capital in the short-term?

I'd argue we might, interpret the free starting capital as a non-interest-bearing, which each company can claim only exactly once.
That means, on takeover a company will have to refund that bearing, otherwise the same company would have claimed it twice.
I am aware that this doesn't take into account the growth of starting capital depending on the timeline.

jamespetts

There are three issues here: (1) possible errors in computation; (2) possible short-term modifications; and (3) treatment of companies on liquidation.

As to (1), I note that you have submitted a pull request. Can you summarise its intended behaviour and how that differs to the present?

As to (2), I am somewhat reluctant to implement a feature that is intended to be removed at some point in the future, not least because there is a big risk of not remembering to remove it, but also because of the problem of wasted effort which could better be spent towards the long-term fix and user confusion of features that appear and disappear quickly.

As to (3), the difference in the case of liquidation is intended: the idea is that, if a company is in administration, one is buying the whole thing as a going concern, taking on both assets and liabilities. In liquidation, however, its individual assets are being sold off to meet the demands of its creditors, and the purchasers of those assets do not take on liability for debt. We currently do not have a system for separating out the assets, so we cannot directly simulate individual assets being bought and sold, but this will be added with respect to the purchase of individual vehicles from a company in liquidation once second hand sales of vehicles are implemented. It is important, however, to simulate not being liable for a company's debts when buying the assets of a liquidated company, or else the assets may end up going for scrap rather than being re-used because nobody wants to take on the associated debt, which is both unrealistic and uneconomic.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Sirius

(1) The intended behavior is the following:
Whenever a company is offered for takeover, the displayed and actually booked costs will be "assets - account_balance".
This means the new company has to buy the assets and pay off the loans.
In case of a positive bank account balance, there are no loans in the current system and that amount will be booked to the new company.

Whenever a company is in liquidation, the displayed and actual cost will "assets"

With the additions from (2), the current stating money will be added to the takeover costs to simulate that the starting capital is available to each company only exactly once.
With the clarifaction from (3), I guess this cost should not apply to companies in liquidation. I'll prepare a third commit, which doesn't add this cost to companies in liquidation, but be warned this will re-enable the takeover exploit on companies in liquidation.

(2)
It's one line of code, already included in the second commit of the PRed branch.
The cost calculation code has to be altered whenever the long-time loans are implemented anyways, so it's rather unlikely to forget it.
I might add a comment clearly pointing out the intention of that line.

About (3)
Thanks for the clarification.
That means no matter how exactly the loan system is implemented, it's always possible to buy assets on loan, run the company into bankruptcy and sell the assets. The new loan system won't fix this.

wlindley

The whole issue of negative balances needs further thought.  No actual company operates with a negative bank balance, that would never be allowed. Loans, bonds, or stocks need some kind of representation.  As is, all the effort into costs, revenues, profits, and game balancing are pointless with negative cash balances. Real companies begin with near-zero assets but with cash from loans or the sale of stocks, bonds, or other securities. Or are we not actually trying to simulate proper economics?

Sirius

We try to simulate this, the current implementation is just a quite simple one and that's the reason why a more sophiscated system is planned in the long-term.
However, even in the current system, there is a credit limit, a solvency limit and an interest being paid on negative account balance, so you can think of negative account balance as a loan.

wlindley

Very good and no worries. On topic, whatever is done here now should merely have a bit of thought and some hooks built in for whatever comes later.

jamespetts

The current system of a negative bank balance is intended to represent an overdraft. It is planned to implement some form of long-term credit in the future, and abolish (or, at least, greatly reduce) the free starting money when that happens so that companies will have to borrow to invest, and there will be an interesting relationship between what a player can achieve by borrowing any given amount of money in any given time and the greater risk that paying interest to service a higher level of borrowing entails.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

prissi

I think the problem is that in Simutrans the revenue scales with the network size. Thus a twice as big loans can potentially generate 4x the revenue. This only saturates when there is the entire map coveraged.

Thus even an initial loan needs to be somewhat limited. (Also my bank denied me loaning 32 billions for covering Angola with high speed trains ... )

Sirius

#8
I have now pushed a change that, as requested, does not charge the initial capital of the current date whenever taking over a company that is in bankruptcy, effectively re-enabling the exploit in case of bankruptcy.


Furthermore, I have noticed that assets does only include vehicles no further non-financial assets like the land value of owned properties or ways.
That might be a topic on its own.

jamespetts

Quote from: prissi on June 10, 2021, 07:43:10 AM
I think the problem is that in Simutrans the revenue scales with the network size. Thus a twice as big loans can potentially generate 4x the revenue. This only saturates when there is the entire map coveraged.

Thus even an initial loan needs to be somewhat limited. (Also my bank denied me loaning 32 billions for covering Angola with high speed trains ... )

In reality, the amount of capital that transport (or, indeed, any) companies can raise is limited by economic mechanisms that we need to simulate to be able to simulate the realistic economic constraints, working with which is more or less the whole game mechanic, affecting commercial transport networks. In simple terms, this requires a credit limit function (as indeed we already have with the overdraft system); before implementing a more sophisticated financing system, we need to work out what the real world constraints on finance really are.

Quote from: Freahk on June 10, 2021, 10:33:47 AM
I have now pushed a change that, as requested, does not charge the initial capital of the current date whenever taking over a company that is in bankruptcy, effectively re-enabling the exploit in case of bankruptcy.

Perhaps I have missed something - may I ask why it is a good idea to re-enable an exploit?

QuoteFurthermore, I have noticed that assets does only include vehicles no further non-financial assets like the land value of owned properties or ways.
That might be a topic on its own.

It is indeed a topic on its own - the "assets" graph should indeed represent these things. Land value owned would require its own independent land ownership abstraction (discussed in another topic); as for ways, this is complex, as depreciation would have to be computed for each segment of way, as ways wear out. The forge cost never has to be repaid, but, beyond that, ways are a wasting asset.

Indeed, when the vehicle maintenance mechanics are implemented, vehicles will also be a wasting asset and depreciation will need to be computed for these, too.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Sirius

#10
Quote from: jamespetts on June 12, 2021, 10:43:21 AMPerhaps I have missed something - may I ask why it is a good idea to re-enable an exploit?
As you have noted above:
Quote from: jamespetts on June 08, 2021, 10:36:41 PMIn liquidation, however, its individual assets are being sold off to meet the demands of its creditors, and the purchasers of those assets do not take on liability for debt.

As purchasers of companies in liquidation do not take on liability, they won't pay the initial capital in addition.
Thus, new companies can still be founded just to spend money on things which don't add up on assets, then run into bankruptcy to be taken over for free.

jamespetts

Thank you for the clarification - that is helpful. Now incorporated.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

wlindley

There seems to be a basic confusion in the game reporting about Assets.  Try this:

       
  • Start a new company.
  • Open the "Finances" page for that company.  Note the Account Balance, Assets, and Net Wealth.
  • Build a shipyard or a road depot.  The construction cost gets counted against your cash flow, and subtracted from account balance, but does not get added to Assets or Net Wealth, in contradiction to generally accepted accounting principles.
  • Likewise, building roads, railways, canals, and so on incurs cost but does not increase Assets -- which is strange indeed. Surely the company would owe taxes at least on the improvements, if not the land itself.
Ignoring purchased real Assets utterly distorts a company's takeover cost in the game.  The more track a rail-heavy company has, the more the purchasing company will lose (with current game algorithms).

It is also strange that under a building you can click twice to get the second dialog "Base" which lists the land; if you purchase the building ("purchase house") the ownership of the base land changes (the color of the dialog title bar changes to the player color). But check this out (Britain 128 Ex pak):

       
  • Click on a Hovel.  Dialog lists (building) Value as 3740¢
  • Click on that tile again. Dialog lists land value as somewhere between 17,000 and 85,000¢
  • Demolish a hovel you do not own. You get charged 37.50¢. Total outlay, 37.50¢
  • Purchase another hovel.  You get charged 3740¢.  But your assets do not increase.
  • Click on the tile twice to get the Base dialog.  The title bar will be in your player color.
  • Question: What exactly do you now own? You paid 3740¢ but the land is worth much more than that: did you just buy the building but not the land?  Surely the building at least should count as an asset of yours?
  • Demolish the hovel you just purchased. You get charged 785.50¢.  Total outlay, 4525.50¢ -- Huh?
How is it sensible that demolishing a building costs so much less than purchasing it and then demolishing it, especially when you retain no interest in the land? 

Although this is a game, perhaps a review of the basic economic model might help make the company takeover process more useful and fun.



Sirius

#13
Yes, the machnics are broken at the moment...

Quote from: wlindley on July 30, 2021, 10:09:57 PMThe more track a rail-heavy company has, the more the purchasing company will lose (with current game algorithms).
How exactly does the purchasing company lose anything?

Quote from: wlindley on July 30, 2021, 10:09:57 PMDemolish a hovel you do not own. You get charged 37.50¢. Total outlay, 37.50¢
That's a bug. Removing an unowned building should cost the same as first purchasing, then demolishing the building.

Quote from: wlindley on July 30, 2021, 10:09:57 PMQuestion: What exactly do you now own? You paid 3740¢ but the land is worth much more than that: did you just buy the building but not the land?  Surely the building at least should count as an asset of yours?
Yes, land ownership is also buggy at the moment.
This is in rework: The first company building on a tile will purchase that land. That company will own the land until it removes the last stationary (aka non-vehicle) object from that tile.

wlindley

Very good. Land can already be marked "partially forged" as shown in the dialogs; perhaps bridleways (being very narrow) can cost much less than full two-lane roads in the future as part of the land rework.

The basic issues Freahk mentioned, once working satisfactory, should make everything far more sensible. 

jamespetts

Sorry for not having had a chance to look at this earlier. This raises two separate issues: (1) land ownership mechanics; and (2) accountancy principles.

As to (1), I note that Freahk is working on this, and I see that there is a branch on Github with this code. May I ask whether this is ready for testing yet or whether it needs more work?

As to (2), this is not simply a matter of a bug fix, as we need to model depreciation, for ways, at least: ways wear out (even when not being used, although more quickly when being used), and need renewing. The forge cost, however, never needs to be spent again. This all needs to be accounted for, and currently there is no code that attempts to do this. Indeed, there is no code that keeps a track of way accounting at all beyond a single monthly maintenance per player figure that is added to or subtracted from whenever players build, upgrade or delete ways.

Buildings do not currently wear out, so it may be that no depreciation is necessary for these. Vehicles do not currently wear out, but this is planned to change, so depreciation may be necessary for this.

We may need a whole new accountancy mechanic for depreciation before we can really address this, which would be a significant coding project. We might be able to add buildings to assets without doing this. I should note that I did not code for the accounting of assets in the first place, so am unsure of the basis on which the decision was made to include some things and exclude others. Can anyone shine any light on the reasoning for this?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

wlindley

Have been looking at this again, seeing if there is a short-term improvement, even without properly counting land and improvements as assets.

Let's step through how it ideally would work. Imagine the first player, Cornelius. He starts a company. Currently the starting bank, which is pakset dependent, comes from an unnamed source but let's assume the unseen banker is Pierpont, who gives Cornelius a loan and a starting bank of $100.

Cornelius then builds some track, stations, a depot and buys some locomotives. His assets (all of those) are now $90 plus cash of $10, totalling $100. Liabilities (the loan from Pierpont) are $100.  This is how double-entry accounting works.  If you wanted to purchase the company, Cornelius would probably charge you $100 (thus paying back Pierpont) plus a fee as his profit.

OK now Cornelius runs some trains and makes $20 profit. This makes his assets $90 (right-of-way, tracks, vehicles, depots) plus cash of $30 (the original $10 plus his $20 profit) toalling $120.  Liabilities are the $100 loan from Pierpont, plus $20 equity owed to Cornelius, totaling $120. In double-entry accounting, assets and liabilities should always have the same totals.  Cornelius would sell you the company for approximately his equity ($20) if you assume the loan from Pierpont, or for $120 if he has to repay Pierpoint before the sale.

A while later, having kept the company, Cornelius builds the Springfield Monorail at a cost of $50. He has lost another $50 on maintenance and salaries. Now his assets are right-of-way, trackway, vehicles, and depots of $150, but no cash.  The former cash balance of $30 was depleted by the $100 in construction and operating expenses, leaving a cash balance of negative $70. Fortunately his friend Hetty has agreed to cover the $70 shortfall.  Liabilities are thus the $100 loan from Cornelius plus the $70 loan from Hetty, totaling $170.  To make assets equal liabilities, Cornelius has a negative $20 equity in the company. At this point, Cornelius will gladly sell you the company if you cover the $170 in debts, and erase his negative equity.

All of which suggests a fairly simple algorithm of:

Hard assets = Sum of Land (including right-of-way), track, stations, depots, buildings, and vehicles owned, plus any positive cash balance
Debts = Initial starting cash balance (assumed to be a loan) plus absolute-value of any negative cash balance

Purchase cost of company = the total of hard assets, or debts, whichever is greater... plus a percentage as fee. 

Exception: A company in liquidation will only have the initial cash balance counted as a debt.  Or, alternately, a company in liquidation will have all its debt, including initial cash, ignored in the calculation.

Even without counting right-of-way, track, and houses owned as assets (the game currently takes your cash for those and eats it) the resulting purchase prices for companies seems more sensible.

I am happy to submit a pull request if this seems useful.

wlindley

I have submitted a pull request with working code.  Also included is the ability to sell city houses (clicking Purchase on a house you already own, will sell it) which may help nearly-broke companies by selling their assets to raise cash. 

Ranran(retired)

The citybuildings valuation calculation was obviously broken so far, so I created a patch to fix it. Your patch will probably create some conflict with it. However, I just changed the formula. Please keep in mind.
Basically, I only report bugs occasionally, never provide patches for new features.
I may only work on fixing bugs that are caused by Ranran.
Fork of simutrans extended for Jalápagos is here.