redshift 1.3.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +8 -0
- data/README +5 -0
- data/RELEASE-NOTES +455 -0
- data/TODO +431 -0
- data/bench/alg-state.rb +61 -0
- data/bench/bench +26 -0
- data/bench/bench.rb +10 -0
- data/bench/continuous.rb +76 -0
- data/bench/diff-bench +86 -0
- data/bench/discrete.rb +101 -0
- data/bench/euler.rb +50 -0
- data/bench/formula.rb +78 -0
- data/bench/half-strict.rb +103 -0
- data/bench/inertness.rb +116 -0
- data/bench/queue.rb +92 -0
- data/bench/run +66 -0
- data/bench/simple.rb +74 -0
- data/bench/strictness.rb +86 -0
- data/examples/ball-tkar.rb +72 -0
- data/examples/ball.rb +123 -0
- data/examples/collide.rb +70 -0
- data/examples/connect-parallel.rb +48 -0
- data/examples/connect.rb +109 -0
- data/examples/constants.rb +27 -0
- data/examples/delay.rb +80 -0
- data/examples/derivative.rb +77 -0
- data/examples/euler.rb +46 -0
- data/examples/external-lib.rb +33 -0
- data/examples/guard-debugger.rb +77 -0
- data/examples/lotka-volterra.rb +33 -0
- data/examples/persist-ball.rb +68 -0
- data/examples/pid.rb +87 -0
- data/examples/ports.rb +60 -0
- data/examples/queue.rb +56 -0
- data/examples/queue2.rb +98 -0
- data/examples/reset-with-event-val.rb +28 -0
- data/examples/scheduler.rb +104 -0
- data/examples/set-dest.rb +23 -0
- data/examples/simulink/README +1 -0
- data/examples/simulink/delay.mdl +827 -0
- data/examples/simulink/derivative.mdl +655 -0
- data/examples/step-discrete-profiler.rb +103 -0
- data/examples/subsystem.rb +109 -0
- data/examples/sync-deadlock.rb +32 -0
- data/examples/sync-queue.rb +91 -0
- data/examples/sync-retry.rb +20 -0
- data/examples/sync.rb +51 -0
- data/examples/thermostat.rb +53 -0
- data/examples/zeno.rb +53 -0
- data/lib/accessible-index.rb +47 -0
- data/lib/redshift.rb +1 -0
- data/lib/redshift/component.rb +412 -0
- data/lib/redshift/meta.rb +183 -0
- data/lib/redshift/mixins/zeno-debugger.rb +69 -0
- data/lib/redshift/port.rb +57 -0
- data/lib/redshift/queue.rb +104 -0
- data/lib/redshift/redshift.rb +111 -0
- data/lib/redshift/state.rb +31 -0
- data/lib/redshift/syntax.rb +558 -0
- data/lib/redshift/target/c.rb +37 -0
- data/lib/redshift/target/c/component-gen.rb +1303 -0
- data/lib/redshift/target/c/flow-gen.rb +325 -0
- data/lib/redshift/target/c/flow/algebraic.rb +85 -0
- data/lib/redshift/target/c/flow/buffer.rb +74 -0
- data/lib/redshift/target/c/flow/delay.rb +203 -0
- data/lib/redshift/target/c/flow/derivative.rb +101 -0
- data/lib/redshift/target/c/flow/euler.rb +67 -0
- data/lib/redshift/target/c/flow/expr.rb +113 -0
- data/lib/redshift/target/c/flow/rk4.rb +80 -0
- data/lib/redshift/target/c/library.rb +85 -0
- data/lib/redshift/target/c/world-gen.rb +1370 -0
- data/lib/redshift/target/spec.rb +34 -0
- data/lib/redshift/world.rb +300 -0
- data/rakefile +37 -0
- data/test/test.rb +52 -0
- data/test/test_buffer.rb +58 -0
- data/test/test_connect.rb +242 -0
- data/test/test_connect_parallel.rb +47 -0
- data/test/test_connect_strict.rb +135 -0
- data/test/test_constant.rb +74 -0
- data/test/test_delay.rb +145 -0
- data/test/test_derivative.rb +48 -0
- data/test/test_discrete.rb +592 -0
- data/test/test_discrete_isolated.rb +92 -0
- data/test/test_exit.rb +59 -0
- data/test/test_flow.rb +200 -0
- data/test/test_flow_link.rb +288 -0
- data/test/test_flow_sub.rb +100 -0
- data/test/test_flow_trans.rb +292 -0
- data/test/test_inherit.rb +127 -0
- data/test/test_inherit_event.rb +74 -0
- data/test/test_inherit_flow.rb +139 -0
- data/test/test_inherit_link.rb +65 -0
- data/test/test_inherit_setup.rb +56 -0
- data/test/test_inherit_state.rb +66 -0
- data/test/test_inherit_transition.rb +168 -0
- data/test/test_numerics.rb +34 -0
- data/test/test_queue.rb +90 -0
- data/test/test_queue_alone.rb +115 -0
- data/test/test_reset.rb +209 -0
- data/test/test_setup.rb +119 -0
- data/test/test_strict_continuity.rb +410 -0
- data/test/test_strict_reset_error.rb +30 -0
- data/test/test_strictness_error.rb +32 -0
- data/test/test_sync.rb +185 -0
- data/test/test_world.rb +328 -0
- metadata +204 -0
data/examples/queue.rb
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
# Example of some basic features of queues. Uses strings as messages
|
2
|
+
# just to make the matching examples simple. See also queue2.rb.
|
3
|
+
|
4
|
+
require 'redshift'
|
5
|
+
|
6
|
+
include RedShift
|
7
|
+
|
8
|
+
class Receiver < Component
|
9
|
+
queue :q
|
10
|
+
|
11
|
+
transition do
|
12
|
+
wait :q => /time is now 2/
|
13
|
+
action do
|
14
|
+
msg = q.pop
|
15
|
+
puts "SPECIAL CASE! popped #{msg.inspect} at time #{world.clock}"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
transition do
|
20
|
+
wait :q => [/time is/, /3/]
|
21
|
+
action do
|
22
|
+
msg = q.pop
|
23
|
+
puts "CONJUNCTION! popped #{msg.inspect} at time #{world.clock}"
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
transition do
|
28
|
+
wait :q => /time is/
|
29
|
+
action do
|
30
|
+
msg = q.pop
|
31
|
+
puts "popped #{msg.inspect} at time #{world.clock}"
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
class Sender < Component
|
37
|
+
link :receiver
|
38
|
+
flow {diff "t' = 1"}
|
39
|
+
|
40
|
+
transition do
|
41
|
+
guard "t>1"
|
42
|
+
reset :t => 0
|
43
|
+
action do
|
44
|
+
msg = "time is now #{world.clock}"
|
45
|
+
puts "pushed #{msg.inspect}"
|
46
|
+
receiver.q << msg
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
w = World.new
|
52
|
+
receiver = w.create Receiver
|
53
|
+
sender = w.create Sender
|
54
|
+
sender.receiver = receiver
|
55
|
+
|
56
|
+
w.evolve 5
|
data/examples/queue2.rb
ADDED
@@ -0,0 +1,98 @@
|
|
1
|
+
# More complex example of queues, showing multiple queues, multiple
|
2
|
+
# simultaneous entries in a queue, and several kinds of matching.
|
3
|
+
|
4
|
+
require 'redshift'
|
5
|
+
|
6
|
+
include RedShift
|
7
|
+
|
8
|
+
class MyMessage
|
9
|
+
attr_accessor :foo
|
10
|
+
def initialize foo
|
11
|
+
@foo = foo
|
12
|
+
end
|
13
|
+
end
|
14
|
+
class OtherMessage; end
|
15
|
+
|
16
|
+
class Receiver < Component
|
17
|
+
queue :q1, :q2 # same as attr_reader :q, plus initialize q to a new queue
|
18
|
+
|
19
|
+
transition do
|
20
|
+
# is there at least one instance of MyMessage on the *head* of the queue,
|
21
|
+
# with foo=="bar"?
|
22
|
+
wait :q1 => [MyMessage, proc {|m| m.foo == "bar"}]
|
23
|
+
action do
|
24
|
+
puts "messages received -- q1: #{q1.pop.inspect}"
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
transition do
|
29
|
+
# is there at least one instance of MyMessage on the *head* of the queue?
|
30
|
+
# and also OtherMessage on q2?
|
31
|
+
wait :q1 => MyMessage, :q2 => OtherMessage
|
32
|
+
action do
|
33
|
+
puts "messages received -- q1: #{q1.pop.inspect}, q2: #{q2.pop.inspect}"
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
transition do
|
38
|
+
# wait for numbers, explicitly handling the case of multiple
|
39
|
+
# objects (assume all are numeric) pushed into the queue
|
40
|
+
# simultaneously
|
41
|
+
wait :q1 => Numeric
|
42
|
+
action do
|
43
|
+
x = q1.pop
|
44
|
+
case x
|
45
|
+
when SimultaneousQueueEntries
|
46
|
+
x = x.max # choose the largest, and ignore the smaller, arbitrarily
|
47
|
+
end
|
48
|
+
puts "max x = #{x}"
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
transition do
|
53
|
+
wait :q1 # is there *anything* on the head of the queue?
|
54
|
+
# note that this guard is checked after the MyMessage guard, so
|
55
|
+
# this transition functions as an "else" clause
|
56
|
+
action do
|
57
|
+
p q1.pop
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
class Sender < Component
|
63
|
+
link :r => Receiver
|
64
|
+
state :S1, :S2, :S3, :S4
|
65
|
+
|
66
|
+
transition Enter => S1 do
|
67
|
+
action do
|
68
|
+
r.q1 << MyMessage.new("bar")
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
transition S1 => S2 do
|
73
|
+
action do
|
74
|
+
r.q1 << MyMessage.new("zzz")
|
75
|
+
r.q2 << OtherMessage.new
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
transition S2 => S3 do
|
80
|
+
action do
|
81
|
+
r.q1 << 1.2
|
82
|
+
r.q1 << 42.0
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
transition S3 => S4 do
|
87
|
+
action do
|
88
|
+
r.q1 << {"foo"=>[:bar, self.inspect, self, r.q1]} # some weird hash
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
w = World.new
|
94
|
+
w.create Sender do |s|
|
95
|
+
s.r = w.create(Receiver)
|
96
|
+
end
|
97
|
+
|
98
|
+
w.evolve 1
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# Shows how to use events to pass values among synced
|
2
|
+
# transitions. Note that event expressions are evaled
|
3
|
+
# *before* reset expressions are evaled, so that the
|
4
|
+
# the latter may reference the former.
|
5
|
+
|
6
|
+
require 'redshift'
|
7
|
+
include RedShift
|
8
|
+
|
9
|
+
class Emitter < Component
|
10
|
+
transition Enter => Exit do
|
11
|
+
event :e => 42.0
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
class Receiver < Component
|
16
|
+
link :c => Emitter
|
17
|
+
constant :result
|
18
|
+
transition Enter => Exit do
|
19
|
+
sync :c => :e
|
20
|
+
event :e => 0.42
|
21
|
+
reset :result => "e + c.e"
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
w = World.new
|
26
|
+
r = w.create(Receiver) {|r| r.c = r.create(Emitter)}
|
27
|
+
w.run 1
|
28
|
+
p r.result
|
@@ -0,0 +1,104 @@
|
|
1
|
+
# efficient and convenient way to manage timed events
|
2
|
+
|
3
|
+
require 'redshift'
|
4
|
+
|
5
|
+
class Scheduler < RedShift::Component
|
6
|
+
queue :request_queue
|
7
|
+
continuous :time
|
8
|
+
constant :next_wakeup_time
|
9
|
+
|
10
|
+
default do
|
11
|
+
@schedule = [] ## could use rbtree for efficient sorted list
|
12
|
+
self.next_wakeup_time = RedShift::Infinity
|
13
|
+
end
|
14
|
+
|
15
|
+
flow do
|
16
|
+
diff " time' = 1 "
|
17
|
+
end
|
18
|
+
|
19
|
+
class Request
|
20
|
+
include Comparable
|
21
|
+
attr_accessor :time, :queue, :message
|
22
|
+
def <=>(other)
|
23
|
+
self.time <=> other.time
|
24
|
+
end
|
25
|
+
def initialize time, queue, message
|
26
|
+
@time, @queue, @message = time, queue, message
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
EPSILON = 1E-12 # float fuzziness, if timestep is 0.1, for example
|
31
|
+
|
32
|
+
# Returns the request object for use with unschedule
|
33
|
+
def schedule_message delta_t, queue, message
|
34
|
+
req = Request.new(time + delta_t - EPSILON, queue, message)
|
35
|
+
request_queue << req
|
36
|
+
req
|
37
|
+
end
|
38
|
+
|
39
|
+
def unschedule req
|
40
|
+
@schedule.delete req
|
41
|
+
end
|
42
|
+
|
43
|
+
transition do
|
44
|
+
wait :request_queue
|
45
|
+
action do
|
46
|
+
case reqs = request_queue.pop
|
47
|
+
when RedShift::SimultaneousQueueEntries
|
48
|
+
reqs.each do |req|
|
49
|
+
@schedule << req
|
50
|
+
end
|
51
|
+
else
|
52
|
+
@schedule << reqs
|
53
|
+
end
|
54
|
+
|
55
|
+
@schedule.sort!
|
56
|
+
self.next_wakeup_time = @schedule.first.time
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
transition do
|
61
|
+
guard "time >= next_wakeup_time"
|
62
|
+
action do
|
63
|
+
while (req = @schedule.first and req.time <= time)
|
64
|
+
@schedule.shift
|
65
|
+
req.queue << req.message
|
66
|
+
end
|
67
|
+
|
68
|
+
if (req = @schedule.first)
|
69
|
+
self.next_wakeup_time = req.time
|
70
|
+
else
|
71
|
+
self.next_wakeup_time = RedShift::Infinity
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
class Client < RedShift::Component
|
78
|
+
queue :wakeup
|
79
|
+
link :scheduler
|
80
|
+
state :Waiting
|
81
|
+
constant :delay => 4.2
|
82
|
+
|
83
|
+
transition Enter => Waiting do
|
84
|
+
action do
|
85
|
+
puts "scheduling message at #{world.clock} sec"
|
86
|
+
scheduler.schedule_message delay, wakeup, "Time to wake up, snoozebrain!"
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
transition Waiting => Exit do
|
91
|
+
wait :wakeup
|
92
|
+
action do
|
93
|
+
msg = wakeup.pop
|
94
|
+
puts "wake up received at #{world.clock} sec: #{msg.inspect}"
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
w = RedShift::World.new
|
100
|
+
s = w.create Scheduler
|
101
|
+
c = w.create Client
|
102
|
+
c.scheduler = s
|
103
|
+
|
104
|
+
w.evolve 10
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# Assigning to comp.dest can change the destination of
|
2
|
+
# the current transition.
|
3
|
+
|
4
|
+
require 'redshift'
|
5
|
+
|
6
|
+
class C < RedShift::Component
|
7
|
+
state :S
|
8
|
+
transition Enter => Exit do
|
9
|
+
action do
|
10
|
+
puts "changing dest from Exit to S"
|
11
|
+
self.dest = S
|
12
|
+
end
|
13
|
+
end
|
14
|
+
transition S => Exit do
|
15
|
+
action do
|
16
|
+
puts "S=>Exit"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
w = RedShift::World.new
|
22
|
+
w.create C
|
23
|
+
w.run 1
|
@@ -0,0 +1 @@
|
|
1
|
+
Models that are comparable to redshift examples in the parent dir.
|
@@ -0,0 +1,827 @@
|
|
1
|
+
Model {
|
2
|
+
Name "delay"
|
3
|
+
Version 6.5
|
4
|
+
MdlSubVersion 0
|
5
|
+
GraphicalInterface {
|
6
|
+
NumRootInports 0
|
7
|
+
NumRootOutports 0
|
8
|
+
ParameterArgumentNames ""
|
9
|
+
ComputedModelVersion "1.4"
|
10
|
+
NumModelReferences 0
|
11
|
+
NumTestPointedSignals 0
|
12
|
+
}
|
13
|
+
SavedCharacterEncoding "windows-1252"
|
14
|
+
SaveDefaultBlockParams on
|
15
|
+
SampleTimeColors off
|
16
|
+
LibraryLinkDisplay "none"
|
17
|
+
WideLines off
|
18
|
+
ShowLineDimensions off
|
19
|
+
ShowPortDataTypes off
|
20
|
+
ShowLoopsOnError on
|
21
|
+
IgnoreBidirectionalLines off
|
22
|
+
ShowStorageClass off
|
23
|
+
ShowTestPointIcons on
|
24
|
+
ShowViewerIcons on
|
25
|
+
SortedOrder off
|
26
|
+
ExecutionContextIcon off
|
27
|
+
ShowLinearizationAnnotations on
|
28
|
+
ScopeRefreshTime 0.035000
|
29
|
+
OverrideScopeRefreshTime on
|
30
|
+
DisableAllScopes off
|
31
|
+
DataTypeOverride "UseLocalSettings"
|
32
|
+
MinMaxOverflowLogging "UseLocalSettings"
|
33
|
+
MinMaxOverflowArchiveMode "Overwrite"
|
34
|
+
BlockNameDataTip off
|
35
|
+
BlockParametersDataTip off
|
36
|
+
BlockDescriptionStringDataTip off
|
37
|
+
ToolBar on
|
38
|
+
StatusBar on
|
39
|
+
BrowserShowLibraryLinks off
|
40
|
+
BrowserLookUnderMasks off
|
41
|
+
Created "Sat Mar 15 23:25:09 2008"
|
42
|
+
Creator "vjoel"
|
43
|
+
UpdateHistory "UpdateHistoryNever"
|
44
|
+
ModifiedByFormat "%<Auto>"
|
45
|
+
LastModifiedBy "vjoel"
|
46
|
+
ModifiedDateFormat "%<Auto>"
|
47
|
+
LastModifiedDate "Sun Mar 16 00:04:55 2008"
|
48
|
+
ModelVersionFormat "1.%<AutoIncrement:4>"
|
49
|
+
ConfigurationManager "None"
|
50
|
+
LinearizationMsg "none"
|
51
|
+
Profile off
|
52
|
+
ParamWorkspaceSource "MATLABWorkspace"
|
53
|
+
AccelSystemTargetFile "accel.tlc"
|
54
|
+
AccelTemplateMakefile "accel_default_tmf"
|
55
|
+
AccelMakeCommand "make_rtw"
|
56
|
+
TryForcingSFcnDF off
|
57
|
+
RecordCoverage off
|
58
|
+
CovPath "/"
|
59
|
+
CovSaveName "covdata"
|
60
|
+
CovMetricSettings "dw"
|
61
|
+
CovNameIncrementing off
|
62
|
+
CovHtmlReporting on
|
63
|
+
covSaveCumulativeToWorkspaceVar on
|
64
|
+
CovSaveSingleToWorkspaceVar on
|
65
|
+
CovCumulativeVarName "covCumulativeData"
|
66
|
+
CovCumulativeReport off
|
67
|
+
CovReportOnPause on
|
68
|
+
ExtModeBatchMode off
|
69
|
+
ExtModeEnableFloating on
|
70
|
+
ExtModeTrigType "manual"
|
71
|
+
ExtModeTrigMode "normal"
|
72
|
+
ExtModeTrigPort "1"
|
73
|
+
ExtModeTrigElement "any"
|
74
|
+
ExtModeTrigDuration 1000
|
75
|
+
ExtModeTrigDurationFloating "auto"
|
76
|
+
ExtModeTrigHoldOff 0
|
77
|
+
ExtModeTrigDelay 0
|
78
|
+
ExtModeTrigDirection "rising"
|
79
|
+
ExtModeTrigLevel 0
|
80
|
+
ExtModeArchiveMode "off"
|
81
|
+
ExtModeAutoIncOneShot off
|
82
|
+
ExtModeIncDirWhenArm off
|
83
|
+
ExtModeAddSuffixToVar off
|
84
|
+
ExtModeWriteAllDataToWs off
|
85
|
+
ExtModeArmWhenConnect on
|
86
|
+
ExtModeSkipDownloadWhenConnect off
|
87
|
+
ExtModeLogAll on
|
88
|
+
ExtModeAutoUpdateStatusClock on
|
89
|
+
BufferReuse on
|
90
|
+
ProdHWDeviceType "32-bit Generic"
|
91
|
+
ShowModelReferenceBlockVersion off
|
92
|
+
ShowModelReferenceBlockIO off
|
93
|
+
Array {
|
94
|
+
Type "Handle"
|
95
|
+
Dimension 1
|
96
|
+
Simulink.ConfigSet {
|
97
|
+
$ObjectID 1
|
98
|
+
Version "1.2.0"
|
99
|
+
Array {
|
100
|
+
Type "Handle"
|
101
|
+
Dimension 7
|
102
|
+
Simulink.SolverCC {
|
103
|
+
$ObjectID 2
|
104
|
+
Version "1.2.0"
|
105
|
+
StartTime "0.0"
|
106
|
+
StopTime "10.0"
|
107
|
+
AbsTol "auto"
|
108
|
+
FixedStep "0.1"
|
109
|
+
InitialStep "auto"
|
110
|
+
MaxNumMinSteps "-1"
|
111
|
+
MaxOrder 5
|
112
|
+
ConsecutiveZCsStepRelTol "10*128*eps"
|
113
|
+
MaxConsecutiveZCs "1000"
|
114
|
+
ExtrapolationOrder 4
|
115
|
+
NumberNewtonIterations 1
|
116
|
+
MaxStep "auto"
|
117
|
+
MinStep "auto"
|
118
|
+
MaxConsecutiveMinStep "1"
|
119
|
+
RelTol "1e-3"
|
120
|
+
SolverMode "Auto"
|
121
|
+
Solver "ode4"
|
122
|
+
SolverName "ode4"
|
123
|
+
ZeroCrossControl "UseLocalSettings"
|
124
|
+
AlgebraicLoopSolver "TrustRegion"
|
125
|
+
SolverResetMethod "Fast"
|
126
|
+
PositivePriorityOrder off
|
127
|
+
AutoInsertRateTranBlk off
|
128
|
+
SampleTimeConstraint "Unconstrained"
|
129
|
+
RateTranMode "Deterministic"
|
130
|
+
}
|
131
|
+
Simulink.DataIOCC {
|
132
|
+
$ObjectID 3
|
133
|
+
Version "1.2.0"
|
134
|
+
Decimation "1"
|
135
|
+
ExternalInput "[t, u]"
|
136
|
+
FinalStateName "xFinal"
|
137
|
+
InitialState "xInitial"
|
138
|
+
LimitDataPoints on
|
139
|
+
MaxDataPoints "1000"
|
140
|
+
LoadExternalInput off
|
141
|
+
LoadInitialState off
|
142
|
+
SaveFinalState off
|
143
|
+
SaveFormat "Array"
|
144
|
+
SaveOutput on
|
145
|
+
SaveState off
|
146
|
+
SignalLogging on
|
147
|
+
InspectSignalLogs off
|
148
|
+
SaveTime on
|
149
|
+
StateSaveName "xout"
|
150
|
+
TimeSaveName "tout"
|
151
|
+
OutputSaveName "yout"
|
152
|
+
SignalLoggingName "logsout"
|
153
|
+
OutputOption "RefineOutputTimes"
|
154
|
+
OutputTimes "[]"
|
155
|
+
Refine "1"
|
156
|
+
}
|
157
|
+
Simulink.OptimizationCC {
|
158
|
+
$ObjectID 4
|
159
|
+
Array {
|
160
|
+
Type "Cell"
|
161
|
+
Dimension 5
|
162
|
+
Cell "ZeroExternalMemoryAtStartup"
|
163
|
+
Cell "ZeroInternalMemoryAtStartup"
|
164
|
+
Cell "InitFltsAndDblsToZero"
|
165
|
+
Cell "OptimizeModelRefInitCode"
|
166
|
+
Cell "NoFixptDivByZeroProtection"
|
167
|
+
PropName "DisabledProps"
|
168
|
+
}
|
169
|
+
Version "1.2.0"
|
170
|
+
BlockReduction on
|
171
|
+
BooleanDataType on
|
172
|
+
ConditionallyExecuteInputs on
|
173
|
+
InlineParams off
|
174
|
+
InlineInvariantSignals off
|
175
|
+
OptimizeBlockIOStorage on
|
176
|
+
BufferReuse on
|
177
|
+
EnforceIntegerDowncast on
|
178
|
+
ExpressionFolding on
|
179
|
+
FoldNonRolledExpr on
|
180
|
+
LocalBlockOutputs on
|
181
|
+
ParameterPooling on
|
182
|
+
RollThreshold 5
|
183
|
+
SystemCodeInlineAuto off
|
184
|
+
StateBitsets off
|
185
|
+
DataBitsets off
|
186
|
+
UseTempVars off
|
187
|
+
ZeroExternalMemoryAtStartup on
|
188
|
+
ZeroInternalMemoryAtStartup on
|
189
|
+
InitFltsAndDblsToZero on
|
190
|
+
NoFixptDivByZeroProtection off
|
191
|
+
EfficientFloat2IntCast off
|
192
|
+
OptimizeModelRefInitCode off
|
193
|
+
LifeSpan "inf"
|
194
|
+
BufferReusableBoundary on
|
195
|
+
}
|
196
|
+
Simulink.DebuggingCC {
|
197
|
+
$ObjectID 5
|
198
|
+
Version "1.2.0"
|
199
|
+
RTPrefix "error"
|
200
|
+
ConsistencyChecking "none"
|
201
|
+
ArrayBoundsChecking "none"
|
202
|
+
SignalInfNanChecking "none"
|
203
|
+
ReadBeforeWriteMsg "UseLocalSettings"
|
204
|
+
WriteAfterWriteMsg "UseLocalSettings"
|
205
|
+
WriteAfterReadMsg "UseLocalSettings"
|
206
|
+
AlgebraicLoopMsg "warning"
|
207
|
+
ArtificialAlgebraicLoopMsg "warning"
|
208
|
+
CheckSSInitialOutputMsg on
|
209
|
+
CheckExecutionContextPreStartOutputMsg off
|
210
|
+
CheckExecutionContextRuntimeOutputMsg off
|
211
|
+
SignalResolutionControl "TryResolveAllWithWarning"
|
212
|
+
BlockPriorityViolationMsg "warning"
|
213
|
+
MinStepSizeMsg "warning"
|
214
|
+
TimeAdjustmentMsg "none"
|
215
|
+
MaxConsecutiveZCsMsg "error"
|
216
|
+
SolverPrmCheckMsg "warning"
|
217
|
+
InheritedTsInSrcMsg "warning"
|
218
|
+
DiscreteInheritContinuousMsg "warning"
|
219
|
+
MultiTaskDSMMsg "error"
|
220
|
+
MultiTaskCondExecSysMsg "error"
|
221
|
+
MultiTaskRateTransMsg "error"
|
222
|
+
SingleTaskRateTransMsg "none"
|
223
|
+
TasksWithSamePriorityMsg "warning"
|
224
|
+
SigSpecEnsureSampleTimeMsg "warning"
|
225
|
+
CheckMatrixSingularityMsg "none"
|
226
|
+
IntegerOverflowMsg "warning"
|
227
|
+
Int32ToFloatConvMsg "warning"
|
228
|
+
ParameterDowncastMsg "error"
|
229
|
+
ParameterOverflowMsg "error"
|
230
|
+
ParameterUnderflowMsg "none"
|
231
|
+
ParameterPrecisionLossMsg "warning"
|
232
|
+
UnderSpecifiedDataTypeMsg "none"
|
233
|
+
UnnecessaryDatatypeConvMsg "none"
|
234
|
+
VectorMatrixConversionMsg "none"
|
235
|
+
InvalidFcnCallConnMsg "error"
|
236
|
+
FcnCallInpInsideContextMsg "Use local settings"
|
237
|
+
SignalLabelMismatchMsg "none"
|
238
|
+
UnconnectedInputMsg "warning"
|
239
|
+
UnconnectedOutputMsg "warning"
|
240
|
+
UnconnectedLineMsg "warning"
|
241
|
+
SFcnCompatibilityMsg "none"
|
242
|
+
UniqueDataStoreMsg "none"
|
243
|
+
BusObjectLabelMismatch "warning"
|
244
|
+
RootOutportRequireBusObject "warning"
|
245
|
+
AssertControl "UseLocalSettings"
|
246
|
+
EnableOverflowDetection off
|
247
|
+
ModelReferenceIOMsg "none"
|
248
|
+
ModelReferenceVersionMismatchMessage "none"
|
249
|
+
ModelReferenceIOMismatchMessage "none"
|
250
|
+
ModelReferenceCSMismatchMessage "none"
|
251
|
+
ModelReferenceSimTargetVerbose off
|
252
|
+
UnknownTsInhSupMsg "warning"
|
253
|
+
ModelReferenceDataLoggingMessage "warning"
|
254
|
+
ModelReferenceSymbolNameMessage "warning"
|
255
|
+
ModelReferenceExtraNoncontSigs "error"
|
256
|
+
StrictBusMsg "Warning"
|
257
|
+
}
|
258
|
+
Simulink.HardwareCC {
|
259
|
+
$ObjectID 6
|
260
|
+
Version "1.2.0"
|
261
|
+
ProdBitPerChar 8
|
262
|
+
ProdBitPerShort 16
|
263
|
+
ProdBitPerInt 32
|
264
|
+
ProdBitPerLong 32
|
265
|
+
ProdIntDivRoundTo "Undefined"
|
266
|
+
ProdEndianess "Unspecified"
|
267
|
+
ProdWordSize 32
|
268
|
+
ProdShiftRightIntArith on
|
269
|
+
ProdHWDeviceType "32-bit Generic"
|
270
|
+
TargetBitPerChar 8
|
271
|
+
TargetBitPerShort 16
|
272
|
+
TargetBitPerInt 32
|
273
|
+
TargetBitPerLong 32
|
274
|
+
TargetShiftRightIntArith on
|
275
|
+
TargetIntDivRoundTo "Undefined"
|
276
|
+
TargetEndianess "Unspecified"
|
277
|
+
TargetWordSize 32
|
278
|
+
TargetTypeEmulationWarnSuppressLevel 0
|
279
|
+
TargetPreprocMaxBitsSint 32
|
280
|
+
TargetPreprocMaxBitsUint 32
|
281
|
+
TargetHWDeviceType "Specified"
|
282
|
+
TargetUnknown off
|
283
|
+
ProdEqTarget on
|
284
|
+
}
|
285
|
+
Simulink.ModelReferenceCC {
|
286
|
+
$ObjectID 7
|
287
|
+
Version "1.2.0"
|
288
|
+
UpdateModelReferenceTargets "IfOutOfDateOrStructuralChange"
|
289
|
+
CheckModelReferenceTargetMessage "error"
|
290
|
+
ModelReferenceNumInstancesAllowed "Multi"
|
291
|
+
ModelReferencePassRootInputsByReference on
|
292
|
+
ModelReferenceMinAlgLoopOccurrences off
|
293
|
+
}
|
294
|
+
Simulink.RTWCC {
|
295
|
+
$BackupClass "Simulink.RTWCC"
|
296
|
+
$ObjectID 8
|
297
|
+
Array {
|
298
|
+
Type "Cell"
|
299
|
+
Dimension 1
|
300
|
+
Cell "IncludeHyperlinkInReport"
|
301
|
+
PropName "DisabledProps"
|
302
|
+
}
|
303
|
+
Version "1.2.0"
|
304
|
+
SystemTargetFile "grt.tlc"
|
305
|
+
GenCodeOnly off
|
306
|
+
MakeCommand "make_rtw"
|
307
|
+
GenerateMakefile on
|
308
|
+
TemplateMakefile "grt_default_tmf"
|
309
|
+
GenerateReport off
|
310
|
+
SaveLog off
|
311
|
+
RTWVerbose on
|
312
|
+
RetainRTWFile off
|
313
|
+
ProfileTLC off
|
314
|
+
TLCDebug off
|
315
|
+
TLCCoverage off
|
316
|
+
TLCAssert off
|
317
|
+
ProcessScriptMode "Default"
|
318
|
+
ConfigurationMode "Optimized"
|
319
|
+
ConfigAtBuild off
|
320
|
+
IncludeHyperlinkInReport off
|
321
|
+
LaunchReport off
|
322
|
+
TargetLang "C"
|
323
|
+
IncludeBusHierarchyInRTWFileBlockHierarchyMap off
|
324
|
+
IncludeERTFirstTime off
|
325
|
+
Array {
|
326
|
+
Type "Handle"
|
327
|
+
Dimension 2
|
328
|
+
Simulink.CodeAppCC {
|
329
|
+
$ObjectID 9
|
330
|
+
Array {
|
331
|
+
Type "Cell"
|
332
|
+
Dimension 16
|
333
|
+
Cell "IgnoreCustomStorageClasses"
|
334
|
+
Cell "InsertBlockDesc"
|
335
|
+
Cell "SFDataObjDesc"
|
336
|
+
Cell "SimulinkDataObjDesc"
|
337
|
+
Cell "DefineNamingRule"
|
338
|
+
Cell "SignalNamingRule"
|
339
|
+
Cell "ParamNamingRule"
|
340
|
+
Cell "InlinedPrmAccess"
|
341
|
+
Cell "CustomSymbolStr"
|
342
|
+
Cell "CustomSymbolStrGlobalVar"
|
343
|
+
Cell "CustomSymbolStrType"
|
344
|
+
Cell "CustomSymbolStrField"
|
345
|
+
Cell "CustomSymbolStrFcn"
|
346
|
+
Cell "CustomSymbolStrBlkIO"
|
347
|
+
Cell "CustomSymbolStrTmpVar"
|
348
|
+
Cell "CustomSymbolStrMacro"
|
349
|
+
PropName "DisabledProps"
|
350
|
+
}
|
351
|
+
Version "1.2.0"
|
352
|
+
ForceParamTrailComments off
|
353
|
+
GenerateComments on
|
354
|
+
IgnoreCustomStorageClasses on
|
355
|
+
IncHierarchyInIds off
|
356
|
+
MaxIdLength 31
|
357
|
+
PreserveName off
|
358
|
+
PreserveNameWithParent off
|
359
|
+
ShowEliminatedStatement off
|
360
|
+
IncAutoGenComments off
|
361
|
+
SimulinkDataObjDesc off
|
362
|
+
SFDataObjDesc off
|
363
|
+
IncDataTypeInIds off
|
364
|
+
PrefixModelToSubsysFcnNames on
|
365
|
+
MangleLength 1
|
366
|
+
CustomSymbolStrGlobalVar "$R$N$M"
|
367
|
+
CustomSymbolStrType "$N$R$M"
|
368
|
+
CustomSymbolStrField "$N$M"
|
369
|
+
CustomSymbolStrFcn "$R$N$M$F"
|
370
|
+
CustomSymbolStrBlkIO "rtb_$N$M"
|
371
|
+
CustomSymbolStrTmpVar "$N$M"
|
372
|
+
CustomSymbolStrMacro "$R$N$M"
|
373
|
+
DefineNamingRule "None"
|
374
|
+
ParamNamingRule "None"
|
375
|
+
SignalNamingRule "None"
|
376
|
+
InsertBlockDesc off
|
377
|
+
SimulinkBlockComments on
|
378
|
+
EnableCustomComments off
|
379
|
+
InlinedPrmAccess "Literals"
|
380
|
+
ReqsInCode off
|
381
|
+
}
|
382
|
+
Simulink.GRTTargetCC {
|
383
|
+
$BackupClass "Simulink.TargetCC"
|
384
|
+
$ObjectID 10
|
385
|
+
Array {
|
386
|
+
Type "Cell"
|
387
|
+
Dimension 13
|
388
|
+
Cell "IncludeMdlTerminateFcn"
|
389
|
+
Cell "CombineOutputUpdateFcns"
|
390
|
+
Cell "SuppressErrorStatus"
|
391
|
+
Cell "ERTCustomFileBanners"
|
392
|
+
Cell "GenerateSampleERTMain"
|
393
|
+
Cell "GenerateTestInterfaces"
|
394
|
+
Cell "MultiInstanceERTCode"
|
395
|
+
Cell "PurelyIntegerCode"
|
396
|
+
Cell "SupportNonFinite"
|
397
|
+
Cell "SupportComplex"
|
398
|
+
Cell "SupportAbsoluteTime"
|
399
|
+
Cell "SupportContinuousTime"
|
400
|
+
Cell "SupportNonInlinedSFcns"
|
401
|
+
PropName "DisabledProps"
|
402
|
+
}
|
403
|
+
Version "1.2.0"
|
404
|
+
TargetFcnLib "ansi_tfl_tmw.mat"
|
405
|
+
TargetLibSuffix ""
|
406
|
+
TargetPreCompLibLocation ""
|
407
|
+
GenFloatMathFcnCalls "ANSI_C"
|
408
|
+
UtilityFuncGeneration "Auto"
|
409
|
+
GenerateFullHeader on
|
410
|
+
GenerateSampleERTMain off
|
411
|
+
GenerateTestInterfaces off
|
412
|
+
IsPILTarget off
|
413
|
+
ModelReferenceCompliant on
|
414
|
+
IncludeMdlTerminateFcn on
|
415
|
+
CombineOutputUpdateFcns off
|
416
|
+
SuppressErrorStatus off
|
417
|
+
IncludeFileDelimiter "Auto"
|
418
|
+
ERTCustomFileBanners off
|
419
|
+
SupportAbsoluteTime on
|
420
|
+
LogVarNameModifier "rt_"
|
421
|
+
MatFileLogging on
|
422
|
+
MultiInstanceERTCode off
|
423
|
+
SupportNonFinite on
|
424
|
+
SupportComplex on
|
425
|
+
PurelyIntegerCode off
|
426
|
+
SupportContinuousTime on
|
427
|
+
SupportNonInlinedSFcns on
|
428
|
+
EnableShiftOperators on
|
429
|
+
ParenthesesLevel "Nominal"
|
430
|
+
ExtMode off
|
431
|
+
ExtModeStaticAlloc off
|
432
|
+
ExtModeTesting off
|
433
|
+
ExtModeStaticAllocSize 1000000
|
434
|
+
ExtModeTransport 0
|
435
|
+
ExtModeMexFile "ext_comm"
|
436
|
+
RTWCAPISignals off
|
437
|
+
RTWCAPIParams off
|
438
|
+
RTWCAPIStates off
|
439
|
+
GenerateASAP2 off
|
440
|
+
}
|
441
|
+
PropName "Components"
|
442
|
+
}
|
443
|
+
}
|
444
|
+
PropName "Components"
|
445
|
+
}
|
446
|
+
Name "Configuration"
|
447
|
+
SimulationMode "normal"
|
448
|
+
CurrentDlgPage "Solver"
|
449
|
+
}
|
450
|
+
PropName "ConfigurationSets"
|
451
|
+
}
|
452
|
+
Simulink.ConfigSet {
|
453
|
+
$PropName "ActiveConfigurationSet"
|
454
|
+
$ObjectID 1
|
455
|
+
}
|
456
|
+
BlockDefaults {
|
457
|
+
Orientation "right"
|
458
|
+
ForegroundColor "black"
|
459
|
+
BackgroundColor "white"
|
460
|
+
DropShadow off
|
461
|
+
NamePlacement "normal"
|
462
|
+
FontName "Arial"
|
463
|
+
FontSize 10
|
464
|
+
FontWeight "normal"
|
465
|
+
FontAngle "normal"
|
466
|
+
ShowName on
|
467
|
+
}
|
468
|
+
BlockParameterDefaults {
|
469
|
+
Block {
|
470
|
+
BlockType Constant
|
471
|
+
}
|
472
|
+
Block {
|
473
|
+
BlockType Integrator
|
474
|
+
ExternalReset "none"
|
475
|
+
InitialConditionSource "internal"
|
476
|
+
InitialCondition "0"
|
477
|
+
LimitOutput off
|
478
|
+
UpperSaturationLimit "inf"
|
479
|
+
LowerSaturationLimit "-inf"
|
480
|
+
ShowSaturationPort off
|
481
|
+
ShowStatePort off
|
482
|
+
AbsoluteTolerance "auto"
|
483
|
+
IgnoreLimit off
|
484
|
+
ZeroCross on
|
485
|
+
}
|
486
|
+
Block {
|
487
|
+
BlockType Scope
|
488
|
+
ModelBased off
|
489
|
+
TickLabels "OneTimeTick"
|
490
|
+
ZoomMode "on"
|
491
|
+
Grid "on"
|
492
|
+
TimeRange "auto"
|
493
|
+
YMin "-5"
|
494
|
+
YMax "5"
|
495
|
+
SaveToWorkspace off
|
496
|
+
SaveName "ScopeData"
|
497
|
+
LimitDataPoints on
|
498
|
+
MaxDataPoints "5000"
|
499
|
+
Decimation "1"
|
500
|
+
SampleInput off
|
501
|
+
SampleTime "-1"
|
502
|
+
}
|
503
|
+
Block {
|
504
|
+
BlockType Sin
|
505
|
+
SineType "Time based"
|
506
|
+
TimeSource "Use simulation time"
|
507
|
+
Amplitude "1"
|
508
|
+
Bias "0"
|
509
|
+
Frequency "1"
|
510
|
+
Phase "0"
|
511
|
+
Samples "10"
|
512
|
+
Offset "0"
|
513
|
+
SampleTime "-1"
|
514
|
+
VectorParams1D on
|
515
|
+
}
|
516
|
+
Block {
|
517
|
+
BlockType Sum
|
518
|
+
IconShape "rectangular"
|
519
|
+
Inputs "++"
|
520
|
+
InputSameDT on
|
521
|
+
OutDataTypeMode "Same as first input"
|
522
|
+
OutDataType "sfix(16)"
|
523
|
+
OutScaling "2^0"
|
524
|
+
LockScale off
|
525
|
+
RndMeth "Floor"
|
526
|
+
SaturateOnIntegerOverflow on
|
527
|
+
SampleTime "-1"
|
528
|
+
}
|
529
|
+
Block {
|
530
|
+
BlockType VariableTransportDelay
|
531
|
+
VariableDelayType "Variable time delay"
|
532
|
+
MaximumDelay "1"
|
533
|
+
InitialOutput "0"
|
534
|
+
MaximumPoints "1024"
|
535
|
+
FixedBuffer off
|
536
|
+
ZeroDelay off
|
537
|
+
TransDelayFeedthrough off
|
538
|
+
PadeOrder "0"
|
539
|
+
AbsoluteTolerance "auto"
|
540
|
+
}
|
541
|
+
}
|
542
|
+
AnnotationDefaults {
|
543
|
+
HorizontalAlignment "center"
|
544
|
+
VerticalAlignment "middle"
|
545
|
+
ForegroundColor "black"
|
546
|
+
BackgroundColor "white"
|
547
|
+
DropShadow off
|
548
|
+
FontName "Arial"
|
549
|
+
FontSize 10
|
550
|
+
FontWeight "normal"
|
551
|
+
FontAngle "normal"
|
552
|
+
}
|
553
|
+
LineDefaults {
|
554
|
+
FontName "Arial"
|
555
|
+
FontSize 9
|
556
|
+
FontWeight "normal"
|
557
|
+
FontAngle "normal"
|
558
|
+
}
|
559
|
+
System {
|
560
|
+
Name "delay"
|
561
|
+
Location [740, 99, 1393, 457]
|
562
|
+
Open on
|
563
|
+
ModelBrowserVisibility off
|
564
|
+
ModelBrowserWidth 200
|
565
|
+
ScreenColor "white"
|
566
|
+
PaperOrientation "landscape"
|
567
|
+
PaperPositionMode "auto"
|
568
|
+
PaperType "usletter"
|
569
|
+
PaperUnits "inches"
|
570
|
+
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
|
571
|
+
TiledPageScale 1
|
572
|
+
ShowPageBoundaries off
|
573
|
+
ZoomFactor "100"
|
574
|
+
ReportName "simulink-default.rpt"
|
575
|
+
Block {
|
576
|
+
BlockType Constant
|
577
|
+
Name "Constant"
|
578
|
+
Position [35, 50, 65, 80]
|
579
|
+
Value "0.3"
|
580
|
+
VectorParams1D on
|
581
|
+
SamplingMode "Sample based"
|
582
|
+
OutDataTypeMode "Inherit from 'Constant value'"
|
583
|
+
OutDataType "sfix(16)"
|
584
|
+
ConRadixGroup "Use specified scaling"
|
585
|
+
OutScaling "2^0"
|
586
|
+
SampleTime "inf"
|
587
|
+
FramePeriod "inf"
|
588
|
+
}
|
589
|
+
Block {
|
590
|
+
BlockType Integrator
|
591
|
+
Name "Integrator"
|
592
|
+
Ports [1, 1]
|
593
|
+
Position [245, 190, 275, 220]
|
594
|
+
IgnoreLimit off
|
595
|
+
}
|
596
|
+
Block {
|
597
|
+
BlockType Integrator
|
598
|
+
Name "Integrator1"
|
599
|
+
Ports [1, 1]
|
600
|
+
Position [120, 155, 150, 185]
|
601
|
+
Orientation "down"
|
602
|
+
IgnoreLimit off
|
603
|
+
}
|
604
|
+
Block {
|
605
|
+
BlockType Scope
|
606
|
+
Name "Scope"
|
607
|
+
Ports [3]
|
608
|
+
Position [450, 73, 480, 107]
|
609
|
+
Floating off
|
610
|
+
Location [530, 201, 1258, 894]
|
611
|
+
Open on
|
612
|
+
NumInputPorts "3"
|
613
|
+
ZoomMode "yonly"
|
614
|
+
List {
|
615
|
+
ListType AxesTitles
|
616
|
+
axes1 "%<SignalLabel>"
|
617
|
+
axes2 "%<SignalLabel>"
|
618
|
+
axes3 "%<SignalLabel>"
|
619
|
+
}
|
620
|
+
YMin "-5~-5~-5"
|
621
|
+
YMax "5~5~5"
|
622
|
+
DataFormat "StructureWithTime"
|
623
|
+
SampleTime "0"
|
624
|
+
}
|
625
|
+
Block {
|
626
|
+
BlockType Scope
|
627
|
+
Name "Scope1"
|
628
|
+
Ports [3]
|
629
|
+
Position [505, 238, 535, 272]
|
630
|
+
Floating off
|
631
|
+
Location [530, 201, 1258, 894]
|
632
|
+
Open off
|
633
|
+
NumInputPorts "3"
|
634
|
+
ZoomMode "yonly"
|
635
|
+
List {
|
636
|
+
ListType AxesTitles
|
637
|
+
axes1 "%<SignalLabel>"
|
638
|
+
axes2 "%<SignalLabel>"
|
639
|
+
axes3 "%<SignalLabel>"
|
640
|
+
}
|
641
|
+
YMin "-5~-5~-5"
|
642
|
+
YMax "5~5~5"
|
643
|
+
SaveName "ScopeData1"
|
644
|
+
DataFormat "StructureWithTime"
|
645
|
+
SampleTime "0"
|
646
|
+
}
|
647
|
+
Block {
|
648
|
+
BlockType Sin
|
649
|
+
Name "Sin"
|
650
|
+
Ports [0, 1]
|
651
|
+
Position [85, 15, 115, 45]
|
652
|
+
SineType "Time based"
|
653
|
+
Frequency "pi/2"
|
654
|
+
SampleTime "0"
|
655
|
+
}
|
656
|
+
Block {
|
657
|
+
BlockType Sum
|
658
|
+
Name "Sum"
|
659
|
+
Ports [2, 1]
|
660
|
+
Position [370, 120, 390, 140]
|
661
|
+
ShowName off
|
662
|
+
IconShape "round"
|
663
|
+
Inputs "|-+"
|
664
|
+
InputSameDT off
|
665
|
+
OutDataTypeMode "Inherit via internal rule"
|
666
|
+
SaturateOnIntegerOverflow off
|
667
|
+
}
|
668
|
+
Block {
|
669
|
+
BlockType Sum
|
670
|
+
Name "Sum1"
|
671
|
+
Ports [2, 1]
|
672
|
+
Position [425, 285, 445, 305]
|
673
|
+
ShowName off
|
674
|
+
IconShape "round"
|
675
|
+
Inputs "|-+"
|
676
|
+
InputSameDT off
|
677
|
+
OutDataTypeMode "Inherit via internal rule"
|
678
|
+
SaturateOnIntegerOverflow off
|
679
|
+
}
|
680
|
+
Block {
|
681
|
+
BlockType VariableTransportDelay
|
682
|
+
Name "Variable\nTime Delay"
|
683
|
+
Position [175, 22, 205, 53]
|
684
|
+
MaximumDelay "10"
|
685
|
+
}
|
686
|
+
Block {
|
687
|
+
BlockType VariableTransportDelay
|
688
|
+
Name "Variable\nTime Delay1"
|
689
|
+
Position [150, 237, 180, 268]
|
690
|
+
MaximumDelay "10"
|
691
|
+
}
|
692
|
+
Block {
|
693
|
+
BlockType Sin
|
694
|
+
Name "shifted sin"
|
695
|
+
Ports [0, 1]
|
696
|
+
Position [85, 75, 115, 105]
|
697
|
+
SineType "Time based"
|
698
|
+
Frequency "pi/2"
|
699
|
+
Phase "-0.3 * pi/2"
|
700
|
+
SampleTime "0"
|
701
|
+
}
|
702
|
+
Line {
|
703
|
+
SrcBlock "Sin"
|
704
|
+
SrcPort 1
|
705
|
+
Points [15, 0]
|
706
|
+
Branch {
|
707
|
+
DstBlock "Variable\nTime Delay"
|
708
|
+
DstPort 1
|
709
|
+
}
|
710
|
+
Branch {
|
711
|
+
DstBlock "Integrator1"
|
712
|
+
DstPort 1
|
713
|
+
}
|
714
|
+
}
|
715
|
+
Line {
|
716
|
+
SrcBlock "Variable\nTime Delay"
|
717
|
+
SrcPort 1
|
718
|
+
Points [20, 0]
|
719
|
+
Branch {
|
720
|
+
Points [125, 0; 0, 40]
|
721
|
+
Branch {
|
722
|
+
DstBlock "Scope"
|
723
|
+
DstPort 1
|
724
|
+
}
|
725
|
+
Branch {
|
726
|
+
DstBlock "Sum"
|
727
|
+
DstPort 1
|
728
|
+
}
|
729
|
+
}
|
730
|
+
Branch {
|
731
|
+
DstBlock "Integrator"
|
732
|
+
DstPort 1
|
733
|
+
}
|
734
|
+
}
|
735
|
+
Line {
|
736
|
+
SrcBlock "shifted sin"
|
737
|
+
SrcPort 1
|
738
|
+
Points [215, 0]
|
739
|
+
Branch {
|
740
|
+
DstBlock "Scope"
|
741
|
+
DstPort 2
|
742
|
+
}
|
743
|
+
Branch {
|
744
|
+
Points [0, 65]
|
745
|
+
DstBlock "Sum"
|
746
|
+
DstPort 2
|
747
|
+
}
|
748
|
+
}
|
749
|
+
Line {
|
750
|
+
SrcBlock "Sum"
|
751
|
+
SrcPort 1
|
752
|
+
Points [20, 0; 0, -30]
|
753
|
+
DstBlock "Scope"
|
754
|
+
DstPort 3
|
755
|
+
}
|
756
|
+
Line {
|
757
|
+
SrcBlock "Constant"
|
758
|
+
SrcPort 1
|
759
|
+
Points [5, 0]
|
760
|
+
Branch {
|
761
|
+
Points [80, 0; 0, -20]
|
762
|
+
DstBlock "Variable\nTime Delay"
|
763
|
+
DstPort 2
|
764
|
+
}
|
765
|
+
Branch {
|
766
|
+
Points [0, 195]
|
767
|
+
DstBlock "Variable\nTime Delay1"
|
768
|
+
DstPort 2
|
769
|
+
}
|
770
|
+
}
|
771
|
+
Line {
|
772
|
+
SrcBlock "Integrator"
|
773
|
+
SrcPort 1
|
774
|
+
Points [130, 0; 0, 40]
|
775
|
+
Branch {
|
776
|
+
DstBlock "Scope1"
|
777
|
+
DstPort 1
|
778
|
+
}
|
779
|
+
Branch {
|
780
|
+
DstBlock "Sum1"
|
781
|
+
DstPort 1
|
782
|
+
}
|
783
|
+
}
|
784
|
+
Line {
|
785
|
+
SrcBlock "Variable\nTime Delay1"
|
786
|
+
SrcPort 1
|
787
|
+
Points [205, 0]
|
788
|
+
Branch {
|
789
|
+
DstBlock "Scope1"
|
790
|
+
DstPort 2
|
791
|
+
}
|
792
|
+
Branch {
|
793
|
+
Points [0, 65]
|
794
|
+
DstBlock "Sum1"
|
795
|
+
DstPort 2
|
796
|
+
}
|
797
|
+
}
|
798
|
+
Line {
|
799
|
+
SrcBlock "Sum1"
|
800
|
+
SrcPort 1
|
801
|
+
Points [20, 0; 0, -30]
|
802
|
+
DstBlock "Scope1"
|
803
|
+
DstPort 3
|
804
|
+
}
|
805
|
+
Line {
|
806
|
+
SrcBlock "Integrator1"
|
807
|
+
SrcPort 1
|
808
|
+
DstBlock "Variable\nTime Delay1"
|
809
|
+
DstPort 1
|
810
|
+
}
|
811
|
+
Annotation {
|
812
|
+
Name "Note: 0.3 is\nhardcoded\ninside the\nshift bloc"
|
813
|
+
"k"
|
814
|
+
Position [41, 125]
|
815
|
+
BackgroundColor "yellow"
|
816
|
+
UseDisplayTextAsClickCallback off
|
817
|
+
}
|
818
|
+
Annotation {
|
819
|
+
Name "Compare the 3rd plot in this scope\nwith the id"
|
820
|
+
"di_err in delay.rb.\nRedShift is more accurate\nbecause delay flows buffer\nt"
|
821
|
+
"he entire rk4 state, not\njust the values at the timesteps."
|
822
|
+
Position [528, 194]
|
823
|
+
BackgroundColor "cyan"
|
824
|
+
UseDisplayTextAsClickCallback off
|
825
|
+
}
|
826
|
+
}
|
827
|
+
}
|