谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
+ i. T: M% G7 S& U/ Ibegin model initialization function2 |: [5 @9 R3 ]3 c* Z6 W+ L
create 1 load of load type L_null to P_Creation22 F* D" o. C) D `) z
create 1 load of load type L_null to P_Creation3
& B% X+ A8 i8 d) l" q; E create 1 load of load type L_null to P_Creation4
C# c" E% B, T5 V, J return true ) J- p1 L* g. _# y# z& [
end" Q6 q- Z% A0 ]# a' L
/ x7 f* s6 p `0 \7 E
begin P_Creation2 arriving procedure
: m1 V6 P: X$ Q$ K, lwhile 1=1 do( W( I# ~+ a/ A
begin' f! `* R @- d; K! I/ c5 @1 S
wait for 1 sec
' R- S$ n( X$ D' _2 m% T* P create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)9 T2 T3 r% E, S" ^- K2 r
end
1 I# t; d- x5 ~9 eend
+ M9 P# q* M4 u. U. G3 n) P
, G- N9 X) {1 f) ?- e* Ybegin P_Creation3 arriving procedure
e+ u2 C% D. w* B! K- Z, A, x; wwhile 1=1 do7 R n0 \# n; D& ] M
begin2 `# t, i: N2 j/ t; q$ m6 a ^
wait for 1 sec
3 r" `. |6 L) P3 h2 k create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)6 K! a% m1 j; s4 n: `
end% o, ~, g7 L5 n( ]) j1 P
end % q; f6 Z' n8 C' u% I
, Z$ g+ D" r* j0 s" | p# m8 Hbegin P_Creation4 arriving procedure
9 ` L# N( `3 L- L9 Bwhile 1=1 do
8 H t' N+ C5 @0 ? r9 ` }$ k& X begin
' u# u/ ?' L9 {6 t$ O wait for 1 sec* k6 {( ]6 Q. ~, u6 v
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
4 w/ b/ z7 w2 ?2 H end, R; P3 e5 f; @7 _4 R
end
" y7 ?3 E* L$ N1 m, e1 n) w/ t
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |