设为首页收藏本站

最大的系统仿真与系统优化公益交流社区

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8062|回复: 9

[求助] 用AGV模板发生了以下错误,请解!

  [复制链接]
发表于 2011-11-5 16:38:28 | 显示全部楼层 |阅读模式
问题在哪里?

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
 楼主| 发表于 2011-11-14 10:37:54 | 显示全部楼层
没有解决,再顶一下。
 楼主| 发表于 2011-11-17 11:03:27 | 显示全部楼层
/* called by:        entrance ctrl of the object 'track'1 t/ c' |& G6 ?3 S
*/
0 Z+ x) G/ m" i7 F/ x' ^is% K" G5 [5 g5 u1 i) t
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 R( `1 c! K3 r+ O
do
8 g3 G- @" j# x        Lan := rootfolder.Internal.Tools.AOLlanguage;
, P- E8 ^/ ^1 ]# _( [        if current = @.Destination -- else return! j. x4 m! c9 w
        then$ ?+ n' R/ \% T
                @.Destination := void;9 n* P7 h* O: n( k
                if @.occupied then7 ?) ]  A, i: q2 F: ?$ ?/ Y
                        part := @.cont;
) n/ x' }$ V$ c( D# a2 _                        @.transpOrder := void;9 \/ E: Y5 s' z, o6 ~
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ N/ o  V+ P# o* I" W& V                                @,root.eventcontroller.simTime);1 l0 d2 _# }) g" B& E; @) i0 S
                        @.HasOrder := false;/ w: g' I0 ?  w$ N4 e0 S  \3 u* |+ @" I
                        @.DrivingHome := true;; u1 `$ V- q3 _7 r
                        rgManager.tryToStartTransOrder;! b" ]# o3 Q1 n
                        if @.Destination = void; z) E9 y" \9 A, s( j2 \$ e
                        then -- no transport order for vehicle @. R0 T$ e6 J. o4 Q: f# S" L
                                @.Destination :=
2 U* J5 Y) l: o                                rgManager.nearestFreeStation(@,track.~);3 I: C$ t) M9 ~) C$ A
                                newDirection(@);   
6 D) A# G" w7 M. d+ Y1 n                                if @.Destination /= void then0 D$ Y6 ?7 j  p8 X% Q: f1 d7 M
                                        @.Destination.NumReservation :=
; w  ^. h4 |5 u5 T* b" `                                        @.Destination.NumReservation + 1;% g1 N- C3 D; K& e* `- k* Q
                                end;
/ J$ z" T. R# \( d. [                                @.CurrIcon := "drivingHome";5 P. |9 `& K! X: w% v. ^4 B
                                @.DrivingHome := true;
0 N& ]9 j5 }9 k5 V+ w, [! E                        end;, ^" S) q: l9 }, ]7 [1 j
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station; X. D2 _$ M9 I
                        part := @.transpOrder;
& \) a8 R$ B2 `9 s; ^" y; b                        part.move(@);-- load part
7 T8 E) ~( }" D' B- ^                        @.CurrIcon := "load";  E% j: z6 l8 w. h) j1 r
                        GlobalDistObj := part.globDestination;: R1 p: H- e5 R. k% S
                        assignLObj := rgmanager.rgAssignL;
, h/ z* O5 h6 p; r# ]5 P                        row := assignLObj.getRowNo(GlobalDistObj);
4 X/ Y  a# P; A6 H4 O                        if Row = -1 then -- since 70' ]7 ^' i+ {, I+ P" m# ~
                                if lan=1 then
8 k+ `7 c1 {. \9 q                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) X; f9 S3 p/ Z4 y7 b) y1 Y3 ~+ Z) A0 Y) ?
                                                to_str("in der Andockstation: \"",?.~.name,"\""));" ^8 G/ i5 V6 k
                                else
9 P' T  {6 i7 g' x8 n$ M  S                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& o) b) L9 A8 d                                                to_str("in docking station: \"",?.~.name,"\""));                                " }" o* ^  v! e
                                end;5 C* h; J* a1 c; L
                        else+ R: d8 O5 G4 y+ E" l! H
                                @.Destination := assignLObj[1,row];
" g4 h* t) |2 M/ J+ f                        end;                        - D1 \) V, v6 q9 M7 ~
                        newDirection(@);* K7 W3 P. C8 s3 s5 F
                        @.HasOrder := true;# |! h$ u2 r( R8 R7 O
                end;% D( T" A- G7 C! d
        end;- u# u1 ^* M; M4 L, p
end;        -- of the method
1 {! V7 w& n8 K  Y
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ; a8 c" G8 k9 R2 r
- x& p3 ^9 e* Y3 h
这是AGV_putin中arrive的method。& N9 L8 C. M9 i9 J: d  p- ^& m

# T5 Z4 t( x& b当到达物料速度越高时,这个报警更多,
; f. p) J7 [3 `' w/ Y& n: @" o可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。1 [6 O% P9 m6 ?( n, S  V# d
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?( `3 Z4 u7 P- i' l6 ?+ c5 b4 l
7 k4 m$ u0 v+ S; L( x% g- l: W
另外一个小建议,就是move,所有的move都可以这样
) B3 ]: o$ ?6 q+ _if not move() then debug end
: T% T& l1 K: o8 V2 h+ `, j  B- L这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。* ^7 U2 g9 p( F8 Q2 f
plant simulation中的free libraries有AGV模板,  g+ ]5 r4 D- F4 L
里面也有案例。
, H& B: v# P& D8 a! G- e我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
) Q# Z: Q1 o7 O. H5 T( k" o6 Z" \( X0 w4 B, x2 \
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
5 G- O" U& t5 ?* _( C  ~- Y6 d, T0 g$ q
# T  M! s/ v& T* A2 ^2 _那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 % B/ x4 q( t& R+ ~& h% f9 u8 A  M
这是AGV_putin中arrive的method。8 Z& O: c2 ^( ^9 |
2 G* u& G: C, s- ]8 u
当到达物料速度越高时,这个报警更多,

3 L8 w4 N3 l# r, G另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|SimulWay 道于仿真   

GMT+8, 2026-5-13 06:28 , Processed in 0.024094 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表