设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7059|回复: 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'
7 [- k: i6 |/ p* J$ I1 W*/
- z5 e$ L' F3 X& R; I: r. p8 Ais$ |4 T$ T  H) M. K+ ~6 ]
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 l6 b' J0 Z7 _& w5 |  qdo
; h3 ^5 H/ Y  L        Lan := rootfolder.Internal.Tools.AOLlanguage;, Y9 H- Q& v/ d: k5 ^/ K# Y
        if current = @.Destination -- else return
; Q% D5 A1 l" P6 _, d        then
% b, U& n: t0 y3 r3 S                @.Destination := void;
  [" ?0 d. l, l# [$ C                if @.occupied then0 Z# {. r$ e3 a6 e1 B
                        part := @.cont;3 v) X. r2 A, K3 U# ^# x
                        @.transpOrder := void;
* E. f' N* O! ?                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* D. e4 ^/ ]' [$ U6 s# a/ l
                                @,root.eventcontroller.simTime);+ o6 z) h$ Q6 {  [3 Z
                        @.HasOrder := false;
) r% J. U% u- [                        @.DrivingHome := true;" Z5 l3 H; R: Y* C+ q
                        rgManager.tryToStartTransOrder;. J7 S1 z. d/ B7 Y  T+ I5 \
                        if @.Destination = void$ E" O# ~9 P' k3 e
                        then -- no transport order for vehicle @' l1 Z6 H$ x& H
                                @.Destination :=8 u5 t) v5 y: s! L
                                rgManager.nearestFreeStation(@,track.~);6 h8 H' b* K* R
                                newDirection(@);   
5 Z3 W: A1 X4 ^# D4 [                                if @.Destination /= void then# [( u+ l+ A* K! j& D0 ]7 ]
                                        @.Destination.NumReservation :=
+ |) x3 R( G. _' C                                        @.Destination.NumReservation + 1;" ]9 ?3 g. E6 X% D4 b, W" ~
                                end;7 B' o3 ~: h, I
                                @.CurrIcon := "drivingHome";
$ `  y$ i9 K" G7 R' t3 [                                @.DrivingHome := true;
+ @$ C8 B* U1 p$ y: W9 u* y                        end;# G+ o' U2 n3 z8 P4 `
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% I  k$ D; g8 x; G: k4 Z5 a5 a  U                        part := @.transpOrder;
& Q: a5 \, J6 h% A                        part.move(@);-- load part. a9 G! H: s4 i' f! V
                        @.CurrIcon := "load";/ v$ t) k( ~. N' b& N
                        GlobalDistObj := part.globDestination;
/ ~8 I8 B5 d9 U2 {- ^                        assignLObj := rgmanager.rgAssignL;9 @$ t& c2 {9 }
                        row := assignLObj.getRowNo(GlobalDistObj);
3 N) {  D, x* X9 K                        if Row = -1 then -- since 70
0 Z& i! Z0 u7 R                                if lan=1 then' G, |, Q  H/ w' ~8 F7 A/ S
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 M5 f8 U9 E  W3 C' z& L3 B$ n  i+ u" _                                                to_str("in der Andockstation: \"",?.~.name,"\""));$ c% Y! ?, A( q: P
                                else3 A$ k+ P7 C' T' U/ O, c2 K
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),  u" `0 Z+ B  b1 F3 \, G2 [
                                                to_str("in docking station: \"",?.~.name,"\""));                               
) d# \$ ^+ Q7 h& a: V3 d5 L                                end;
  @* Q, I  x& N# r, M% ~1 U' M                        else% x. [0 m8 N* f2 w& m# H2 J$ `7 m
                                @.Destination := assignLObj[1,row];
* B& e( D* e6 K4 K                        end;                        - _. v/ K! i+ `8 Q( j, l
                        newDirection(@);! G6 n( j0 P8 T5 @
                        @.HasOrder := true;- R5 U4 T, F- g# k) Y
                end;0 V( f" n$ g* `/ J5 K$ L
        end;
+ I$ S" k8 `) l) Kend;        -- of the method; ~7 {4 {# v, f, U! u
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
' u% g1 E0 W$ e6 \0 h. |6 i4 T7 i7 o3 |
这是AGV_putin中arrive的method。+ X8 H5 Q" j3 {4 K

6 z) ?# U# y0 x+ k+ E$ d当到达物料速度越高时,这个报警更多,
/ Y' C3 \7 x  I( X可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。$ J" r) L" N2 M) f7 L4 W! n5 j
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?" s2 I- N$ q4 t- Z( \( }% V

5 z, s3 g6 x& F另外一个小建议,就是move,所有的move都可以这样
& p- U) k. A8 [! d4 Sif not move() then debug end
; B7 u% ~. j3 V1 v  g这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
' h8 q9 ?$ N9 ]' `* L7 Kplant simulation中的free libraries有AGV模板,# s, p! i1 T* O# J, s
里面也有案例。
" e1 p) c. ?/ F; v我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。2 Q. p! _. O) n( O

! y, t- U" @- R- G我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 2 f1 B8 w" H' A9 ]6 Y
; Y8 i9 W( i- g
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
$ y0 q+ p, t+ c- w2 X这是AGV_putin中arrive的method。5 U6 s/ O# U/ a5 v' p. ^0 r' z. [
/ ?- X4 O) K  O6 }8 @
当到达物料速度越高时,这个报警更多,

; ~. K8 b; Z, d! [3 L/ K$ z# E另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-14 04:28 , Processed in 0.024352 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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