谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);' I H8 d6 M6 `* d
begin model initialization function1 r, l. k% I7 C' T) \* |; R( o2 e
create 1 load of load type L_null to P_Creation2
& U6 t8 b0 B! J+ _, i create 1 load of load type L_null to P_Creation3
6 }8 }% }. l- U. O create 1 load of load type L_null to P_Creation4" I: R* y" z G4 j
return true . N& F# b% v7 ?! p" O1 D$ w
end
2 ^- C. s6 B$ l0 ^# ]1 u, O* f3 d* T) C9 \
begin P_Creation2 arriving procedure
. z/ W, e* `+ U0 F1 rwhile 1=1 do/ v# Q$ D5 ^8 L5 W6 n
begin
& _) m6 J- R0 M, o9 [3 O wait for 1 sec8 C x0 U9 U& Y, t+ V
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)* w- Z' a4 ]5 h# }4 d
end( G0 B1 Z7 ~& w, {
end, ~0 G( K+ n) C8 r
, U# H; Z+ Y+ y$ i5 e. L
begin P_Creation3 arriving procedure0 W n" m) m1 O. f
while 1=1 do: i9 |2 V5 y+ u# S; A! t* |+ [7 y4 T, x
begin
9 I9 Y! S( T+ U% E0 s wait for 1 sec) ]0 i. v' C' s/ q3 c% w5 G
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
* x& o5 X: y* F ? end
( Y, ?) h" F+ h- H- d% |+ L& [, Gend ; J( w6 Z6 r4 i2 I+ U9 Q1 e
! W/ _7 O0 H- E9 j! T* Z6 ~* A+ T
begin P_Creation4 arriving procedure9 M0 D+ i; j# W$ I [
while 1=1 do
; X, |0 y) ~! J0 E M- C% B) R begin
; g9 o% b* i, p8 ] wait for 1 sec: F6 N3 }1 n3 v9 G6 w
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
4 K" {: ?5 d, k5 M6 w/ U9 v4 Y end$ k/ Y+ s6 v. ^
end
' W5 w/ c% M7 P: M
9 |; v6 ~+ V0 r0 }但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |