Skip to content

Example with issues #182

@havelund

Description

@havelund

I think this example has issues:

examples/documentation/time_units_1.py

import sys
import rtamt

def monitor():
spec = rtamt.StlDiscreteTimeSpecification()
spec.name = 'Bounded-response Request-Grant'

spec.declare_var('req', 'float')
spec.declare_var('gnt', 'float')
spec.declare_var('out', 'float')

spec.spec = 'out = (req>=3) implies (eventually[0:5](gnt>=3))'

try:
    spec.parse()
    spec.update(0, [('req', 0.1), ('gnt', 0.3)])
    spec.update(1, [('req', 0.45), ('gnt', 0.12)])
    spec.update(2, [('req', 0.78), ('gnt', 0.18)])
    nb_violations = spec.sampling_violation_counter // nb_violations = 0
except rtamt.RTAMTException as err:
    print('RTAMT Exception: {}'.format(err))
    sys.exit()

if name == 'main':
# Process arguments
monitor()
}

  1. ends with }
  2. in 'nb_violations = spec.sampling_violation_counter // nb_violations = 0' // should be #
  3. it complains about: RTAMT Exception: RTAMT Exception: Bounded eventually operator not implemented in STL online monitor.

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