谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
. z* j7 v p+ O6 U: D, P0 pbegin model initialization function4 H. V4 b5 q* Y3 P2 |& J& Q
create 1 load of load type L_null to P_Creation2
" Z& |0 c. D+ N create 1 load of load type L_null to P_Creation3. T* o9 j$ y6 W
create 1 load of load type L_null to P_Creation4
, H1 D2 x$ ~: B4 T6 { return true 4 q; U9 ^) ^6 t' z' [
end
( _2 p; ^: n9 B8 x- J, m* N0 m x$ k/ c
begin P_Creation2 arriving procedure+ @- Y I7 r( Q! T. @
while 1=1 do( K; X5 \% n& A+ m( {
begin
* [5 r/ Q3 K% B6 d& K* M( o( m wait for 1 sec
- u( _# B0 B% o$ A1 r3 j3 V- e% e, U create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)2 a4 L4 U' |+ L# @7 X2 Q" ^6 |
end9 n1 K2 Y" h$ T3 Z! o
end
2 H, i8 \) V! O! d' L1 M5 ^, e2 u5 I+ @
begin P_Creation3 arriving procedure
- _; {; |9 A p! Twhile 1=1 do9 J, k! b9 @" W9 I. o
begin) H$ J1 m3 n, V# x$ u7 G
wait for 1 sec
$ w3 K& \. P7 _1 B. a1 I create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
4 @ K2 V! E8 j- P1 F6 o; J: } end, |" V- A( T; D9 Z- \ p
end : R& ?* D- S- |
2 F1 k0 c7 W3 k. s& h: |begin P_Creation4 arriving procedure
+ P; b- x; ?% Gwhile 1=1 do* v$ U* F8 x- ^+ D3 N
begin
3 ?: P- J& p6 U0 |, v! s wait for 1 sec
! I. M* l( R: j/ j. O create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)1 w# D' S: e- a8 e
end# P F! z% d) r! X3 y
end2 u Y4 _. }/ {$ w, y" E& K/ v
1 w; x2 e! r, A6 {" P
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |