设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6736|回复: 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'
, S& |* x! G  d/ n7 X+ L*/% v) W- _+ V* R. t
is
% @" G8 T' E8 K( @2 O, I        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- n7 N" x; v2 `- X7 x  n1 P- Ado+ k, B/ @& x+ d: l2 U' S
        Lan := rootfolder.Internal.Tools.AOLlanguage;" E7 h0 E" L" y% h
        if current = @.Destination -- else return8 e1 |8 M! n: M7 |! S! l* l
        then
% f) e: E3 Q, B, D* Z4 ]2 f                @.Destination := void;
7 G. k) o$ `. e- h1 \( [8 W! Z                if @.occupied then
" o% I  B" z$ n2 ?) {& n                        part := @.cont;; Q# f& O* U; ^$ e* b4 v
                        @.transpOrder := void;
6 N" n9 f% h( g  P2 J/ e. o. l                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# K9 ?& ]& y7 r5 z5 |                                @,root.eventcontroller.simTime);) o1 |7 ]  X+ m: h: E
                        @.HasOrder := false;6 c! i/ ?$ A# u  _! D
                        @.DrivingHome := true;' G% P# z) u5 t6 |+ b4 L( u
                        rgManager.tryToStartTransOrder;$ u) k6 }# {* I: n3 A5 }
                        if @.Destination = void
4 L6 G. t6 ?0 p/ y                        then -- no transport order for vehicle @$ g. w. T& S3 [' A, Q" ~; y; e
                                @.Destination :=
+ Y+ C9 W6 n: W( X; ?3 [1 z% z: W                                rgManager.nearestFreeStation(@,track.~);
; t; Q& {$ d, V" X4 Z  l! ^                                newDirection(@);   
* R. i0 h% s! U+ l0 W9 h7 _                                if @.Destination /= void then
* }. r- Q2 [9 Q5 h0 x3 z. n$ d                                        @.Destination.NumReservation :=
+ i* j; B$ Q+ T; ]* A" ^. U                                        @.Destination.NumReservation + 1;
. ~8 ^/ x- [3 z. F* B                                end;" m' H2 N! f. W4 u' g1 `
                                @.CurrIcon := "drivingHome";) g! X0 k- I4 w! I9 R/ D0 H8 ]
                                @.DrivingHome := true;1 g3 x5 J$ c# I) b5 h
                        end;
- W4 e% g+ R( h6 x$ r  w, }                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 M  R; |% e. o+ T: m% s                        part := @.transpOrder;9 V) u8 Z) T1 v8 ?8 H
                        part.move(@);-- load part' u/ X+ j* t( ]; a0 g  ?# ~- W
                        @.CurrIcon := "load";1 z0 \; Y! @" ^. s
                        GlobalDistObj := part.globDestination;
9 d# C4 G  z4 D$ }3 ]                        assignLObj := rgmanager.rgAssignL;
* b0 j" i' U5 O6 P; U( m) a                        row := assignLObj.getRowNo(GlobalDistObj);
; c2 ?1 j" U  k  q) h                        if Row = -1 then -- since 70. @6 S0 S% R; m' |: m0 l
                                if lan=1 then
7 G8 r7 c0 S! r5 O7 S& y                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* i9 H7 d9 ~, g2 \6 H. Z* q2 k( J: Z
                                                to_str("in der Andockstation: \"",?.~.name,"\""));9 ~. t* ?. ~& t8 U
                                else3 X  |& D9 Z0 \
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 J' y$ N) {0 v; a1 c. W; o
                                                to_str("in docking station: \"",?.~.name,"\""));                                ' h9 T3 U. K: j0 L0 j1 g8 [
                                end;& {- j0 m+ q& q! q5 D
                        else
9 J% z3 C7 l* s9 \  j& ^: J! v                                @.Destination := assignLObj[1,row];
0 I% z0 @; a. W/ c7 P                        end;                        - x% B' L# m8 l) ]6 X3 a2 Q* D
                        newDirection(@);
0 g+ {- `* Z+ h& G- ^% C. x$ I                        @.HasOrder := true;' `6 S# {6 @0 K* s* Q# a
                end;
5 Q* n; v8 J* _& o+ g$ u. v        end;
7 E1 W4 L8 q1 E& M) Nend;        -- of the method  }0 S3 b1 i# m+ \6 n0 w4 ~2 P
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
/ y* |5 P. r0 H: p
- x9 i0 U0 v: L这是AGV_putin中arrive的method。
3 o, V$ H* m) s. w' P
7 f- V  E! F% s9 ~$ y0 p6 a当到达物料速度越高时,这个报警更多,
9 }/ j% i, M, x5 g; }可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。4 M, r2 t4 L; v& ?3 w* ~9 I& h
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
: A# j; }8 f* v: H* x) m4 S3 o) e& b+ s% ]5 a% {' \; g; T
另外一个小建议,就是move,所有的move都可以这样+ H. O" n4 u" m' q" \
if not move() then debug end; ?' j: Q  b# c- I0 X9 J& E
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。. Z  d. ]! s& K: {: T* D) e
plant simulation中的free libraries有AGV模板,  S/ _3 e! }. }
里面也有案例。
( b% w6 \' M; s8 ?( N: \2 x4 Y: @! P我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。% u1 L# e8 L) b- W$ L8 I
6 `1 a! f& _! u5 t* r! o, L
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
. @0 M6 a# b4 b! Q2 Q( y/ m% ~5 ?8 x5 J  H. g& g) Q
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 . ]5 O" ?* y4 r: F* H% M. g
这是AGV_putin中arrive的method。
: V/ F; }0 k% ]: f! v! ]* J2 l( L$ l( _
当到达物料速度越高时,这个报警更多,
4 ^) D) S( R. x0 k0 w
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-23 14:47 , Processed in 0.015896 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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