设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10224|回复: 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'
  p; P, Z2 b: k- D9 l1 N*/
# z, u: y: E3 J; h2 n' f; K& Ris
6 u  P) R$ v1 K0 N* u# t        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 V7 i1 Q3 X7 J* Cdo
: B3 N7 m! R  L+ B- @5 M8 L; I        Lan := rootfolder.Internal.Tools.AOLlanguage;
( l$ K9 s, b3 n( q1 C6 R+ q        if current = @.Destination -- else return
5 Z+ H7 F8 b- d9 }) K% o: G        then
  m6 r8 q- @# B) g6 ~% i. X                @.Destination := void;
/ L( D* B; B: v5 V- ]                if @.occupied then
: K5 C$ |# D  Q" P                        part := @.cont;  S) L7 j" U6 J6 u3 d$ [( ]+ D
                        @.transpOrder := void;
9 T. m/ h, H) R3 ~+ o! c* k                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 k+ v5 v; c( F                                @,root.eventcontroller.simTime);
) b& Y4 b8 E/ E4 K) W                        @.HasOrder := false;8 l$ x3 \8 j9 |, ^  a* R) q
                        @.DrivingHome := true;
( l0 B  [& S: V/ p1 _                        rgManager.tryToStartTransOrder;
; t/ J4 Z# E7 h4 x1 F% K                        if @.Destination = void0 B, I  m% g- W' g
                        then -- no transport order for vehicle @0 d8 c& g: q3 y+ I6 Z  d7 l7 W
                                @.Destination :=
# ~. M* c% [; y" K/ w" Z4 r$ A                                rgManager.nearestFreeStation(@,track.~);
# {" ~" ^* x9 C. z8 x                                newDirection(@);   * A1 W, N" H6 t9 z) w& w
                                if @.Destination /= void then
+ w% Z* p% I8 a7 ^2 h" V( X                                        @.Destination.NumReservation :=5 b1 H5 {% ^9 h- t/ r2 P3 N/ X
                                        @.Destination.NumReservation + 1;
* g- N! a! U9 e/ A" D                                end;
; T; b& j7 ^; d9 V+ e" X8 o9 B                                @.CurrIcon := "drivingHome";
2 W2 R0 T% k2 |9 m: U+ o3 y* _6 X                                @.DrivingHome := true;
9 M2 q+ J' t9 e; m                        end;
9 A$ t0 ?( x) D8 U9 u                else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ Y$ U" q/ z* @6 e* O, v
                        part := @.transpOrder;
! l. r: Q" e. m2 R% ^, U                        part.move(@);-- load part" T8 S. g6 W/ {: u  }
                        @.CurrIcon := "load";
1 R; [- Q$ p! |: j# g; H                        GlobalDistObj := part.globDestination;4 U  P& x  ?* a0 f3 }) t& a/ b4 L
                        assignLObj := rgmanager.rgAssignL;
( p; r. t, M& D9 K" J, D& s7 R                        row := assignLObj.getRowNo(GlobalDistObj);# X9 ~, h1 x6 T" g. g/ n1 g
                        if Row = -1 then -- since 70
& W0 |2 ~* ?4 ?0 }3 l                                if lan=1 then9 T' q2 F: o5 D
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: I+ e3 H0 `& y/ F
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
: b# P! X* S( u( `+ q' j! T                                else
7 e+ E' b, j1 n" w                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- r- W  s8 k: |* V( R2 @8 ?                                                to_str("in docking station: \"",?.~.name,"\""));                               
* w. ^; ^! s5 `% i/ j+ r. c                                end;
0 d0 g6 h8 o0 G. G; R                        else
% X* d. |' h8 J$ I$ u! H. z- a                                @.Destination := assignLObj[1,row];+ T, J  M) ?, ?
                        end;                       
8 Y- W+ m1 i" }                        newDirection(@);
( \8 d! t5 M' T                        @.HasOrder := true;( a. a8 r! R6 w" c" b6 f' W
                end;/ M- p5 e/ L: T; M! o
        end;# R1 k3 u9 }; c
end;        -- of the method
( e: U0 X. C  j6 a/ S
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
: e/ O9 ]5 u- m* o( Q
# ^" [( I0 r' A- Z% Z3 s这是AGV_putin中arrive的method。
& G8 D1 y1 l* w5 ^
  u! U; Y9 o% ?1 [- ~当到达物料速度越高时,这个报警更多,
% p6 D9 Y+ y8 l0 ]+ z7 _2 s: Y可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
5 o- C5 J; R: V1 w8 @程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?# \; M  @1 |& A) A% s+ {7 F0 [
8 ]4 a7 H( [# L, Q' K, Z( r' \
另外一个小建议,就是move,所有的move都可以这样, e5 h2 I4 _3 @7 R1 B: U* @# G
if not move() then debug end+ Z/ t" e2 M! S7 i
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。$ J  }: y) C4 ~6 T
plant simulation中的free libraries有AGV模板,, [: [# r* y( C, l. T2 ?2 X
里面也有案例。5 X# C0 }8 y3 V1 [' f
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。0 ?4 k# \" J. I+ V4 N
3 I2 \) e+ t* p  g* O! V* }
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
' c" M" r' ~" J; S3 M% p
1 @* i; L" Z/ y" A9 {那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 / B* ~+ k( ]2 G; \
这是AGV_putin中arrive的method。" t! ]$ H# H$ S1 y
7 x- r' S) u2 a7 E2 \- L% k
当到达物料速度越高时,这个报警更多,
: z. m) j0 x4 H- U8 q
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-21 03:43 , Processed in 0.017209 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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