设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8127|回复: 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'
9 [% O% R7 t* b9 l5 B6 ?; W*/
4 T8 ]+ Y' T8 @3 E* K; Y- l) \is3 n+ O8 b& i; @$ e2 K+ z- \9 M9 L9 B
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; X6 V9 u4 p, {* l( fdo
& a+ b6 r8 P8 y6 u$ a        Lan := rootfolder.Internal.Tools.AOLlanguage;
! t; w4 N- D+ G7 W  y4 k        if current = @.Destination -- else return& ?7 {3 y. `- c4 g5 z: ?$ W. z
        then
5 L) N  w) o8 @2 {, B                @.Destination := void;
7 H5 ~! f0 g4 I& ]" c                if @.occupied then8 T# [- [) o) P, a3 l
                        part := @.cont;
- C6 i+ ?5 q% `/ D" ~( b# p                        @.transpOrder := void;; T# F& f2 y' j5 T) q" n1 x
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* n: q4 ^/ x) W: W                                @,root.eventcontroller.simTime);
$ g6 ]" b: B" ]. }$ n4 m                        @.HasOrder := false;
4 }' W7 X+ t' u                        @.DrivingHome := true;
3 }  d  n% n% G: a                        rgManager.tryToStartTransOrder;
3 k9 s) B' H/ J& z. @( O4 p( V1 L6 J                        if @.Destination = void# b  Z8 l- k* \+ G  g. F; D' s
                        then -- no transport order for vehicle @
/ x1 f8 [1 s9 }  D( P                                @.Destination :=" {5 Y+ ?$ O: b, C
                                rgManager.nearestFreeStation(@,track.~);
4 M, a2 t$ k) x8 `, y+ K, v                                newDirection(@);   
1 f* u1 ?2 {/ |1 }5 A' s; C9 o/ {                                if @.Destination /= void then
( l; V. A$ y  \- Z                                        @.Destination.NumReservation :=2 D4 W+ W7 H9 G* u5 }0 ^
                                        @.Destination.NumReservation + 1;
4 U) W1 Y0 @* w7 ?+ ~+ M                                end;; h" @" m. J' B& K5 @
                                @.CurrIcon := "drivingHome";
: Z2 k, w6 q- H6 ?/ h                                @.DrivingHome := true;
; Q, g% f, f4 B; C! L( f6 Y8 b+ i4 e                        end;
( s' P( h% K) Z* S& o$ w                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, [4 @! t+ D8 Y" {                        part := @.transpOrder;, H  D% T8 p; w$ P* i
                        part.move(@);-- load part! z2 d. X3 Z5 _" P" l# H( h
                        @.CurrIcon := "load";: Y9 [) }9 J+ t' g3 H/ T
                        GlobalDistObj := part.globDestination;' L' n, O5 R" X* M) U5 K: x; |
                        assignLObj := rgmanager.rgAssignL;, U& Z! [( `: b  q7 e( S$ j: w
                        row := assignLObj.getRowNo(GlobalDistObj);
) R; c: |; s& d                        if Row = -1 then -- since 70- i2 S0 f! C" p% ~) I
                                if lan=1 then
$ y, K0 @, c; R1 b                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 z+ ?+ o1 I: B. N/ j" x                                                to_str("in der Andockstation: \"",?.~.name,"\""));
0 E+ N' F3 \2 b4 u, m# B; w7 j                                else( R' E& @& D, F
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 q( M  t0 p# a. d                                                to_str("in docking station: \"",?.~.name,"\""));                               
% u1 M' j5 C7 {                                end;
; g1 \% P* V6 _" X$ j                        else
, x! X6 Q/ o* b# U& h                                @.Destination := assignLObj[1,row];
7 `* O+ V7 M8 B* Z                        end;                          R5 g4 V* S# `1 Y, o- h/ I7 k9 d
                        newDirection(@);
' e( R' v; e& }                        @.HasOrder := true;
" W. `5 ^- W: m# n: d8 i; Z                end;
2 T) F  {) k6 P/ w0 ]8 _3 ]        end;, ?  e5 n& e7 q" U' x$ T
end;        -- of the method4 C) \' J- x7 H2 h- @! p
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 - n7 @" j. Q; j* l* t- H& M: g: d
5 ~1 Z- t4 L5 s
这是AGV_putin中arrive的method。5 g$ S5 ]+ L* |' J2 _. s
5 p$ S4 F5 h) Y- c+ g: h
当到达物料速度越高时,这个报警更多,
- L- r7 I$ z" r: b  d. e可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。  G- s6 i, E( ?- l6 @
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?; C' u2 X2 K. t4 |

  H  S+ ^0 m: }3 a* J/ T; J另外一个小建议,就是move,所有的move都可以这样
* G  R/ ^* \4 W; `- P! e1 r9 Uif not move() then debug end% o- i& I' e( b: R3 ~5 _7 a2 F
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。# j! g( \+ H6 Z2 H3 q/ [( ]
plant simulation中的free libraries有AGV模板,
/ @0 l1 {7 G- ?! `# ?, ^里面也有案例。
! q4 c+ c/ I4 _我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。. S  T6 A% M. N0 f% R4 q2 v* }& P
" t5 k8 U8 }* N) b2 X6 h6 h+ t% ^
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
7 b; _$ U1 ^' R1 \8 K0 f* v
% c# s7 f6 ?% k7 [6 c4 W那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
. ]6 o# p  Y) N4 K这是AGV_putin中arrive的method。
5 d5 o" Y7 O( Q( @2 S4 C: p7 D! w* o! B( Q5 Z7 L
当到达物料速度越高时,这个报警更多,

5 y, D% h% i5 v& g4 E& r* s另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-16 04:30 , Processed in 0.021401 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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