{{ message }}

# No more space for orders#6968

Closed
opened this issue Nov 13, 2018 · 5 comments · Fixed by #7220
Closed

# No more space for orders#6968

opened this issue Nov 13, 2018 · 5 comments · Fixed by #7220

### SamuXarick commented Nov 13, 2018

 While testing multiple AIs on a 4096x4096 map, some kind of limit has been reached. I was seeing vehicles with no orders and AIs struggling to insert orders to their vehicles. ShipAI hinted me with the error message `ERR_ORDER_TOO_MANY` I decided to play and right on my first bus service, I could only insert the first order. When attempting to insert the 2nd order it failed with this: Savegame attached. no more space for orders.zip The text was updated successfully, but these errors were encountered:

### James103 commented Nov 13, 2018

 Steps to reproduce: (An autoclicker is helpful for this) Start new game Give yourself a few million so you can then... buy a road vehicle. Put down a bus station ("A"). Give your road vehicle 254 of the same order to go to station A. If you see "Too many orders", this step is done. Clone your road vehicle 251 more times. 250 of those times it will work, but the 251th time the vehicle will copy, but the orders won't. On the road vehicle with no orders, give it 246 of the same order to go to station A. If you see "No more space for orders", this step is done. To calculate the max number of orders, punch in the equation `[your road vehicles - 1] * [254 orders per vehicle] + [# of orders on last vehicle]`. I got `[251] * [254] + [246]` = 64,000 orders total across all my road vehicles. If you attempt to insert more orders on any of your vehicles, you will see the message "No more space for orders" or `ERR_ORDER_TOO_MANY`. Result: The limit for how many orders you can have across all vehicles of all companies is 64,000 orders total. Savegame attached: no more space for orders 2.zip

### planetmaker commented Nov 13, 2018

 That indeed is a hardcoded limit in the game code itself. src/order_base.h:typedef Pool OrderPool; src/order_base.h:typedef Pool OrderListPool;

### SamuXarick commented Nov 13, 2018

 My testing with 14 AIs started in 1935 and I've spotted the first vehicles with no orders in 1952. It could have been earlier. Still, it only took 17 years to reach the limit. Could the order limit be increased? Is it feasible?

### nielsmh commented Nov 13, 2018

 Let's do some more numbers. At 64,000 orders max and a full game of 15 companies, that gives 4266 order entries to each company. The hard limit is 5000 vehicles of each type, so less than a quarter order per vehicle. However, sensible players use order sharing, and usually don't use all types of transport, so in practice you're probably up to 2-3 orders per vehicle, more if you only use trains or only road vehicles. That's reasonable, especially when playing on sensible map sizes and not 4096 sized maps.

### andythenorth commented Nov 13, 2018

 Thanks for the report (and the detailed investigations). The limit is believed to be non-trivial to increase. We don't see much failure demand (reports of this being a problem) over the last 10 years. So I'm closing this one, as it won't be changed. Cheers.

mentioned this issue Feb 11, 2019
mentioned this issue Dec 28, 2019