谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);+ y$ r8 i( [; ^, c: k- _' }1 X6 b
begin model initialization function
, q- r3 C0 }" h9 [) ~ create 1 load of load type L_null to P_Creation2
; Y( z1 P9 r' ^- R0 A( \8 X create 1 load of load type L_null to P_Creation3
6 E* [2 z# `3 B& k create 1 load of load type L_null to P_Creation4
7 y! r6 o* _& c% X. B: j return true ; r+ k/ f) Y: u' s+ _9 A
end, L _+ \% G1 Y3 z$ a+ b+ P
8 z8 H: j V1 x- C) X3 Z+ D5 Nbegin P_Creation2 arriving procedure
! o7 n7 w5 O2 I% pwhile 1=1 do
0 Q2 r' }9 d, j, }4 l begin
6 W8 D D8 N! k o wait for 1 sec
[3 c! y4 c4 r2 S# q% C1 x create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)1 H$ y6 w5 ^" ]( c
end
% [4 t$ d& y+ O. J' _0 _' A7 x4 `$ Zend
( e, }/ J9 f/ b& W
+ n0 {' f6 K3 r8 F. r. ebegin P_Creation3 arriving procedure
9 C2 d2 a+ d3 y4 L z5 j& Q7 @) ^while 1=1 do
/ ^ N. I1 k" Y begin
* I) L# A8 O! E% v5 h, b* f wait for 1 sec$ l6 @4 G- u/ {( o( j) Q. y
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)0 _4 T: v8 D# B9 M! D
end. ^( Q& @( s$ O! z
end : Q9 Z3 i/ u- _+ v0 R' \( e" Y- {0 Y! q
: z% g0 R, m% M' G8 A0 U+ i- d
begin P_Creation4 arriving procedure1 [/ Q6 n! O, B% D. F; K
while 1=1 do
4 L* ^3 ^5 c3 c7 l begin
9 G) u; U' Z# ?8 t" _: h, T/ G wait for 1 sec/ h$ _3 E( E, W* {5 f! ~: \
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)0 Y- t. p4 U# f+ Q. M
end
. V T7 O3 r' A( Dend' H s. c, _% \# U( Y, L
# g2 [% B& I5 k; P
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |