设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7484|回复: 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'0 O* O- }  d. q
*/
2 L7 Y. b5 J* q/ i- y$ jis
: g, ]! j/ O* q        part, GlobalDistObj, assignLObj:object;row,Lan:integer;# R- u5 i4 i9 ~
do
  L8 g: \. M& B5 G. \( H        Lan := rootfolder.Internal.Tools.AOLlanguage;( E+ o  L; J( U9 e
        if current = @.Destination -- else return
$ U/ F& K. }, g        then
# w6 o8 Q9 X& u: x3 o% l                @.Destination := void;; O; b9 Z- d1 y. S9 N" `' Y! S
                if @.occupied then6 G# _8 z& S+ k1 l8 z9 a
                        part := @.cont;. F$ o5 u( ^) ~5 W3 [/ e
                        @.transpOrder := void;
+ G3 V# P1 }# \% @  b                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 a4 u+ l$ W7 O9 U" z
                                @,root.eventcontroller.simTime);, ?3 u$ Z. x2 c1 i; L4 f/ h
                        @.HasOrder := false;
) j3 E2 T" w/ D% w; j2 ]7 ]                        @.DrivingHome := true;& g, s  G1 v9 X% l' c' n2 |- k
                        rgManager.tryToStartTransOrder;
$ a! o) ]( @* F                        if @.Destination = void1 j, T0 G/ W" I( P4 A) J0 @1 l
                        then -- no transport order for vehicle @
" r" H5 c, Y2 y" b: n* s                                @.Destination :=
" ]! p* `! C+ c. h; f& _) }                                rgManager.nearestFreeStation(@,track.~);
6 _: t: I/ j$ K3 U- U) G6 {                                newDirection(@);   1 d8 n$ \. {( y) a& j
                                if @.Destination /= void then, y2 Y  B; O. w3 x5 x5 Q4 X
                                        @.Destination.NumReservation :=* Y# H- f! D# f6 s% G
                                        @.Destination.NumReservation + 1;
; \0 l! h* f! X+ D" [5 l  x                                end;
& I  g! F* `9 m3 r  ]                                @.CurrIcon := "drivingHome";
* j3 V, G. X7 s  z8 b                                @.DrivingHome := true;
( W) x* r: K0 C" N" {                        end;
* r- C$ h' y% k4 Q                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% i, P& x* [/ w9 S. u, b                        part := @.transpOrder;& g# V% E+ F& M9 Q$ y3 w5 @
                        part.move(@);-- load part
  o4 ?8 ~, l) F                        @.CurrIcon := "load";3 f3 d% l2 I0 r1 T" E  y) j
                        GlobalDistObj := part.globDestination;
8 T1 W* k3 Q1 _                        assignLObj := rgmanager.rgAssignL;; Y. D3 y, O8 ^. [
                        row := assignLObj.getRowNo(GlobalDistObj);/ |5 B$ b5 \1 X' m6 B8 @( s
                        if Row = -1 then -- since 70- e' Z$ Z( {/ B
                                if lan=1 then
/ q1 E) d7 D# x( }                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- s5 C: _* z' j" f& N                                                to_str("in der Andockstation: \"",?.~.name,"\""));
; f1 ~- q; D- t! @2 X8 |& a                                else/ K) y# {% X/ R$ [( }2 n& [
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) i8 z& o) Q9 ?% `# o( G0 O                                                to_str("in docking station: \"",?.~.name,"\""));                                % W0 K4 }' E) f& I: t$ G
                                end;
, z( j6 X* m, R' b7 q                        else
% a/ Z8 L& D' q) [! {& @( o                                @.Destination := assignLObj[1,row];2 i# x" W9 N0 ]: F+ i5 v* \( ~
                        end;                        - K7 q  Y& o" O* g0 M
                        newDirection(@);: o  Z0 ]; R$ q3 p
                        @.HasOrder := true;
! b: [0 C; y7 ?/ A4 b6 O0 t) a                end;. G7 H0 I) @7 S% ^5 I
        end;6 W, `$ F2 T3 `* U8 q  B
end;        -- of the method
  y: r2 o+ v' X  o! l8 I
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
# j7 g* o6 D  l6 s
; i9 e$ U8 N' \7 Q' }: D, H这是AGV_putin中arrive的method。- Q9 ^/ S4 b( V2 }& _

& a* {0 E2 y4 g6 Q) g3 s& O当到达物料速度越高时,这个报警更多,
" d3 d' W+ U1 _可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
9 |. I! }: {4 Q0 w% V# P程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?2 s! `4 S2 q3 f" B7 T7 B% `4 `
! C0 ]; j! _& D' L, \  W. \* i* S
另外一个小建议,就是move,所有的move都可以这样8 @, ^0 z5 H- {& c
if not move() then debug end
/ v7 w4 R. D1 }9 z2 c这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
" R. R" c% I  \0 d6 z2 `, l+ Mplant simulation中的free libraries有AGV模板,
( e9 G. o2 M5 I' B( D2 E) n里面也有案例。
+ i) n; R8 r0 \: D* l我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
4 F, D$ g5 K! L1 v. ?( J  E+ |1 t) B
* b3 G$ q2 B6 o, {: c7 m我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 2 c) i0 _: R6 {. b9 `
0 ~1 U# ]% T0 s/ h2 x9 C+ t# z
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
" g$ o% A1 n4 {+ |9 L7 m; A这是AGV_putin中arrive的method。4 o* f# u. i: B" r) ?

4 w. t7 g3 H5 e当到达物料速度越高时,这个报警更多,
* I/ c/ A5 b9 ~1 l
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-14 08:33 , Processed in 0.018546 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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