Jump to content

Recommended Posts

Hello

I would like to know if there is a "log file" resulting from the execution of a layout. 

I know that the plugin "3dts*EV-Troubleshooting" exists, but the resulting log is not complete.  For example, events that aren't executed due to the conditions not met aren't displayed in this log.

Also, the sequence of the execution of the different events on a specific timeframe is not shown.  The plugin only display the executed actions; not the test of the conditions!

==> very difficult to test the events in these conditions.

I hope one has a solution for me!

Thank you in advance.
André

Share this post


Link to post
Share on other sites

Hi André,
any plugin can only receive datas from the port. It cannot know anything about your programmed events. Especially nothing about conditions and their state.
It listens on the event port.

vor 1 Stunde schrieb ademes:

The plugin only display the executed actions

that's it. If you take a look into the wiki about available commands being sent you will see, there's nothing else. And even this is not complete (i.e. setting speed of a vehicle and some more). The only thing you can do is something like:

event:   whatever event
conditions:   whatever condition
actions: whatever action
 and add here:
             set variable:  mydebug  value:  573        (or whatever value you want to specify the whole event)
alternate action:
             set variable:  mydebug  value:  574

now the event sets either 573 or 574, at least it does something that the controller can use.
With the new version you will be able to use Lua for debugging purposes. There's one integrated by default.

regards
  Andy

Share this post


Link to post
Share on other sites
vor 14 Stunden schrieb Andy:

event:   whatever event
conditions:   whatever condition
actions: whatever action
 and add here:
             set variable:  mydebug  value:  573        (or whatever value you want to specify the whole event)
alternate action:
             set variable:  mydebug  value:  574

now the event sets either 573 or 574, at least it does something that the controller can use.
With the new version you will be able to use Lua for debugging purposes. There's one integrated by default.

regards
  Andy

Hi Andy,

I'm sorry, but I don't understand your turnover 573 / 574.  Do you mean that the "set variable" is executed even if the event's conditions aren't met?:o

Currently, I introduce a "tracing" : in each event, I have a "set variable trace = a specific text".  So I can follow the events that are executed.  With this tracing, I also add the 2 following instructions :
          set variable Trigger1 = $_Trigger1._Name
          set variable Trigger2 = $_Trigger2._Name                 and so, for the executed events, I know fo sure the value of those 2 special variables.
Regards

André

Share this post


Link to post
Share on other sites
vor einer Stunde schrieb ademes:

Do you mean that the "set variable" is executed even if the event's conditions aren't met?

Sure, never used that option? There's something that can be chosen!

 

Clipboard01.jpg

Share this post


Link to post
Share on other sites

Andy,

Of course, I know this option, but set "not met" as the condition for an event  means that the actions will take place if the answer to the question is YES.  I use it to restart a timer, for example, when the conditions aren't met.

But now, I suppose that you suggest to duplicate the events and invert them to "not met"; changing than the value for the "trace" variable will show what happened.  Is it correct?

André

Share this post


Link to post
Share on other sites

No, for what should that be good?

vor 21 Stunden schrieb ademes:

The plugin only display the executed actions; not the test of the conditions

you missed the test of the conditions. True, but not available as I already explained.
If the condition is not fulfilled, you don't see if the event happened or not. The way I did it you can catch this - with result of the condition.

Share this post


Link to post
Share on other sites

Andy,

I just discover now (!!!??) :x that the "action if not met" occurs at the same time as the "action if met" in the same event.  This is great for debugging.

Thank you a lot!

Regards

André

Share this post


Link to post
Share on other sites
vor 19 Minuten schrieb ademes:

... at the same time ...

But of course.

A condition leads to a branch in the execution of code.

Therefor, one or the other action happens right after the condition has been evaluated.

Just like a car would show up at either side of an intersection at the same time after passing the fork in the road..

Share this post


Link to post
Share on other sites
vor 2 Stunden schrieb ademes:

in the same event

 

I already realized that this could be the point, just waited for the next reply to point on this.

Share this post


Link to post
Share on other sites

Andy,

I discover that the events are executed even if nothing happens!  For example if all engines are stopped!

This is due to the internal logic that executes the events conditions, no matter if something happens on the corresponding material.  This impacts the time needed for 3d to terminate one cycle.

My suggestion is the following :

  1. any object that may be referenced in an event should be marked (0= inactive / 1= active) depending on the fact that something happens on that object

  2. when the object mark is positive (ie = 1), run the event where that object is referenced during this cycle; otherwise, leave it unused for that cycle

If you look in the attached document, you will see all "NOT MET" traces for events executed without any reason.  I call this : pollution.

Do you think that this may be incoporated into the new version?

Regards

André

tracing.zip

Share this post


Link to post
Share on other sites
Posted (edited)

There happens NO event without a reason, pollution is - like always - just human made.
In my layout happen in 22 minutes (virtual time from 3:00 to 1:00) around 100000 events, and ALL are reasonable.
There's only one thing that may happen: entering a track (street) in handmade tracks for a crossroad, when pieces of the tracks are too close together. The vehicle doesn't really enters that ghost track. But again, it's human, because of a bad track-design. At least you can check that way, if the crossroad is okay.

The events in your file are Countdown done (50) and Variable Set (60). So better check the conditions for your setting of variables. Those events happen only, if a variable really becomes set.
In some cases events can happen while you are modifying the layout, but also just because of you are causing the event then.

greetings
  Andy

ps.: and _Diesel_203 is definately moving !

Edited by Andy
ps

Share this post


Link to post
Share on other sites

Andy,

You are right!  Because I set at least one variable in both cases (MET and NOT MET), the event is always executed.  So, sorry for my remarks and suggestions.

But then, how to follow the sequence of the test conditions, without setting a variable or something else?  Or is it impossible?

André

Share this post


Link to post
Share on other sites

Don't use the trace variables that you set in events, such simple.

Share this post


Link to post
Share on other sites
Am 3.6.2019 um 15:57 schrieb Andy:


If the condition is not fulfilled, you don't see if the event happened or not. The way I did it you can catch this - with result of the condition. 

Hello Andy,

Sorry to be so stupid, but I still don't understand how you do the evaluation of a condition.  Could you be so kind to explain it in more details, please.

Thank you

André

Share this post


Link to post
Share on other sites

Sorry no, perhaps there is another one trying to explain that. What I had to say is already said.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×