设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6103|回复: 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'% l( C; e3 O( V( M3 N- s
*/' c7 R, C9 D* ~1 g5 y5 |! b: I4 Y
is# L% D, b  F; B, K" k0 I% i+ d8 j0 Q
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 e. h( H" s& e, _do; N" w/ b; F6 N5 l1 }
        Lan := rootfolder.Internal.Tools.AOLlanguage;* P0 A: @# N1 u' E
        if current = @.Destination -- else return2 p) a' z5 H5 ]# p
        then
$ W/ @" [$ L" H                @.Destination := void;
$ e% k8 k# F+ v. n- m                if @.occupied then
$ M2 X2 [/ F3 f' T6 m5 B                        part := @.cont;
4 G, ]9 |( g$ t& t! q2 w, ]9 w                        @.transpOrder := void;" ^- u8 `: }! p! R
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 Y) t' P& D# w. _9 R  p! H
                                @,root.eventcontroller.simTime);' e2 E8 |& D: D2 A! Z# f, N
                        @.HasOrder := false;' d5 R  T/ A7 Q& ]. z1 H9 D# H
                        @.DrivingHome := true;
4 ^+ b& `" V6 @; t$ S                        rgManager.tryToStartTransOrder;
* X  z  A  E) W4 Y$ z                        if @.Destination = void; x  b  q/ z; e/ z8 O! r
                        then -- no transport order for vehicle @* Y0 K8 v5 D: ~. m/ m- O1 {. a! r
                                @.Destination :=
! p+ b# _* P" W/ v% w/ X                                rgManager.nearestFreeStation(@,track.~);
, h1 b* B! \+ C                                newDirection(@);   6 O( r) V' i$ P0 ~
                                if @.Destination /= void then* f# n* D6 s# t
                                        @.Destination.NumReservation :=
' V4 _( `* ~. \! {                                        @.Destination.NumReservation + 1;
4 u% u) A0 w9 z$ d0 V$ {8 N; C                                end;
  a* G6 b& v# h4 C                                @.CurrIcon := "drivingHome";
3 K4 ^7 x0 b  h( [                                @.DrivingHome := true;; w7 d' q2 W' W9 M
                        end;) C+ D& j' Q4 ]/ G0 r3 _- r
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! {3 i, j/ R0 W/ w# j                        part := @.transpOrder;
% R! B% w/ y2 ^7 Q# Z                        part.move(@);-- load part! }. E5 [( K" N& N
                        @.CurrIcon := "load";
  \! G" P0 V# k1 j+ z# K                        GlobalDistObj := part.globDestination;! |- w4 u. ~6 }4 q
                        assignLObj := rgmanager.rgAssignL;
8 j, s8 M( r& R1 {4 c6 F5 ^3 h                        row := assignLObj.getRowNo(GlobalDistObj);
+ I# s# R4 A6 Q* v: p9 |/ Y                        if Row = -1 then -- since 70
/ V5 Q% a* E# L& \0 i- S                                if lan=1 then
/ p2 q. b# w  r" C) m4 I+ F                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. K# z( _7 G5 z" e
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
( y1 q( o# c8 R7 Y0 ^6 c) I6 J                                else
8 L* n3 k; e# C! E8 ?7 g                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 v  d0 j4 A" s: `/ b' n; @
                                                to_str("in docking station: \"",?.~.name,"\""));                                . Y5 s/ O7 s7 k; v: x4 l
                                end;
  Y( h! ?6 X9 N' x                        else0 ?$ t: K9 I7 e7 I) U! m* @! q
                                @.Destination := assignLObj[1,row];! D% I4 e& ^5 \8 |/ u1 q/ M
                        end;                        , Z0 n# {2 V" o  |  q
                        newDirection(@);
* @5 q1 b" G4 u4 E; v                        @.HasOrder := true;! E8 Q! t, H1 @, g; m& y) W
                end;, f1 K# f9 h* p7 d! d* e: b
        end;$ G5 [" y: z  B2 ~  y1 ]# U$ P5 \  ^
end;        -- of the method5 U; ~; G5 K: [' n) B
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
6 g6 q$ l" u6 i( q  d- f+ {
! q9 Y* @9 b0 f8 g# R这是AGV_putin中arrive的method。. i: D. L' y* L4 R: ?7 C

7 i8 S. t; `2 k$ {# m* R当到达物料速度越高时,这个报警更多,
2 l* R& l- j4 C5 S可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
* M8 v( ^; u2 \% Q( |1 V$ u程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
% V. R7 Z: `5 B9 z# J3 K1 D1 n8 B) f6 W+ H- U; h7 s. L
另外一个小建议,就是move,所有的move都可以这样
8 K) w, t' Z) W3 Aif not move() then debug end
* ^" u$ |# f/ u: D* V! m这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。9 y' G: r9 p+ o7 E8 x  o7 O, w
plant simulation中的free libraries有AGV模板,9 Z# E6 M( B( ]) T
里面也有案例。0 }* }2 Z% u2 ]! v! n  ]! B
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。# `, w* t1 b+ L0 _" H7 t7 D

- ~; m6 }& `+ D: r: ^我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 , @. D/ q& r0 y

. L' i& X/ Z  ^0 S( x2 @/ U% N: y那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
; b* \0 H# U& t. y这是AGV_putin中arrive的method。: N2 n, w  D3 r5 N& J3 ?8 Q

) o  m8 d& I2 V( k& |当到达物料速度越高时,这个报警更多,
& g- [2 O$ k/ U( G6 H- V$ b
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-18 17:47 , Processed in 0.031737 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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