ATTENTIONThis 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 |
#1
|
|||
|
|||
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. |
#2
|
|||
|
|||
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
|
|||
|
|||
Quote:
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
|
|||
|
|||
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? |
#7
|
|||
|
|||
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 |