谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);! f! y" V3 i4 U6 M d
begin model initialization function
% H3 F2 q7 c6 h% s create 1 load of load type L_null to P_Creation2
' J" B4 a& Y" N0 g: C create 1 load of load type L_null to P_Creation3
* n/ Q7 z# m' l1 \% u create 1 load of load type L_null to P_Creation4
. n! ]1 @7 q; @3 v return true
' O- m# |$ s6 V: c% ^' v& |) @end- W: }, B0 R/ {3 n5 O" n; r3 D! k
% _/ i. e* N2 n! U# @& xbegin P_Creation2 arriving procedure
9 r' b$ J5 p0 \. b1 ~while 1=1 do
+ g# n% x$ C( w" c: _9 d begin. y; n8 o) v u" B+ N6 _' r
wait for 1 sec5 g/ T$ m$ o @5 h
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
- y, ^6 V- Z( B' W end
1 l; h) V1 e5 z2 Wend B2 `: _- q4 M
+ ^0 Q% B" ?, Z, _6 b: u _begin P_Creation3 arriving procedure- c8 x9 Z* [. I) |1 r5 y# T
while 1=1 do
: v' G) i, v; z begin
: P. N! N. K7 j+ i% C4 A; W; z wait for 1 sec
3 Z2 a0 U- q$ A" H8 I create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)2 t3 ] l5 |2 I _9 H% A
end
$ c& q% O8 Y- b3 lend 8 m5 n; y, z# u3 X1 X, w3 [. {
$ U* J- v) G5 I+ K8 K0 \begin P_Creation4 arriving procedure
, G: @" c! V" t1 P4 awhile 1=1 do! Z6 U6 a8 |* s) q( `: O3 X/ S
begin5 Y6 d; F2 r. S2 u$ U) ~% ]+ x
wait for 1 sec
( ~, v# O! Z; G$ i create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)5 U# o4 b- B( B) V- p/ H# H6 [* V
end
6 T( ?+ x8 q: H6 j7 G$ jend
1 }% v. @" E; r3 _! `7 T# R' f, L! T' E
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |