设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8699|回复: 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'- k( W2 F% }: F: V9 x  M
*/. }+ B# f+ q  c  A; m
is, u% ]" x8 ^/ [. W, D/ m" b
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 r9 c2 t) M4 f' Q* C; Hdo9 Z% k9 O& Z: V
        Lan := rootfolder.Internal.Tools.AOLlanguage;9 m/ I- S: Q1 X. F' o6 k8 o
        if current = @.Destination -- else return
7 ]* J4 [8 x2 \0 Q2 @        then) }' M5 `1 {. m# I9 ^
                @.Destination := void;, i: D; H0 ?4 F* C3 \2 W# W1 a
                if @.occupied then' G( c8 x) E  f/ V4 z4 `
                        part := @.cont;$ T* G2 J+ `6 Y( p  U) @7 c
                        @.transpOrder := void;
3 F  S7 c; \2 w8 {% y' l2 p                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 F* B5 u7 E0 y- p3 H" N
                                @,root.eventcontroller.simTime);, d: B* k7 k3 L4 s) t6 E
                        @.HasOrder := false;9 p- \3 Y4 Z" X+ X5 f
                        @.DrivingHome := true;
+ F. _: W$ t3 c9 {2 }# B                        rgManager.tryToStartTransOrder;- k, k" n% P! M" g7 t9 T! [
                        if @.Destination = void
7 [5 R5 Y' p8 [; m, U/ b                        then -- no transport order for vehicle @
0 X# o# D' I7 b& y5 s* g, M                                @.Destination :=7 [2 T: A. @3 D5 ?
                                rgManager.nearestFreeStation(@,track.~);
/ V' l( q6 E& F  ^                                newDirection(@);   * ~5 o4 x; j8 ]
                                if @.Destination /= void then8 w- \- X  @7 _( U2 S% c. @- ?# L
                                        @.Destination.NumReservation :=
# n0 r* e0 ?, P% j$ j  g, c/ K                                        @.Destination.NumReservation + 1;; X. p$ f' H+ p  a' i
                                end;2 i% w: I' W! b, e& h! z
                                @.CurrIcon := "drivingHome";! l: o& b# b$ W3 K% d2 X8 O8 ?
                                @.DrivingHome := true;# P) ]5 y" @1 W2 ]. g
                        end;( @5 ^6 U4 k5 V2 l
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 S/ Y( E; k# q" I
                        part := @.transpOrder;8 R( n  n: m% T: f0 F
                        part.move(@);-- load part6 a# R0 ?* Z0 V! Y% Q
                        @.CurrIcon := "load";8 Z4 g# y9 H- a& r* \! O9 B; q
                        GlobalDistObj := part.globDestination;0 ~5 r8 T0 r' b
                        assignLObj := rgmanager.rgAssignL;
* L7 j5 H) x0 f                        row := assignLObj.getRowNo(GlobalDistObj);
; B; K3 M& w) R  I                        if Row = -1 then -- since 70
' Y, J* P. F3 P                                if lan=1 then; W5 ]$ ^+ y' E+ z
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, c2 B1 e( i" y9 K: B# Q
                                                to_str("in der Andockstation: \"",?.~.name,"\""));( G" ?8 R- A1 M, z7 v- Q* E
                                else
( i! E- q5 g" L  R1 `  z                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( D, I% A( l9 U+ i' `                                                to_str("in docking station: \"",?.~.name,"\""));                                ; Y; V5 Z# W2 V0 U
                                end;2 R- d0 Y( ~, O) n+ s& z* o/ i5 f' @1 S
                        else
/ ]" P& t  r& c  i                                @.Destination := assignLObj[1,row];
3 p+ o+ m% T9 R3 a. W" Z* S                        end;                       
9 P' a$ X% T2 J% L6 T% C0 u                        newDirection(@);
3 s$ V" U+ ^" U, q  e0 a                        @.HasOrder := true;- p% x! b8 k& ?  q
                end;
  R7 b  o5 `$ y1 q. Y" p        end;
0 \/ W7 g5 z( o. o$ F6 ^( c' p$ ~end;        -- of the method! S7 K4 B# ~1 h. o0 t1 h
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
, `5 g5 ~( N8 ]8 u; V% v% L# K4 @# S/ S* n4 m
这是AGV_putin中arrive的method。' N4 k5 E$ H! M6 r
+ L4 q. i. O4 c& y& L$ g$ O
当到达物料速度越高时,这个报警更多,0 ]# Y0 M+ n! A  `1 k
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
, g+ `5 Y/ d* U+ q+ n9 t3 D程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?: }! O% H1 y6 a  k! N0 k

% N1 }1 ]& ^0 o另外一个小建议,就是move,所有的move都可以这样1 C& y7 {% q7 M2 V: ]+ d$ }
if not move() then debug end1 I- g  L9 z* P6 l6 e
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
6 b, @$ A. A# G. z& R4 Yplant simulation中的free libraries有AGV模板,/ {' e9 N7 Q: [2 L) I0 e5 I/ k; o0 o7 d
里面也有案例。
" D4 p" y4 [4 x9 o, ]' C2 r* D我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。; G: w- n+ E$ _( M) n0 _( @* |

: s% X  a6 Q! T- c我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
' G% h' ?( v& R
7 W$ g% G$ K8 S3 ?( Z, u2 G那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
" R! h% Z' ^* Q7 G" D这是AGV_putin中arrive的method。# W* ^  B6 H- T4 p2 }; y  j

. w. a- d" l4 b$ P# L当到达物料速度越高时,这个报警更多,

3 G3 a, J6 v2 c另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-21 03:53 , Processed in 0.021882 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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