#Ships only use one construction warehouse despite having multiple.

56 messages · Page 1 of 1 (latest)

fathom lance
#

Have 2 construction warehouses, both have 25000 construction materials, but all the transport ships are queuing up to only use 1 construction warehouse

fossil coyote
fathom lance
#

Multiple ships waiting, use the other instead of waiting in a long line.

fossil coyote
#

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.

fathom lance
#

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.

fossil coyote
#

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.

fathom lance
#

Time to pick up mats
Warehouse A has 2 ships waiting
Warehouse B has 3 ships waiting
Go to A

fossil coyote
# fathom lance By looking at which warehouse has the shortest queue of ships when departing.

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.

fathom lance
#

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

fossil coyote
#

The problem is the queue, how is the queue determined. By the "current" waiting warehouse right? See my first paragraph.

fathom lance
#

Once the warehouse is decided, just go there and wait

fossil coyote
#

Then you're left with your original problem.

#

All ships dispatch to the same warehouse thinking it's empty.

fathom lance
#

P ly for the first batch of ships

#

Once ships start arriving, later ships would depart for the other warehouse

#

Then it balances out

fossil coyote
#

So then why do the balancing at all?

fathom lance
#

Because, as you can see in my video, there are multiple warehouse with parts that the ships can now use

fossil coyote
#

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?

fathom lance
#

Because it's not a problem

fossil coyote
#

Then why is it a bug?

fathom lance
#

Because it's a bug

fossil coyote
#

It's not a bug, the ships are functioning properlly.

fathom lance
#

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.

fossil coyote
#

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.

fathom lance
#

No, it isnt

fossil coyote
#

I don't understand your logic then.

fathom lance
#

What are you not understanding?

fossil coyote
fathom lance
#

There is no loop, the ship just goes to whichever warehouse it saw had the shortest queue when departing.

fossil coyote
#

I already discussed that. Which it would just lead to the same "bug" which all ships dispatch to one warehouse.

fathom lance
#

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

rough pelican
#

@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.

fossil coyote
rough pelican
#

But that is still better then only using 1 warehouse. Becuase the farther will at least give construction materials.

fossil coyote
#

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?

rough pelican
#

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.

fossil coyote
#

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?

fathom lance
fossil coyote
fathom lance
#

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.

radiant holly
#

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.

lucid relic
#

I am at 500 ships now, will need over 1000 to just to cover the planets.