设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7254|回复: 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 c2 p3 l' f, p7 M*/4 C& m4 E! H' |6 m) a4 Q
is
' J3 z$ d; @+ ?! R7 y1 m$ a$ S4 L2 f. a* I" B        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 Y/ z; i) L* Y* z% o! Tdo$ P$ f5 l1 L  V3 v3 r
        Lan := rootfolder.Internal.Tools.AOLlanguage;
0 y! t! R$ Q- V* t, I* M7 U        if current = @.Destination -- else return! S4 g% r; \% z/ ~
        then
7 E. {3 p. m/ L! L% h                @.Destination := void;1 z8 Y* ^, o4 J- c* {& k
                if @.occupied then
/ i- r$ ?' ?& f! g) V" R                        part := @.cont;
) B+ }8 M1 c0 I2 r0 S4 e6 X                        @.transpOrder := void;
  j( P2 k- X1 {+ }" k                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,  d1 B- ^; h# Q' w) {6 X9 z
                                @,root.eventcontroller.simTime);
& G8 L% P6 `4 s$ Y5 l                        @.HasOrder := false;
/ c, }' N% R- s/ j- E% t& m                        @.DrivingHome := true;/ E" Q* M( n  X8 F0 c& \$ g2 L4 R
                        rgManager.tryToStartTransOrder;9 w! j* Q1 Z  P) s0 {, [, F
                        if @.Destination = void; |0 M% ?, U4 w; b; a, e6 c
                        then -- no transport order for vehicle @
+ K4 i8 Q* I8 o7 x: O                                @.Destination :=
! k9 ~( B; f3 G% ~; U                                rgManager.nearestFreeStation(@,track.~);- [9 z, \7 |& L
                                newDirection(@);   
+ |4 Z6 z4 P% Q& v                                if @.Destination /= void then
7 w; [* N. ~5 l1 S/ |; B4 O& {- `                                        @.Destination.NumReservation :=
5 g6 g7 |7 \" q7 [8 c' [                                        @.Destination.NumReservation + 1;( ?8 z, V2 b" Q/ B
                                end;1 i" x/ a' ^2 e" I9 y4 m0 h. U' ~
                                @.CurrIcon := "drivingHome";
, k# Z3 F' |5 s$ B9 K6 M& K) O2 ^                                @.DrivingHome := true;+ J! c! J0 i5 @  ?/ @9 `7 {" o
                        end;, h2 m- k( `. g) p! q2 H
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 D4 Q$ x  D( h9 d2 F/ B! i2 @: U# n                        part := @.transpOrder;
$ V+ F9 Z! r/ J0 R                        part.move(@);-- load part
$ g% a" b* B; w: t                        @.CurrIcon := "load";7 r! `  p0 m  M, Z( H2 M- n
                        GlobalDistObj := part.globDestination;
! n! I. x4 P# A2 X+ d% B2 }                        assignLObj := rgmanager.rgAssignL;, l$ {  X7 I/ v) ]
                        row := assignLObj.getRowNo(GlobalDistObj);
: |4 u2 q3 }9 P6 _                        if Row = -1 then -- since 702 e# j+ P6 g) V5 P9 m4 t) F
                                if lan=1 then5 {  Z- G. f/ p
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 l' o) R: m% E3 U; S  y, z* A
                                                to_str("in der Andockstation: \"",?.~.name,"\""));* \6 P5 W9 z: t
                                else
1 U+ J$ A1 J1 }. E# F                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& e8 c# C( R( D$ m                                                to_str("in docking station: \"",?.~.name,"\""));                                0 c1 ]4 o# E# m" E1 A
                                end;
( d# @3 i8 ~  j/ U8 v  |8 D2 W                        else- F! f/ O: Y, `/ Y
                                @.Destination := assignLObj[1,row];* z4 ]! J* [- u+ N( H9 S5 m
                        end;                       
5 ?; D$ z# M/ m" h3 Y, f( |3 t                        newDirection(@);3 X9 q/ z- c9 {1 }" ?
                        @.HasOrder := true;* O4 @+ a4 O; T" a+ C. o, s" _  A
                end;5 l, A2 s* M% \" D
        end;
0 M) J+ P, c4 e# A- X3 Lend;        -- of the method* s9 A/ J9 m: I4 `0 a' \. z! C
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
  @% m  N. Y- B) e0 M) U
% e7 M" S1 ?& t" H6 {  q& g4 y这是AGV_putin中arrive的method。
) w% C2 a0 R# i; ~
0 g) O5 _3 x$ D& j8 o当到达物料速度越高时,这个报警更多,- z4 y. V  ?4 b
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。7 c# S) r! g+ J  B0 K
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
4 o, D, R, K' K. ^; A" h" [7 \
% F  T# j) |( n) U) ]) g% n* o7 V另外一个小建议,就是move,所有的move都可以这样8 w# [' K* m2 \9 g3 y
if not move() then debug end0 B( S! V6 J  g: p' h. `& e
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。' \* v( d- P  ~! h' ?
plant simulation中的free libraries有AGV模板,# E- ?6 Q* R& G5 {
里面也有案例。
! X# h# K# ]# ^0 k: ~9 a我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
2 C& o" j* p/ k( b* z; y5 v
. ^1 U+ D# B6 U- C8 ^' ]0 f我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
7 Q, M. C+ K, a. p; s; [
1 [/ ]; X7 }' n+ ^* ^; W那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 . ^+ f) N1 M7 y. [
这是AGV_putin中arrive的method。4 s( H1 ^* H* t4 s7 d/ ?
! A/ t* T4 @* |5 ]
当到达物料速度越高时,这个报警更多,

. ^2 S* e2 V; a另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-30 23:49 , Processed in 0.022254 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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