设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6951|回复: 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'
9 h" n6 |: k9 Z+ I$ m*/
9 I( H: _, n: t- @+ F  R2 }is
% f3 V, ?/ b) ^9 ^! j        part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 T5 ]$ D& X9 V# ]
do9 k& l9 R8 d, D+ {/ o
        Lan := rootfolder.Internal.Tools.AOLlanguage;6 A  s, P* V. a; b
        if current = @.Destination -- else return0 M7 L0 [7 j5 x
        then
. j: R) i$ R/ P) ~- Z. e                @.Destination := void;
/ i) p5 }  J  K/ @5 O2 g7 c6 i; S                if @.occupied then2 J2 G# X% E1 d5 P* F, t3 J/ P
                        part := @.cont;9 L' C1 F7 w+ o4 i* }
                        @.transpOrder := void;
: s8 s$ h5 U  |; r6 V                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 z9 f4 c+ o, Q; h8 c6 y2 B                                @,root.eventcontroller.simTime);% F5 x1 H+ E. U- L' h- R
                        @.HasOrder := false;
+ z4 k( a. m% o" M                        @.DrivingHome := true;
) t! W1 C2 \% g5 m! y2 e* G                        rgManager.tryToStartTransOrder;
& R9 L3 D& F0 A6 ^                        if @.Destination = void
* R: ]  ?/ U: A) v                        then -- no transport order for vehicle @: k4 Y, }& |  [- t  D
                                @.Destination :=
$ |3 ]3 t1 u) e9 U: F' W( ?                                rgManager.nearestFreeStation(@,track.~);
- T2 W2 P  ~' z8 `6 ]4 ^                                newDirection(@);   
- y/ K# n  _4 f7 R1 D3 _. I                                if @.Destination /= void then: ]- f# L  X& K6 g
                                        @.Destination.NumReservation :=
5 G) \4 I3 P9 i  O                                        @.Destination.NumReservation + 1;
, z, v" q/ w4 l8 Q2 ~7 @& W. r7 ^                                end;9 D" w  h5 U+ J3 f/ d7 f
                                @.CurrIcon := "drivingHome";+ g' r1 W! y# m! f" m3 `/ a
                                @.DrivingHome := true;% c$ P: m% `8 D0 w- U* G8 |- H
                        end;
3 H# |  }4 ^2 n  D2 q( n4 m8 F                else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ J6 h1 ~1 J9 E% ?$ H- A- K
                        part := @.transpOrder;
8 w2 @- v7 k( S% g* }# O                        part.move(@);-- load part
! }- n+ E0 g: C5 i                        @.CurrIcon := "load";
" i) J! K& e5 e8 H7 e                        GlobalDistObj := part.globDestination;' y& u' ^0 c& w! O5 S" a% u
                        assignLObj := rgmanager.rgAssignL;  L, a) b- N* y5 g$ r0 F
                        row := assignLObj.getRowNo(GlobalDistObj);* }" j& ]+ d% S4 n3 s
                        if Row = -1 then -- since 709 I4 Y  w! Q% w3 j  U
                                if lan=1 then% @' ?& i' s- r3 e
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- ~, z- O3 Q; r3 U, z                                                to_str("in der Andockstation: \"",?.~.name,"\""));1 }: o$ j. M* w
                                else9 b  P& ]# Q, ?  ^" R% m$ d
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% {1 z2 [5 @( J" M/ i% b
                                                to_str("in docking station: \"",?.~.name,"\""));                                ) l9 \4 P" H& J4 {& u
                                end;1 ^' q" p2 \6 |0 C1 b% m4 }3 P* h
                        else/ e2 b1 `1 b& Y" x; k/ `4 E+ V! {, U
                                @.Destination := assignLObj[1,row];5 o2 ~+ |4 G" f. r6 t! i3 K
                        end;                       
1 d3 l# z' B) [7 b) G                        newDirection(@);! w! o- V1 c9 i# E6 V) \) d1 H
                        @.HasOrder := true;; K& S* M9 E) t
                end;, d  u  _: u6 Z6 W
        end;7 ~- A* ?7 n5 @* E1 b. ~+ b
end;        -- of the method1 r! j, @! i9 Z# \+ i- O$ C
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
- J0 [; b# g8 I; u, O$ V+ c& u) \+ d: t  |) V9 \7 M0 c( i/ s
这是AGV_putin中arrive的method。) H( Z1 U$ L/ Q0 b% h! ]

& l: U- O8 Y$ \6 `- g1 ?3 t当到达物料速度越高时,这个报警更多,
( V& s. k* [0 ?  R, U可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。5 `9 v, F/ s( F4 u! R# e; K
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?% V. v: k3 \+ `: U/ o

% j& \! v( U' _, z* {另外一个小建议,就是move,所有的move都可以这样
* O  O$ I' S% A. Jif not move() then debug end
: ]2 ^! g, i7 G/ x这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
& g* E- }5 g- B$ Oplant simulation中的free libraries有AGV模板,
) D; z( f" f. o' N- x+ O里面也有案例。
( y! d1 q& T# i% O我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。$ M0 f' \% H! j) P# x& Y9 d9 K" ~

/ V' e% D/ N) C; T/ U我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
. B: C% w# Z# i% n* }2 `; `% i! U7 q! p$ y! s7 s: s
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ; ?7 F# G3 N0 X) x4 ^
这是AGV_putin中arrive的method。# Q% w- t. x- V- f1 M, ?' s  _

( i+ C) m, \' C9 \/ U: w当到达物料速度越高时,这个报警更多,
" q% i& ?% S8 U& }) F( t
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-7 21:29 , Processed in 0.018289 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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