设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8441|回复: 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'
, R% _2 D8 W9 O, V) F# x*/
# T" E& I+ R: w" U. jis
; G5 L( w( x1 W0 n        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 F5 P* G& l+ g+ w- I0 ydo8 c) ~- K$ i3 [3 p0 v% ^
        Lan := rootfolder.Internal.Tools.AOLlanguage;
, x! P; s0 c) S2 o: r        if current = @.Destination -- else return
! K2 y) J5 D4 f$ D7 X% n4 M$ z        then
* z0 Y" i8 E8 U0 Y0 g& k                @.Destination := void;
( {8 R8 h0 P# {% F( Y                if @.occupied then! N: c" l$ n) A, x  H
                        part := @.cont;
% z; F5 M1 l" A+ J% j: w4 C                        @.transpOrder := void;
9 V$ \0 g" m* S+ I2 H9 U2 [2 C( h                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 N1 \3 o" F# E; R6 S7 t                                @,root.eventcontroller.simTime);4 d3 B1 P+ l1 `1 a/ k3 Q7 w( T. c
                        @.HasOrder := false;5 ]0 j. e6 Y' Z0 r# ]$ _! M
                        @.DrivingHome := true;
( c+ Z2 O3 x8 h8 ]: q                        rgManager.tryToStartTransOrder;
. M1 l6 n' E5 b; V0 b                        if @.Destination = void+ [* k' R1 U6 w! s
                        then -- no transport order for vehicle @
  x9 f! S: F  D" Q. t! A3 s' |                                @.Destination :=) H* ]8 `2 O4 {3 s
                                rgManager.nearestFreeStation(@,track.~);
0 e& M# @2 J+ m0 H' r                                newDirection(@);   
/ |+ g  I% a# L: O' d$ S) {2 h                                if @.Destination /= void then9 s& M8 ^! T5 M
                                        @.Destination.NumReservation :=
! |1 A( J5 J) v8 u7 V+ C& Z' _                                        @.Destination.NumReservation + 1;
* ?2 [: O. B0 q6 C% h                                end;
; O' k" _8 |: S                                @.CurrIcon := "drivingHome";
7 E% r2 ]. H- C. t                                @.DrivingHome := true;, R/ V5 _1 z' m7 \* n9 m7 B
                        end;
9 s3 s7 ?3 T' ?' t                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! `' J) @5 A. k" g                        part := @.transpOrder;7 X6 H8 w( e4 X! D) Z
                        part.move(@);-- load part$ Q* X! D* \' ~' ~- J7 S+ Z5 E* i
                        @.CurrIcon := "load";2 `* e# v- `5 }& z; G5 A; }( @
                        GlobalDistObj := part.globDestination;
' s* j2 D  D3 E1 z2 v* `2 R                        assignLObj := rgmanager.rgAssignL;
) D4 f7 a" n3 @$ K# J                        row := assignLObj.getRowNo(GlobalDistObj);$ _5 W  z, |& X3 N, s) }: }3 P
                        if Row = -1 then -- since 70
3 L1 g6 m. K# [# [+ `                                if lan=1 then
4 Y* p' t0 K, o                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- G- ?5 e+ W! i1 [                                                to_str("in der Andockstation: \"",?.~.name,"\""));! U) W. O* ?) y
                                else; a: ^3 r! p4 `: M: f
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( p# r8 }! Q' o                                                to_str("in docking station: \"",?.~.name,"\""));                               
( g" z' d- I' r5 I                                end;! a5 G3 h3 `& e. [4 z+ |
                        else" [9 Q6 M& C! n
                                @.Destination := assignLObj[1,row];
6 d" ~& ~$ G" h4 v+ P0 y                        end;                       
" q. k  ~: z5 X                        newDirection(@);- e, U0 p4 }6 J5 U+ `7 O. |
                        @.HasOrder := true;
2 N3 h& P- {$ E                end;
+ h! `/ `  O+ t9 J2 [" _  m; \        end;7 y2 c: ~: j; n
end;        -- of the method3 q1 r* t; o/ K4 }. b. v1 M
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 5 P; [& y# V, K8 ]3 `

0 Z& i. f: g* o% F# ?7 B这是AGV_putin中arrive的method。
+ c1 q0 s4 h- E9 C: w# k* l# y+ ~# H" g* K
当到达物料速度越高时,这个报警更多,
' G6 M2 p) [3 P5 g3 {可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。9 q) e1 }/ D  r8 R
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
# u8 O% b5 y/ V: H8 [; C' t3 c" o
另外一个小建议,就是move,所有的move都可以这样
  Y3 ]" z" \- M' r2 Lif not move() then debug end$ z2 ~. @. h2 l6 R
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
8 n7 g, z$ s# _" r9 ?plant simulation中的free libraries有AGV模板,! Q. ]+ ?5 x: c4 B# A' Z
里面也有案例。( m  B5 G4 M8 X. x. d! R* j$ W
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
# P& d) J' F$ }* f7 a* L3 B1 O- X! {. g: }/ a2 ~) K
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 $ I  ^2 u% \6 }* Y
  i5 G2 L4 W. I( K6 X2 R( Z
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 $ S; h$ p( m' O* s7 N6 T5 j
这是AGV_putin中arrive的method。
  J' T' x% z( K% g) T7 _: l) o% \! X' t, R: w
当到达物料速度越高时,这个报警更多,

. K- ?: I! }, d  g' e/ ]  d% w另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-4 03:43 , Processed in 0.017403 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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