设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8608|回复: 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'
( w7 ?  ?) X  \- X/ f' K*/
4 P+ v/ m: r- F0 |% a2 }# Ais
6 U( ^/ M2 n$ M6 p* E$ ~        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 G3 ~; X% L( a0 c, f/ r6 v) cdo: H( a* o7 J9 ]! U
        Lan := rootfolder.Internal.Tools.AOLlanguage;* x) u9 V# z$ j& W2 q& y7 s0 n) x
        if current = @.Destination -- else return4 k3 n" }3 G- Z9 R3 |3 a" o
        then
: n7 a% X! C2 Z  W6 _                @.Destination := void;
' o0 r( j1 I* E8 o" E8 q! C                if @.occupied then) W8 o8 P2 o( E( z  P9 v) Q$ @
                        part := @.cont;. w: T" s4 x0 w9 ~/ o
                        @.transpOrder := void;
0 z5 ?& Q% m4 {# r* |. C                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! \/ I0 y& i9 a& V* r# w2 `                                @,root.eventcontroller.simTime);
$ U  {6 \% s5 w0 e, Z                        @.HasOrder := false;
; [. S& Z- F6 ]" u+ J2 B& D7 }9 w                        @.DrivingHome := true;! h  U9 P. Z" l: E
                        rgManager.tryToStartTransOrder;  D% B/ }9 y% W* q( Y6 H
                        if @.Destination = void. ~& O# N" T+ |
                        then -- no transport order for vehicle @. A7 F+ f9 U3 |6 C' \1 U9 }' @6 G
                                @.Destination :=  I7 |+ h7 ^: ~* ?3 ]! [9 n2 |& a
                                rgManager.nearestFreeStation(@,track.~);
: w4 p2 R5 G( J. @                                newDirection(@);   4 e, z6 N, D% \: n7 m0 f, m' y
                                if @.Destination /= void then
1 U* m9 s; Z. I' v" T: ^                                        @.Destination.NumReservation :=
0 h- O: Z" {/ u! \. |8 [( f                                        @.Destination.NumReservation + 1;9 U) V3 ~4 L. |% r& t; M# s3 x
                                end;) x8 V3 E, s9 N; f% c& B4 C$ D2 V
                                @.CurrIcon := "drivingHome";
/ q5 [& E# V% U8 m                                @.DrivingHome := true;
& L! x- h' O9 q; S                        end;
( m: L( j1 a$ ~/ z0 H) P                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; s, }7 W0 Z- u# V* i1 N9 k                        part := @.transpOrder;& h: y- H( o$ E& O+ N
                        part.move(@);-- load part
8 Z, w+ F' \8 J                        @.CurrIcon := "load";. k/ i! `& G+ z3 n: r. d
                        GlobalDistObj := part.globDestination;
, ^& V8 C  B7 Q0 G% ^, B9 e                        assignLObj := rgmanager.rgAssignL;$ B# b5 ]- j" q; _9 C3 T! \% B
                        row := assignLObj.getRowNo(GlobalDistObj);+ ?, }3 u# s" I" F8 F# h6 t
                        if Row = -1 then -- since 70) F7 ^+ W2 @0 k+ w- D
                                if lan=1 then# y  T; x4 j, c. X: Y' y
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 }6 D2 u0 h' `2 N
                                                to_str("in der Andockstation: \"",?.~.name,"\""));/ a% C+ D- I- T7 r- O: D
                                else+ ^( I: F6 J- x* s3 U
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, e4 x, @  l6 k+ G! I  ~" }
                                                to_str("in docking station: \"",?.~.name,"\""));                               
: U  l- V9 X6 L, {* q# [# v1 U                                end;
5 T" a0 h( o1 t: [& u! B9 D                        else
" b0 @' {6 d+ O: Q% T  J0 f                                @.Destination := assignLObj[1,row];6 w! e7 t2 s" F
                        end;                        ; ?! p* O2 ^; r* {
                        newDirection(@);) R) e4 c/ H( l3 l$ F! M
                        @.HasOrder := true;
# n2 }$ X( G  ~& z                end;- }* r  C9 f7 t, b, b$ x2 l5 x! [' ]
        end;# j) V9 w: r3 L3 a- j; x
end;        -- of the method4 B# M6 L5 Q0 ~2 O0 H
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
: M3 F/ u; B" \' L+ i
8 m9 Y$ F+ O! s% w7 K: X5 M这是AGV_putin中arrive的method。
  e" S* [/ x: G
! y. c; m- R8 @" N1 @当到达物料速度越高时,这个报警更多,
+ l7 h1 Y& a1 ^! d1 \) m可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。# C( s( f2 t; M8 |% |+ F: m
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?/ f+ j$ {# |3 b1 b) x7 s2 N

. R# Z8 S& j0 Z, c5 [# I1 W; M另外一个小建议,就是move,所有的move都可以这样
0 B! K% u* x& m* `8 cif not move() then debug end2 Y# ^* s8 p+ {3 C9 c
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
1 T! i; t$ v0 ?% }6 l$ s( lplant simulation中的free libraries有AGV模板,, ~/ _/ e" N' n0 T2 r0 ^
里面也有案例。
" c# ]7 b8 h  \7 |我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
# N2 N. ^  \5 `. C3 X% o; ]" O0 j; o! B  w& k8 l. |
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 4 z) V- O6 q" v! C" X
" z& m( f" s  I/ i( `
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 2 h, M5 b* c: B# ^! W- \8 L( R
这是AGV_putin中arrive的method。6 i6 ~2 B) J- o7 x' @% C
" n9 A) q# d2 P% i! ~  u- m
当到达物料速度越高时,这个报警更多,

% U4 U6 ~' }( S  T# s另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-15 12:10 , Processed in 0.014687 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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