设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6953|回复: 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'* L5 q9 @2 S* ~
*/; Y3 T; t0 G% w7 @. _
is# p. D% I% n6 I! I$ k
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 z* S( y, C4 F5 w0 Mdo8 H* U& q+ o9 U8 U5 b2 O; @
        Lan := rootfolder.Internal.Tools.AOLlanguage;
6 R0 _# C2 L( y+ w' |5 L        if current = @.Destination -- else return
6 f( J0 x: I1 b* i+ w# O        then
" p/ \. L& D* u                @.Destination := void;
6 f5 @4 M! d5 b4 f                if @.occupied then
% N& l" T2 L+ j3 j% J4 p) o: C  w                        part := @.cont;
% t+ V& T+ Q9 Z6 h, {                        @.transpOrder := void;$ U- ~6 y& k* \6 r" [6 p5 U
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 v0 d3 m  G& O! O6 Y: W                                @,root.eventcontroller.simTime);2 q$ D  V4 D5 b* X
                        @.HasOrder := false;
+ T0 m! ]/ l/ r$ P                        @.DrivingHome := true;8 r  C+ x4 }& L; Z/ l5 R
                        rgManager.tryToStartTransOrder;/ }" z0 Y. g9 m! N
                        if @.Destination = void
: m' k3 I" |0 E! I3 r                        then -- no transport order for vehicle @
: A( r: s0 c5 @/ J8 w                                @.Destination :=% N2 `3 l, A: V! O0 s7 ]3 n
                                rgManager.nearestFreeStation(@,track.~);' v; d3 }1 B' W# R) o
                                newDirection(@);   1 s; C) X+ ^+ w+ N0 h. B% z8 L% L' C
                                if @.Destination /= void then
+ Q( v9 [1 H- h' s! R; t3 W8 B                                        @.Destination.NumReservation :=6 ?* h9 H; @8 }% ~) Z8 N
                                        @.Destination.NumReservation + 1;
  M9 b) I% U4 T/ V5 ~8 ~+ b: c                                end;
+ j$ c' O0 j1 l3 `4 j                                @.CurrIcon := "drivingHome";
% D6 p( ~1 z& G- a3 U! r2 G& O                                @.DrivingHome := true;( ?1 r) ~: b$ `: f& P4 ?
                        end;
8 `6 y! x0 g8 @- h& L3 T                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 L8 B- Z0 _; M1 V' Y2 j: k" j                        part := @.transpOrder;
$ b7 f9 f0 L: S/ b                        part.move(@);-- load part( W4 p3 N* P, W* t4 v- n
                        @.CurrIcon := "load";
; A" @. F5 M6 G# t, a; E                        GlobalDistObj := part.globDestination;
0 S: ~+ B3 m. {6 y9 z                        assignLObj := rgmanager.rgAssignL;
  y% \9 u/ \' a; e6 s, c- o/ O2 k# D' w                        row := assignLObj.getRowNo(GlobalDistObj);
! B+ K' z4 @) r' k3 m3 |% R- s( h                        if Row = -1 then -- since 70
0 G( ~. r4 v& M5 R/ \% g# M" q                                if lan=1 then( R2 G9 w# P3 j! a/ ^7 K
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! Y" M" i8 h. O$ R- m% f                                                to_str("in der Andockstation: \"",?.~.name,"\""));
% }+ M9 \' A: H( Z3 `5 l  G                                else
6 g( {  B+ W$ C& b! W                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# W9 y2 t" y/ p" {) Q, }+ N                                                to_str("in docking station: \"",?.~.name,"\""));                               
2 a" D  K' f% i9 k% x                                end;
4 r% g$ Y: G0 h3 `8 I" h- o                        else4 T% J( U3 @, g& T: i3 X
                                @.Destination := assignLObj[1,row];
2 i3 c- X' W, a2 `) H; L                        end;                       
1 y4 Q8 Q3 u+ T; o                        newDirection(@);! @/ y: {! I2 j
                        @.HasOrder := true;1 K- M4 H. r& w5 B
                end;0 g: k- K8 C- E2 T* W
        end;
7 K- q4 \0 R0 C( bend;        -- of the method
5 ~& P% F8 {6 @
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
9 Q' C' J* S- c7 o  m& O+ n5 P" V9 n' F' a+ S8 W
这是AGV_putin中arrive的method。8 v/ g: g& N. p7 u

5 [, B% n0 V  H8 ?! ]当到达物料速度越高时,这个报警更多,
; J1 A. ?0 l, k7 c5 F可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。8 g: J9 g% ], p' |
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
+ a3 C* T, n5 N- a+ ?* v$ I0 q5 Y+ c! ~7 N
另外一个小建议,就是move,所有的move都可以这样
  X6 G+ R2 o- F1 g' D: G' Wif not move() then debug end
+ G3 J% w  G* G4 l2 k9 d' `9 F8 y这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。0 d  r/ ~' S8 _: X1 G$ i
plant simulation中的free libraries有AGV模板,
) d$ F6 I. j& b3 V2 j6 [. f! W- z里面也有案例。
' N  ?- Q% W( M. i$ V3 ^$ `我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。) h# J/ |9 m) Z, L5 b+ F( A9 K( g3 @( q0 ?
# r# J5 f/ \+ b& X0 z7 A
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 , S0 G' n/ U3 v3 R. ]

* n5 `* Z2 G: ]+ g那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 & R4 m" d" }( L; k8 k
这是AGV_putin中arrive的method。
6 {- Z% `! Y7 O/ ~/ H4 Q! h. D2 e% x0 K, e
当到达物料速度越高时,这个报警更多,

( u, s1 z. m: G8 G5 X1 f" J; A( n" @6 v5 O另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-7 23:57 , Processed in 0.018807 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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