Skip to content

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

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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