设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6050|回复: 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'
1 K) e, I4 O- c*/6 j6 `8 [. h& }
is
& }. |+ U( j1 G. L        part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ A* @: Z& m" y
do
$ H% Y5 t9 [8 x% r( A0 O        Lan := rootfolder.Internal.Tools.AOLlanguage;, j! |1 F  V- Y; ]) ^0 X' S
        if current = @.Destination -- else return
  ^& n) f3 o6 V) F" V$ w        then5 l; h6 x' O3 n. N1 I
                @.Destination := void;
, q' H( a& ]) Z* C, ?1 K+ t                if @.occupied then1 [- B  Q2 Q6 }/ y8 B& Z
                        part := @.cont;
) ?/ F% {  y( Y% M                        @.transpOrder := void;, t9 g$ _" X5 n" ?  }
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ r% i+ ?" h0 Y: @1 ?1 L2 U+ g
                                @,root.eventcontroller.simTime);  r' E( s- P) `' c
                        @.HasOrder := false;" P5 T* o/ m1 W! e
                        @.DrivingHome := true;
" q7 y3 a2 p, C                        rgManager.tryToStartTransOrder;
+ m! F+ ^6 s* l9 ]- m7 A. c, z                        if @.Destination = void; H1 C5 E  I6 R( w$ R( W
                        then -- no transport order for vehicle @
/ ~/ }* M9 E- w                                @.Destination :=
3 ?. D: [& `  O3 G0 P: J5 x                                rgManager.nearestFreeStation(@,track.~);
  O" q4 x' b: O+ g$ J* k                                newDirection(@);   0 d: d& e& x/ A% r
                                if @.Destination /= void then
( H+ E4 J( W  ?& a& m$ p6 y                                        @.Destination.NumReservation :=) {, T0 }$ T; I5 m3 a
                                        @.Destination.NumReservation + 1;% [) v, g: a/ v$ _: _) `/ D" X
                                end;  s4 C! `; w. ^4 h5 J9 Q! P
                                @.CurrIcon := "drivingHome";
' f; Y/ K- y& h1 }. W                                @.DrivingHome := true;
& _% A: K' X' P+ {& A                        end;$ W0 G( }! k3 U* G  d: G7 G
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 S9 V$ h3 A4 x' a+ _0 |3 ^# ~7 R
                        part := @.transpOrder;: M+ x+ ~0 O' c3 B* P) {
                        part.move(@);-- load part  M0 a2 J$ r8 m, t( f
                        @.CurrIcon := "load";0 Q0 Q0 R. U# n  C5 m9 P3 n
                        GlobalDistObj := part.globDestination;
! r( r! }- F! q" ~8 @                        assignLObj := rgmanager.rgAssignL;& R6 K3 m: p& t6 ?- \  l8 m
                        row := assignLObj.getRowNo(GlobalDistObj);
5 O& C$ J0 z! Y& _0 z: A! g, g                        if Row = -1 then -- since 70% N7 C5 [; d: s$ q
                                if lan=1 then" F7 j7 B. d# M( v
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; |& V6 G/ n8 ^# q4 K. I: G
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
) }. p2 {$ U0 Z' _8 S                                else
) C0 z; D5 P( s: k) F                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 F8 v4 [& L3 }0 i3 X
                                                to_str("in docking station: \"",?.~.name,"\""));                                $ s4 S* [$ n9 F# R
                                end;
* E$ Y' h7 h3 W6 }! |$ ?3 V) C                        else' X! ?# z8 ]' c- M4 M
                                @.Destination := assignLObj[1,row];& i; U3 e: g4 [, t& j
                        end;                        # n- D, ]" {  t6 X  Q
                        newDirection(@);
+ l. q' l$ C1 V/ s7 t7 K8 `, X4 c                        @.HasOrder := true;
& u- f8 ~0 g- d& _# Y: c2 n7 o                end;5 a1 t7 C* B* S! z3 x) w
        end;: {. c2 ]/ T; y% D* l  h5 F  Q
end;        -- of the method/ h$ h& h$ r$ [! ^' R
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
) a4 ~: t0 ?0 X- }1 r, ~# m  g; \0 Q6 f! |0 k
这是AGV_putin中arrive的method。9 a: U3 k2 t% `& _, Y

8 I/ C. e* W+ @8 O; h当到达物料速度越高时,这个报警更多,
, b) r4 A* j) d/ U9 k( k可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。2 |; C& x' K' b
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?9 s4 H- {5 j8 \2 q

9 {. {  D7 ?2 m) w6 R4 q. A& c另外一个小建议,就是move,所有的move都可以这样3 s/ }% I4 O- N$ a  d3 X
if not move() then debug end
) O7 A& @' }9 Q/ s) N! T8 o% C5 P这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。: |5 ?3 D% a! I) D
plant simulation中的free libraries有AGV模板,
8 D; k" v# z, O9 q& Y里面也有案例。
. \5 l9 h6 r8 B我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。1 q( t; X  {# {
/ l8 O& E$ s$ l* V/ M, k
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 # u2 q) V1 L9 Q$ y7 F

/ h" a9 M$ d$ `0 _( M: e5 z那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
3 ]* l1 w1 c3 U2 c# r这是AGV_putin中arrive的method。
, T+ W7 w" W2 D$ {) O: |/ h2 S+ Q9 }8 u
当到达物料速度越高时,这个报警更多,

8 B7 |/ W; U) T' u* H* y另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-14 14:14 , Processed in 0.021996 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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