设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7016|回复: 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'
1 X2 B; Z: }1 d  _1 K: x  v) b- L*/
$ [  D9 X" n& G6 His
' h' R4 a1 n3 ?: v6 K3 T$ o/ N        part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 H" T3 L5 b1 ?5 o
do1 f) S1 h) G/ p) R
        Lan := rootfolder.Internal.Tools.AOLlanguage;+ i# z& j$ m8 L( R8 G# n1 q$ U
        if current = @.Destination -- else return
7 [3 H6 B$ e) i( @$ Z. Q        then
" [" t7 S& u" K                @.Destination := void;
/ [( j/ M2 A7 E3 B, g- A' g                if @.occupied then; x, ~: D5 G, |4 l% \) y  [
                        part := @.cont;7 L, d  o5 \* a) k+ K. d5 S& [- I1 ]
                        @.transpOrder := void;; G& t! D" _8 S+ d
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ O: I  m9 i' e. e                                @,root.eventcontroller.simTime);
& H2 F/ Y/ T* i7 J                        @.HasOrder := false;
# ]5 W% |0 g9 O# R                        @.DrivingHome := true;
7 N# x1 x& j1 s                        rgManager.tryToStartTransOrder;
; U$ F4 p" a: ?: ^1 g, [  h                        if @.Destination = void/ s* d, m; L- N7 y8 C) F) D/ w' @. c
                        then -- no transport order for vehicle @" ]0 }! K8 q8 E, h) c7 Z
                                @.Destination :=
& A4 f3 z" G, G1 P5 C# f                                rgManager.nearestFreeStation(@,track.~);% B; O& e/ Q7 x) x" Q2 `: A
                                newDirection(@);   
1 Z$ A& [: X( D. h, c" c                                if @.Destination /= void then
3 o0 e, E# z1 @/ e2 O  `                                        @.Destination.NumReservation :=7 X, c$ M& V( z" Y
                                        @.Destination.NumReservation + 1;* Q& l+ O' u- w  i6 ~
                                end;
, _4 T( o! Q* Z1 @+ I                                @.CurrIcon := "drivingHome";& b( [; K2 B+ x( L5 b2 X
                                @.DrivingHome := true;
# D2 Q: d) C- C& y# r8 i                        end;
. K- X7 C7 [7 G1 `# k                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
  z9 f# u" T( a                        part := @.transpOrder;
3 n# Q" j: \9 K) t! @+ M3 F# d                        part.move(@);-- load part7 s7 b4 [3 c- m/ b" G6 h$ p7 f
                        @.CurrIcon := "load";
; A6 y" ^. f0 M: d; g                        GlobalDistObj := part.globDestination;
" Z1 O, q1 K8 w5 {/ P/ T- y% ?                        assignLObj := rgmanager.rgAssignL;
' ^3 d! j8 [0 K) e3 C" Y7 E1 j( E5 H                        row := assignLObj.getRowNo(GlobalDistObj);1 g; N- U, ?, s- X3 I
                        if Row = -1 then -- since 70, B/ ?! \/ `( J1 e3 q6 d: u
                                if lan=1 then3 o* E7 t3 _5 `9 [4 ]1 Q7 a3 F/ C
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ H7 t$ T; ?+ D- Q. W9 _                                                to_str("in der Andockstation: \"",?.~.name,"\""));
: u& E1 V7 g7 f& L' }% q  y                                else
9 b$ T2 k9 \4 W" T                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# w% U8 e; N9 _) Q8 |) K3 i( \                                                to_str("in docking station: \"",?.~.name,"\""));                                . L1 d" z2 X% c1 n" N+ L
                                end;  Z( Y+ E! l0 t/ j
                        else6 P8 K/ L2 r1 Y; [! `
                                @.Destination := assignLObj[1,row];
& ?* y% V3 p% P& f                        end;                        ; V- d  q& B9 u% N
                        newDirection(@);5 q$ [6 I9 Z& L$ {9 i
                        @.HasOrder := true;
# _& R# M2 v9 x% b7 v5 E5 Y                end;/ B: }4 R. |" @: W
        end;8 V2 X; N4 M$ C: o" c, ?8 h. n& G
end;        -- of the method
" Z4 M$ D+ N" l9 U3 z+ z% R
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 / b- n. Z$ O1 }( O; ~+ h% r$ _
. ~$ G: F) p7 P7 a1 P
这是AGV_putin中arrive的method。5 ]: @* D7 S: f$ d; u
8 x) {. m$ t) ~  ^& d9 J# @
当到达物料速度越高时,这个报警更多,
0 j0 v* T/ B  g0 c1 B9 X- ~可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
  g# g8 V) ]2 J: V程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
2 O5 K# |' ^+ q, c: t1 |( N
4 U5 {7 Z+ C* o3 p另外一个小建议,就是move,所有的move都可以这样2 [/ l6 }5 u' U, k$ O; U6 c
if not move() then debug end
6 E4 V; _( p( j5 U: H6 T* a这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
' K+ q/ f( |* {1 ^7 H' C! N7 pplant simulation中的free libraries有AGV模板,
) g4 I. R, O$ E% c6 b; P' s里面也有案例。
' h# p. H8 S1 U9 I2 E- D8 M我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。) j2 Z/ O" Y! J+ [' z; z1 ?
* _7 F& P  z5 l  S! H
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
! `/ @- D/ J% E# u
% T* z5 y+ ]+ v那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 " S7 t' l: K: U/ Z
这是AGV_putin中arrive的method。
1 L$ A+ Z; j0 V: J% H
. d8 T$ x9 h4 g6 ^5 k当到达物料速度越高时,这个报警更多,

+ @6 K& O  H7 r4 w, u另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-11 12:08 , Processed in 0.017338 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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