谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);+ J2 y- m! i1 x1 e5 k$ ^/ {# Z
begin model initialization function' E* ~0 R& I' }2 v) A
create 1 load of load type L_null to P_Creation21 V% j& w& `# X5 \; o
create 1 load of load type L_null to P_Creation3" y# t+ v, o7 N8 o7 O/ T, O% I
create 1 load of load type L_null to P_Creation4
1 i3 s! p2 D+ w* w6 C4 {7 Y) X return true # M% A& K7 b. p! b8 f# O; [6 a8 d6 O
end( m$ g* y6 [; r; c. v
9 r/ F+ `' ^% }+ m' Nbegin P_Creation2 arriving procedure0 m4 V5 T7 {$ @. b6 V' h/ Q. h! G
while 1=1 do
" W0 a' Y, p5 T, n! c0 V' u begin2 `, t4 B- _8 t& n' `4 b. F
wait for 1 sec
4 @4 q1 J3 P4 A# o- x! B v create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
- H$ x7 B$ K) V& ^1 G end. y$ p) {1 |+ T
end
7 b/ {+ d- s3 B
9 L* {$ U- |. F2 `2 lbegin P_Creation3 arriving procedure W5 V8 M+ C+ k. g6 v
while 1=1 do m/ ?0 S3 ^9 @4 R$ D+ Q1 c5 z
begin+ r' @3 {$ d+ a% G; a
wait for 1 sec
. x" |9 _' s+ I$ e9 Q1 D/ D create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
2 M9 R, U- _* s, r end' V, X; t1 `: C# @* [; M4 s/ v
end
& ^1 `3 s5 C' B0 b# e' R+ d3 E) F
: ` }; g0 [7 v1 n$ Q- G9 c* Z) G' Rbegin P_Creation4 arriving procedure
- r' T3 q% i0 ~& Ewhile 1=1 do" Y2 f4 U1 j% X
begin8 l! P( ~9 O1 t& q! ]
wait for 1 sec
, Y- _. \, ~. s" j' x0 R* Y create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)3 r' N6 \' [6 m7 b( y! H
end
( m7 }2 b1 Q8 V7 a# R9 N0 K Qend
0 `" v$ }6 v- F
; L# d0 ~, {- O" F但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |