谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);& L" X4 Y6 r' r, A
begin model initialization function% N+ z$ V8 |) _ E0 V! l8 |0 U
create 1 load of load type L_null to P_Creation2
' t* K' }9 q2 s create 1 load of load type L_null to P_Creation3. H3 x3 A& I3 G/ G d5 \
create 1 load of load type L_null to P_Creation4; J8 K# e; a. Y3 v+ x, T
return true
# A5 [9 q' _, r9 qend
2 ^1 x' }1 F5 V0 J) A
3 k; S: l/ C1 m$ T- J- sbegin P_Creation2 arriving procedure
$ s1 D4 ]! f4 k+ F9 x9 F* J7 Y: kwhile 1=1 do
# F+ H3 \; ^. x% L+ g% A begin
- u4 R$ `9 u( h" x0 i; m* I wait for 1 sec8 `, k8 {( Y1 Y. R7 b
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
/ s7 L3 q" D! R \- m end! I- q/ \, A+ Y+ v; L
end9 L( f$ r( l$ X* ? q, O0 ~
6 G; h! S; s, fbegin P_Creation3 arriving procedure8 l [$ D" S) L3 Q" D
while 1=1 do
- ?0 n7 u& ]2 o, w2 m P begin
4 ` r$ `; Y# b; [' @* p$ V* {, v" ] wait for 1 sec9 e3 i! B# d1 Q2 H+ r6 X/ _
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)1 p% f7 D5 }9 L
end0 V, K* `4 _; n4 _
end
2 U+ k+ T& D7 Q5 Y+ [5 W
U! Y4 a" A, j" Y( Ebegin P_Creation4 arriving procedure
/ _8 I+ K% x& x7 U2 kwhile 1=1 do
0 m5 h9 V; u& n0 m b1 Z begin3 u3 |3 C9 [, M8 _4 ]6 ^! y
wait for 1 sec$ E' ` x8 W$ W. o O: ?/ ]
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
* d. V6 g" `% c8 }" v+ M end0 M- U. w/ ?9 Z5 v' j$ U6 n
end
7 ]" z, X8 X" q4 |* C& D( ^: |4 F' t( X4 Y
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |