设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8104|回复: 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'% ^9 c+ {, k% X3 c+ t: n! t9 h
*/
8 H9 R0 A# W5 W1 W5 A1 R3 Ris; L, ?/ f7 B* ~5 i3 F
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;& s+ a$ V" [6 h% E
do
& P7 y6 n5 c5 H1 o: J        Lan := rootfolder.Internal.Tools.AOLlanguage;6 x! p1 |3 s: P; M1 ~3 q# ?, O
        if current = @.Destination -- else return
* l/ X  ^2 P* g9 K  k& i! i2 s3 B  q        then* z( o4 M( M  h& [  x
                @.Destination := void;, J8 }  [/ ?; {& |( M9 o: J0 L
                if @.occupied then" {7 h. |0 Q: A( E- Z
                        part := @.cont;
0 I7 ?# }1 D% c/ @                        @.transpOrder := void;) Y, M- U; R7 w3 @& \) \
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: Y' M8 M$ j' n2 c6 r3 W8 M
                                @,root.eventcontroller.simTime);2 C5 H5 r- N2 n  Q5 u$ |
                        @.HasOrder := false;( B7 C: i% w  l2 n
                        @.DrivingHome := true;0 ^" z% J! G' p, I5 [+ |
                        rgManager.tryToStartTransOrder;- T% g$ K" Z( }5 c$ P1 m
                        if @.Destination = void
% M8 @) V' m8 o3 ?9 ^7 _                        then -- no transport order for vehicle @
1 T) U! w! K; ?' n+ X' F9 ^  ^% ]                                @.Destination :=
0 O2 i1 M6 o! W5 k# ]- X                                rgManager.nearestFreeStation(@,track.~);
; ~, R. W& H/ F8 n0 Y9 R3 E                                newDirection(@);   & M) D% a: O4 ]7 K" P5 f9 ?3 w
                                if @.Destination /= void then3 f6 c# o' n" O9 J. W$ J
                                        @.Destination.NumReservation :=; q6 z/ I$ S( r+ p2 k
                                        @.Destination.NumReservation + 1;
( E0 ?; |+ v/ q) o5 l# q  y                                end;4 z6 j9 K$ M  V5 E& l
                                @.CurrIcon := "drivingHome";: x% X. _5 n7 z/ u
                                @.DrivingHome := true;1 h  @& a/ I/ C6 ?
                        end;
& B9 O3 e8 t& v3 W) L  t                else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ O. i# M: U) H
                        part := @.transpOrder;% V+ `0 H$ c4 v3 N* _4 S
                        part.move(@);-- load part
3 p: S* M1 d, {$ u                        @.CurrIcon := "load";
% R* ^. t) S) Q                        GlobalDistObj := part.globDestination;
" W, h# s3 y0 K5 j5 p: W                        assignLObj := rgmanager.rgAssignL;) o8 N" W$ c8 c# e
                        row := assignLObj.getRowNo(GlobalDistObj);
) _7 e" ~2 H" H  @                        if Row = -1 then -- since 70: C2 t! X) ~9 s8 y" R
                                if lan=1 then
# k. z6 M7 x( }* }                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 Z" ^& t" d% _4 D, i% q9 U
                                                to_str("in der Andockstation: \"",?.~.name,"\""));+ l4 n' W+ L" M2 e. c! t4 @$ F
                                else
7 ?6 D+ ~- _+ N+ ^6 Q) U                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! O. @4 I  _2 B$ p$ b                                                to_str("in docking station: \"",?.~.name,"\""));                               
' ]. z3 H$ @' N# A4 V                                end;; c" |: ?, ~+ P, o# i
                        else% @6 V+ I0 `) c# E: L" V3 e$ m
                                @.Destination := assignLObj[1,row];
* }; h) Z7 X* e* {                        end;                       
5 j# V* A8 Z: S# \                        newDirection(@);- O) S% p7 G0 P+ Z6 }
                        @.HasOrder := true;
; p* D; K2 ?  B                end;
+ l8 w7 q, g. `( A; J! G        end;0 A; G" t- }, {: ^' V) n3 i; f4 p+ C
end;        -- of the method
4 b8 h& |$ I8 p7 W9 E% p
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
* |$ a4 \5 i0 Q8 x1 G( U# m+ }: a
这是AGV_putin中arrive的method。- u# u6 E( k1 C% Z

7 j" l/ h$ ^: m当到达物料速度越高时,这个报警更多,
' a+ K6 X7 y# E3 \/ T可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
: t) L6 \$ \; @$ X程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?- c" r9 o9 R; T8 S8 v
( W2 b- U( R& _0 g( k
另外一个小建议,就是move,所有的move都可以这样
4 b1 m% Q4 \5 Z+ h: b8 Pif not move() then debug end
* |; O4 N8 `/ h" X8 L+ L5 L这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。8 Z/ O) I! n' Y  N
plant simulation中的free libraries有AGV模板,* ^  Z+ ^+ o) Y- A8 ]* q
里面也有案例。$ l- V. b& ?% v; c3 |1 }8 u
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
7 U' ^- b8 g' C: X5 ]+ U
% A( N0 G. y) R5 n8 x我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
; `: Y( h& c" [/ ^7 @
4 v: L& Z, @2 ?* N2 z! |5 B那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
1 C1 R1 S" @7 N* T, j1 k6 u这是AGV_putin中arrive的method。
* J  b5 C7 f) v* H' P! ^6 c; S3 E( r- |* V- C. X. E- t
当到达物料速度越高时,这个报警更多,

7 d7 Q5 P& f( c9 K5 _& y# F另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-14 23:23 , Processed in 0.020419 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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