220hotwheels Geschrieben 4. Mai Geschrieben 4. Mai Hi I'm a little puzzled about the following: A vessel pulls into port, stops. It is then moved sideways to the berth and stops. After a period of time, in this experiment 10 seconds, it is then moved back to the original track and given the instruction to continue on its merry way. All works perfectly upto the point of its continuation of its journey. Once back on the main track it simply refuses to move unless it is given the most minor of nudges. My conclusion is clearly that I have got something wrong but having spent several hours experimenting I am still no further on. I'm hoping that a fresh, and more experienced set of eyes, might be able to show me the errors of my ways. Puzzled Pete Berthing Experiment.mbp
Eggu Geschrieben 4. Mai Geschrieben 4. Mai (bearbeitet) to connect a vehicle functional to a track (in addition to the logical/physical) linking, you also need one line of Lua Code (new position of vehicle = current position of vehicle), something like that: $("Containership MBS Ituana").transformation.position = $("Containership MBS Ituana").transformation.position (this somehow imitates the manual twitching) I tried this, but unfortunately it does not work, might be there is some other issue. Your code (event blocks) do not work at all, after the delay block of 18 sec the ship should go back to the main track (via SX1), I suppose, but then you have to set the speed to a negative value (-1 instead of +1). at the end I can not see the code for re-linking the ship to the main track (this code block is near the top, where it is not needed). as last step you should re-set the speed for the ship. As alternative method you can move a proper track part, with the ship still linked and connected. For deeper investigation some comment on you code blocks would be helpful. regards, Eggu Bearbeitet 5. Mai von Eggu Korrektur
Phrontistes Geschrieben 5. Mai Geschrieben 5. Mai vor 8 Stunden schrieb Eggu: $("Containership MBS Ituana").transformation.position = $("Containership MBS Ituana").transformation.position This works sometimes but not always. In my experience, it always works to raise the object and lower it again: local pos = $("Containership MBS Ituana").transformation.position pos["z"] = pos["z"] + 1 $("Containership MBS Ituana").transformation.position = pos pos["z"] = pos["z"] - 1 $("Containership MBS Ituana").transformation.position = pos Kind regards Phrontistes
Eggu Geschrieben 5. Mai Geschrieben 5. Mai great idea, but in this case, this does not work, too. I attached the modified file: - corrections as mentioned in my first post - separate event, triggered when boat is back on main track - "twitching" with method from @Phrontistes - in addition: remember original ship position, using dummy object, restoring this position later, just before the "twitching". Might be someone will find more issues. regards, Eggu Berthing Experiment- Eggu-mod.mbp
Goetz Geschrieben 5. Mai Geschrieben 5. Mai I recommend to move the track and not the ship. The ship can stay attached to the track and no re-connect is required. Berthing Experiment track move.mbp Kind regards Goetz
Eggu Geschrieben 5. Mai Geschrieben 5. Mai I am still wondering why the "Phrontistes-method" does not work in this case. In other creations it works, it is also the method Goetz explained to me some time ago. regards, Eggu
Goetz Geschrieben 5. Mai Geschrieben 5. Mai vor 6 Minuten schrieb Eggu: why the "Phrontistes-method" does not work in this case I can't say for sure, but it may be related to the fact that one wheelbase of the ship is in front of the bow and at some distance, resting on a separate, curved bit of track: Kind regards Goetz
Roter Brummer Geschrieben 5. Mai Geschrieben 5. Mai Die absolut einfache Idee von Goetz hat mich interessiert. Deshalb hier ein neuer, absolut simpler Ansatz: Schiffsanleger.mbp HG Brummi
220hotwheels Geschrieben 5. Mai Autor Geschrieben 5. Mai Hi to all for your replies, @Eggu,@Phrontistes, @Goetz and @Roter Brummer Many thanks to you all for taking the trouble to reply to my question. I had already realised that the simple solution was to move the track on which the ship moved rather than move the ship itself. My issue there is that the port area in my layout is principally a narrow inlet, see attached screenshots, and the track in and out will be used by two other ships. I have managed to modify the track to allow the ship to berth on it's own but unless I can solve the side movement without having to move the track itself then my only solution is for the vessel to back out so far before connecting to the main track in order to proceed along the inlet to the basin area where it can turn ready to set forth on its journey. The irritation thus far is that the basic principle of operation works but it requires this final minor twitch of the ship in order to ensure it is perfectly aligned on the main track. If Lua code is the answer then I will have to look into that but whatever solution I come up with need to work every time and not just some of the time. During my deliberations I found that when the ship stopped on the main track the x,y,z, position might vary minutely one time to another. So too after the side movement with SX2, upon returning to the main track the x,y,z, positions could be different again and I can't explain this. One thing that I will try is to add a dummy track in parallel to the main berthing track. As the main track moves to berth the ship the dummy moves with it to replace the main track ready for either of the other two ships to navigate the inlet. When I want to return the container ship to the main track the dummy will be replaced by the main section. I'll let you all know if this works. Once again many thanks for your thoughts. kind regards Pete
Herman Geschrieben 5. Mai Geschrieben 5. Mai Hello Pete, I like the photos already. Must be a great layout. Nice Greetings, Herman
Phrontistes Geschrieben 5. Mai Geschrieben 5. Mai vor 33 Minuten schrieb 220hotwheels: the x,y,z, position might vary minutely one time to another Unfortunately, this is a general problem. Therefore my solution is to take the current position as a starting point and return to it. vor 31 Minuten schrieb Herman: Must be a great layout. Nice
Eggu Geschrieben 5. Mai Geschrieben 5. Mai vor 2 Stunden schrieb Goetz: I can't say for sure, but it may be related to the fact that one wheelbase of the ship is in front of the bow and at some distance, resting on a separate, curved bit of track: Yes, you are right. Replacing the big ship with a smaller one (and adjusting the trigger contact) works . Attached the modified solution (together with the other corrections I described above). Still open: modify the method to work with the big ship. regards, Eggu Berthing Experiment- small-ship.mbp
220hotwheels Geschrieben 5. Mai Autor Geschrieben 5. Mai To @Phrontistes, @Herman Hi Guys Thanks for the kind words, the screenshots show roughly half of the layout. Incidentally Herman this is the layout that started as the trial for rotating people for which you so kindly sent me the Lua script. The layout is called "On The Move" in which everything that can move does move. Its proving to be quite a challenge at times, but still lots of fun. I think I have just about sorted the berthing issue by using a dummy track section. Just a few more experiments to go and if all does go well then I'll post the full solution. Kind regards Pete
Eggu Geschrieben 5. Mai Geschrieben 5. Mai vor 29 Minuten schrieb Eggu: Still open: modify the method to work with the big ship. attached the solution for a bigger ship (and adjusted contacts and delays). It also works without restoring the original position (using the dummy_object), but it seems the ship and related contacts have to fit all to the same single track, as Goetz supposed. regards, Eggu Berthing Experiment- bigger-ship.mbp
Goetz Geschrieben 5. Mai Geschrieben 5. Mai vor 2 Stunden schrieb 220hotwheels: My issue there is that the port area in my layout is principally a narrow inlet, see attached screenshots, and the track in and out will be used by two other ships. would a replacement track work for you? Berthing Experiment double track move.mbp kind regards Goetz
220hotwheels Geschrieben 5. Mai Autor Geschrieben 5. Mai Hi Goetz It sure would and it certainly does, see attached. This reminds me of that age old saying "great minds think alike", we'll forget about the last part of that saying. Kind regards Pete Berthing Experiment.mbp
Roter Brummer Geschrieben 5. Mai Geschrieben 5. Mai Hallo zusammen, ich habe mein Bespiel so erweitert, dass das Container-Schiff sehr sanft am Kai anlegt. Ein bisschen Ausschmückung durfte auch nicht fehlen. Schiffsanleger 2.mbp Hello everyone, I have extended my example so that the container ship docks very gently at the quay. A bit of decoration was also a must. HG Brummi
220hotwheels Geschrieben 5. Mai Autor Geschrieben 5. Mai 1 hour ago, Roter Brummer said: Hallo zusammen, ich habe mein Bespiel so erweitert, dass das Container-Schiff sehr sanft am Kai anlegt. Ein bisschen Ausschmückung durfte auch nicht fehlen. Schiffsanleger 2.mbp 35.56 kB · 5 downloads Hello everyone, I have extended my example so that the container ship docks very gently at the quay. A bit of decoration was also a must. HG Brummi Hi Brummi Great solution. It's amazing that one problem can be solved in so many different ways but I suppose the basics are all very similar. The added scenery is a nice touch. Kind regards Pete Hallo Brummi Großartige Lösung. Es ist erstaunlich, dass ein Problem auf so viele verschiedene Arten gelöst werden kann, aber ich nehme an, die Grundlagen sind alle sehr ähnlich. Die hinzugefügte Kulisse ist eine nette Idee. Mit freundlichen Grüßen Pete
220hotwheels Geschrieben 10. Mai Autor Geschrieben 10. Mai On 5/5/2024 at 1:21 PM, Goetz said: would a replacement track work for you? Berthing Experiment double track move.mbp 7.71 kB · 5 downloads kind regards Goetz Good morning Goetz I wonder if I might trouble you once more in order to pick your brains, so to speak. Berthing the ship is now sorted and working perfectly. I have two distinct parts to the unloading and subsequent loading of said container ship. The first part has the ship arriving, docking and then discharging 10 containers after which it loads 12 containers before going on its merry way. The second part has the same ship returning, docking and then discharging the 12 containers before loading the 10 ready to begin the round trip all over again. So far so good. In an effort to try to distinguish between the 2 trips I introduced both a switch and separate trigger for each different arrival. So let us say that arrival 1 triggers switch 1 with the condition that the trigger is in position 2 ( the trigger is an SX1 that moves between two stops stop 1 and stop 2). Unfortunately this does not work while both sets of instructions in the EV are "live". If I deactivate one set of instructions then all is perfect and visa versa. So my question to you, with your vast knowledge of these matters., is can I program in my EV to deactivate one set of instructions whilst the other is running and then reverse this action, or do I need to rethink my EV. I have attached three screenshots of the EV to show how the process is set to work. Kind regards Pete
Eggu Geschrieben 10. Mai Geschrieben 10. Mai You can activate/deactivate a complete module manually, and by using an action event too.
220hotwheels Geschrieben 10. Mai Autor Geschrieben 10. Mai 25 minutes ago, Eggu said: You can activate/deactivate a complete module manually, and by using an action event too. Hi Eggu Thanks for that although if I'm absolutely honest I don't really understand quite what you are suggesting for the action event. To activate or deactivate manually is not an issue as can be seen in the screenshots above. Kind regards Pete
Eggu Geschrieben 10. Mai Geschrieben 10. Mai Seems I did not understand your question in full detail. I tried to answer your question vor einer Stunde schrieb 220hotwheels: can I program in my EV to deactivate one set of instructions whilst the other is running and then reverse this action 1) yes, you can activate one set of instructions by putting these instructions in one module, and then activate/deactivate the complete module with the proper action (activate/deactivate action/module). 2) you can put another set of instructions in a second module and can deactivate/active this module in the the same way, but in reverse (one module active, the other inactive, and vice versa). Regards Eggu
Goetz Geschrieben 10. Mai Geschrieben 10. Mai in addition to Eggus correct suggestions ... vor einer Stunde schrieb 220hotwheels: a switch ... for each different arrival a single switch would suffice. It has two conditions, perfect to alternate between two scenarios.
220hotwheels Geschrieben 10. Mai Autor Geschrieben 10. Mai 42 minutes ago, Eggu said: Seems I did not understand your question in full detail. I tried to answer your question 1) yes, you can activate one set of instructions by putting these instructions in one module, and then activate/deactivate the complete module with the proper action (activate/deactivate action/module). 2) you can put another set of instructions in a second module and can deactivate/active this module in the the same way, but in reverse (one module active, the other inactive, and vice versa). Regards Eggu Thanks Eggu, now that makes total sense. I can implement that without a problem, I think. Why is it that the obvious answer is always right in front of you but you just don't see it until someone points it out. Anyway, thanks again for getting back so quickly with the right solution. Pete
Empfohlene Beiträge
Erstelle ein Benutzerkonto oder melde dich an, um zu kommentieren
Du musst ein Benutzerkonto besitzen, um einen Kommentar verfassen zu können
Benutzerkonto erstellen
Neues Benutzerkonto für unsere Community erstellen.
Neues Benutzerkonto erstellenAnmelden
Du hast bereits ein Benutzerkonto? Melde dich hier an.
Jetzt anmelden