设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9358|回复: 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'$ ^- j. y) e6 `
*/
1 u, E: _$ t3 U  n6 qis
% d) z5 ]4 O1 r' e  l# j        part, GlobalDistObj, assignLObj:object;row,Lan:integer;& Y* \& |% \( V* s. i" ]0 z" x* i
do+ \9 u6 _3 r) \6 X
        Lan := rootfolder.Internal.Tools.AOLlanguage;
8 e- v# [' C6 D# w( O2 k        if current = @.Destination -- else return* {/ u6 M# I6 R+ q
        then
5 z1 L; ~( ~8 |0 N: f% R- I                @.Destination := void;
6 C0 R% N5 ~. h/ s( M& o' A% _                if @.occupied then6 g0 ^  \9 v  L
                        part := @.cont;
2 A# G: t! V" I# v8 p  O                        @.transpOrder := void;+ ~5 J9 R+ ^9 b* K  z/ Q4 Q
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# C+ X' Z% @6 H7 {" r3 F. D% X" J, M                                @,root.eventcontroller.simTime);
2 ^/ K5 u. Y. N- a- v+ P                        @.HasOrder := false;4 Q% K: ?4 _  Z* K: r* Y+ F
                        @.DrivingHome := true;) U' {2 S' w% e& P! Q  v  d; q
                        rgManager.tryToStartTransOrder;$ C+ C7 _  V3 g
                        if @.Destination = void
; |; ]* X" r! S                        then -- no transport order for vehicle @% f+ z1 `, L- z/ U; e9 j
                                @.Destination :=
/ @  Z$ {9 ]/ r+ n9 ^                                rgManager.nearestFreeStation(@,track.~);
8 W& B. G) I3 @2 E) L+ N6 v                                newDirection(@);   
' t1 s" C  ]6 A% T$ J0 F0 n. z0 J                                if @.Destination /= void then/ q6 y; T" Q) _3 P0 \/ g
                                        @.Destination.NumReservation :=, \* [) I6 s* b: U3 _2 A5 c
                                        @.Destination.NumReservation + 1;
: `7 v2 k' ^) T( T- E- q5 n. S3 W                                end;
) a  t9 O7 n& @- Y( m                                @.CurrIcon := "drivingHome";
! o4 o7 G. l7 L! ~  _% t1 D                                @.DrivingHome := true;) X$ g7 \. \) f- v
                        end;
/ X  `. b. q( V3 G  C. K                else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 F4 l! U1 |& M
                        part := @.transpOrder;
9 g# Z2 F# R$ g                        part.move(@);-- load part+ p* b. ], x2 s, F  M& _' y6 h: N- Q3 q
                        @.CurrIcon := "load";
- |& K7 r  [& R* l8 ?                        GlobalDistObj := part.globDestination;0 v2 s4 a; g; T2 P6 ~
                        assignLObj := rgmanager.rgAssignL;
3 V4 v- G3 s( o( b4 }! z                        row := assignLObj.getRowNo(GlobalDistObj);& \0 ?% ]: }1 L! Z. |* |# h' U( n
                        if Row = -1 then -- since 705 t, }/ E* o3 G  V
                                if lan=1 then
1 k1 M/ a& [$ O* ~/ h/ C                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 t8 a6 {6 C- ^7 }8 ^
                                                to_str("in der Andockstation: \"",?.~.name,"\""));# n" I# A6 i1 \
                                else& e( g5 r( s" y
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* O' j, `% Z& E: k0 [  @. w
                                                to_str("in docking station: \"",?.~.name,"\""));                                2 \* U  y! L- E
                                end;
) H$ _& |! D' P$ t5 U                        else
; q; A' b. a8 V* Y$ z' h                                @.Destination := assignLObj[1,row];
0 e2 z; R  C* O1 w* R6 @- P5 Y$ X                        end;                        0 W7 W! {) F& D# C& @
                        newDirection(@);
; v9 d/ C" l5 J6 ?: A                        @.HasOrder := true;
8 o; m: N3 U5 l9 U! y2 W3 v/ A                end;
: m' ]/ y% M1 N; d. }        end;
! k( `2 Q+ l. F6 O! v5 F; L) cend;        -- of the method
# X0 m5 t; Q8 \! y& b
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ' V( O' ~, O3 V9 Q# k
) S4 J  a  S3 V9 x/ R" B  I
这是AGV_putin中arrive的method。
9 W: k! @. k4 a: @2 l/ r' t
% |. k, ~5 s; J' C. s# A7 a当到达物料速度越高时,这个报警更多,7 |/ D' `  R( `: F  \2 ?
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。! v; U1 Y1 I3 `
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
; q/ K7 ^& O0 R" }+ L; I0 T
# F" I& L2 r9 t另外一个小建议,就是move,所有的move都可以这样4 a; W2 ^) ]: T) H
if not move() then debug end( H, ]5 S  v2 T3 X
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。7 }/ n( k& t) [2 W9 V
plant simulation中的free libraries有AGV模板,; u. I3 j& F( v. c+ `
里面也有案例。* w4 S- l) Z, ]& J
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。: Y8 H/ x6 L, Q; `; r
! u- _; \' y9 N$ Z7 Z+ V, ]& ~; w
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
0 @( n! a- U. q  s) ^  X5 y* ]2 g8 x# g
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 / @9 I, m. H/ y9 k
这是AGV_putin中arrive的method。) p' k/ ~$ B& }2 T+ j- ]
! h. X, g  e4 K2 }9 L
当到达物料速度越高时,这个报警更多,

4 \3 \4 {7 p& R8 n9 r% ]. E/ i- e6 F, C另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-27 17:14 , Processed in 0.020002 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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