设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10082|回复: 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'
8 L2 f) ]1 p, F; [*/
  U( a7 I+ _' s5 Dis
0 s) G! Q' o5 V. G( d$ g        part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 g/ W7 h4 n( {( T: h2 v
do! P. c5 Z# }4 u
        Lan := rootfolder.Internal.Tools.AOLlanguage;
1 [8 q: l) y  F, L9 R6 l9 z        if current = @.Destination -- else return/ @2 v4 M0 a5 `7 S/ ]5 ]
        then
4 b  [# q4 a6 o0 O" v6 C                @.Destination := void;* T- {, e. ?7 o7 ^* Q2 |
                if @.occupied then
, u3 v, G' j4 Y8 \$ a% n                        part := @.cont;
$ u; s: n! _- D) }- i2 ]9 l                        @.transpOrder := void;8 u& c* ?7 @" U- I
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," {# N4 `1 M- y
                                @,root.eventcontroller.simTime);
- e$ F; ^$ Y# `, O                        @.HasOrder := false;2 a3 y/ t. A6 l+ u" K  O  k
                        @.DrivingHome := true;. k/ o! ^" U2 M$ A! U6 ^. k, [$ J
                        rgManager.tryToStartTransOrder;
4 U1 _/ H$ i7 L0 {! f1 M                        if @.Destination = void
; k$ y& P  _4 }& u                        then -- no transport order for vehicle @4 J0 f  |5 D+ S7 `
                                @.Destination :=( m. x! R1 I0 {7 t1 m
                                rgManager.nearestFreeStation(@,track.~);
! ], {# p& l6 X                                newDirection(@);   ( d7 s4 C0 m5 m" i- U4 E, {# u2 O
                                if @.Destination /= void then: I: t0 H( T' f+ X$ x4 M8 h! }) I
                                        @.Destination.NumReservation :=4 i  k, h5 v+ n$ B
                                        @.Destination.NumReservation + 1;; o* p& t, Y  |; t
                                end;
2 Q; |) h3 \0 j: ?$ W( P                                @.CurrIcon := "drivingHome";2 e) t- H7 w& a( A0 N6 O  D
                                @.DrivingHome := true;! c: P$ O( I/ b" r5 t2 c! v% e
                        end;; c% B  Q: |8 k/ {% o
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station" g* P* T$ }5 y% G0 d3 d' R
                        part := @.transpOrder;& ?  s1 j" j3 n' n. z: i) V6 D, v  N
                        part.move(@);-- load part
% F  u! l/ j0 _                        @.CurrIcon := "load";
/ {( ^& I( x5 u: e                        GlobalDistObj := part.globDestination;$ h5 D. `1 j9 l# ]2 I; V
                        assignLObj := rgmanager.rgAssignL;
$ C! Y& B! G* R2 X  i+ G0 `                        row := assignLObj.getRowNo(GlobalDistObj);
, W$ N' g# _9 `                        if Row = -1 then -- since 70$ ?; w. i: I" E' [# n
                                if lan=1 then2 O( \: S" G2 u
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& M+ m8 K2 `* Z& p8 {
                                                to_str("in der Andockstation: \"",?.~.name,"\""));3 N% Q3 T+ k: T5 o! w
                                else
+ L/ k" f% r4 h  T                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# L: ]  p: g8 R. T; L9 @
                                                to_str("in docking station: \"",?.~.name,"\""));                                ! D# C  ~; A( l0 F( c) k: G  `
                                end;
* ]; [8 m$ F1 z3 {4 Z. R                        else" s7 z2 W* Y. K) x" Q
                                @.Destination := assignLObj[1,row];! H! v9 v- x# X# v7 F% m6 ~; L
                        end;                       
6 A5 V' b" L7 @: o! A- f! ^                        newDirection(@);$ V) C! I0 @! K7 p$ L. ?
                        @.HasOrder := true;: h0 X% b0 |- b5 Q; D# ]5 K
                end;
# t% j! l  p5 R2 u        end;& H6 r7 @# s& ^
end;        -- of the method' e( K% k5 f- [! W/ B0 r: P
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ( `: R* U6 a! I  X
# `4 ^% k( w5 C- ]3 H
这是AGV_putin中arrive的method。9 c6 n6 X: H9 ?% [

; ~! y; N4 l( j% e& F当到达物料速度越高时,这个报警更多,
0 y3 F) Y1 R' g- V+ L4 _9 ]可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。" d9 K6 o" r3 s% Q# a# g- S4 y4 z1 \; U9 H
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
6 A  ?/ q- l; Q6 u6 V7 |+ v, o7 _) H9 I) L' n% [& L& i$ J8 v4 q( M; ?
另外一个小建议,就是move,所有的move都可以这样! M/ c3 k' }* U- w$ L3 z# h
if not move() then debug end/ [3 m" q8 E) s& Z1 K' s
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
# z9 l8 @0 V" ]  |plant simulation中的free libraries有AGV模板,
( v8 a3 f4 D9 o7 b2 o里面也有案例。% ]: G3 I7 r) |$ s& g! U
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。! Y; t6 |/ e* J. u' l8 E1 @! D

/ _  b9 h' o; F3 j2 Z9 I我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑   L0 D, G3 F) E1 ~# ]
- \* `$ a% Q# N3 G
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 - j6 B* J; [8 e/ P8 F
这是AGV_putin中arrive的method。
' e' n  o6 v( D# X' M( a- X
" Q8 G0 h5 M; k  x% b( t# Z) I当到达物料速度越高时,这个报警更多,

/ n5 v: g! s- Z/ K/ p0 k另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-12 05:04 , Processed in 0.014972 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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