设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8167|回复: 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'  m3 r3 m8 D+ l% ?
*/0 e3 b# Y/ A, ]4 n0 u
is2 d8 W6 K: S/ H
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 c# O+ X4 P% k4 v2 [* Bdo; w  k; m4 Z7 c
        Lan := rootfolder.Internal.Tools.AOLlanguage;
$ M/ S5 \, N# E) M  @# ~$ V        if current = @.Destination -- else return
, }( ~+ M# S! l  S        then
0 R# z8 E3 O7 h0 h4 @                @.Destination := void;: `9 m: H, D6 O& Z
                if @.occupied then
3 b; g2 b; H- I. V! `/ ^! V                        part := @.cont;. M& h, i$ `) s: p/ |
                        @.transpOrder := void;5 r4 Y, @! v$ a
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! M# ^1 _6 _% R  c1 {3 Q9 V
                                @,root.eventcontroller.simTime);
( Y; ?$ x) A1 O" [                        @.HasOrder := false;
3 f0 N4 F; L1 @- X+ `, l( r                        @.DrivingHome := true;
  h7 D# R$ [. ~( p                        rgManager.tryToStartTransOrder;" t' u5 T2 }& z2 k/ ]4 p
                        if @.Destination = void- C1 A3 E, m! y' ?
                        then -- no transport order for vehicle @
0 W+ Q2 U+ q; C6 N4 \$ S                                @.Destination :=0 l" H" W" \2 n/ s& e
                                rgManager.nearestFreeStation(@,track.~);
- g0 a( |* V4 q. F                                newDirection(@);   2 O; Y  H9 R- g- H3 C9 o2 j! s
                                if @.Destination /= void then+ y  R. @+ u( {$ n: P6 f
                                        @.Destination.NumReservation :=
  d  m7 }* d- J/ [% s0 J; L                                        @.Destination.NumReservation + 1;
( ~5 y1 L, _1 y$ o                                end;! J- v$ F. |  n/ ^5 X
                                @.CurrIcon := "drivingHome";
4 h' s$ {3 t  y  d* a: l                                @.DrivingHome := true;
, {- ^( g: l% Z2 ~- i6 ]                        end;
! G$ e4 E( e6 r+ S$ H0 R8 g                else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 V2 H7 L+ x2 U) d
                        part := @.transpOrder;# b7 Q/ J* e5 ]
                        part.move(@);-- load part5 O/ L$ o( t+ L! W
                        @.CurrIcon := "load";
" O9 i9 b' q* h+ \' l6 x                        GlobalDistObj := part.globDestination;) d4 W. U( l5 |7 h
                        assignLObj := rgmanager.rgAssignL;
8 u4 w* t" W+ b9 @                        row := assignLObj.getRowNo(GlobalDistObj);
5 C1 ~: J0 I+ e) K6 E/ o9 i4 K. z                        if Row = -1 then -- since 70$ o, T) o% C: q7 o( T
                                if lan=1 then7 B+ \3 t6 ^  j& A$ D& l; W
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 L# g$ B% t' f* |/ \7 R6 B
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
9 f2 e, ?* F; L! @8 {: ?1 Q+ k- Q$ E                                else+ ^, O1 H& R! l4 r: |% z6 c
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 q. B1 g! |9 k: ~% v                                                to_str("in docking station: \"",?.~.name,"\""));                                6 `- g0 r9 p4 ?; G8 r. J$ W9 Y
                                end;% |& }. |" Y( [1 I
                        else$ K8 u& s* B0 Q0 b' ]4 C
                                @.Destination := assignLObj[1,row];
' X$ M5 o2 |; V% J& [* b9 Q                        end;                        4 f) {4 k, R; d8 L# n/ @
                        newDirection(@);) {, }$ Q% c: T) U3 x4 V
                        @.HasOrder := true;9 O9 W% X2 F+ x+ y1 @! R5 H" M
                end;
- ^- a' L  w6 j6 }7 Y        end;
' V6 ?( V. U+ [, D2 Aend;        -- of the method* G! j2 d6 Z  i1 C' d, g8 d  {
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
/ {2 g3 w, w8 Y8 `  p/ _( ]" F
9 r1 c) |5 i+ j/ ^这是AGV_putin中arrive的method。
1 C* i2 }2 B3 i' Z7 [1 j  K% m! g6 F4 g! i# N
当到达物料速度越高时,这个报警更多,
( f) @) g' x; j; Z) `5 m0 g可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。' a  D  ]- y' l& X9 U  r3 U& ^% V
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
8 X% z7 A6 G/ @& ^9 B) Z2 v7 L; N. U: m! b* Z5 d, }
另外一个小建议,就是move,所有的move都可以这样
4 M. X8 d; }+ s8 N  jif not move() then debug end3 h" K* H3 M# O. C; ]2 S7 E; t
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
- Z2 f% y7 `: h4 W& r1 _8 r7 k1 B4 Wplant simulation中的free libraries有AGV模板,4 ]6 a5 w8 {! C: ]" S
里面也有案例。
; |/ V% {$ H3 f/ B+ h我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。$ o5 @6 R: F7 g3 a1 a2 L
' A- w4 }: {  e. o, ~. \: s7 B
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑   {4 u  O. w$ N+ _- {

4 A+ r3 Z- x( M/ Z那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
/ Q3 s% H+ l' H6 P4 P0 x; s& H这是AGV_putin中arrive的method。
( A: _0 q' D. l$ `# `% r0 M4 l+ @
8 S7 ?7 f- t6 Y- D当到达物料速度越高时,这个报警更多,
; B. O! _4 F7 a( ~# u
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-18 14:37 , Processed in 0.020384 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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