Opened 11 years ago

Closed 7 years ago

#2226 closed enhancement (fixed)

Improve event logging

Reported by: Francesco Casella Owned by: Lennart Ochel
Priority: high Milestone: 1.12.0
Component: Backend Version: trunk
Keywords: Cc:

Description (last modified by Francesco Casella)

the -lv LOG_ZEROCROSSINGS flag produces output of dubious usefulness, it should probably be removed.

Furthermore, LOG_EVENTS should output the following information

  • time of the event occurrence
  • type of event (time or state)
  • the condition triggering the event

LOG_EVENTS_V should also report this additional information

  • for zero-crossing triggered events, the value of the crossing function residual, and, if possible, the number of iterations of the zero-crossing root finder
  • any discrete variable that changes its value
  • the beginning of a new event iteration

Change History (12)

comment:1 by Francesco Casella, 11 years ago

Description: modified (diff)

comment:2 by Lennart Ochel, 11 years ago

Status: newaccepted

comment:3 by Lennart Ochel, 11 years ago

I have removed the strange LOG_ZEROCROSSINGS messages. Now they occur only in the developer dumps. Maybe I will remove them completely, later.

Also I have changed the LOG_EVENTS dump as you proposed.
The following model produces time and state event:

model Test1
   discrete Real next_t;
   discrete Real next_t2;
equation
   when time >= pre(next_t) then
     next_t = pre(next_t)+1;
   end when;
   when sample(0.5, 1.0) then
     next_t2 = pre(next_t2)+1;
   end when;
initial equation
   next_t = 1;
   annotation (experiment(StopTime=10));
end Test1;

The new dump is the following:

LOG_EVENTS        | info    | time event at time 0.5
|                 | |       | | [1] sample(0.5, 1)
LOG_EVENTS        | info    | state event at time 1
|                 | |       | | [0] time >= pre(next_t)
LOG_EVENTS        | info    | time event at time 1.5
|                 | |       | | [1] sample(0.5, 1)
LOG_EVENTS        | info    | state event at time 2
|                 | |       | | [0] time >= pre(next_t)
[…]

Further improvements will follow soon.

comment:4 by Martin Sjölund, 11 years ago

Milestone: 1.9.01.9.1

Postponed until 1.9.1

comment:5 by Martin Sjölund, 10 years ago

Milestone: 1.9.11.9.2

This ticket was not closed for 1.9.1, which has now been released. It was batch modified for milestone 1.9.2 (but maybe an empty milestone was more appropriate; feel free to change it).

comment:6 by Martin Sjölund, 10 years ago

Milestone: 1.9.21.9.3

Milestone changed to 1.9.3 since 1.9.2 was released.

comment:7 by Martin Sjölund, 9 years ago

Milestone: 1.9.31.9.4

Moved to new milestone 1.9.4

comment:8 by Martin Sjölund, 9 years ago

Milestone: 1.9.41.9.5

Milestone pushed to 1.9.5

comment:9 by Martin Sjölund, 9 years ago

Milestone: 1.9.51.10.0

Milestone renamed

comment:10 by Martin Sjölund, 8 years ago

Milestone: 1.10.01.11.0

Ticket retargeted after milestone closed

comment:11 by Martin Sjölund, 8 years ago

Milestone: 1.11.01.12.0

Milestone moved to 1.12.0 due to 1.11.0 already being released.

comment:12 by Francesco Casella, 7 years ago

Resolution: fixed
Status: acceptedclosed

The output of event logging is now just fine, and has been so since comment:3

Note: See TracTickets for help on using tickets.