#Ships only use one construction warehouse despite having multiple.
56 messages · Page 1 of 1 (latest)
That sounds logical to me. It should withdraw from the first warehouse in the array until it’s empty then withdraw from the next. What’s the issue here?
Multiple ships waiting, use the other instead of waiting in a long line.
Should be easily implemented. Add a Semaphore to each warehouse that is down when in use, so other ships know to use another if available. But that's just the cloud scalability engineer in me talking, IDK how Unity handles gamemode kinda stuff.
route to whichever warehouse has the shortest queue at the time of departure.
Honestly, I think they currently only go to the closest warehouse to their destination.
When I emptied the warehouse in the video, they did switch to the other one, but returned to the first warehouse when I let it get loaded again.
Side note, a workaround for this is to have one warehouse feed the other warehouse to take advantage of the 25k buffer.
warehouses will export their construction materials with loaders set to unload.
How would that be determined?
Consider X ships are inbound, Y ships are waiting for deliveries.
Wouldn't you eventually run into a race condition, where they're always stuck in a grass-is-always-greener balancing loop?
If X ships are inbound to warehouse A, but B has Y ships inbound. What happens if X > Y? Would it just send all of X to Y?
You'd also run into the traveling salesmen problem.
What would be the "shortest" path from each construction pad to each warehouse.
I don't think some indie devs want to take on literally the toughest problem in computer science for a game.
So I think your idea doesn't hold water.
By looking at which warehouse has the shortest queue of ships when departing.
Time to pick up mats
Warehouse A has 2 ships waiting
Warehouse B has 3 ships waiting
Go to A
OK, so consider this. Warehouse X has 4 ships currently. Warehouse Y has 5 ships currently. Transport ship 1 needs material. Clearly it should go to X, right? OK, but it's very far away. So now, Warehouse X has 5 ships, and Warehouse Y has 5 ships. Ship 2 needs a place to go. So it picks one at random. Goes to X. But now, the queue is full. So now it should send it to Y? Now Y's full. It shoulds send it to X? X is full.. Repeat forever.
Eventually your logic gets stuck in a loop. This is a problem of the dining philospher. Each ship doesn't know what each other ship is doing. And each ship isn't comunicating what it's doing to the warehouse. A simple counter isn't sufficent, since if you incerment it when the ship is above, it could lead to the same problem you started with, if you dispatch 20 ships to the same warehouse thinking it's currently empty.
You're making it way more complex than it needs to be. Ship needs to depart, just see which warehouse has shortest queue. Go there.
Nothing else needed, no other checks needed, no loops, no confusion
The problem is the queue, how is the queue determined. By the "current" waiting warehouse right? See my first paragraph.
Once the warehouse is decided, just go there and wait
Then you're left with your original problem.
All ships dispatch to the same warehouse thinking it's empty.
P ly for the first batch of ships
Once ships start arriving, later ships would depart for the other warehouse
Then it balances out
So then why do the balancing at all?
Because, as you can see in my video, there are multiple warehouse with parts that the ships can now use
But you didn't answer my question. What's the purpose of doing the balancing at all if your orignial problem is going to happen anyway due to the queue being "empty" at the time of dispatch?
Because it's not a problem
Then why is it a bug?
Because it's a bug
It's not a bug, the ships are functioning properlly.
Hence me saying they should go to both warehouses I stead of queueing at one
When departing, see which warehouse has shortest queue, go there.
Yes, but the logic for how it should determine to go which warehouse usually leads down the path of still causing the bug in the first place.
No, it isnt
I don't understand your logic then.
What are you not understanding?
How is the problem of ship flip-flopping and eventually stuck in a loop not going to occur with your balancing code/
There is no loop, the ship just goes to whichever warehouse it saw had the shortest queue when departing.
I already discussed that. Which it would just lead to the same "bug" which all ships dispatch to one warehouse.
Ships take tome to fly, take time to load, take time to u load.
Even if all ships get assigned to the same warehouse when taking off the first time, any further visits would ot because the ships get space out and will eventually have compeletey different arrival times
@fossil coyote The warehouses keep track which ships are going to queue and the ships only check once to choose which warehouse they want to use. That resolves your issue.
Right, so it has a list of 6 ships going to one warehouse. Right? So it says it's full, don't send ships here. But it still needs material. What happens when 12 ships are about 2 warehouses. It will refuse to send ships there. Even though you still need material. So now you're just again stuck in a loop. I need more ships, can't send ships. I need more ships. Can't send ships.
But that is still better then only using 1 warehouse. Becuase the farther will at least give construction materials.
No it's not. Because currently, the logic is "if I have material for the ships and the ships in the queue, send me ships."
Why incorporate the logic of solving the P = NP problem, when you can just increase the throughput of the warehouse?
But You can't increase the throughput of a warehouse. Zytukin"s factory is big enough that 1 warehouse doesn't have enough throughput for what he wants to create.
The devs could, which is what you're suggesting, they either solve what is it now, 3 of the hardest mathematical problems to solve indie building game problem, instead of just allowing more ships to tap one warehouse?
Where is is your count of a max of 6 coming from?
Just an arbitary number used for demonstration purposes.
It's really not a hard problem at all to solve, numerous games already have.
ie, factorio. Give several stations the same name, like "Station A". When a train departs to go to Station A, it checks to see which ones are empty and goes to the closest one. It doesn't matter what else happens, the destination is set and it goes there. If another train does as well, then one of them just has to wait. If you launch 10 trains at once then yea, they all go to the same station, but after that they won't because they get spaced out due to time spent travelling, loading, and unloading. The game won't recalculate the trains route and send it to a different station unless you force it too.
Workers and Reaources, a road vehicles route is set when departing. Changes to the roads, except deleting them, are completely ignored.
Rise Of Industry, a vehicles path to the destination is set upon departure and even deleting roads won't cause the game to recalculate its route, the vehicle still drives the route it was assigned to the assigned destination.
prior to the update, a limited number of ships would be assigned at launch. Haven't tested it myself, but it looks like from what you're saying they changed it to an unlimited maount. but then it's still getting assigned at launch.
I am at 500 ships now, will need over 1000 to just to cover the planets.