Kstudent Posted February 25, 2015 Share Posted February 25, 2015 Dear members, I could really use your help with the following for my research project: A server that is capable to processing parts in both directions (I can only find tandem servers)? To be specific a waterway lock that is able to transfer ships from one direction to the other. Besides that, there are multiple ship sizes, so server capacity fluctuates over time, depending on entering ships. Any ideas?? Thank you in advance! Link to comment Share on other sites More sharing options...
tulach Posted February 25, 2015 Share Posted February 25, 2015 I would think about the lock as like it is a vehicle. Basically lock is nothing but an elevator. Use two nodes (one for top level of lock and one for bottom). Then use vehicle to transfer entities from one node to another. You can use Evaluating transport request add-on process to check if your ship that is about to enter the lock (be picked up by vehicle) is not bigger than remaining capacity of lock. There is a simbit dealing with this, I bet. For this you would probably need to subclass vehicle definition and add some state to vehicle and update it each time you load or unload a ship into the lock. Link to comment Share on other sites More sharing options...
dsturrock Posted February 25, 2015 Share Posted February 25, 2015 Petr, Good idea to think of it as an elevator. Look at SimBit: Simple Elevator Object for an example. Link to comment Share on other sites More sharing options...
tulach Posted February 25, 2015 Share Posted February 25, 2015 I created a simple model (not visually appealing) to ilusterate my Idea. Especially to solve the problem with different sizes of ships. WaterLock.spfx Link to comment Share on other sites More sharing options...
Kstudent Posted February 26, 2015 Author Share Posted February 26, 2015 Many thanks for all your input and ideas! It is so clever to look like it is an elevator, going to try this right away! Not sure whether I completely understand (just a novice user..) how to implement the add-on process to check for remaining capacity, but that is exactly how the model should look like! Thanks for creating a simple model!! Kindest regards, Kim Link to comment Share on other sites More sharing options...
tulach Posted February 26, 2015 Share Posted February 26, 2015 Just take a look somehere in help or documentation about Evaluating Transport Request, if token used in this process (so you have to search for tokens as well) is assigned value 0 or less, the entity trying to reserve transport on this vehicle is rejected and have to wait for another try. This is just a simple model, for production use (models with multiple locks) it make a good sense to use object approach as David showed in Elevator Simbit. That way you would be able to have logic in one place. Link to comment Share on other sites More sharing options...
dsturrock Posted February 26, 2015 Share Posted February 26, 2015 Here is Petr's model with some animation to make it look more like a lock.WaterLockByTulach.spfx Link to comment Share on other sites More sharing options...
Kstudent Posted February 26, 2015 Author Share Posted February 26, 2015 I could have never completely figured this out on my own, so many many thanks!! Kindest regards, Kim Link to comment Share on other sites More sharing options...
Recommended Posts