Parcourir la source

Latexify now works better

Randy Paredis il y a 4 ans
Parent
commit
f98022172c

+ 355 - 0
examples/AGV/flattened.gv

@@ -0,0 +1,355 @@
+// CBD model of the AGVVirtual block
+// Created with CBD.converters.CBDDraw
+digraph model {
+ splines=ortho;
+ label=<<B>AGVVirtual (AGVVirtual)</B>>;
+ labelloc="t";
+ fontsize=20;
+ node_140486831185200 [label="PathBlock\n(environment)", shape=box];
+ inter_140486831184480_OUT1 -> node_140486831185200 [headlabel="x", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831266208_OUT1 -> node_140486831185200 [headlabel="y", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831185200_color [shape=point, width=0.01, height=0.01];
+ node_140486831185200 -> inter_140486831185200_color [taillabel="color", arrowtail="invempty", arrowhead="none", dir=both];
+ inter_140486831185200_offset [shape=point, width=0.01, height=0.01];
+ node_140486831185200 -> inter_140486831185200_offset [taillabel="offset", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831185344 [label="PositionCollectorBlock\n(plot)", shape=box];
+ inter_140486831184480_OUT1 -> node_140486831185344 [headlabel="X", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831266208_OUT1 -> node_140486831185344 [headlabel="Y", arrowhead="normal", arrowtail="none", dir=both];
+ node_140486831265680 [label="SignalCollectorBlock\n(errorPlot)", shape=box];
+ inter_140486831266016_OUT1 -> node_140486831265680 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ node_140486831265776 [label="SignalCollectorBlock\n(headingPlot)", shape=box];
+ inter_140486831184576_OUT1 -> node_140486831265776 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ node_140486831265824 [label="IntegratorBlock\n(int)", shape=box];
+ inter_140486831185200_offset -> node_140486831265824 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831265872_OUT1 -> node_140486831265824 [headlabel="IC", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831265920_OUT1 -> node_140486831265824 [headlabel="delta_t", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831265824_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831265824 -> inter_140486831265824_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831265872 [label=" ConstantBlock\n(zero)\n0", shape=ellipse];
+ inter_140486831265872_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831265872 -> inter_140486831265872_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831265920 [label=" ConstantBlock\n(delta)\n0.2", shape=ellipse];
+ inter_140486831265920_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831265920 -> inter_140486831265920_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831265968 [label="IntegratorBlock\n(intH)", shape=box];
+ inter_140486831265872_OUT1 -> node_140486831265968 [headlabel="IC", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831265920_OUT1 -> node_140486831265968 [headlabel="delta_t", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831184576_OUT1 -> node_140486831265968 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831265968_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831265968 -> inter_140486831265968_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831266016 [label="ProductBlock\n(mult)", shape=box];
+ inter_140486831265968_OUT1 -> node_140486831266016 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831265824_OUT1 -> node_140486831266016 [headlabel="IN2", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831266016_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831266016 -> inter_140486831266016_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140487039590560 [label=" ConstantBlock\n(Controller.v)\n0.05", shape=ellipse];
+ inter_140487039590560_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140487039590560 -> inter_140487039590560_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831183088 [label=" ConstantBlock\n(Controller.threshold)\n-50", shape=ellipse];
+ inter_140486831183088_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831183088 -> inter_140486831183088_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831183136 [label=" ConstantBlock\n(Controller.friction)\n1", shape=ellipse];
+ inter_140486831183136_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831183136 -> inter_140486831183136_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831183184 [label="AdderBlock\n(Controller.sum)", shape=box];
+ inter_140486831266304_OUT1 -> node_140486831183184 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831183088_OUT1 -> node_140486831183184 [headlabel="IN2", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831183184_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831183184 -> inter_140486831183184_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831183280 [label="ProductBlock\n(Controller.mult)", shape=box];
+ inter_140486831266832_OUT1 -> node_140486831183280 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831183136_OUT1 -> node_140486831183280 [headlabel="IN2", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831183280_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831183280 -> inter_140486831183280_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831183376 [label=" ConstantBlock\n(Controller.PID.Kp)\n0.0", shape=ellipse];
+ inter_140486831183376_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831183376 -> inter_140486831183376_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831183616 [label=" ConstantBlock\n(Controller.PID.Ki)\n0.0", shape=ellipse];
+ inter_140486831183616_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831183616 -> inter_140486831183616_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831183664 [label=" ConstantBlock\n(Controller.PID.Kd)\n0.0", shape=ellipse];
+ inter_140486831183664_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831183664 -> inter_140486831183664_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831183712 [label="IntegratorBlock\n(Controller.PID.int)", shape=box];
+ inter_140486831266736_OUT1 -> node_140486831183712 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831183856_OUT1 -> node_140486831183712 [headlabel="delta_t", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831184096_OUT1 -> node_140486831183712 [headlabel="IC", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831183712_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831183712 -> inter_140486831183712_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831183760 [label="DerivatorBlock\n(Controller.PID.deriv)", shape=box];
+ inter_140486831266736_OUT1 -> node_140486831183760 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831183856_OUT1 -> node_140486831183760 [headlabel="delta_t", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831184096_OUT1 -> node_140486831183760 [headlabel="IC", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831183760_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831183760 -> inter_140486831183760_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831183856 [label=" ConstantBlock\n(Controller.PID.delta_t)\n0.2", shape=ellipse];
+ inter_140486831183856_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831183856 -> inter_140486831183856_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831183904 [label="ProductBlock\n(Controller.PID.prod)", shape=box];
+ inter_140486831183376_OUT1 -> node_140486831183904 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831266736_OUT1 -> node_140486831183904 [headlabel="IN2", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831183904_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831183904 -> inter_140486831183904_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831184000 [label="ProductBlock\n(Controller.PID.imult)", shape=box];
+ inter_140486831183712_OUT1 -> node_140486831184000 [headlabel="IN2", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831183616_OUT1 -> node_140486831184000 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831184000_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831184000 -> inter_140486831184000_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831184048 [label="ProductBlock\n(Controller.PID.dmult)", shape=box];
+ inter_140486831183760_OUT1 -> node_140486831184048 [headlabel="IN2", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831183664_OUT1 -> node_140486831184048 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831184048_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831184048 -> inter_140486831184048_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831184096 [label=" ConstantBlock\n(Controller.PID.zero)\n0", shape=ellipse];
+ inter_140486831184096_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831184096 -> inter_140486831184096_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831183952 [label="AdderBlock\n(Controller.PID.sum1)", shape=box];
+ inter_140486831183904_OUT1 -> node_140486831183952 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831184000_OUT1 -> node_140486831183952 [headlabel="IN2", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831183952_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831183952 -> inter_140486831183952_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831184192 [label="AdderBlock\n(Controller.PID.sum2)", shape=box];
+ inter_140486831183952_OUT1 -> node_140486831184192 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831184048_OUT1 -> node_140486831184192 [headlabel="IN2", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831184192_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831184192 -> inter_140486831184192_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831266736 [label="WireBlock\n(Controller.PID.IN1)", shape=box];
+ inter_140486831183184_OUT1 -> node_140486831266736 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831266736_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831266736 -> inter_140486831266736_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831266832 [label="WireBlock\n(Controller.PID.OUT1)", shape=box];
+ inter_140486831184192_OUT1 -> node_140486831266832 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831266832_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831266832 -> inter_140486831266832_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831266304 [label="WireBlock\n(Controller.color)", shape=box];
+ inter_140486831185200_color -> node_140486831266304 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831266304_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831266304 -> inter_140486831266304_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831266400 [label="WireBlock\n(Controller.heading)", shape=box];
+ inter_140486831183280_OUT1 -> node_140486831266400 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831266400_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831266400 -> inter_140486831266400_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831266496 [label="WireBlock\n(Controller.velocity)", shape=box];
+ inter_140487039590560_OUT1 -> node_140486831266496 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831266496_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831266496 -> inter_140486831266496_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831184240 [label="ProductBlock\n(StaticPlant.steeringMult)", shape=box];
+ inter_140486831183040_OUT1 -> node_140486831184240 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831184672_OUT1 -> node_140486831184240 [headlabel="IN2", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831184240_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831184240 -> inter_140486831184240_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831184672 [label=" ConstantBlock\n(StaticPlant.WheelAxis)\n0.18", shape=ellipse];
+ inter_140486831184672_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831184672 -> inter_140486831184672_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831184624 [label=" ConstantBlock\n(StaticPlant.half)\n0.5", shape=ellipse];
+ inter_140486831184624_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831184624 -> inter_140486831184624_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831184720 [label="ProductBlock\n(StaticPlant.halfSteeringMult)", shape=box];
+ inter_140486831184240_OUT1 -> node_140486831184720 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831184624_OUT1 -> node_140486831184720 [headlabel="IN2", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831184720_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831184720 -> inter_140486831184720_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831184816 [label="AdderBlock\n(StaticPlant.leftSum)", shape=box];
+ inter_140486831182944_OUT1 -> node_140486831184816 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831184912_OUT1 -> node_140486831184816 [headlabel="IN2", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831184816_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831184816 -> inter_140486831184816_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831184864 [label="AdderBlock\n(StaticPlant.rightSum)", shape=box];
+ inter_140486831182944_OUT1 -> node_140486831184864 [headlabel="IN2", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831184720_OUT1 -> node_140486831184864 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831184864_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831184864 -> inter_140486831184864_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831184912 [label="NegatorBlock\n(StaticPlant.neg)", shape=box];
+ inter_140486831184720_OUT1 -> node_140486831184912 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831184912_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831184912 -> inter_140486831184912_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831184960 [label="ProductBlock\n(StaticPlant.leftMult)", shape=box];
+ inter_140486831184816_OUT1 -> node_140486831184960 [headlabel="IN2", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831185104_OUT1 -> node_140486831184960 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831184960_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831184960 -> inter_140486831184960_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831185056 [label="ProductBlock\n(StaticPlant.rightMult)", shape=box];
+ inter_140486831184864_OUT1 -> node_140486831185056 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831185104_OUT1 -> node_140486831185056 [headlabel="IN2", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831185056_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831185056 -> inter_140486831185056_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831185104 [label=" ConstantBlock\n(StaticPlant.WheelRadius)\n66.66666666666667", shape=ellipse];
+ inter_140486831185104_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831185104 -> inter_140486831185104_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831185008 [label=" ClampBlock\n(StaticPlant.leftClamp)\n[-11.868238913562223, 11.868238913562223]", shape=box];
+ inter_140486831184960_OUT1 -> node_140486831185008 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831185008_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831185008 -> inter_140486831185008_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831185152 [label=" ClampBlock\n(StaticPlant.rightClamp)\n[-11.868238913562223, 11.868238913562223]", shape=box];
+ inter_140486831185056_OUT1 -> node_140486831185152 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831185152_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831185152 -> inter_140486831185152_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831182944 [label="WireBlock\n(StaticPlant.velocity)", shape=box];
+ inter_140486831266496_OUT1 -> node_140486831182944 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831182944_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831182944 -> inter_140486831182944_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831183040 [label="WireBlock\n(StaticPlant.steering)", shape=box];
+ inter_140486831266400_OUT1 -> node_140486831183040 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831183040_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831183040 -> inter_140486831183040_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831183424 [label="WireBlock\n(StaticPlant.phiLdot)", shape=box];
+ inter_140486831185008_OUT1 -> node_140486831183424 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831183424_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831183424 -> inter_140486831183424_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831183520 [label="WireBlock\n(StaticPlant.phiRdot)", shape=box];
+ inter_140486831185152_OUT1 -> node_140486831183520 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831183520_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831183520 -> inter_140486831183520_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831185296 [label="IntegratorBlock\n(odo.int_w)", shape=box];
+ inter_140486831185872_OUT1 -> node_140486831185296 [headlabel="delta_t", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831264144_OUT1 -> node_140486831185296 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831265728_OUT1 -> node_140486831185296 [headlabel="IC", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831185296_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831185296 -> inter_140486831185296_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831185872 [label=" ConstantBlock\n(odo.delta)\n0.2", shape=ellipse];
+ inter_140486831185872_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831185872 -> inter_140486831185872_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831264864 [label="IntegratorBlock\n(odo.int_x)", shape=box];
+ inter_140486831185872_OUT1 -> node_140486831264864 [headlabel="delta_t", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831267264_OUT1 -> node_140486831264864 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831264912_OUT1 -> node_140486831264864 [headlabel="IC", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831264864_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831264864 -> inter_140486831264864_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831264624 [label="IntegratorBlock\n(odo.int_y)", shape=box];
+ inter_140486831185872_OUT1 -> node_140486831264624 [headlabel="delta_t", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831267168_OUT1 -> node_140486831264624 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831264960_OUT1 -> node_140486831264624 [headlabel="IC", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831264624_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831264624 -> inter_140486831264624_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831264912 [label=" ConstantBlock\n(odo.init_x)\n0", shape=ellipse];
+ inter_140486831264912_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831264912 -> inter_140486831264912_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831264960 [label=" ConstantBlock\n(odo.init_y)\n-0.3", shape=ellipse];
+ inter_140486831264960_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831264960 -> inter_140486831264960_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831265728 [label=" ConstantBlock\n(odo.init_w)\n0", shape=ellipse];
+ inter_140486831265728_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831265728 -> inter_140486831265728_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831263856 [label=" ConstantBlock\n(odo.base.r)\n0.03", shape=ellipse];
+ inter_140486831263856_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831263856 -> inter_140486831263856_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831264384 [label=" GenericBlock\n(odo.base.sin)\nsin", shape=box];
+ inter_140486831266976_OUT1 -> node_140486831264384 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831264384_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831264384 -> inter_140486831264384_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831264432 [label=" GenericBlock\n(odo.base.cos)\ncos", shape=box];
+ inter_140486831266976_OUT1 -> node_140486831264432 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831264432_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831264432 -> inter_140486831264432_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831264480 [label="AdderBlock\n(odo.base.B-OUZVyqj9DiQNmVnVL9-16)", shape=box];
+ inter_140486831266688_OUT1 -> node_140486831264480 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831267072_OUT1 -> node_140486831264480 [headlabel="IN2", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831264480_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831264480 -> inter_140486831264480_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831264576 [label=" ConstantBlock\n(odo.base.half)\n0.5", shape=ellipse];
+ inter_140486831264576_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831264576 -> inter_140486831264576_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831264528 [label="ProductBlock\n(odo.base.div2)", shape=box];
+ inter_140486831264576_OUT1 -> node_140486831264528 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831264480_OUT1 -> node_140486831264528 [headlabel="IN2", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831264528_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831264528 -> inter_140486831264528_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831264672 [label="ProductBlock\n(odo.base.mulX)", shape=box];
+ inter_140486831264528_OUT1 -> node_140486831264672 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831264768_OUT1 -> node_140486831264672 [headlabel="IN2", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831264672_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831264672 -> inter_140486831264672_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831264720 [label="ProductBlock\n(odo.base.mulY)", shape=box];
+ inter_140486831264528_OUT1 -> node_140486831264720 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831264816_OUT1 -> node_140486831264720 [headlabel="IN2", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831264720_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831264720 -> inter_140486831264720_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831264768 [label="ProductBlock\n(odo.base.mulSin)", shape=box];
+ inter_140486831264384_OUT1 -> node_140486831264768 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831263856_OUT1 -> node_140486831264768 [headlabel="IN2", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831264768_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831264768 -> inter_140486831264768_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831264816 [label="ProductBlock\n(odo.base.mulCos)", shape=box];
+ inter_140486831263856_OUT1 -> node_140486831264816 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831264432_OUT1 -> node_140486831264816 [headlabel="IN2", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831264816_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831264816 -> inter_140486831264816_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831266688 [label="WireBlock\n(odo.base.phiLdot)", shape=box];
+ inter_140486831184288_OUT1 -> node_140486831266688 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831266688_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831266688 -> inter_140486831266688_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831266976 [label="WireBlock\n(odo.base.heading)", shape=box];
+ inter_140486831185296_OUT1 -> node_140486831266976 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831266976_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831266976 -> inter_140486831266976_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831267072 [label="WireBlock\n(odo.base.phiRdot)", shape=box];
+ inter_140486831184384_OUT1 -> node_140486831267072 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831267072_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831267072 -> inter_140486831267072_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831267168 [label="WireBlock\n(odo.base.ydot)", shape=box];
+ inter_140486831264672_OUT1 -> node_140486831267168 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831267168_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831267168 -> inter_140486831267168_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831267264 [label="WireBlock\n(odo.base.xdot)", shape=box];
+ inter_140486831264720_OUT1 -> node_140486831267264 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831267264_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831267264 -> inter_140486831267264_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831265056 [label=" ConstantBlock\n(odo.OCegTr4naEkMIVMNTQIZ-73.rneg)\n-0.03", shape=ellipse];
+ inter_140486831265056_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831265056 -> inter_140486831265056_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831265392 [label="NegatorBlock\n(odo.OCegTr4naEkMIVMNTQIZ-73.OCegTr4naEkMIVMNTQIZ-39)", shape=box];
+ inter_140486831264048_OUT1 -> node_140486831265392 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831265392_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831265392 -> inter_140486831265392_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831265488 [label="AdderBlock\n(odo.OCegTr4naEkMIVMNTQIZ-73.OCegTr4naEkMIVMNTQIZ-43)", shape=box];
+ inter_140486831263952_OUT1 -> node_140486831265488 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831265392_OUT1 -> node_140486831265488 [headlabel="IN2", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831265488_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831265488 -> inter_140486831265488_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831265584 [label="ProductBlock\n(odo.OCegTr4naEkMIVMNTQIZ-73.multr)", shape=box];
+ inter_140486831265488_OUT1 -> node_140486831265584 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831265056_OUT1 -> node_140486831265584 [headlabel="IN2", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831265584_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831265584 -> inter_140486831265584_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831265632 [label=" ConstantBlock\n(odo.OCegTr4naEkMIVMNTQIZ-73.invd)\n5.555555555555555", shape=ellipse];
+ inter_140486831265632_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831265632 -> inter_140486831265632_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831265536 [label="ProductBlock\n(odo.OCegTr4naEkMIVMNTQIZ-73.multd)", shape=box];
+ inter_140486831265632_OUT1 -> node_140486831265536 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831265584_OUT1 -> node_140486831265536 [headlabel="IN2", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831265536_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831265536 -> inter_140486831265536_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831263952 [label="WireBlock\n(odo.OCegTr4naEkMIVMNTQIZ-73.phiLdot)", shape=box];
+ inter_140486831184288_OUT1 -> node_140486831263952 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831263952_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831263952 -> inter_140486831263952_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831264048 [label="WireBlock\n(odo.OCegTr4naEkMIVMNTQIZ-73.phiRdot)", shape=box];
+ inter_140486831184384_OUT1 -> node_140486831264048 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831264048_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831264048 -> inter_140486831264048_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831264144 [label="WireBlock\n(odo.OCegTr4naEkMIVMNTQIZ-73.wdot)", shape=box];
+ inter_140486831265536_OUT1 -> node_140486831264144 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831264144_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831264144 -> inter_140486831264144_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831184288 [label="WireBlock\n(odo.phiLdot)", shape=box];
+ inter_140486831183424_OUT1 -> node_140486831184288 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831184288_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831184288 -> inter_140486831184288_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831184384 [label="WireBlock\n(odo.phiRdot)", shape=box];
+ inter_140486831183520_OUT1 -> node_140486831184384 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831184384_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831184384 -> inter_140486831184384_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831184480 [label="WireBlock\n(odo.x)", shape=box];
+ inter_140486831264864_OUT1 -> node_140486831184480 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831184480_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831184480 -> inter_140486831184480_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831184576 [label="WireBlock\n(odo.heading)", shape=box];
+ inter_140486831185296_OUT1 -> node_140486831184576 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831184576_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831184576 -> inter_140486831184576_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_140486831266208 [label="WireBlock\n(odo.y)", shape=box];
+ inter_140486831264624_OUT1 -> node_140486831266208 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_140486831266208_OUT1 [shape=point, width=0.01, height=0.01];
+ node_140486831266208 -> inter_140486831266208_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+
+}

examples/LotkeVolterra/diagram.io → examples/LotkeVolterra/diagram.drawio


+ 24 - 19
examples/LotkeVolterra/diagram_experiment.py

@@ -6,6 +6,7 @@ from diagram import *
 from CBD.simulator import Simulator
 from CBD.realtime.plotting import plot, LinePlot
 from CBD.converters.latexify import CBD2Latex
+from CBD.converters.CBDDraw import draw
 
 DELTA_T = 0.01
 END = 10.0
@@ -16,24 +17,28 @@ cbd.addFixedRateClock("clock", DELTA_T)
 cbd.addConnection("clock-clock", "x", output_port_name="delta", input_port_name='delta_t')
 cbd.addConnection("clock-clock", "y", output_port_name="delta", input_port_name='delta_t')
 
-# cbd.flatten()
-c2l = CBD2Latex(cbd)
-c2l.simplify()
-print(c2l.render())
-
-# cbd = SinGen("SinGen")
+cbd.flatten()
+draw(cbd, "lv.gv")
 
-# Run the Simulation
-sim = Simulator(cbd)
-sim.setDeltaT(DELTA_T)
-sim.run(END)
 
-# TODO: Process Your Simulation Results
-import matplotlib.pyplot as plt
-fig = plt.figure()
-ax = fig.add_subplot(111)
-plot(cbd.findBlock("rabbits")[0], (fig, ax), LinePlot(color='red', label='rabbits'))
-plot(cbd.findBlock("foxes")[0], (fig, ax), LinePlot(color='blue', label='foxes'))
-# plot(cbd.findBlock("mySin")[0], (fig, ax), LinePlot(color='red'))
-ax.legend()
-plt.show()
+# cbd.flatten()
+# c2l = CBD2Latex(cbd)
+# c2l.simplify()
+# print(c2l.render())
+#
+# # cbd = SinGen("SinGen")
+#
+# # Run the Simulation
+# sim = Simulator(cbd)
+# sim.setDeltaT(DELTA_T)
+# sim.run(END)
+#
+# # TODO: Process Your Simulation Results
+# import matplotlib.pyplot as plt
+# fig = plt.figure()
+# ax = fig.add_subplot(111)
+# plot(cbd.findBlock("rabbits")[0], (fig, ax), LinePlot(color='red', label='rabbits'))
+# plot(cbd.findBlock("foxes")[0], (fig, ax), LinePlot(color='blue', label='foxes'))
+# # plot(cbd.findBlock("mySin")[0], (fig, ax), LinePlot(color='red'))
+# ax.legend()
+# plt.show()

+ 190 - 0
examples/LotkeVolterra/lv.gv

@@ -0,0 +1,190 @@
+// CBD model of the LotkeVolterra block
+// Created with CBD.converters.CBDDraw
+digraph model {
+ splines=ortho;
+ label=<<B>LotkeVolterra (LotkeVolterra)</B>>;
+ labelloc="t";
+ fontsize=20;
+ node_139780484092928 [label=" ConstantBlock\n(alpha)\n1.5", shape=ellipse];
+ inter_139780484092928_OUT1 [shape=point, width=0.01, height=0.01];
+ node_139780484092928 -> inter_139780484092928_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_139780484011536 [label=" ConstantBlock\n(gamma)\n-0.2", shape=ellipse];
+ inter_139780484011536_OUT1 [shape=point, width=0.01, height=0.01];
+ node_139780484011536 -> inter_139780484011536_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_139780484010864 [label=" ConstantBlock\n(delta)\n0.2", shape=ellipse];
+ inter_139780484010864_OUT1 [shape=point, width=0.01, height=0.01];
+ node_139780484010864 -> inter_139780484010864_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_139780484010336 [label="ProductBlock\n(ax)", shape=box];
+ inter_139779666424928_OUT1 -> node_139780484010336 [headlabel="IN2", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139780484092928_OUT1 -> node_139780484010336 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139780484010336_OUT1 [shape=point, width=0.01, height=0.01];
+ node_139780484010336 -> inter_139780484010336_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_139779666394272 [label="ProductBlock\n(xy)", shape=box];
+ inter_139779666424928_OUT1 -> node_139779666394272 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666424496_OUT1 -> node_139779666394272 [headlabel="IN2", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666394272_OUT1 [shape=point, width=0.01, height=0.01];
+ node_139779666394272 -> inter_139779666394272_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_139779666394320 [label=" ConstantBlock\n(beta)\n-0.7", shape=ellipse];
+ inter_139779666394320_OUT1 [shape=point, width=0.01, height=0.01];
+ node_139779666394320 -> inter_139779666394320_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_139779666394224 [label="ProductBlock\n(gy)", shape=box];
+ inter_139779666424496_OUT1 -> node_139779666394224 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139780484011536_OUT1 -> node_139779666394224 [headlabel="IN2", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666394224_OUT1 [shape=point, width=0.01, height=0.01];
+ node_139779666394224 -> inter_139779666394224_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_139779666394416 [label="AdderBlock\n(sum1)", shape=box];
+ inter_139780484010336_OUT1 -> node_139779666394416 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666394464_OUT1 -> node_139779666394416 [headlabel="IN2", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666394416_OUT1 [shape=point, width=0.01, height=0.01];
+ node_139779666394416 -> inter_139779666394416_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_139779666394464 [label="ProductBlock\n(bxy)", shape=box];
+ inter_139779666394272_OUT1 -> node_139779666394464 [headlabel="IN2", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666394320_OUT1 -> node_139779666394464 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666394464_OUT1 [shape=point, width=0.01, height=0.01];
+ node_139779666394464 -> inter_139779666394464_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_139779666394512 [label="ProductBlock\n(dxy)", shape=box];
+ inter_139779666394272_OUT1 -> node_139779666394512 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139780484010864_OUT1 -> node_139779666394512 [headlabel="IN2", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666394512_OUT1 [shape=point, width=0.01, height=0.01];
+ node_139779666394512 -> inter_139779666394512_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_139779666394560 [label="AdderBlock\n(sum2)", shape=box];
+ inter_139779666394512_OUT1 -> node_139779666394560 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666394224_OUT1 -> node_139779666394560 [headlabel="IN2", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666394560_OUT1 [shape=point, width=0.01, height=0.01];
+ node_139779666394560 -> inter_139779666394560_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_139779666394608 [label=" ConstantBlock\n(IC)\n10", shape=ellipse];
+ inter_139779666394608_OUT1 [shape=point, width=0.01, height=0.01];
+ node_139779666394608 -> inter_139779666394608_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_139779666394368 [label="SignalCollectorBlock\n(rabbits)", shape=box];
+ inter_139779666394416_OUT1 -> node_139779666394368 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ node_139779666394656 [label="SignalCollectorBlock\n(foxes)", shape=box];
+ inter_139779666394560_OUT1 -> node_139779666394656 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ node_139779666424352 [label=" ConstantBlock\n(clock-delta)\n0.01", shape=ellipse];
+ inter_139779666424352_OUT1 [shape=point, width=0.01, height=0.01];
+ node_139779666424352 -> inter_139779666424352_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_139779666392016 [label=" ConstantBlock\n(x.zero)\n0", shape=ellipse];
+ inter_139779666392016_OUT1 [shape=point, width=0.01, height=0.01];
+ node_139779666392016 -> inter_139779666392016_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_139779666393168 [label="DelayBlock\n(x.delayIn)", shape=box];
+ inter_139779666392016_OUT1 -> node_139779666393168 [headlabel="IC", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666424640_OUT1 -> node_139779666393168 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666393168_OUT1 [shape=point, width=0.01, height=0.01];
+ node_139779666393168 -> inter_139779666393168_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_139779666393264 [label="ProductBlock\n(x.multDelta)", shape=box];
+ inter_139779666393168_OUT1 -> node_139779666393264 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666424736_OUT1 -> node_139779666393264 [headlabel="IN2", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666393264_OUT1 [shape=point, width=0.01, height=0.01];
+ node_139779666393264 -> inter_139779666393264_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_139779666393360 [label="DelayBlock\n(x.delayState)", shape=box];
+ inter_139779666424832_OUT1 -> node_139779666393360 [headlabel="IC", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666393408_OUT1 -> node_139779666393360 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666393360_OUT1 [shape=point, width=0.01, height=0.01];
+ node_139779666393360 -> inter_139779666393360_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_139779666393408 [label="AdderBlock\n(x.sumState)", shape=box];
+ inter_139779666393264_OUT1 -> node_139779666393408 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666393360_OUT1 -> node_139779666393408 [headlabel="IN2", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666393408_OUT1 [shape=point, width=0.01, height=0.01];
+ node_139779666393408 -> inter_139779666393408_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_139779666424640 [label="WireBlock\n(x.IN1)", shape=box];
+ inter_139779666394416_OUT1 -> node_139779666424640 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666424640_OUT1 [shape=point, width=0.01, height=0.01];
+ node_139779666424640 -> inter_139779666424640_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_139779666424736 [label="WireBlock\n(x.delta_t)", shape=box];
+ inter_139779666393888_OUT1 -> node_139779666424736 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666424736_OUT1 [shape=point, width=0.01, height=0.01];
+ node_139779666424736 -> inter_139779666424736_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_139779666424832 [label="WireBlock\n(x.IC)", shape=box];
+ inter_139779666394608_OUT1 -> node_139779666424832 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666424832_OUT1 [shape=point, width=0.01, height=0.01];
+ node_139779666424832 -> inter_139779666424832_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_139779666424928 [label="WireBlock\n(x.OUT1)", shape=box];
+ inter_139779666393408_OUT1 -> node_139779666424928 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666424928_OUT1 [shape=point, width=0.01, height=0.01];
+ node_139779666424928 -> inter_139779666424928_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_139779666393456 [label=" ConstantBlock\n(y.zero)\n0", shape=ellipse];
+ inter_139779666393456_OUT1 [shape=point, width=0.01, height=0.01];
+ node_139779666393456 -> inter_139779666393456_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_139779666393936 [label="DelayBlock\n(y.delayIn)", shape=box];
+ inter_139779666393456_OUT1 -> node_139779666393936 [headlabel="IC", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666392928_OUT1 -> node_139779666393936 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666393936_OUT1 [shape=point, width=0.01, height=0.01];
+ node_139779666393936 -> inter_139779666393936_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_139779666394032 [label="ProductBlock\n(y.multDelta)", shape=box];
+ inter_139779666393936_OUT1 -> node_139779666394032 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666393024_OUT1 -> node_139779666394032 [headlabel="IN2", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666394032_OUT1 [shape=point, width=0.01, height=0.01];
+ node_139779666394032 -> inter_139779666394032_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_139779666394128 [label="DelayBlock\n(y.delayState)", shape=box];
+ inter_139779666393120_OUT1 -> node_139779666394128 [headlabel="IC", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666394176_OUT1 -> node_139779666394128 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666394128_OUT1 [shape=point, width=0.01, height=0.01];
+ node_139779666394128 -> inter_139779666394128_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_139779666394176 [label="AdderBlock\n(y.sumState)", shape=box];
+ inter_139779666394032_OUT1 -> node_139779666394176 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666394128_OUT1 -> node_139779666394176 [headlabel="IN2", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666394176_OUT1 [shape=point, width=0.01, height=0.01];
+ node_139779666394176 -> inter_139779666394176_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_139779666392928 [label="WireBlock\n(y.IN1)", shape=box];
+ inter_139779666394560_OUT1 -> node_139779666392928 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666392928_OUT1 [shape=point, width=0.01, height=0.01];
+ node_139779666392928 -> inter_139779666392928_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_139779666393024 [label="WireBlock\n(y.delta_t)", shape=box];
+ inter_139779666393888_OUT1 -> node_139779666393024 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666393024_OUT1 [shape=point, width=0.01, height=0.01];
+ node_139779666393024 -> inter_139779666393024_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_139779666393120 [label="WireBlock\n(y.IC)", shape=box];
+ inter_139779666394608_OUT1 -> node_139779666393120 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666393120_OUT1 [shape=point, width=0.01, height=0.01];
+ node_139779666393120 -> inter_139779666393120_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_139779666424496 [label="WireBlock\n(y.OUT1)", shape=box];
+ inter_139779666394176_OUT1 -> node_139779666424496 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666424496_OUT1 [shape=point, width=0.01, height=0.01];
+ node_139779666424496 -> inter_139779666424496_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_139779666394752 [label=" ConstantBlock\n(clock-clock.IC)\n0.0", shape=ellipse];
+ inter_139779666394752_OUT1 [shape=point, width=0.01, height=0.01];
+ node_139779666394752 -> inter_139779666394752_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_139779666423920 [label="DelayBlock\n(clock-clock.delay)", shape=box];
+ inter_139779666424016_OUT1 -> node_139779666423920 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666394752_OUT1 -> node_139779666423920 [headlabel="IC", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666423920_OUT1 [shape=point, width=0.01, height=0.01];
+ node_139779666423920 -> inter_139779666423920_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_139779666424016 [label="AdderBlock\n(clock-clock.TSum)", shape=box];
+ inter_139779666393600_OUT1 -> node_139779666424016 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666423920_OUT1 -> node_139779666424016 [headlabel="IN2", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666424016_OUT1 [shape=point, width=0.01, height=0.01];
+ node_139779666424016 -> inter_139779666424016_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_139779666424112 [label="AdderBlock\n(clock-clock.STSum)", shape=box];
+ inter_139779666424256_OUT1 -> node_139779666424112 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666424160_OUT1 -> node_139779666424112 [headlabel="IN2", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666424112_OUT1 [shape=point, width=0.01, height=0.01];
+ node_139779666424112 -> inter_139779666424112_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_139779666424160 [label="NegatorBlock\n(clock-clock.STNeg)", shape=box];
+ inter_139779666394752_OUT1 -> node_139779666424160 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666424160_OUT1 [shape=point, width=0.01, height=0.01];
+ node_139779666424160 -> inter_139779666424160_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_139779666424208 [label=" ConstantBlock\n(clock-clock.Past)\n0.0", shape=ellipse];
+ inter_139779666424208_OUT1 [shape=point, width=0.01, height=0.01];
+ node_139779666424208 -> inter_139779666424208_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_139779666424256 [label="AdderBlock\n(clock-clock.PastSum)", shape=box];
+ inter_139779666423920_OUT1 -> node_139779666424256 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666424208_OUT1 -> node_139779666424256 [headlabel="IN2", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666424256_OUT1 [shape=point, width=0.01, height=0.01];
+ node_139779666424256 -> inter_139779666424256_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_139779666393600 [label="WireBlock\n(clock-clock.h)", shape=box];
+ inter_139779666424352_OUT1 -> node_139779666393600 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666393600_OUT1 [shape=point, width=0.01, height=0.01];
+ node_139779666393600 -> inter_139779666393600_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_139779666393696 [label="WireBlock\n(clock-clock.time)", shape=box];
+ inter_139779666424256_OUT1 -> node_139779666393696 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666393696_OUT1 [shape=point, width=0.01, height=0.01];
+ node_139779666393696 -> inter_139779666393696_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_139779666393792 [label="WireBlock\n(clock-clock.rel_time)", shape=box];
+ inter_139779666424112_OUT1 -> node_139779666393792 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666393792_OUT1 [shape=point, width=0.01, height=0.01];
+ node_139779666393792 -> inter_139779666393792_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+ node_139779666393888 [label="WireBlock\n(clock-clock.delta)", shape=box];
+ inter_139779666393600_OUT1 -> node_139779666393888 [headlabel="IN1", arrowhead="normal", arrowtail="none", dir=both];
+ inter_139779666393888_OUT1 [shape=point, width=0.01, height=0.01];
+ node_139779666393888 -> inter_139779666393888_OUT1 [taillabel="OUT1", arrowtail="invempty", arrowhead="none", dir=both];
+
+}

+ 2 - 4
src/CBD/converters/latexify.py

@@ -186,16 +186,13 @@ class CBD2Latex:
 				var:    Lefthand-side of the equation.
 				val:    Righthand-side of the equation, i.e. the function.
 				ltx:    Latex-string to format var and val in.
+				at:     Whether to apply the time or not.
 			"""
 			if isinstance(val, Fnc):
 				val = deepcopy(val)
 				if at:
 					val.apply_time(t=tvar, fmt=fmt, dt=dt)
 				val = val.latex(rl, tvar)
-				# TODO: use stack to check for parentheses
-				# if len(val) > 2:
-				# 	while val[0] == "(" and val[-1] == ")":
-				# 		val = val[1:-1]
 				if rl and rpar:
 					val = val.replace("(", "\\left(").replace(")", "\\right)")
 			return ltx.format(v=var, val=val, time=tvar)
@@ -314,6 +311,7 @@ class CBD2Latex:
 				if isinstance(f, Fnc):
 					if v not in outputs:
 						f.apply(v, output)
+		for output in outputs:
 			deps = self.get_dependencies_for(output)
 			for dep in deps:
 				if dep in to_delete: