Skip to content

datalog run-time set_cycle isn't robust #2015

@excaliburtb

Description

@excaliburtb

after the change to multi-rate logging, the set_cycle method is more complicated in that it must know if it's a pre-init call or post-init so that it can set the next cycle tics according to the current sim tics or for just afterward.

What still works:

dr_group.set_cycle(0.1)
trick.add_read(1.0, 'dr_group.set_cycle(1.0)')
trick.add_read(3.0, 'dr_group.set_cycle(0.1)')

What doesn't:

ss_end = 1800.0
cs_end = 30600.0
cs_logging_break = 28796.6
ph_logging_break = 1796.6

trick.add_read(2.4,"dr_group.set_cycle(ph_logging_break)")
trick.add_read(ss_end-1.1,"dr_group.set_cycle(0.1)")
trick.add_read(ss_end+2.4,"dr_group.set_cycle(cs_logging_break)")
trick.add_read(cs_end-1.1,"dr_group.set_cycle(0.1)")
trick.stop(cs_end+2.6)

i.e.

Setting cycle to 1796.6 at time 2.4
Setting cycle to 0.1 at time 1798.9
Setting cycle to 28796.6 at time 1802.4
Setting cycle to 0.1 at time 30598.9

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions