Skip to content

[bdsim BUG] When block is completely discrete, no integrator reference should be used #32

@mandicLuka

Description

@mandicLuka

bdsim version 1.1.2
Describe the bug
Error:

File ".../lib/python3.10/site-packages/bdsim/run_sim.py", line 918, in run_interval
out = b.output(integrator.t, b.inputs, b._x)[p.port]
UnboundLocalError: local variable 'integrator' referenced before assignment

To Reproduce
Any block diagram with only discrete blocks

Expected behavior
Simulation runs smoothly

Operating environment (please complete the following information):

  • OS: Ubuntu 22.04

Suggestion:

instead

out = b.output(integrator.t, b.inputs, b._x)[p.port]

use

out = b.output(t, b.inputs, b._x)[p.port]

as integrator is not defined here

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions