设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6678|回复: 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'! o$ |! U0 g, l* A* v' D4 S3 j# g
*/
7 R0 Y$ I: o# `' ais
/ L3 w* f4 N8 Y* _' s' y/ o        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: Q6 @$ v7 U8 N* t4 qdo
" `: c- g6 Q, l- W) ]        Lan := rootfolder.Internal.Tools.AOLlanguage;
, C0 \5 |9 f& S) S; V* Z5 R5 \! e- \        if current = @.Destination -- else return9 J) Q4 K( X, c) u" [$ e; M) F
        then
8 G- a5 b# k; B                @.Destination := void;
7 E4 Y' r* I4 E" ^5 s                if @.occupied then
% Y* y# U0 F% \                        part := @.cont;/ X' \2 F) ]* C! ?! L/ J& {6 g; l
                        @.transpOrder := void;3 B3 j) _. a' E* F! D7 Z
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& E- X: X! o5 M: X% g- L8 S7 I
                                @,root.eventcontroller.simTime);
, Z7 _8 f0 U! V2 _8 f3 j, p                        @.HasOrder := false;  E' _3 P7 h, Y# i. b+ `
                        @.DrivingHome := true;) G, [" d. `  G8 P( f
                        rgManager.tryToStartTransOrder;
" F  ]' Z0 q6 m9 {/ C2 n% X                        if @.Destination = void8 ^1 N9 _8 b2 Q7 }2 {5 p
                        then -- no transport order for vehicle @
; f6 ?: L$ d, k4 [$ c) S                                @.Destination :=2 R0 z( s: C* O( k* a/ c
                                rgManager.nearestFreeStation(@,track.~);
& f5 A# x; B& s5 L; H: p* m1 w" B# h  d                                newDirection(@);   ! t9 A6 ]1 s/ t1 x5 g2 k
                                if @.Destination /= void then- v+ y" Y5 s; o1 w! O7 m) k
                                        @.Destination.NumReservation :=
1 @- o- u* f0 g+ Q+ @1 |) x                                        @.Destination.NumReservation + 1;- e4 j* h* y( B
                                end;3 x" }6 M3 V( j% a! L
                                @.CurrIcon := "drivingHome";
9 {7 d" {+ r& D                                @.DrivingHome := true;
. h0 Y  ]2 J( @  t                        end;0 k6 O1 l6 _( G3 j  v/ N7 M; I/ |
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station& e& ?- `+ `+ A4 O: e9 k
                        part := @.transpOrder;( Q. }- K! V" a: k4 s
                        part.move(@);-- load part0 F7 T  s+ u6 G! b7 `. [, {; d0 P
                        @.CurrIcon := "load";4 A) `( p  V  U- l1 b8 H; V
                        GlobalDistObj := part.globDestination;7 Q  v: z5 D7 E
                        assignLObj := rgmanager.rgAssignL;
- ^8 }! r7 F$ M; H                        row := assignLObj.getRowNo(GlobalDistObj);
1 s% f- z& s! U                        if Row = -1 then -- since 709 h; S' S6 o8 T  H
                                if lan=1 then
% d) W; ?! n3 |1 }' E& f1 f                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- ]6 r0 a2 g  @& p% G' h$ x
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
3 W$ y5 V  i' u9 E9 h                                else
3 f  z% N. C9 v1 S* k                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, O9 g6 d# I1 J- V- H                                                to_str("in docking station: \"",?.~.name,"\""));                                # e* i2 p) L& a# Y) |
                                end;3 n% G7 K; }+ O8 b1 T$ v9 A, j
                        else. C9 I2 T9 S; o5 L* r) T
                                @.Destination := assignLObj[1,row];, `8 H6 q/ q( G: \) g2 h
                        end;                        7 @$ s7 y- n7 S8 x' x" N$ T4 K
                        newDirection(@);2 p3 ?/ e$ e! Y0 t+ Q5 g8 q7 E
                        @.HasOrder := true;: p+ S) U7 _, o  N# Q
                end;% L8 t% g( {) e' J, c/ ^
        end;7 ^8 q% s0 u8 W! O
end;        -- of the method( E) f( ^, g6 g, J9 Y" K, i! q
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
/ A# q) O( g2 ^+ {2 B$ }
% B7 X- Y& m! |6 |) H1 m  W. Q这是AGV_putin中arrive的method。
; B( \6 c2 z0 m6 F4 {  K$ [  `" z; ~
当到达物料速度越高时,这个报警更多,
" W6 C7 W, E) V3 u% X+ S可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。: N% j* H+ e" @2 ~& M! Q3 b1 U8 \
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?! o7 D1 ^2 ]" R" Z1 @# i' C

! @- K# F. p" I  S9 p: s+ x5 y另外一个小建议,就是move,所有的move都可以这样5 _% d& K3 |' b+ z( \! |
if not move() then debug end# `% Z  x4 e0 Y5 F4 U) W
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
& m, u/ I$ p! C1 V5 ], Iplant simulation中的free libraries有AGV模板,3 o9 ]7 R" a7 s2 Z* X
里面也有案例。
2 d0 |* x5 f, v我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
$ ~8 f/ s1 ^0 X$ Y. d! f6 n2 s; K2 m5 g9 s2 T
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 , Y) U& f' S: j# j5 w
2 M# K* v2 Z8 f2 ~
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ' F6 o% O! k9 T# D/ y1 p& C
这是AGV_putin中arrive的method。
( w2 `  A* B! n; t3 w3 i' b$ X$ y& y7 ]9 w
当到达物料速度越高时,这个报警更多,

2 }+ T& m7 @. s, t% N* _另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-20 12:08 , Processed in 0.279530 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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