谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);3 Y$ ?9 N( w2 c* ^/ g) o4 N9 [
begin model initialization function4 I8 D( ]) A' G( U1 u" O
create 1 load of load type L_null to P_Creation2
1 O) a, D( y0 w9 w* |$ c create 1 load of load type L_null to P_Creation3; V2 f9 J& o9 G. B" ~
create 1 load of load type L_null to P_Creation4
$ ]4 j8 K/ s$ c+ X5 Q0 B! V return true
' G* c) Z4 V! x" \! ]# hend0 @& X Z& e8 H! a$ `
" l1 \. ^: X: U' A, o
begin P_Creation2 arriving procedure
* L1 ~5 W) O, ?! A2 Ewhile 1=1 do. m [# B k0 l# o! K
begin% @$ d; ]' h( ? C7 q% Z# D6 u9 y
wait for 1 sec
" l4 x( j& R! ~) |9 ? create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
! W! ?5 {0 ^; o* h0 a end5 _1 j3 J" j5 `9 Q4 p
end
2 \* S3 p9 Z' V, M' E0 |! E, r- H
begin P_Creation3 arriving procedure% q' F. T4 L8 T# R8 q; Y7 b h
while 1=1 do
( \! K# Y/ G7 X B1 P. _3 s begin
' l7 X: F! y6 n! p" n% \ wait for 1 sec
* M' V8 h& R, h- Z create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)2 E# ]* b/ G* B. N$ t7 b1 [
end; ]& u3 R5 W3 d9 R
end / B& A; C4 u4 O+ b
' V1 `: L ?9 h: o4 T$ Z. p2 R y
begin P_Creation4 arriving procedure
2 H, o* V8 b$ R+ X* C: nwhile 1=1 do
+ z5 r' K1 n6 ^ begin# f5 y; @- p: z- h/ w
wait for 1 sec
$ j0 @8 R/ y4 z) L create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
* v: `% e0 h' c4 R end
: o" n: |. `& v/ Tend
7 \( j! `7 M0 X9 ]
& b7 z( w7 u+ E- {. y但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |