谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);% w$ a, T' M5 P
begin model initialization function
1 ~3 l+ |! o& S6 r V* I: D create 1 load of load type L_null to P_Creation2# l1 \" x4 r. H" r/ w3 r( m# T
create 1 load of load type L_null to P_Creation3% |4 M( d- N. d+ y1 i% M7 U
create 1 load of load type L_null to P_Creation4
1 l. ]; w, W) K& H" e+ q return true % ]! m2 l, s+ ] b" h1 f! ]
end2 Z( g5 J" s ?8 q
w) n4 N# A% V2 b! {- F
begin P_Creation2 arriving procedure
3 A/ p* [, K! c7 h2 K+ Iwhile 1=1 do# Y% g. [; ^% ]/ y! r0 j# |. V
begin( t+ o) q- {0 } {4 Q7 E
wait for 1 sec; I7 `+ h$ t4 U, b+ k
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die) P; d3 Y6 J0 T0 T* ^; O& X# G
end3 l- w: Z/ X- Q1 i, n! g8 `0 I' j* `
end, V0 I5 L" \8 j+ i. W( ~* A% f
6 h5 [# k$ a! C$ sbegin P_Creation3 arriving procedure
+ u7 b8 }- K: T& m6 [while 1=1 do S L3 T7 P8 Z, e! B
begin( n* W) a" B6 D* \
wait for 1 sec# d+ z7 m# n8 z! {$ D
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
7 _" ] r$ i$ C! e end
, c3 V) R4 I5 B7 S& ]end
h. b9 j, h) e+ m1 @! k% e a6 W% m! {9 A
begin P_Creation4 arriving procedure# l2 y; u/ M m+ D
while 1=1 do
! h1 }! p* h+ O7 R5 T: P begin1 U3 [8 T/ k% @3 \3 M
wait for 1 sec" I4 _- y/ T* V6 h% B/ V! L5 v6 M
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
3 m& w5 `, B% X6 d& w C+ D end
* o+ j# q+ c& O; oend
( w" u$ Y4 L0 A. w: S/ B7 A H
# d( o/ B- `) ?+ p但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |