Jump to content

Empfohlene Beiträge

Geschrieben

@Roter Brummer

Hi

The layout that I am working on at present is one that I started back in 2019 in V4. It has grown quite large with many level crossings, some I have completed and others await completion. Some that I thought were complete, work some of the time and not fully on other occasions.

Having done a little investigating I came across your ME05 Level crossing with car traffic. As the title was in English I immediately jumped at the possibility of further investigation. Whilst I can follow the basic principle of the operation I cannot fully understand how to implement this on my layout. I'm only just starting to see the wood for the trees with variables let alone inters!!! What I can say quite categorically is that I do find your solution to be immensely more straightforward than the one I have been using, a screenshot is attached to give you an example.

My hope therefore is that you might be so kind as to provide me with an EV in English. I'm afraid I am a typical Brit, no ear for languages or as some might say just too lazy to learn another language. I leave you to decide which of these to be most appropriate. The basic principle is clear, a train comes and the crossing barriers go down, vehicles stop until the barrier is lifted after the train has passed and then continue. All very simple until you try to put it as simply as possible into the EV.

Anyway, any assistance that you feel able to offer will be greatly appreciated.

Kind regards

Pete

Level crossing control.jpg

Geschrieben

Hi Brummi

What can I say other than brilliant. I do so very much appreciate you having done this for me.  A few days ago Goetz very kindly pointed me in the right direction for sorting out traffic light systems at junctions and so I have been busy taking full advantage of my newly found knowledge. I can now set up lights at T junctions and crossroads with 30 minutes, which is absolutely great. Best still they work!!! I hope I might be able to say the same for level crossings in a day or so.

Once again many thanks.

Kind regards

Pete

Geschrieben

Hi Brummi

As always there seems to be yet another question to ask. The iteration 'wdh'. What does this refer to please. The only time I have thus far got involved with iterations is to use them to open and close train carriages and for that the word "carriage" seems quite obvious.

Kind regards

Pete

Geschrieben (bearbeitet)

Hello Pete,

vor 20 Minuten schrieb 220hotwheels:

I can now set up lights at T junctions and crossroads with 30 minutes

and you can do the exact same thing now at railroad crossings!

The barriers work like traffic lights. Connect your road contact to a barrier and a significant portion of the V6 EV becomes obsolete.
What's left is only the section that lowers and raises the barriers.

Greets
Goetz

Bearbeitet von Goetz
Geschrieben
vor 2 Minuten schrieb 220hotwheels:

The iteration 'wdh'. What does this refer to please.

When you iterate over a list, every single element from that list is pulled and passed on to the code inside the iteration.
For that, you need a placeholder to say "thing from the list here".
The default name of that variable is Wdh, short for "Wiederholung" (= repitition)

Geschrieben
1 hour ago, Goetz said:

When you iterate over a list, every single element from that list is pulled and passed on to the code inside the iteration.
For that, you need a placeholder to say "thing from the list here".
The default name of that variable is Wdh, short for "Wiederholung" (= repitition)

On the English version it names it as "iter".

Geschrieben
2 hours ago, Goetz said:

When you iterate over a list, every single element from that list is pulled and passed on to the code inside the iteration.
For that, you need a placeholder to say "thing from the list here".
The default name of that variable is Wdh, short for "Wiederholung" (= repitition)

Hi Goetz

Thank you for both explanations. Sometimes I tend to overthink things and in doing so overlook the obvious.

Pete

51 minutes ago, simonjackson1964 said:

On the English version it names it as "iter".

Thanks Simon. As they say every little helps. It was from your example for carriage door opening that I was first drawn into the world of iteration. That example was so straightforward to follow it made me feel like a pro quite quickly. The same can be said for Goetz traffic lights solution so if I can do the same with level crossings then I shall feel as though the sky's the limit.

Pete

Geschrieben
9 hours ago, simonjackson1964 said:

Oddly I'm still trying to figure traffic lights and traffic control out, mostly because I prefer to concentrate on the trains.

Right now though I'm rapidly loosing patience with V7.

 

Your comment about loosing patience with V7 does surprise me. Whilst I can concur that nothing is ever perfect my impression of V7 thus far is nothing but positive. For the element that I am most interested in, layout design first and technical aspects second I find it a vast improvement on V6 offering much greater flexibility. Even the technical elements that I have started to get involved with, in particular the routing of road vehicles along with the implementation of traffic lights at junctions has proved to be more straightforward than I had thought, albeit with the invaluable assistance of members in the forum.

Overall I personally think V7 is absolutely great. If I had any less positive comment to make then it would not be directed at V7 but at every version and that is the lack of an informative manual that might provide a learning platform that would leave one feeling more independent and less reliant on the expertise of others. However, that said, the forum does provide a brilliant platform from which to secure new friends and at the same time move forward with problem solving. Sometimes, as in my case, advice offered can take several attempts to sink in but then I have found that most members seem to have infinite patience with we less knowledgeable folk.

Anyway that's my opinion for what is might be worth. I'll now get off my soap box, take the dog for a walk ang get some breakfast. Stick with it Simon I'm sure you will benefit in the end. You have expertise to offer that we lesser mortals need.

Pete

 

Geschrieben

@Roter Brummerand @Goetz

Good morning to you both

As seems to be the way with me, I feel I have completed my current learning task regarding the level crossing aspect by accurately following the example supplied by you, Brummi, but clearly there has to be something that I have either got wrong or totally overlooked. The only bit that I know for sure that is not quite as shown in your example refers to the "set property/variable" for both closing and opening the barriers. In your example the property shows as "automatic deceleration (target speed) =0 or automatic deceleration (target speed)=50" but I have been unable to get this precis wording. I can locate either one or the other from the drop down menu but not both.

Could this be the reason for things not working or is there something else. I have attached my result thus far and would appreciate you taking a look and letting me know what I am not seeing please.

Many thanks

Pete

traffic light and level crossing test layout.mbp

Geschrieben

Hello Pete,

vor 49 Minuten schrieb 220hotwheels:

I can locate either one or the other from the drop down menu but not both.

Because a single command can perform only one action at a time.

But that's not your problem.
In the iteration over all barriers, you're only addressing one specific object instead of every object that you receive from the iteration.

1280566484_wrongbarrier.jpg.7b22d8c81535b9df3ee7b9814484e9b2.jpg

That's the point you overlooked.

Greets
Goetz

 

Geschrieben
39 minutes ago, Goetz said:

Hello Pete,

Because a single command can perform only one action at a time.

But that's not your problem.
In the iteration over all barriers, you're only addressing one specific object instead of every object that you receive from the iteration.

1280566484_wrongbarrier.jpg.7b22d8c81535b9df3ee7b9814484e9b2.jpg

That's the point you overlooked.

Greets
Goetz

 

Hi Goetz

There is always something no matter how careful I think I've been. Anyway many thanks for spotting that. I've made the relevant change, if that is all I needed to do, but still nothing works. Perhaps I have upset the railway unions!! or just plain clumsy somewhere else in my EV. Now that won't be the first time!!

I have taken the liberty to attach my updated version. As you can see my traffic lights are working perfectly. My next experiment in that area will be to try to ensure there are no pushy drivers wanting to cross lanes at the junction and thereby incurring the wrath of the insurance companies but before that perfect level crossings await.

Pete

traffic light and level crossing test layout.mbp

Geschrieben

Hi Pete,

vor 25 Minuten schrieb 220hotwheels:

plain clumsy somewhere else in my EV

not clumsy, Pete

You cannot see your mistakes when you don't understand what you copy.

The flaw that still upsets your barrier closing routine is in the first iteration.
You (correctly) iterate over a bunch of contacts.
And then you attempt to set a vehicle property. You should set a contact property instead.

996140236_targetspeed.thumb.jpg.28963a6f24ac28ad7b79e7c60e1b29c8.jpg

 

You stand no chance to spot these errors when all you do is copy.
I copy first and understand later is tempting, but impossible.

So - don't feel sorry that you didn't spot it. You couldn't.

Also, when you defend or excuse your mistakes, you concentrate on the old. That leaves little romm for the brain to take in the new.
The key to learning is joy. Appreciate every new realisation. Take it in, look at it from all angles. Love it for what it offers. But don't fret. Ever!

So, here's some additional knowledge which I consider useful:
The first "untoward" command in an event list causes the studio to exit from this entire action list.
That's why the barriers didn't close, even though that part of your leist was now perfectly fine. 

Kind regards
Goetz

Geschrieben
2 minutes ago, Goetz said:

Hi Pete,

not clumsy, Pete

You cannot see your mistakes when you don't understand what you copy.

The flaw that still upsets your barrier closing routine is in the first iteration.
You (correctly) iterate over a bunch of contacts.
And then you attempt to set a vehicle property. You should set a contact property instead.

996140236_targetspeed.thumb.jpg.28963a6f24ac28ad7b79e7c60e1b29c8.jpg

 

You stand no chance to spot these errors when all you do is copy.
I copy first and understand later is tempting, but impossible.

So - don't feel sorry that you didn't spot it. You couldn't.

Also, when you defend or excuse your mistakes, you concentrate on the old. That leaves little romm for the brain to take in the new.
The key to learning is joy. Appreciate every new realisation. Take it in, look at it from all angles. Love it for what it offers. But don't fret. Ever!

So, here's some additional knowledge which I consider useful:
The first "untoward" command in an event list causes the studio to exit from this entire action list.
That's why the barriers didn't close, even though that part of your leist was now perfectly fine. 

Kind regards
Goetz

Many thanks for that. I tried all sorts to try to get the same wording on that particular section as in the example from Brummi but all I got was either target speed or automatic deceleration but not both. Obviously I did not know where else to find the right wording. Now I do. I am most grateful. I take your point too about looking for the new rather than concentrating on the old. The more knowledge I gain the wider will be my search method, so onwards and upwards, as they say. Progress can be very addictive once you have mastered the overall concept.

Kind regards

Pete

Geschrieben
vor 10 Minuten schrieb 220hotwheels:

I tried all sorts

See? That's what I mean by "copying is no learning method"

With understanding, you would have realised that what you want to do here is to change the property of a contact.
Because that's where you find that value: In the contact's properties:

604318410_contactproperties.jpg.7a3e4d27fd3a5610d4a70cf0a8647b00.jpg

I know I sound harsh, as if I'm telling you off.
I don't mean to.
I just can't help it when I try to clarify things.

So, once again: Please, don't feel sorry 
I'm only trying to help you understand the underlying structure.

Cheers
Goetz

Geschrieben
3 hours ago, Goetz said:

See? That's what I mean by "copying is no learning method"

With understanding, you would have realised that what you want to do here is to change the property of a contact.
Because that's where you find that value: In the contact's properties:

604318410_contactproperties.jpg.7a3e4d27fd3a5610d4a70cf0a8647b00.jpg

I know I sound harsh, as if I'm telling you off.
I don't mean to.
I just can't help it when I try to clarify things.

So, once again: Please, don't feel sorry 
I'm only trying to help you understand the underlying structure.

Cheers
Goetz

Hey, don't worry. I can take it. I do so appreciate your guidance in these matters. I have been pondering on and off during the afternoon and come to the conclusion that MBS is a bit like a murder mystery movie or book. The obvious is never the answer, you need to dig deeper and use the "little grey cells" more. Perhaps that's one reason there is no detailed manual, we are all being trained to be investigators!!!!! That so then it's not a bad thing.

Kind regards

Pete

 

  • 2 Wochen später...
Geschrieben
On 10/19/2021 at 1:07 PM, Goetz said:

Hi Pete,

not clumsy, Pete

You cannot see your mistakes when you don't understand what you copy.

The flaw that still upsets your barrier closing routine is in the first iteration.
You (correctly) iterate over a bunch of contacts.
And then you attempt to set a vehicle property. You should set a contact property instead.

996140236_targetspeed.thumb.jpg.28963a6f24ac28ad7b79e7c60e1b29c8.jpg

 

You stand no chance to spot these errors when all you do is copy.
I copy first and understand later is tempting, but impossible.

So - don't feel sorry that you didn't spot it. You couldn't.

Also, when you defend or excuse your mistakes, you concentrate on the old. That leaves little romm for the brain to take in the new.
The key to learning is joy. Appreciate every new realisation. Take it in, look at it from all angles. Love it for what it offers. But don't fret. Ever!

So, here's some additional knowledge which I consider useful:
The first "untoward" command in an event list causes the studio to exit from this entire action list.
That's why the barriers didn't close, even though that part of your leist was now perfectly fine. 

Kind regards
Goetz

On 10/19/2021 at 11:44 AM, Goetz said:

Hello Pete,

Because a single command can perform only one action at a time.

But that's not your problem.
In the iteration over all barriers, you're only addressing one specific object instead of every object that you receive from the iteration.

1280566484_wrongbarrier.jpg.7b22d8c81535b9df3ee7b9814484e9b2.jpg

That's the point you overlooked.

Greets
Goetz

 

Hi Goetz

Having got to grips with the basics of level crossing barrier control, thanks to your advice and example, I now have the challenge of adapting this to cope with multiple tracks.  Sorting it out so that any train on any track operates the barriers and controls the vehicles was not so difficult but I now seem to be getting in a bit of a muddle trying to adjust this so that the barrier will only go up and the vehicles start to move after the last train has passed.

I have taken the liberty to attach my efforts thus far which have been based on the assumption that each train would have to add '1' to the crossing barriers as they approach and a minus'1' as they leave so that when '0' is reached the barriers can go up and the vehicles start to move. Clearly I have not got this right and am not sure how to achieve this.

Might I call upon your expertise for more guidance please.

Kind regards

Pete

 

Crossing barrier EV1.jpg

Crossing barrier EV2.jpg

Geschrieben

Hello Pete,

vor 3 Minuten schrieb 220hotwheels:

Clearly I have not got this right

Your theory is spot on.
And your screenshots hold no information as to what's going wrong or why.

Greets
Goetz

Geschrieben
34 minutes ago, Goetz said:

Hello Pete,

Your theory is spot on.
And your screenshots hold no information as to what's going wrong or why.

Greets
Goetz

Hi Goetz

I've just been working through my EV in an effort to try to provide you with more detail. I began by looking at the four barriers, which I have in two groups but all four have the same variable "DECBARRIER. In carrying out this little exercise I noted that this variable is a keyword and I now wonder if it should be a number. I'll try that and see if it solves the problem. My only other thought is whether I should have all four barriers in just one group?

Kind regards

Pete

Geschrieben

Hello Pete,

vor einer Stunde schrieb 220hotwheels:

My only other thought is whether I should have all four barriers in just one group?

Grouping has no relevance in the context of EV actions.
That's why you want an identical keyword in all four barriers. It enables you to address all four in one loop.

And that also clarifies why a keyword is indeed the correct choice (and a number wouldn't be).

Anyway, I'm really excited that you still keep me in the dark. I love a good mystery and though I'm pretty certain that the gardener is the evil doer this time, I wouldn't be surprised if you come up with a plot twist at the last minute and present me with an unexpected culprit after all.

Geschrieben
31 minutes ago, Goetz said:

Hello Pete,

Grouping has no relevance in the context of EV actions.
That's why you want an identical keyword in all four barriers. It enables you to address all four in one loop.

And that also clarifies why a keyword is indeed the correct choice (and a number wouldn't be).

Anyway, I'm really excited that you still keep me in the dark. I love a good mystery and though I'm pretty certain that the gardener is the evil doer this time, I wouldn't be surprised if you come up with a plot twist at the last minute and present me with an unexpected culprit after all.

Hi Goetz

I have ben playing around with all sorts since my last message and have now got the barriers to come down when they should and go up when they should the only problem now is that each train as it triggers the action causes the barriers to go up and down so I have ended up with the equivalent of a Greek police man directing traffic and barriers going up and down as if chopping meat. It's quite comical really but for tonight I have decided that I cannot cope with any more humour, my sides just won't take any more laughter so I'll take another look tomorrow to see if I can see my next errors. 

I would be quite happy to send you a copy of this amusing operation, I feel a bit like Inspector Clouseau, but I'm not quite sure how best to do so. I can't send you the whole mbp as it's over 5250kb so I might just have to redo a test layout tomorrow and send that.

For now I will lay down my truncheon, hang up my handcuffs and call it a day!!!

Cheers

Pete

Geschrieben
17 hours ago, 220hotwheels said:

Hi Goetz

I have ben playing around with all sorts since my last message and have now got the barriers to come down when they should and go up when they should the only problem now is that each train as it triggers the action causes the barriers to go up and down so I have ended up with the equivalent of a Greek police man directing traffic and barriers going up and down as if chopping meat. It's quite comical really but for tonight I have decided that I cannot cope with any more humour, my sides just won't take any more laughter so I'll take another look tomorrow to see if I can see my next errors. 

I would be quite happy to send you a copy of this amusing operation, I feel a bit like Inspector Clouseau, but I'm not quite sure how best to do so. I can't send you the whole mbp as it's over 5250kb so I might just have to redo a test layout tomorrow and send that.

For now I will lay down my truncheon, hang up my handcuffs and call it a day!!!

Cheers

Pete

Hi Goetz

As promised I have created a small test layout using my somewhat limited knowledge in order to extend the original operations perfectly functioning level crossing barrier control, albeit for just a single track. Clearly I am either barking up the wrong tree, metaphorically speaking, or just got the right bits but in the wrong order, or totally wrong all together. 

Having taken the original system I concluded that I needed to introduce a counting mechanism in order to tell the barriers when to open and close and so I added a number variable to the barriers as well as the keyword. It seems to work by either adding one or subtracting one but the barriers still go up and down of their own free will.

So my conclusion. It's definitely the chauffeur with monkey wrench who keeps attacking my poor crossing barriers, unless of course you know something different!!!

Cheers

Pete

Level crossing barriers test layout.mbp

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 erstellen

Anmelden

Du hast bereits ein Benutzerkonto? Melde dich hier an.

Jetzt anmelden
×
×
  • Neu erstellen...