谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);2 F' G% A: D$ p# r
begin model initialization function2 V2 h( x" g* w2 G1 O" G! x0 B- p
create 1 load of load type L_null to P_Creation2
4 w& R0 u. |) ^ create 1 load of load type L_null to P_Creation3
6 R+ o3 z5 S4 ?/ g: L0 A0 \4 h8 F! q& o; l create 1 load of load type L_null to P_Creation4
! U- ?+ H8 I9 K& E return true & ~% L# r' F- ^
end5 f4 Z3 D( C& f6 Y* S' p
* _, E/ x( z) D- b5 n, L9 L
begin P_Creation2 arriving procedure: e- C- `% i# D1 t) o+ ]! f
while 1=1 do# X6 E5 _9 I) d4 Z' S K( R# P' J( T
begin
" _1 A) U& F/ V! {8 V: S0 ?1 P wait for 1 sec
`# x+ V% B9 l+ y) N6 r8 [ create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)) @8 j% S- r" y; N, F) @2 R; |
end. y4 k7 \: V q9 o3 D! L* t6 m
end
- A# y4 p: t' k, v! P% F* N& Y2 D+ I' v4 i1 L( `
begin P_Creation3 arriving procedure* P, a5 d, S* p! a' i
while 1=1 do2 m! R; n$ W- Y1 z+ F
begin
4 R2 C2 d2 A/ [6 |# A% t wait for 1 sec
& T+ \ P# [2 [; j; q( K create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)' o/ d+ c4 d0 R r! c! K/ J# e9 O9 |
end
" U) D h! r) Q! T' Nend
8 @6 Z0 S% }" g
$ j3 B, c7 T& K6 ~& _/ }. r. bbegin P_Creation4 arriving procedure
2 U2 M9 g( ^% Y8 l& g+ ?2 T7 y& Vwhile 1=1 do
+ O5 @, @% M9 p4 N begin
7 S2 a! ^3 |7 l: W% p wait for 1 sec
! Y& I1 o" [) m* U8 U' Z% q create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die), O2 F4 e) r9 i& j y1 q" j
end+ a2 h' [1 t7 m1 J1 T7 f! b6 J' `
end; g; ?( M6 |# w
) s7 s$ G+ C( L- U* d
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |