Skip to content

Resolve "Create SFG"

Ivar Härnqvist requested to merge 12-create-sfg into develop

This merge will:

  • add ability to "shallow-copy" graph components, which is required to implement the SFG constructor
  • redesign Port/OutputPort/InputPort interface to simplify implementation and make it easier to implement operator overloading for connecting signals (only InputPort has a connect method)
  • update logic between Signal constructor/set_source/set_detination and InputPort.connect/add_signal/remove_signal, etc.
  • add SignalSourceProvider interface for Operation and OutputPort that forces AbstractOperation to implement a method that provides its "main" signal source if available, making it possible to pass either an OutputPort or Operation as a signal source to various operation constructors
  • implement SFG constructor according to the current class diagram
  • fix order of methods in various classes to match class diagram
  • fix order of constructor arguments in InputPort/OutputPort to match class diagram
  • move input source connection code from concrete operations to AbstractOperation to reduce boilerplate in user-defined operations
  • use the public interface of base classes in derived classes instead of relying on implementation details for operations
  • change param name from "coefficient" to "value" in some core operations
  • add some tests for SFG construction
  • fix some small typos/style errors in comments and syntax
  • fix some tests relying on AssertionError being raised, rather than any Exception
  • change Signal.is_connected to Signal.dangling to match class diagram
  • update implementation of AbstractOperation.split() and AbstractOperation.evaluate_output()
  • add implementation of evaluate() and evaluate_output() to sfg (needs testing)
Edited by Ivar Härnqvist

Merge request reports