设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7973|回复: 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'8 b; V/ `0 N% S9 D# m& Z8 S# ^
*/
8 H3 D2 `1 z2 Q5 C3 S9 ]3 {" ?1 T4 tis
# N( S) ?3 U1 T% d0 r        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 F, K/ Z! s% Mdo% W/ ~. Y8 \6 H9 H! D+ _) C5 s( C
        Lan := rootfolder.Internal.Tools.AOLlanguage;
7 N, K& k% A2 x        if current = @.Destination -- else return+ d+ Z9 @1 A2 V
        then9 T- V1 y9 a% T1 l6 c
                @.Destination := void;; M$ i2 a% i7 P
                if @.occupied then
6 s6 j$ c' w) j4 b$ ]3 E. u9 v0 w) e                        part := @.cont;
  K& [* F! x; ~# [7 j                        @.transpOrder := void;
6 C+ A- a% `& T                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 t" c% V: a2 b: r# @5 O                                @,root.eventcontroller.simTime);
8 q9 U! m( D. A& Q3 {                        @.HasOrder := false;
& ?' b6 b+ o' a2 L                        @.DrivingHome := true;6 d6 [$ k; D9 P9 g6 o, c
                        rgManager.tryToStartTransOrder;7 f3 W$ d) B4 @2 M0 m0 K% L
                        if @.Destination = void+ p/ L7 I# w# c/ [5 J, i6 F
                        then -- no transport order for vehicle @
1 D: z5 |5 t) V7 `7 m  p. J# }                                @.Destination :=) K1 z, o5 e; S9 f/ b: {$ v6 S$ b
                                rgManager.nearestFreeStation(@,track.~);4 o+ f8 |. m) `: A2 w# g& h) b
                                newDirection(@);   
% i3 o9 e# r" W: X( G9 M: A                                if @.Destination /= void then
8 V1 X6 |. R1 s: v- K% x% R                                        @.Destination.NumReservation :=
9 @+ C5 t8 d( A# r                                        @.Destination.NumReservation + 1;
7 E, L: a& g+ r1 s                                end;
6 a+ g6 l$ q5 A                                @.CurrIcon := "drivingHome";
( S/ n1 G6 r3 I9 }! J" K1 G                                @.DrivingHome := true;" _8 y- N* ?2 w) o1 n' s9 G% t6 B
                        end;
- G0 Y" @3 d' O+ u  Z                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ `" P0 B. r! X' Y2 }0 d                        part := @.transpOrder;
5 s- ^2 I& H4 l6 f                        part.move(@);-- load part
. M" M9 ~( n9 n$ S7 B2 v# X9 s7 w                        @.CurrIcon := "load";
. q+ Z2 X; G% O9 G6 z* `( F                        GlobalDistObj := part.globDestination;
( v+ n3 Z2 K9 M3 F8 X                        assignLObj := rgmanager.rgAssignL;
3 V# m- w0 ?, x2 X0 r2 b                        row := assignLObj.getRowNo(GlobalDistObj);
! t0 g3 p3 U, O3 v, `, O                        if Row = -1 then -- since 70
' z# M8 ], Q2 Q! u                                if lan=1 then
. k! g& j0 M; m9 C                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 u9 m1 i6 \. V3 z7 G  E# A
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
' W! L% B2 F2 t5 n- D                                else
$ q, u$ y# R3 z0 U! O                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) g! ?6 ?5 {" y9 [6 I6 X                                                to_str("in docking station: \"",?.~.name,"\""));                                7 Y8 u- ~* Q, h! H* _" O  E
                                end;: F( S9 v+ }8 M# q
                        else, B& q+ z- i* g: T5 J+ ?/ ^$ J
                                @.Destination := assignLObj[1,row];6 d3 j% Y' Y- _, F( e4 g
                        end;                       
+ O$ p$ Y( P; a- f3 `' I                        newDirection(@);
3 I7 s5 n. P8 ]; @% X( u# k' O                        @.HasOrder := true;
: k1 W  Q6 }( e* l8 `. N$ N                end;
: {, j- ~& j! v/ I& o# R* p. |' p        end;
6 b& a! z, z$ `3 |: ~0 c: g; dend;        -- of the method
. H" m4 R, s; o, {. w" [  y
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
. s% L% N5 T( Z+ e
$ m8 e' P; n! h6 q/ @1 @. ]这是AGV_putin中arrive的method。
& L* R; m& c0 m* H: C3 k/ v/ S; O+ e" `( X8 R6 c
当到达物料速度越高时,这个报警更多,% q' m& W: M4 Q) e  y; R1 ]& T
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
' T# C$ X0 E  G程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?9 m/ A8 x) D  x" [3 s, Y7 a

% O+ {5 S! \, r另外一个小建议,就是move,所有的move都可以这样# g" u4 y: E+ w! l5 K" k9 M0 Q
if not move() then debug end: f/ ^2 g/ B  a& m' t, V: n
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
% y1 b2 I9 M  e) o% K7 q  G$ |plant simulation中的free libraries有AGV模板,1 E0 W0 A3 _3 r. h2 W1 I  _! D9 e$ O
里面也有案例。
  R  O7 h* R) E; d8 ?0 A/ }$ Q我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
- S, b, _% w: B% t& j. Q6 m# J# Y3 L
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
9 V* l$ I1 _# }' X; |& T3 G1 y5 e" |# n
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 / i0 W2 w/ L5 T% g
这是AGV_putin中arrive的method。! ?! y. S% j. [4 U! X7 i5 l5 C' U
2 h6 ^/ y/ u" V& [$ H
当到达物料速度越高时,这个报警更多,
/ f  k) Y6 F: M! P$ r
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-8 14:07 , Processed in 0.017797 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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