设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5835|回复: 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'/ `$ X8 W9 W, b' i
*/
0 |, K. v! n. t$ `: O4 c5 X/ ^is
( z. g# `6 S+ u' a        part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ {3 _& s4 ~6 D  e
do5 k6 {3 k; u$ D1 H: J
        Lan := rootfolder.Internal.Tools.AOLlanguage;3 {9 m: a  ]/ ~
        if current = @.Destination -- else return5 n$ ?" C7 d6 r- R: L
        then8 U1 D& \* O1 i" n# Z, k
                @.Destination := void;
- [' q' O$ J& O% o& o4 t& |" G% _                if @.occupied then* p: _* U5 L" |, w
                        part := @.cont;& n  C% k! K0 g; W
                        @.transpOrder := void;/ p( _2 h* I" D0 a9 p! y* Q* }
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ }6 X2 l6 c* _. a/ w/ o9 c                                @,root.eventcontroller.simTime);2 ?+ W1 N' x2 u
                        @.HasOrder := false;! l2 d* ^, c  j8 a# b+ `
                        @.DrivingHome := true;7 q- p8 M/ m+ y& z) K
                        rgManager.tryToStartTransOrder;; a$ o+ l5 j( Y9 O
                        if @.Destination = void
! l/ |/ P) Q9 F# ?9 Q; r                        then -- no transport order for vehicle @
. C) y* o4 L6 [/ b# v$ w                                @.Destination :=8 }2 Q- ?! ]! L6 e* O3 q+ n& v
                                rgManager.nearestFreeStation(@,track.~);) E& J/ G. r9 ^6 Y: V
                                newDirection(@);   
4 k# ~# }* B& V                                if @.Destination /= void then- ^3 ]6 ^* F5 C/ J
                                        @.Destination.NumReservation :=
6 z1 y2 a8 {6 Y5 b  A/ A                                        @.Destination.NumReservation + 1;
6 p$ v1 B) h# L# Q5 y: y                                end;
: x; a2 i; Y6 ^* a( F/ r                                @.CurrIcon := "drivingHome";
$ L; d, q6 d4 m' j; ]* l% E" C' H  ]                                @.DrivingHome := true;
4 S; I) d1 f( r# y1 B: k                        end;
# X( i3 a* N  l/ U4 W& K6 J/ ]) p                else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 r) S2 I& M  [
                        part := @.transpOrder;1 |6 K$ E& r# `5 w
                        part.move(@);-- load part! p6 F6 Q9 s" I3 _; g' z
                        @.CurrIcon := "load";( e$ v' c: l4 E* r. ]( ]2 H' ^' G0 y
                        GlobalDistObj := part.globDestination;
4 I1 v, w7 z5 n# q                        assignLObj := rgmanager.rgAssignL;/ X. k* O0 v8 |+ R- S; ~) s
                        row := assignLObj.getRowNo(GlobalDistObj);
! ~( Z; v: J" S                        if Row = -1 then -- since 70+ M) e" x0 s* q9 C# P1 {
                                if lan=1 then" @" \; L! E; c$ @' s( e* @: b# j
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) j+ i2 T9 T5 b0 W
                                                to_str("in der Andockstation: \"",?.~.name,"\""));* D7 E1 c+ A( X+ `- F# |' v
                                else# ]* J5 l5 r5 J
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 T7 D% F& |( ]  F$ Y                                                to_str("in docking station: \"",?.~.name,"\""));                               
) L% ?* ]/ i- \8 |( {0 z$ i3 X                                end;
. ^" @1 Z( |7 [) O! T9 Z                        else
9 B7 G; F0 t. I                                @.Destination := assignLObj[1,row];
2 S; L6 ?+ k8 S0 N                        end;                        ' y' l! f# l% P' F! u
                        newDirection(@);
/ o, W# ~7 p# s                        @.HasOrder := true;/ U  t2 u% J3 [1 f2 \- P0 ^+ d
                end;
; J5 C( Q5 R/ G1 p9 V6 O( \$ [; u        end;
4 n1 L3 p: a& oend;        -- of the method
6 l6 \! _7 H% V' Y# o, \
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
4 H% J- h  P. T; H6 R4 |: W8 M: @) `" l  N2 u' f
这是AGV_putin中arrive的method。# `# J& Y! A2 d1 B  Q: T* ?
- L* E' E8 Z  q' |  L& s
当到达物料速度越高时,这个报警更多,8 K- t# c! x$ j" Q' Q/ F
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
9 N3 w1 K# x6 g) R程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?3 U4 h/ J5 ]7 m2 C* H  B% u
  E. I2 |4 m, G% j
另外一个小建议,就是move,所有的move都可以这样
) y0 ^* d% k+ \  A) U  k* Aif not move() then debug end
, z! f* n, V4 r9 o2 Z9 B这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
% K& H3 y9 F! E- ~* d6 U" L! eplant simulation中的free libraries有AGV模板,) S( z0 R2 }2 V$ L
里面也有案例。# {4 m3 M3 V& r- c
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。% `$ o, V$ R' ^, M5 }: h; a

( c" F' ]) w9 p3 y( W! A1 o" L我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
  ~1 h; q9 m: q1 g1 `) Q( @
0 x) O* n7 a! V! h$ V4 c那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
/ y3 |, F( ~7 h  O1 Z; w这是AGV_putin中arrive的method。' g8 [9 z; X" _5 B& d% b  L
/ Q% E$ J9 A" H6 M
当到达物料速度越高时,这个报警更多,
4 v3 j) c) ?# J8 V: `* M
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-25 10:45 , Processed in 0.015655 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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