设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6443|回复: 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'
2 Z% z1 U4 N1 B( r4 _*/9 k9 t' |) ]2 b# O3 U* P: b
is7 x, d" J, n' r* R. @; s& c& \
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& V# l" d1 V9 I/ {do
- q- j; W, n. I4 }- Q1 ?3 V        Lan := rootfolder.Internal.Tools.AOLlanguage;
! A& W; M$ j  i0 ?% m! K" B; Z& D, _7 W        if current = @.Destination -- else return
1 i& N: l! o# {9 `* U        then( p! K1 c' u- w8 @, z
                @.Destination := void;+ N* c) L  h1 E1 X7 Y- i
                if @.occupied then2 R! G0 [9 q  C! z$ M
                        part := @.cont;# l4 r* o2 F+ `
                        @.transpOrder := void;& O' P: o6 d* J1 P6 M7 L
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- ^6 U" @/ ~. S5 K
                                @,root.eventcontroller.simTime);0 N/ f* Q# e  b! a4 P% z
                        @.HasOrder := false;; ]. O; n+ F6 {( r5 a3 I
                        @.DrivingHome := true;0 [# j0 @+ i7 W% w
                        rgManager.tryToStartTransOrder;
: t  C) c- L$ s                        if @.Destination = void
+ G* k/ F4 e1 Z) A                        then -- no transport order for vehicle @/ f; i8 J, Q! ~5 i
                                @.Destination :=# y, ~- ?' o. W1 U8 ?! Y  u3 z
                                rgManager.nearestFreeStation(@,track.~);; j1 K1 ]8 x) H+ [
                                newDirection(@);   
. ?3 a6 p9 D, M                                if @.Destination /= void then
. H% i* F% r. n6 o& ?                                        @.Destination.NumReservation :=
* \8 b5 ~. x% T2 O$ B% N/ u# E! `                                        @.Destination.NumReservation + 1;1 z5 ?/ z8 e) x. s: c8 X
                                end;8 O/ }( G4 e- G- ?! D
                                @.CurrIcon := "drivingHome";8 `- ^) |( E8 \# [
                                @.DrivingHome := true;
; {) S8 `5 {, ^# d                        end;8 Y0 K" c+ ?& Z5 s! Z" x: Q
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station  C( [  }' F1 Q* }6 R: M7 B
                        part := @.transpOrder;3 I9 A, |( _7 ^  O
                        part.move(@);-- load part
! U1 s- {" d5 `8 X. Q' s1 N0 I8 I2 E                        @.CurrIcon := "load";
: g; X0 j# {. b4 p7 |$ [                        GlobalDistObj := part.globDestination;3 t1 a+ D* Z/ w
                        assignLObj := rgmanager.rgAssignL;
* S- M  O& {4 C. T& l0 c/ O, W2 ?                        row := assignLObj.getRowNo(GlobalDistObj);
  }3 _' D1 @+ O9 L                        if Row = -1 then -- since 709 d/ d, J8 N" y' V2 D
                                if lan=1 then
" a- e/ O* r: q/ X8 F6 t                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ O" S8 Y1 l0 Y% V
                                                to_str("in der Andockstation: \"",?.~.name,"\""));' ]% q: ]0 i6 K6 c
                                else
# P9 b5 z( W6 X1 F                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),  Q& x, d1 j6 c; P' Z
                                                to_str("in docking station: \"",?.~.name,"\""));                               
/ ?6 X- T# x/ q, k$ E                                end;
1 l) a. l2 Q- I% N; A! I' m2 p                        else! P' {) G. S; Q. o: q
                                @.Destination := assignLObj[1,row];
6 W- `9 }% L$ P; x& o; e                        end;                       
/ G2 I* X! v% Q9 q$ t" j# i4 B: B                        newDirection(@);  ?* N; a+ d$ o9 d+ L
                        @.HasOrder := true;) c" ~) c# n! [) u4 a  H5 k
                end;
) e$ Z, o3 h& W  a        end;& o, Z* w1 y$ X  l: m6 U: e' K
end;        -- of the method
% |- T" G& F9 `2 d& e# s, E
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 : t3 F, r8 g& _& K

  v" ]* G3 n5 W, d7 n4 T( n4 `这是AGV_putin中arrive的method。" ~' s" c5 q# ?, @/ m
& o3 b3 ~5 f8 m4 p
当到达物料速度越高时,这个报警更多,$ K( L) [3 G8 ~. O# |! L
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
- y+ g$ d2 j) G  c程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
1 c+ r  ]/ p( e4 V/ a5 O9 T9 q' ~1 K8 K1 P! u' w6 {8 H9 K! a
另外一个小建议,就是move,所有的move都可以这样
5 p( W3 m" O% @1 o0 D/ Xif not move() then debug end: ?5 _: h- x; L4 R6 \7 P5 H
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
* {! r+ V0 x/ b0 aplant simulation中的free libraries有AGV模板,
6 a, x+ V% h, t' s  L# }3 I里面也有案例。
5 y5 Y& d* u" _/ e" j1 R我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。8 z, @  y* a2 q% ]3 E% V0 b
: |  j7 E. q% U# _/ i' t" P# A
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
& D9 H7 w2 e% }  z6 E$ n( Z6 Q* q8 }
" e3 p3 q7 L. f/ p* J  t那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
/ Z  t1 ^! v. `' J' e$ `2 L# q+ i这是AGV_putin中arrive的method。
( J5 E2 d' F, M# \) A
" d# L6 K8 R& I1 t% K0 B* y当到达物料速度越高时,这个报警更多,
( i8 `; O' k$ {. l. s
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-7 01:33 , Processed in 0.018466 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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