设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6559|回复: 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'
2 o3 r- O  M. T0 j; G0 Y$ H- _*/" N* c# y7 h& b- ?: P" r
is
( S. E$ w& N7 A/ W        part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ ~/ D4 M' j; S$ d, [0 j- A
do5 {1 m1 X! w, ?
        Lan := rootfolder.Internal.Tools.AOLlanguage;$ w6 D+ O8 i9 `& e/ A/ n
        if current = @.Destination -- else return
/ Z. b" Y0 r. ]( ]; G! N, O3 P8 K        then1 ^8 h: Y! e, B( o( t
                @.Destination := void;( z+ r* ^& y$ ]" r$ K1 h- d5 v: e
                if @.occupied then+ W( Z; Z1 ~: C6 i
                        part := @.cont;# Q9 ]3 {0 J* o6 `9 g# `/ l9 I6 E: t
                        @.transpOrder := void;! l3 Q0 a1 d' @, m% R* R
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 i) Y& z# Y5 \% v/ A% ?; j                                @,root.eventcontroller.simTime);( ]( J. B" k. e! B+ F* ?2 m
                        @.HasOrder := false;
( U" z7 Z& c  Y8 O! Z2 m  G                        @.DrivingHome := true;
9 m! r7 Z# e2 p. C' v3 @( I                        rgManager.tryToStartTransOrder;  }4 |! x( G! n. l- v5 Z1 j
                        if @.Destination = void  `/ J- S8 |- T8 Y6 X5 G. m
                        then -- no transport order for vehicle @9 V) z: o: ~' j! [
                                @.Destination :=5 M& A( H" A2 Q8 p/ t( x- y4 w* W( }
                                rgManager.nearestFreeStation(@,track.~);8 }# V2 N: T/ Z/ B4 c: a, w- n
                                newDirection(@);   
: e: Q" }8 ?7 _: j5 ~                                if @.Destination /= void then9 V' y: p& w( M* c
                                        @.Destination.NumReservation :=
1 D8 ?& v/ X3 Q1 ]                                        @.Destination.NumReservation + 1;8 J& }! Z+ n' F3 `' }% c
                                end;
& S) U- ]5 @. b                                @.CurrIcon := "drivingHome";
* L# Y8 K9 m4 Z& ?; L8 V: W; g2 x                                @.DrivingHome := true;
% K7 W: X6 b/ n6 o! l+ G5 O                        end;# W( l& }6 K, D, ^2 m0 L& V1 L
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- A2 f7 X8 i3 |6 Z8 {, R3 O                        part := @.transpOrder;3 S5 {8 B7 ]3 h4 G
                        part.move(@);-- load part
! O! @0 i, P+ S% D                        @.CurrIcon := "load";4 ^; O& R; r: e
                        GlobalDistObj := part.globDestination;
) `, d+ |. i( F: q7 W" w                        assignLObj := rgmanager.rgAssignL;6 o% u6 H0 A8 f
                        row := assignLObj.getRowNo(GlobalDistObj);- p9 `5 H8 e8 T. Z% H7 M" G
                        if Row = -1 then -- since 70# Y! A1 s  A; |4 `
                                if lan=1 then5 ^( c5 _8 j; d( g0 _/ V
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ {7 V2 A0 _" {7 a/ ?                                                to_str("in der Andockstation: \"",?.~.name,"\""));3 b1 [4 R; q/ i7 m( S
                                else
7 F2 }- o( g  _) C: w8 A1 P                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ h' J' S/ o7 N
                                                to_str("in docking station: \"",?.~.name,"\""));                                # A3 J+ Q8 L( p# U
                                end;
6 f* B4 p) R% b, @* g                        else( J8 p7 q) A: ]! s- e5 f1 V
                                @.Destination := assignLObj[1,row];
& E) B: W6 T, Z( P9 a6 _/ O+ P- {3 O                        end;                        ) e5 y2 {( L0 B2 P! ]3 h7 |
                        newDirection(@);; ^7 `% T$ w, q2 C3 \
                        @.HasOrder := true;
3 n% q+ A. a, V$ w& P% P                end;
' y( V0 Y6 _. [! b4 i! l        end;
: `" T# Y; k8 N( d( w1 G& ^! _, Kend;        -- of the method
8 p/ m0 M4 E  a0 H9 W
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
; c+ J2 n' S% u3 I( ~. F* Z+ E6 g; X# ~. @; N, w8 _
这是AGV_putin中arrive的method。
  Q2 U* E5 p$ z( ?( X3 ^4 P+ s, G5 e8 D4 Z" T
当到达物料速度越高时,这个报警更多,
; p  }4 k$ ], P可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。* [( p' `' N4 h, R
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?( q- R9 O# j, T& e8 K" }! `) p8 H
- W! r) y! x; H; R7 R/ \4 A/ k
另外一个小建议,就是move,所有的move都可以这样9 n; c; D& u6 o, m" q" a2 U
if not move() then debug end
, N0 o3 V7 L9 V这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。  i& r+ o" H( ?
plant simulation中的free libraries有AGV模板,
3 J; B! N& X: U+ o* A: \" V4 L, u  j里面也有案例。  g$ }( D3 E" n, m# }& W9 P
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
* m# y# x' ^# G6 P8 x6 b# w) z" n! N8 X; _
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 + N! f9 k* y# U4 `- l9 S7 a) Q

$ I, b  S2 V* R; a4 Z' r; Y) F. i那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 / I1 L. ?5 p5 D
这是AGV_putin中arrive的method。, N7 D) N# ?9 d/ i0 M3 P) T
; P+ M+ |! q! \8 \2 V
当到达物料速度越高时,这个报警更多,

2 {6 J- F+ Z0 F7 t/ d另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-13 00:05 , Processed in 0.046459 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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