设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8992|回复: 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'5 q( p% |9 `' e1 E
*/+ N5 @0 Z5 M7 t' N) [& D/ X
is
' a) q% u# l; a/ B        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: a: T" C4 Z& F1 ?' [/ ^do
- s0 V0 I' ]: ^& V        Lan := rootfolder.Internal.Tools.AOLlanguage;
- ?6 H$ ^) a2 x* s: m        if current = @.Destination -- else return
; `" n8 j$ D" t0 l# h  K        then
6 U" f4 E  s/ f8 N7 d" R0 I                @.Destination := void;% S% C4 i( \* Q
                if @.occupied then# g: s. E  X3 }% [. s0 ~) A( j
                        part := @.cont;5 |" y4 ~5 c$ b$ @9 }. V& y; t  S
                        @.transpOrder := void;
% [+ K6 Q# {* J8 c' [                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, {3 j$ O# p  {% B5 e" q# D* E5 F                                @,root.eventcontroller.simTime);! [2 n4 Y2 [' n! H
                        @.HasOrder := false;: W9 {5 M" v+ W+ R
                        @.DrivingHome := true;- C& e7 J' f+ ^! k2 f. z0 }
                        rgManager.tryToStartTransOrder;
5 x! q, o7 ^2 v                        if @.Destination = void/ U  t9 b; s4 X* r$ ^! B0 h
                        then -- no transport order for vehicle @
2 \( Q* J  A/ L4 ~; }) Y* H' R' v                                @.Destination :=
! r  U* N& J: B2 P                                rgManager.nearestFreeStation(@,track.~);
3 c2 e8 s0 U$ |8 N- ^1 i( k$ k                                newDirection(@);   
0 K9 P& g( q! B% w+ p) O; a                                if @.Destination /= void then& @. a/ @3 ^  w& I6 ^7 \
                                        @.Destination.NumReservation :=  T: p$ I) W7 G) p
                                        @.Destination.NumReservation + 1;) s0 R. }1 l: B
                                end;- L3 Y6 C4 }% c0 @& o8 z/ B
                                @.CurrIcon := "drivingHome";* ]' M( r5 L0 R. n, d- Q! s$ C. A
                                @.DrivingHome := true;! V7 o+ P3 n) o- Y' d
                        end;$ j* H1 a' a( K/ A$ {5 b
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station, ~; D$ ]2 C5 ]! v( i" q" [
                        part := @.transpOrder;
( V9 ]. N6 l- T                        part.move(@);-- load part
+ n& D8 Z; B6 M                        @.CurrIcon := "load";
8 \( b7 S5 D$ s! V1 A                        GlobalDistObj := part.globDestination;/ A0 ^% o* ]' ]" {, g
                        assignLObj := rgmanager.rgAssignL;
) v! s2 U0 N) n3 n5 F                        row := assignLObj.getRowNo(GlobalDistObj);7 R4 A( m- I' U) [$ A
                        if Row = -1 then -- since 708 c; R! p8 P7 m* \
                                if lan=1 then% B& U! r5 I% d1 s+ e
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 Z  r) e9 e; v5 @7 V+ K
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
: O0 ]1 V- E3 `, |                                else7 c: ]( k: _7 W# r
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 A( ?. V1 u' \                                                to_str("in docking station: \"",?.~.name,"\""));                                7 z8 n+ o. \. W: o8 Y
                                end;+ ~5 {7 H- K3 e! I9 h- y: k
                        else
4 T1 D, P$ k" ^3 f                                @.Destination := assignLObj[1,row];
; l$ d$ C! A4 v' F/ z* G' y                        end;                        3 c" t4 v5 q( V$ j, c
                        newDirection(@);
) V. v* A7 z& f5 C( T! {, I                        @.HasOrder := true;7 @) m2 @$ o! w/ G9 M* l
                end;
: v# p$ }- i% ?- A' X* K0 I        end;
% m" M9 \$ a9 P% J+ oend;        -- of the method' u$ ?) ^8 F3 G1 l% f
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 . F# q3 w9 R/ _5 a* Z
( u: q8 _5 H! K/ i" g8 i
这是AGV_putin中arrive的method。
7 \# F0 ^* n3 `% k/ I/ y& y
" L9 e' h2 l' r4 B! j+ h) y5 l当到达物料速度越高时,这个报警更多,
# B$ \, ~. ?0 g4 C可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。  l+ [/ m' a9 ^& s
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?1 D2 V1 t! d. Y9 Z
; G2 h6 s; N4 O# ^3 a. D3 T
另外一个小建议,就是move,所有的move都可以这样
! W. H* I7 \  k9 b$ o+ \" Oif not move() then debug end, w, M3 k% T( i0 @# @
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。3 G8 \. m# J' g2 j% l: o" e+ o* c: D
plant simulation中的free libraries有AGV模板,' E  d' s0 `8 j$ B5 o  Q; l
里面也有案例。
" ?3 I% \0 c' X# r8 S我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。# B; W. K5 c) u9 ^* E8 M
3 [- D0 Z, o. I0 v
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 , @/ k6 f  ^/ R% @6 Y: h7 y. ~, D
; j0 I) o, o) j2 i1 v6 }
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 : y: `3 j3 S9 Z
这是AGV_putin中arrive的method。
; x7 G& ~; L7 A1 `- Y/ r( ]) `) O) Z, s* S, ^0 ]; r# e
当到达物料速度越高时,这个报警更多,
) N8 b3 A- M/ L% [) I0 p; V
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-8 02:08 , Processed in 0.016847 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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