Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
The second best, and no good for you, is the ability to allow autolaunch with less than full loads, still of a single item, in special item cases.
It's the knapsack problem[en.wikipedia.org].
It's one of those famous problems that are NP-complete.
I.e. for which it's only known that an efficient polynomial-time solution exists to verify the correctness of a given answer; but no solution is known to exist to compute such an answer itself in polynomial time.
Or to think of it in another way: it's the class of problems that can only be solved by brute-force.
For knapsack in particular, approximations do exist in polynomial-time - however.
But it'd be hell to express as Factorio circuit combinators, no doubt.
All in all it's better to have automatic mode deal with it and just build more silos. They're cheap.
The difficulty of the knapsack problem is about worst-case storage requirements. Individual problems can be very easy. For example "give exact change" is a very easy to knapsack problem to solve, because of the actual denominations of coins: the greedy solution (always pick the biggest item that still fits) always works.
For loading a rocket, I found the greedy solution usually works. I was willing to accept manual intervention for "not quite full" situations (although it would be even better if I could give the silo a signal to launch anyways) for the added convenience when inventories are actually full. Even better would have been if I had an automatic way to tell the silo to launch.
If I'm building a new space platform and it needs, for example, 3 gun turrets, 4 asteroid grabbers, 4 smelters, etc, those can often fit into a single rocket with space left over but instead the game insists on sending up 50 turrets, then 50 smelters, etc. Utterly ridiculous, when in even the greedy algorithm would be more efficient:
Sort the list of requested items by weight: Heavy items first. Add those requested items to the rocket until you've fulfilled the request or can't fit more. When done with that item, move to the next item and try to fit as many as requested into the space remaining in the rocket. Would it be optimal in every case? Probably not, though because of the divisible stack sizes etc such cases would be rare. Just like with coin changing. But it is always more efficient than sending up stuff *I don't need on the rocket*. If I want 4 smelters and no more, and the game sends 50, then in terms of value that's no different than if it had sent a rocket with 4 smelters and nothing else because those remaining 46 smelters have no value on the platform. So it might as well try to at least fill the space of the remaining 46 smelters with something else that's actually requested.