ATTENTION

This FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices.


flexsim.com

Go Back   FlexSim Community Forum > Flexsim CT > Container Terminal (CT) Library
Downloads

  #1  
Old 10-20-2011
Jaouad Boukachour Jaouad Boukachour is offline
Flexsim User
 
Join Date: Aug 2011
Posts: 7
Downloads: 2
Uploads: 0
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
Jaouad Boukachour is on a distinguished road
Exclamation Why a box disapears after the crane load it on a car ?

Hi,

In this attached model I try to load 2 boxes on 2 cars. When the first car is loaded with a box and the crane goes to pickup a box to loaded on the second car, the first box is removed from the first car !!!!!

Many thanks for your help.
Attached Files
File Type: fsm GantryCrane.fsm (87.8 KB, 147 views)
  #2  
Old 10-24-2011
Juan Segui Juan Segui is offline
Flexsim User
 
Join Date: Apr 2010
Posts: 16
Downloads: 4
Uploads: 0
Thanks: 0
Thanked 6 Times in 6 Posts
Rep Power: 126
Juan Segui is on a distinguished road
Default Error on your task sequence

Hi Jaouad :

Most of your usercommands and most of the model structure is calling a .dll so it is not easy just to debug that model on its own.

However, I think I found the problem on your task sequence.

On the OnMessage Trigger of the Crane, item is referenced as first(centerobject(current,1)) and this reference is the one that is inserted in both task sequences.

So unless you add the second item reference, the first box will disappear when the crane reaches the second car.

So from your example
---------------------------------

inserttask(ts,TASKTYPE_TRAVEL,centerobject(current ,1),NULL);
pt ("TASKTYPE_TRAVEL");
inserttask(ts,TASKTYPE_FRLOAD,item,centerobject(cu rrent,1),NULL);
pt ("TASKTYPE_FRLOAD");
inserttask(ts,TASKTYPE_TRAVEL,car,NULL);
//pt("TASKTYPE_TRAVEL");
inserttask(ts,TASKTYPE_FRUNLOAD,item,car,1);
//pt("TASKTYPE_FRUNLOAD");



inserttask(ts,TASKTYPE_TRAVEL,centerobject(current ,1),NULL);
pt ("TASKTYPE_TRAVEL");
inserttask(ts,TASKTYPE_FRLOAD,item,centerobject(current,1),NULL);
pt ("TASKTYPE_FRLOAD");
inserttask(ts,TASKTYPE_TRAVEL,car2,NULL);
//pt("TASKTYPE_TRAVEL");
inserttask(ts,TASKTYPE_FRUNLOAD,item,car2,NULL);
//pt("TASKTYPE_FRUNLOAD");
------------------------------------------------------------------

The one that is highlighted needs to reference another item.
The Following User Says Thank You to Juan Segui For This Useful Post:
Jörg Vogel (10-25-2011)
  #3  
Old 10-25-2011
Jaouad Boukachour Jaouad Boukachour is offline
Flexsim User
 
Join Date: Aug 2011
Posts: 7
Downloads: 2
Uploads: 0
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
Jaouad Boukachour is on a distinguished road
Default

Quote:
Originally Posted by Juan Segui View Post
Hi Jaouad :

Most of your usercommands and most of the model structure is calling a .dll so it is not easy just to debug that model on its own.

However, I think I found the problem on your task sequence.

On the OnMessage Trigger of the Crane, item is referenced as first(centerobject(current,1)) and this reference is the one that is inserted in both task sequences.

So unless you add the second item reference, the first box will disappear when the crane reaches the second car.

So from your example
---------------------------------

inserttask(ts,TASKTYPE_TRAVEL,centerobject(current ,1),NULL);
pt ("TASKTYPE_TRAVEL");
inserttask(ts,TASKTYPE_FRLOAD,item,centerobject(cu rrent,1),NULL);
pt ("TASKTYPE_FRLOAD");
inserttask(ts,TASKTYPE_TRAVEL,car,NULL);
//pt("TASKTYPE_TRAVEL");
inserttask(ts,TASKTYPE_FRUNLOAD,item,car,1);
//pt("TASKTYPE_FRUNLOAD");



inserttask(ts,TASKTYPE_TRAVEL,centerobject(current ,1),NULL);
pt ("TASKTYPE_TRAVEL");
inserttask(ts,TASKTYPE_FRLOAD,item,centerobject(current,1),NULL);
pt ("TASKTYPE_FRLOAD");
inserttask(ts,TASKTYPE_TRAVEL,car2,NULL);
//pt("TASKTYPE_TRAVEL");
inserttask(ts,TASKTYPE_FRUNLOAD,item,car2,NULL);
//pt("TASKTYPE_FRUNLOAD");
------------------------------------------------------------------

The one that is highlighted needs to reference another item.
Hi,

Thanks. Please, let me know a function which can choose a random item. I want to use a another function instead first(centerobject(current,1)).
  #4  
Old 10-31-2011
Juan Segui Juan Segui is offline
Flexsim User
 
Join Date: Apr 2010
Posts: 16
Downloads: 4
Uploads: 0
Thanks: 0
Thanked 6 Times in 6 Posts
Rep Power: 126
Juan Segui is on a distinguished road
Default Function to address item

Hi Jaouad :

You should take a look at using the function rank(container,index)

So, for the first object that is placed in your rack, you should say

treenode item = rank(centerobject(current,1), 1)

Now for the second box you would like to transport declare it

treenode Item2 = rank(centerobject(current,1),2);

and in the task sequence instead of item, point to Item2 for the second box

If you follow the logic subsequently, for the third box from the rack it will be

treenode Item3 = rank(centerobject(current,1),3);

I don't see a point in selecting a random box from your rack. If you need to take them in a different sequence than the one they have entered. You can point to a value from 1, up to the contents of the rack. However, you should be careful and need to prevent how are you going to have a different item every time?
  #5  
Old 10-31-2011
Jaouad Boukachour Jaouad Boukachour is offline
Flexsim User
 
Join Date: Aug 2011
Posts: 7
Downloads: 2
Uploads: 0
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
Jaouad Boukachour is on a distinguished road
Default

Many thanks for your help Juan.
We found the same function rank
  #6  
Old 11-09-2011
Jaouad Boukachour Jaouad Boukachour is offline
Flexsim User
 
Join Date: Aug 2011
Posts: 7
Downloads: 2
Uploads: 0
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
Jaouad Boukachour is on a distinguished road
Default

Hi,

I need to know how I can load two boxes, one near another, on car, not one above the other.
  #7  
Old 11-14-2011
Juan Segui Juan Segui is offline
Flexsim User
 
Join Date: Apr 2010
Posts: 16
Downloads: 4
Uploads: 0
Thanks: 0
Thanked 6 Times in 6 Posts
Rep Power: 126
Juan Segui is on a distinguished road
Default

Hi Jaouad :

What you are trying to do doesn't change the behaviour of the objects inside Flexsim.

Assuming you are only going to load two boxes in one car, I would recommend you the following.

Try on the OnLoad trigger check if the car has a box inside (you would want to check for the content). If it does have a box inside, measure the object in size, and use from the picklist option

setloc(item, x,y,z)


Thread Thread Starter Forum Replies Last Post
How to load each car with a box ? Jaouad Boukachour Container Terminal (CT) Library 1 10-24-2011 10:09 AM
LOAD and UNLOAD on Robot Lydia Franck Q&A 10 09-15-2010 07:29 AM
Is it possible to let quay crane load two container at same time? zhang xin Container Terminal (CT) Library 3 12-14-2009 09:32 AM
Crane Logic: How to find out what a crane currently is doing? Tom David Q&A 5 06-02-2008 11:57 PM
Double load handling ASRS Paul Dowling Q&A 8 05-06-2008 10:19 PM


All times are GMT -6.
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.