Railcraft

Railcraft

34M Downloads

Logistics

CovertJaguar opened this issue · 7 comments

commented

Is your feature request related to a problem? Please describe.
Another issue got me thinking about the possibility of requesting trains based on certain conditions. This is similar to Krapht's old logistics pipes or Factorio's Logistics bots.

Right now, this system may not make a lot of sense as there isn't really a huge need in Minecraft to move items from many locations to many locations. This will however change once the Tycoon system is added. See https://github.com/Railcraft/Railcraft/projects/13

Describe the solution you'd like
Essentially, trains would wait on a "Depot Track" until needed. Whether the "job" should start with sending a train to load up, or if a train should wait while loaded is a topic for discussion.

"Jobs" could be inspected on a "Job Board" or "Schedule Table" or some such block.

"Jobs" would be posted, for a lack of better idea, by "Semaphore" blocks. Which could be paired with an inventory or tank or redstone with a few simple conditions like fullness, etc. It will also contain a destination name of where the Train should be sent. Also possibly it should marked whether the stop is a supplier or requester.

When a Job comes in, a (random?) train waiting at a Depot Track, will be assigned a destination and sent on its way. Once it reaches its destination, the Job is marked complete and the Train sent back to the Depot. Destinations would either be marked by the Semaphore itself or a new track.

Generally, this system should be fairly easy to implement, the hardest part being the Semaphore interfaces. We already have routing so we get that for free.

Describe alternatives you've considered
The current solutions to these problems involve saturating your railway with lots of trains waiting to be unloaded. While this works, it can result in some cases needing a greater total number of trains and more overall traffic.

Additional context
Factorio Logistics Train Network Mod:
https://forums.factorio.com/viewtopic.php?f=214&t=51072
Factorio Train Supply Manager Mod:
https://mods.factorio.com/mod/train-pubsub

commented

Instead of depot tracks, I would suggest adding advanced signal systems and blocks where shunting is allowed. These shunting-allowed blocks would serve as depot tracks, and would have a restricted-speed max speed limit compared to other regular blocks (and can be reflected on future advanced signals that shows info not only about the immediate block)

commented

You'll have to define shunting, and explain what bit of code would then be responsible for asking the ScheduleMaster for Jobs and assigning them to Locomotives.

commented

instead of directly posting request to "depot tracks" and ready-to-go trains, we should leave a hook for further shunting/just-in-time train arrangement support. shunting means the arrangement (setup) of a train and removal/addition of minecarts (in a block). This would require less minecarts and can make sure only the relevant carts are dispatched. (useful if you are short in some carts or locos)

moreover, schedules are not to be assigned to locomotives but to trains. In minecraft, locomotives play a relatively smaller role compared to in other games, as vanilla promotes power tracks (golden rail) over powered minecarts for speedy minecart transport (vanilla did not fix furnace cart corner bug even when spigot's side gave a fix back in 1.8, and jeb has stated that he plans to remove furnace minecarts)

commented

Eh... All that makes the system way more complex. Assigned to trains? What does that even mean? We have no mechanic for routing trains and no plans to add one.

And you want to build some kind of switch yard mechanic? You are being too vague here for me to work with any of it.

I can see adding a way to designate trains for certain categories of jobs, but constructing them on the fly seems like too much. But maybe we could hook into train dispensers.

commented

our routing is targeting trains even though they are currently implemented by only loconotives.

we don't need to add yards right now, but we need to leave a hook for that possibility

commented

I think this is a great alternative for those who don't want to get involved with other mods extensively for dispatching (like open computers). It will allow for complex routing without simplifying away the other elements of railcraft (like setting your routes with books, etc.) It should allow this with Railcraft only as a mod.

I would definitely try this myself (was planning on doing something much more complicated to accomplish this).

commented

Oh good, I'm glad I wrote this down!