设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8733|回复: 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'6 w% M9 p2 Q4 r( e, o. U
*/  b7 e3 P, z' @! g% K1 r
is
: r) P  p( l* s0 x7 ]        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# Q' D' m# V+ J: R3 u& Xdo% c- y2 P7 v5 p2 \7 T0 u4 d
        Lan := rootfolder.Internal.Tools.AOLlanguage;
  \+ J; S  L# E2 \" ?4 T& g8 D9 z        if current = @.Destination -- else return. F% j3 I3 p/ w& `' k
        then2 t% w3 h% [" y1 a+ j' k5 j( X0 }( m
                @.Destination := void;8 A. N  C$ ?% p1 G
                if @.occupied then
. C3 G* m: j, H6 J                        part := @.cont;
' Y( M+ D: C4 E                        @.transpOrder := void;
5 q1 \! a3 r" x3 y                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- R( N% ~- I2 n) @
                                @,root.eventcontroller.simTime);
; j; S7 f8 ]! y                        @.HasOrder := false;
* Q7 G4 \( I9 r- g+ |                        @.DrivingHome := true;
  x& F' h# E3 E7 H                        rgManager.tryToStartTransOrder;& L0 c; o( u" |) A: U; F
                        if @.Destination = void, E/ B% j9 G% R
                        then -- no transport order for vehicle @. ^2 h# Y( C6 ?/ R
                                @.Destination :=
: K: j% A* h* v' {5 P                                rgManager.nearestFreeStation(@,track.~);
/ o6 f- {2 i' r6 W                                newDirection(@);     x* i( G7 D" T! U* ~
                                if @.Destination /= void then  F9 y9 W: k* s
                                        @.Destination.NumReservation :=
- v) \, b2 n' n8 ?                                        @.Destination.NumReservation + 1;! P6 J/ y/ m! A0 C# ]' Y" L! h
                                end;2 E* t1 p. J* B' Q8 i3 o2 A
                                @.CurrIcon := "drivingHome";6 @4 ]* D, B, R0 i9 i2 v! f4 g
                                @.DrivingHome := true;
4 I7 j, S! M0 ~( r2 E; w3 J                        end;  R$ [& c" M6 G$ e2 ~4 d, s3 x& ~& b
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station' u& Z! c+ D* ^6 c$ }2 c
                        part := @.transpOrder;+ x0 G" d7 l% ?9 g! e5 ~, U6 X
                        part.move(@);-- load part
* h/ m( |7 x" Q( M                        @.CurrIcon := "load";
. O: J+ m' E" H                        GlobalDistObj := part.globDestination;
7 O, C1 W! x7 o' k# p, ^                        assignLObj := rgmanager.rgAssignL;
: u0 ^+ Z6 q3 D8 `                        row := assignLObj.getRowNo(GlobalDistObj);
2 ?; [+ B6 x  y1 Q                        if Row = -1 then -- since 70" O- w0 e6 @& E+ G7 w
                                if lan=1 then
0 U7 K% T2 ~) g                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# h" C9 F+ k! K' p2 J                                                to_str("in der Andockstation: \"",?.~.name,"\""));
* `. N/ {- Q, c: g                                else, S" L! }! u6 o( k" R- Q( D& _
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 B! o" d' G6 H" M
                                                to_str("in docking station: \"",?.~.name,"\""));                               
2 b' A' x4 e1 r7 O* E                                end;' A+ y  r$ a; _- U- \; E: b1 M: q
                        else& p* P3 q& Y7 f8 L7 e
                                @.Destination := assignLObj[1,row];; D' c) S% A+ q# Q- i
                        end;                       
: k. u% Y1 @: X6 L' P# B% ?                        newDirection(@);) D8 q6 \8 x3 q% e/ @) w! R
                        @.HasOrder := true;% T- f/ a- h" q5 w& Z* e+ b
                end;
7 ~5 j8 O" L7 Z2 N  |9 |        end;
* z+ ?& i8 C* n+ _0 Nend;        -- of the method
" D0 r3 c$ r9 D  d8 I9 v; m2 E
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
2 O' y, n. i+ g* S- D: t9 S! z' `, C+ r1 ~  U( a! w- j6 \
这是AGV_putin中arrive的method。3 H5 U! `9 `+ O# F
5 C6 `) b7 o* b! d
当到达物料速度越高时,这个报警更多,! [* \9 M  m9 N' o8 x
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。4 l% `7 ?4 _" F
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
' y  a. i! w  }/ y4 h/ @* R( g  f& J
另外一个小建议,就是move,所有的move都可以这样
/ o" o' Q9 R6 ^; t+ Q2 T, Sif not move() then debug end
$ D; p- [8 ?4 [7 P2 v. e这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。7 C! Q! G: G9 t7 G8 s
plant simulation中的free libraries有AGV模板,
) ?( m6 J; k+ y9 Y# K' \7 O里面也有案例。
' d9 g$ Y$ x/ J, N我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
6 Z4 m7 t) |$ q) g
* _' q1 [4 Q( g  }5 I1 m. [我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 . a5 V5 ~! f4 C, v  q
3 N: o3 A' s2 d
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
' Z: |% [& s) u+ U% r3 @! x$ s这是AGV_putin中arrive的method。
/ X* Z& o1 j5 s# |& j4 G: k. p/ Y, C0 j4 h& C
当到达物料速度越高时,这个报警更多,
1 p8 F1 G- r' Y: a3 _# [: _
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-23 06:18 , Processed in 0.015895 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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