设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4628|回复: 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'
, I4 q$ k7 }( d6 Q*/
& S: Q7 A* d. gis
, H( N6 F2 S$ D, W+ w        part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 n5 _0 e5 ?' U" {- y
do6 \* J8 _) V# ]! [3 t; a# {- s
        Lan := rootfolder.Internal.Tools.AOLlanguage;
5 ]* O5 }& w; W  K: X        if current = @.Destination -- else return
, ?* S5 s( K( X' l6 C# L        then
) \7 W- ~' ]% `                @.Destination := void;
: {3 ^$ C, @8 V. l  b3 l$ t                if @.occupied then
( B4 x8 n$ \& K& C1 X. j" {8 {                        part := @.cont;, E; V0 P7 [6 E; P, `
                        @.transpOrder := void;$ Y; O6 |1 C( v' w
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' y4 k! K! e4 U                                @,root.eventcontroller.simTime);
" L" w- S% P- b- r2 d                        @.HasOrder := false;
9 G2 P' v0 T: l  ?: q7 h                        @.DrivingHome := true;
+ u# ^6 i9 B6 f" A# _8 W- ~0 K                        rgManager.tryToStartTransOrder;8 ~8 z4 v' ^( h  F& l3 C1 P
                        if @.Destination = void
& c! V/ [% ?4 r7 U& F" S6 T0 U" F8 f                        then -- no transport order for vehicle @7 Q% |3 u, q+ d* {; _7 }
                                @.Destination :=
) |& V* F/ [& S                                rgManager.nearestFreeStation(@,track.~);
* V3 t# \3 r6 D( v                                newDirection(@);   
% O; d& g* x' D                                if @.Destination /= void then
' y- N; w. F7 ?; C! [: p+ `                                        @.Destination.NumReservation :=  L' s- m8 y! g% b3 A
                                        @.Destination.NumReservation + 1;/ Q$ S2 w- Y# f: `: N0 l# Y' O' v
                                end;
$ B& q& n# G- x5 D2 q- h, p                                @.CurrIcon := "drivingHome";9 z: Z" R# P8 z! G- @* c
                                @.DrivingHome := true;
' m- Z0 K" c6 J4 {% w1 A; O                        end;
6 C, _6 V) D9 a                else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 Y% h/ q' o6 D' u' y
                        part := @.transpOrder;
) u- H" Z1 R5 O+ m2 }                        part.move(@);-- load part+ d- t+ [' l. l( g
                        @.CurrIcon := "load";, o% K9 n  z9 |
                        GlobalDistObj := part.globDestination;
* [0 e- E/ {1 }4 _- e& b                        assignLObj := rgmanager.rgAssignL;- i6 ~+ z% p5 u& W, C4 g/ J( J
                        row := assignLObj.getRowNo(GlobalDistObj);
/ y% l6 r8 ^6 c' @, K+ C                        if Row = -1 then -- since 70  [8 N$ A6 D" v3 n* t
                                if lan=1 then  R4 T1 O( t# U
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: P, T4 @7 s  o
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
2 ]0 X8 Y2 N( Z* [/ ^                                else4 m1 D) G. G3 E2 i3 F( W
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," i% p5 g$ b9 w& }) U' }; y7 R
                                                to_str("in docking station: \"",?.~.name,"\""));                                ( {- f- N; k2 J# r# M: Q5 _# c$ ]6 s$ U9 K
                                end;
; J9 v) N$ R9 k3 B7 Y* K                        else
& d- {5 q) C/ r( @                                @.Destination := assignLObj[1,row];, V7 M" a% v) g* h) p! B( H# m
                        end;                        9 X  z0 B) v/ r$ S/ m5 O
                        newDirection(@);7 |5 X  y$ E1 i3 |, a" ~: Z
                        @.HasOrder := true;) @  g& R9 G5 S
                end;
9 w( \; q2 s* L1 U& X        end;
$ V( u. z" q( zend;        -- of the method- N/ ^' _  g: V. C" C; ~. k; G
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
* P" V6 E2 B$ y  V4 p; ]
7 @1 ]: P  N4 q7 s1 s2 b这是AGV_putin中arrive的method。- x7 }; n3 n/ x- `5 H1 {6 x+ z, m+ o

( ]8 u" c  D- A当到达物料速度越高时,这个报警更多,
& K' \7 W; N1 Y: p! P2 o可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。- `  S0 M( z3 p- m6 [
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
2 {, _3 ]# V( g" x
" i0 I# y6 v& c5 @9 L. ~: K另外一个小建议,就是move,所有的move都可以这样
+ y- N( `1 F) ]/ Yif not move() then debug end" Q" G; S; _) v/ [, v
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。- F2 i# ]8 O0 `3 Z0 L
plant simulation中的free libraries有AGV模板,
7 m- O! e8 D2 ^4 {; ^+ C- d6 h里面也有案例。( l7 p. T4 [* l& j! s7 k8 g2 t
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。. ~; `* E! L* E/ w* k8 j) z
" g; |1 P% q/ ~4 F( |9 a8 F$ s
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
( u7 Z2 b+ L7 u1 K' a1 q$ k) E( ?: F' c' s0 {
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 + d9 c. r3 _5 k' p1 f
这是AGV_putin中arrive的method。
' o7 q. x: e) r' Q1 s
# T  x' s. v, `( {  K当到达物料速度越高时,这个报警更多,
* s  K6 k5 z* k, B
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-7-12 06:25 , Processed in 0.017027 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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