设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6028|回复: 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'/ s( w- E! A/ D) ]7 f) i, f
*/6 ?/ q* Z  u. O2 E/ A
is
; B. w# V* e" @% Q0 m        part, GlobalDistObj, assignLObj:object;row,Lan:integer;% r1 Y% l6 B4 l# v  I9 _
do2 k, \7 q2 j; M* G! e
        Lan := rootfolder.Internal.Tools.AOLlanguage;0 s( r& I* m( Z+ t
        if current = @.Destination -- else return
  n7 ~  V  I0 e) d" V6 ?- d5 Z: }# a        then5 r6 B3 Y( S" r5 H. b% I3 p1 ?$ S
                @.Destination := void;
0 `( S/ z( O) J4 F+ E8 B                if @.occupied then  d0 ~: ^4 s7 O
                        part := @.cont;! A) e/ [( T+ C3 p6 a0 K
                        @.transpOrder := void;
  e" R# F3 }! k                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* p4 D* n$ y* Z$ I9 u4 U' Q                                @,root.eventcontroller.simTime);
1 ^; @, R! \! Q6 n2 G, e9 m/ ~                        @.HasOrder := false;
2 `% \$ }6 }; K' M$ U8 w                        @.DrivingHome := true;
* C4 |5 @- b6 Q  v- @* |8 A                        rgManager.tryToStartTransOrder;
. t. Q/ l2 o; K" m$ u* v                        if @.Destination = void. d+ Y9 w# o1 ]6 G- n; r
                        then -- no transport order for vehicle @% L+ \% ~( |# C0 z; `% E
                                @.Destination :=! `( c; q; @0 {1 ]6 c
                                rgManager.nearestFreeStation(@,track.~);
# e: u4 p. ~, _; X5 h# m/ O; a                                newDirection(@);   
4 W/ z  F! p; e                                if @.Destination /= void then6 I9 {9 W" A/ w% v
                                        @.Destination.NumReservation :=  i& `: A  I8 Q0 F
                                        @.Destination.NumReservation + 1;  f9 F1 o; X$ u$ `: N3 [7 G. `: K
                                end;
7 E; f% u$ h9 M% y' X1 S9 z                                @.CurrIcon := "drivingHome";* {" a9 Y$ t3 W& E9 N
                                @.DrivingHome := true;  R3 v! _3 H1 Y
                        end;$ l1 A3 r. @, w' w+ L3 X
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ \4 v/ |* ~$ U) g                        part := @.transpOrder;
3 g) {4 D, ?! O3 O$ ]4 J3 f                        part.move(@);-- load part
1 A! d; u( E0 g7 w& v$ e1 A8 i                        @.CurrIcon := "load";
# w3 W0 r2 `6 m5 o0 w                        GlobalDistObj := part.globDestination;# D' L& p2 i5 v/ T4 N7 z, w
                        assignLObj := rgmanager.rgAssignL;
1 E7 _+ y  I  w1 _9 O                        row := assignLObj.getRowNo(GlobalDistObj);
8 \' V2 C7 i4 J5 M1 J/ O                        if Row = -1 then -- since 70/ B) [) v* f6 `" C  T
                                if lan=1 then
  l# F) ]$ Z: ?; s# @( T                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% o0 b6 _; }# Y& o$ X
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
6 m6 k6 S* u; h) l( w- J7 \                                else
8 z* t" \& E2 H3 c/ i                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ W0 P) o7 j2 T) ?# M: z8 ^* r
                                                to_str("in docking station: \"",?.~.name,"\""));                               
  \5 C* s3 Q  ^9 Z                                end;
' E$ J# B& h) u5 C: c! C' d% O                        else+ X, e! e( T. f  G3 R  m
                                @.Destination := assignLObj[1,row];* W- _' r  Y0 Q, }
                        end;                       
  E, z) F& f% I3 \4 A. R                        newDirection(@);
: t  e3 u+ P: c3 i1 y                        @.HasOrder := true;1 H1 r9 D5 s$ K
                end;
- @. T( i4 y4 \& z/ S. h        end;) Y* f6 q( u: e1 D- B- w0 u
end;        -- of the method
/ z! o6 i) h: w* N1 o: t7 B7 O6 e
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
4 g, b  C! J( z+ t: |* ?
* F: X- G) I+ ^+ W这是AGV_putin中arrive的method。/ }2 [" @( i6 }" [4 M) A9 [  ]' y

# T, r2 v- o5 F5 a$ U. ]% V当到达物料速度越高时,这个报警更多,3 U( I  C: Z0 T; I
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。4 u+ X  C9 e2 Y0 ]% j
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
9 G% F; o6 c; v2 c" v0 x; Z5 l! Z, f& G& d: U
另外一个小建议,就是move,所有的move都可以这样1 K% Z+ W5 X" |; s9 L# q
if not move() then debug end
# w* y; V3 y& O1 k这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
6 t+ @& N+ [# |plant simulation中的free libraries有AGV模板,
2 Z5 q* b( W4 k. f" N8 ^  I) n里面也有案例。+ B  U- ~$ w( }/ h7 Z. _# d
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
& v0 o8 M( y: }& K% c$ ^! Q$ A2 t
1 X3 k; g% f0 L我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 : ~4 b  K8 `, J6 Y/ v# Y# n

7 m7 q! y4 H( P/ S+ N& e那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08   v6 e% C' o! ?0 D- e# F* t, o' d
这是AGV_putin中arrive的method。
, S+ j. v- X- i4 c7 K0 I$ w. K1 n% k. U/ d/ w
当到达物料速度越高时,这个报警更多,

( ^! @1 S/ Y7 k: U& g; j' ]另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-13 16:53 , Processed in 0.026848 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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