设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7566|回复: 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'
" O4 }& I, D( h9 z*/6 b5 I0 |; E" B
is/ m- v5 }! _" ]6 m8 ?! d3 p: C
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- G- @: x+ ^+ a* t, w5 o5 u3 V: H5 rdo
9 b+ V! V3 l# P0 \) p1 J* K$ s        Lan := rootfolder.Internal.Tools.AOLlanguage;
5 }9 c1 C# E- }, A# x        if current = @.Destination -- else return
0 N6 V3 d, s. G! ^, r9 k5 R        then& r! u- s$ d; j
                @.Destination := void;
9 o: N( s6 F  F3 a5 G                if @.occupied then+ a3 X5 k4 k$ l4 v- _4 Z
                        part := @.cont;
5 d6 s6 z# W! G1 C- f                        @.transpOrder := void;5 b- j3 {( n8 t& _# K8 g
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, z. Y  V0 F+ O! C2 b' |9 |6 A
                                @,root.eventcontroller.simTime);
% F4 [# q5 b& z. S! P& V                        @.HasOrder := false;
' R6 E9 p. i4 a, y                        @.DrivingHome := true;9 H* ?3 F* r, Q
                        rgManager.tryToStartTransOrder;
" |8 ]( G. _0 {9 a$ ~0 |- h                        if @.Destination = void
3 @3 V6 d0 `; a( j" d                        then -- no transport order for vehicle @: {& w9 @1 y9 m9 h& `
                                @.Destination :=
' o" L5 x! U( Y                                rgManager.nearestFreeStation(@,track.~);
4 y! W* p- |. F% i                                newDirection(@);   ( c' _: K( Y1 f9 G3 N0 z; w* D
                                if @.Destination /= void then( L" z; @7 k6 B9 U
                                        @.Destination.NumReservation :=" t: j0 }. o5 u, C  w4 [
                                        @.Destination.NumReservation + 1;
$ d5 c- [1 F; ?8 N                                end;
, \/ |5 F" ?( i- o                                @.CurrIcon := "drivingHome";
  a& L# ^5 `& y3 ^+ ~                                @.DrivingHome := true;+ r3 a& ~( {& h- [. x/ ^
                        end;
( J& L/ v! Y+ E/ Y4 D. F0 Y! W                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; \. z+ g4 Z7 O. M+ D* f2 {                        part := @.transpOrder;
. T1 j6 i8 t% A                        part.move(@);-- load part( S& e6 W5 S/ [8 T, C) L. B5 S7 ~
                        @.CurrIcon := "load";" L3 c6 m' w: W' G& k
                        GlobalDistObj := part.globDestination;7 L0 o% s/ R$ x' w/ V
                        assignLObj := rgmanager.rgAssignL;2 a# F8 w1 N6 J3 Z9 K) ?
                        row := assignLObj.getRowNo(GlobalDistObj);
% f0 v9 N! w$ Q4 r  L9 f: X                        if Row = -1 then -- since 705 I2 S' N8 m; r: P1 w
                                if lan=1 then* m9 {% d" d: A% J
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, C9 Q1 B& G: h6 h' J  [. W% r4 e
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
+ V- d" W! i8 @3 v                                else) J; B, Q8 P8 K0 I% |
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; _8 P1 \' K# s3 g% R/ I
                                                to_str("in docking station: \"",?.~.name,"\""));                               
! k: W  f8 `/ r; O2 h3 p0 x: a9 d                                end;6 e9 |1 k) A  r- U/ g4 g0 J
                        else) U' g4 U. D) S2 g5 V+ W
                                @.Destination := assignLObj[1,row];. @; u  k2 O2 Y4 x+ z' G5 p
                        end;                       
( e' _7 a0 M# ^2 b                        newDirection(@);
( I$ ]6 o3 F/ z4 D+ C                        @.HasOrder := true;. H+ D0 T1 d! V1 _- j
                end;
; z4 S+ s7 _& x. C6 I9 V        end;7 f6 |- Z3 O6 a5 R1 I6 G
end;        -- of the method
+ m( u6 w+ L( G( I
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 % t/ X0 u: c( B! w5 r' q* j
4 G  M- x; `9 q" i' k
这是AGV_putin中arrive的method。* A; y8 P9 C6 y4 P8 f) N

& j# l2 D) _+ ]/ A7 K当到达物料速度越高时,这个报警更多,$ x3 s. Q8 z/ r2 a) ?( m
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。' H( g# O4 ?6 I8 f4 d, K0 \  }0 v
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
5 e( ~8 o; e$ e4 o9 J$ C# O. o4 t3 D& H+ e
另外一个小建议,就是move,所有的move都可以这样
" Y" @3 _+ b3 M) Wif not move() then debug end& X( k0 C* r: ]: Y! V. O$ A
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
; ?" Z% P2 q2 ?2 H# ^1 r7 U* }plant simulation中的free libraries有AGV模板,: z7 C1 F; V9 T* w: |. f
里面也有案例。
. }% v3 t. f3 T0 w* z" m- s# i我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。5 i& c* w5 N6 ]; f
  j" n0 i) [: A% Q
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
2 S9 l4 k: Q5 r
2 X% x* H# `* e. D5 F% ~+ ?" T! y; |那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
2 z, i4 P1 a; e这是AGV_putin中arrive的method。1 W9 R& O- D5 t4 b& |

5 P: l. {2 M* ~7 F当到达物料速度越高时,这个报警更多,

( ?! g) s4 T7 n  ^' p, L另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-17 23:20 , Processed in 0.017851 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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