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 Software > Q&A
Downloads

Q&A Using Flexsim and building models

  #1  
Old 04-16-2008
AlanZhang's Avatar
AlanZhang AlanZhang is offline
Flexsim Super Moderator
 
Join Date: Aug 2007
Location: CA
Posts: 289
Downloads: 64
Uploads: 0
Thanks: 88
Thanked 91 Times in 47 Posts
Rep Power: 225
AlanZhang is a jewel in the roughAlanZhang is a jewel in the roughAlanZhang is a jewel in the rough
Default Offset Travel

Can anybody explain me how to change the travel offset behaviors of standard object, for example a Transporter. I read the Offset Travel under the TaskExecuter in the help. It explain how it works for different TEs. But it did not give me clues how to change the offset behavior. I would like to have a transporter unload to a rack with the following sequence. Go parallel along the rack x direction to the right bay, turn 90 degree to face the rack, forward, and then unload. Is it possible to modify the Transporter default Offset behavior to do this? Or is there any alternative?

Thank you very much.
__________________
Best,
Alan
  #2  
Old 04-16-2008
Martijn van Oostenbrugge's Avatar
Martijn van Oostenbrugge Martijn van Oostenbrugge is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Posts: 71
Downloads: 12
Uploads: 0
Thanks: 44
Thanked 44 Times in 24 Posts
Rep Power: 268
Martijn van Oostenbrugge is a name known to allMartijn van Oostenbrugge is a name known to allMartijn van Oostenbrugge is a name known to allMartijn van Oostenbrugge is a name known to allMartijn van Oostenbrugge is a name known to allMartijn van Oostenbrugge is a name known to all
Default

The offset travel is not easy altered while it's defined on the object in the library. An alternative is to start with a BasicTE and define the offset travel you would like on the triggers (define kinematics on the begin offset, alter update offset, etc). A problem is you want the forks to be seen and act like in the Transporter. You can view the tree library of the transporter and check the cppfunctions (OnDraw, OnPreDraw) under the behaviour node and try to extract the functionality. You also have to make sure your loaded item acts in the z-direction. It's some work to figure it all out. Hope it helped you on the way.

Martijn
The Following User Says Thank You to Martijn van Oostenbrugge For This Useful Post:
AlanZhang (04-16-2008)
  #3  
Old 04-16-2008
AlanZhang's Avatar
AlanZhang AlanZhang is offline
Flexsim Super Moderator
 
Join Date: Aug 2007
Location: CA
Posts: 289
Downloads: 64
Uploads: 0
Thanks: 88
Thanked 91 Times in 47 Posts
Rep Power: 225
AlanZhang is a jewel in the roughAlanZhang is a jewel in the roughAlanZhang is a jewel in the rough
Default

I have thought about making a transporter starting from a BasicTE but not sure how much work that would be, especially the visual part. It is like to invent a wheel again. So I wonder it may exist a better solution. Thank you for the clue on where to find those code.
__________________
Best,
Alan
  #4  
Old 04-16-2008
AlanZhang's Avatar
AlanZhang AlanZhang is offline
Flexsim Super Moderator
 
Join Date: Aug 2007
Location: CA
Posts: 289
Downloads: 64
Uploads: 0
Thanks: 88
Thanked 91 Times in 47 Posts
Rep Power: 225
AlanZhang is a jewel in the roughAlanZhang is a jewel in the roughAlanZhang is a jewel in the rough
Default

One quick question. The behavior node of a transporter dragged from the library contains no code under cppfunctions. But the transporter in the library has the code you mentioned. This mean all transporters share the same behavior, right? Can I overwrite the default transporter behavior by adding code under cppfunctions of a transporter already dragged into the model?
__________________
Best,
Alan
  #5  
Old 04-16-2008
Brandon Peterson's Avatar
Brandon Peterson Brandon Peterson is offline
The Flexsim Consultant
 
Join Date: Jul 2007
Location: Salt Lake City, Utah
Posts: 382
Downloads: 29
Uploads: 6
Thanks: 192
Thanked 516 Times in 235 Posts
Rep Power: 490
Brandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant future
Default

Alan,

With what you want to do you're probably going to have to use a BasicTE. If you want a good place to start you can view the Open Pit Demo in the Demo Mining Models thread. The Front Shovels and Excavator in that model use nested BasicTEs to create the machines and animate them.

It is a lot like reinventig the wheel but you're asking for something that I personally can't think of a way around. Sorry not to be of more help but the Open Pit model should help a lot if you go the BasicTE way. If not hopefully someone else will have some insights.

Here is a link to that thread: http://www.flexsim.com/community/for...read.php?t=304

Good Luck,
Brandon
__________________
thats not normal.

Last edited by Brandon Peterson; 04-16-2008 at 02:52 PM. Reason: added link to demo model
  #6  
Old 04-16-2008
Brandon Peterson's Avatar
Brandon Peterson Brandon Peterson is offline
The Flexsim Consultant
 
Join Date: Jul 2007
Location: Salt Lake City, Utah
Posts: 382
Downloads: 29
Uploads: 6
Thanks: 192
Thanked 516 Times in 235 Posts
Rep Power: 490
Brandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant future
Default

Alan,

I believe adding the code under the cppfunctions would have to be done in the library. If you do that you should make a copy of the object you want to modify and give it another name. After you modify it you will need to compile the entire session and save the model as a project or session so that you save the library.

Brandon
__________________
thats not normal.
  #7  
Old 04-16-2008
AlanZhang's Avatar
AlanZhang AlanZhang is offline
Flexsim Super Moderator
 
Join Date: Aug 2007
Location: CA
Posts: 289
Downloads: 64
Uploads: 0
Thanks: 88
Thanked 91 Times in 47 Posts
Rep Power: 225
AlanZhang is a jewel in the roughAlanZhang is a jewel in the roughAlanZhang is a jewel in the rough
Default

Thanks, Brandon. I guess I have to invent one of the standard Flexsim object at least once in order to better understand how these objects works. And then I may know what is possible and what is not.
__________________
Best,
Alan
  #8  
Old 04-16-2008
Martijn van Oostenbrugge's Avatar
Martijn van Oostenbrugge Martijn van Oostenbrugge is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Posts: 71
Downloads: 12
Uploads: 0
Thanks: 44
Thanked 44 Times in 24 Posts
Rep Power: 268
Martijn van Oostenbrugge is a name known to allMartijn van Oostenbrugge is a name known to allMartijn van Oostenbrugge is a name known to allMartijn van Oostenbrugge is a name known to allMartijn van Oostenbrugge is a name known to allMartijn van Oostenbrugge is a name known to all
Default

Demo's are always nice to learn from, so that'll help! I've added a model with a start for the BasicTE. It's far from the end result, but it's a start. Good luck.

Martijn
Attached Files
File Type: zip BasicTEadjustment.zip (71.9 KB, 324 views)
  #9  
Old 04-16-2008
Alex Christensen Alex Christensen is offline
Flexsim Technical Support
 
Join Date: Nov 2007
Location: Provo, UT
Posts: 96
Downloads: 41
Uploads: 8
Thanks: 29
Thanked 141 Times in 56 Posts
Rep Power: 298
Alex Christensen is a splendid one to beholdAlex Christensen is a splendid one to beholdAlex Christensen is a splendid one to beholdAlex Christensen is a splendid one to beholdAlex Christensen is a splendid one to beholdAlex Christensen is a splendid one to beholdAlex Christensen is a splendid one to behold
Default

It sounds to me like you don't want to edit the transporter, you just want it to travel the X offset separate from the Y and Z offset. This can be done by making a custom tasksequence when you call the transporter. I attached a model where I just changed the "request transport from" trigger with a tasksequence that does this. Is this kind of what you're looking for?
Attached Files
File Type: zip rack.zip (46.0 KB, 308 views)
  #10  
Old 04-16-2008
AlanZhang's Avatar
AlanZhang AlanZhang is offline
Flexsim Super Moderator
 
Join Date: Aug 2007
Location: CA
Posts: 289
Downloads: 64
Uploads: 0
Thanks: 88
Thanked 91 Times in 47 Posts
Rep Power: 225
AlanZhang is a jewel in the roughAlanZhang is a jewel in the roughAlanZhang is a jewel in the rough
Default

Hi Alex,

This is interesting. Your method is similar to what I thought. I actually tried the method . At that time, I stored the bay and level in labels since I do not know the placeoffsetx() command and the bay is stored under the itemtype of items. And I calculate the offset location based on the rack location and bay number. What I found is when I use a network, placeoffsetx will not return the right number. So Transporter will travel to a wrong location. I also tried TASKTYPE_TRAVELTOLOC instead of TASKTYPE_TRAVELRELATIVE. It won't work either.

I put some printout (in queue's RequestTransportFrom, rack's PlaceInBay and OnEntry) to study the execute order. From the output results, I know that the placeoffsetx command will triger "Place In Bay" of the rack. But when the item actually arrives at the station, the "Place In Bay" will be fired again and returns a different bay number.

I also tried to put TASKTYPE_TRAVELTOLOC to the UnLoad trigger of the transporter. It does not work either. What I found is that if Travel Offset of thet transporter is selected, the UnLoad will be fired after PlaceInBay. This does not make sense to me. If the Travel Offset is not selected, the UnLoad will be fired before PlaceInBay.

Please see attached model for transporter traveling on a network.

If this method works, it will be a simpler solution and has potentials for other usages.

Thank you for the help!
Attached Files
File Type: zip rack_network_node.zip (46.7 KB, 301 views)
__________________
Best,
Alan
  #11  
Old 04-16-2008
AlanZhang's Avatar
AlanZhang AlanZhang is offline
Flexsim Super Moderator
 
Join Date: Aug 2007
Location: CA
Posts: 289
Downloads: 64
Uploads: 0
Thanks: 88
Thanked 91 Times in 47 Posts
Rep Power: 225
AlanZhang is a jewel in the roughAlanZhang is a jewel in the roughAlanZhang is a jewel in the rough
Default

Hi Majin,

I will try your BasicTEExample later. Thank you very much for your help.
__________________
Best,
Alan
  #12  
Old 04-17-2008
Cliff King's Avatar
Cliff King Cliff King is offline
Vice President Technical Services
 
Join Date: Jul 2007
Location: Utah
Posts: 272
Downloads: 158
Uploads: 14
Thanks: 102
Thanked 304 Times in 110 Posts
Rep Power: 412
Cliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud of
Default

This problem is not so difficult if you keep the following facts in mind:
  1. There is a distinction in Flexsim between travel and offset travel.
  2. The TRAVEL task instructs the fork truck to travel as far as the networknode connected to the rack.
  3. The x offset for a rack is in the direction of the bays, and the y offset is towards the rack face, and the z offset is in the direction of the levels.
  4. The UNLOAD task instructs the fork truck to offset travel in x, y, and z simultaneously.
  5. If you desire the fork truck to offset travel the x offset first, then the y offset, and finally the z offset in three separate moves, use three separate PLACEOFFSET tasks instead of an UNLOAD task.
I've attached an example model of this. The only glitch in my solution is that the PLACEOFFSET task in the x-direction has the fork truck offset travel to the front edge of the bay, so when the fork truck takes a 90 degree turn towards the rack it is not perfectly lined up with the target bay. This could be tweaked by using a number larger than 1 for the x offset value perhaps.
Attached Files
File Type: zip rack_network_node2.zip (48.9 KB, 321 views)
The Following User Says Thank You to Cliff King For This Useful Post:
AlanZhang (04-17-2008)
  #13  
Old 04-17-2008
Martijn van Oostenbrugge's Avatar
Martijn van Oostenbrugge Martijn van Oostenbrugge is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Posts: 71
Downloads: 12
Uploads: 0
Thanks: 44
Thanked 44 Times in 24 Posts
Rep Power: 268
Martijn van Oostenbrugge is a name known to allMartijn van Oostenbrugge is a name known to allMartijn van Oostenbrugge is a name known to allMartijn van Oostenbrugge is a name known to allMartijn van Oostenbrugge is a name known to allMartijn van Oostenbrugge is a name known to all
Default

Alan, no worries. This is a far quicker solution to your problem, so definitely use it. I've checked your model. The offset which you define, you define in respect to the queue, but the moment the Transporter starts its offset, the transporter is at the networknode. You should use the network node as the unload station for the offset (see attached model), then it works.
Martijn
Attached Files
File Type: zip ranck_network_node2.zip (46.6 KB, 298 views)
The Following User Says Thank You to Martijn van Oostenbrugge For This Useful Post:
AlanZhang (04-17-2008)
  #14  
Old 04-17-2008
AlanZhang's Avatar
AlanZhang AlanZhang is offline
Flexsim Super Moderator
 
Join Date: Aug 2007
Location: CA
Posts: 289
Downloads: 64
Uploads: 0
Thanks: 88
Thanked 91 Times in 47 Posts
Rep Power: 225
AlanZhang is a jewel in the roughAlanZhang is a jewel in the roughAlanZhang is a jewel in the rough
Default

Thanks, Cliff and Martijn. The problem solved. And this is really a nice example on how easy of changing the default behaviors of standard Flexsim object. I am glad that we have such flexibilities in Flexsim. Besides, it helps me to understand the travel offset and the difference when a network is used or not. Perhaps, this could be summarized as a Wiki article later.

Thanks again!
__________________
Best,
Alan
  #15  
Old 04-17-2008
AlanZhang's Avatar
AlanZhang AlanZhang is offline
Flexsim Super Moderator
 
Join Date: Aug 2007
Location: CA
Posts: 289
Downloads: 64
Uploads: 0
Thanks: 88
Thanked 91 Times in 47 Posts
Rep Power: 225
AlanZhang is a jewel in the roughAlanZhang is a jewel in the roughAlanZhang is a jewel in the rough
Default

Hi, Martijin,

It seems this post cannot be closed yet. If I change the queue to rack, the behavior of Transporter is not right any more. The Place In Bay will be called twice for the same item so you get two bays at different time (say bay a and bay b). And the transporter will firstly go to the bay a at the order of offset x, then y, then z. But it will go to bay b since that is the final destination bay for that item. Please see the attached model for details.
Attached Files
File Type: zip ranck_network_node3.zip (52.9 KB, 288 views)
__________________
Best,
Alan
  #16  
Old 04-17-2008
Brandon Peterson's Avatar
Brandon Peterson Brandon Peterson is offline
The Flexsim Consultant
 
Join Date: Jul 2007
Location: Salt Lake City, Utah
Posts: 382
Downloads: 29
Uploads: 6
Thanks: 192
Thanked 516 Times in 235 Posts
Rep Power: 490
Brandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant future
Default

Alan,

I inserted some exra code in the "Place in Bay" trigger so that it is looking to see if a "bay" label has been set on the item yet or not. This way it only selects the bay once. This required me to also put a label on the flow item and to put some code on the entry triggers of the objects to make sure that the bay label was set to 0.

I've attached the model so that you can test out and see what I've done.

Good Luck,
Brandon
Attached Files
File Type: zip rack_network_node_BJP.zip (48.5 KB, 315 views)
__________________
thats not normal.
The Following User Says Thank You to Brandon Peterson For This Useful Post:
AlanZhang (04-18-2008)
  #17  
Old 04-18-2008
AlanZhang's Avatar
AlanZhang AlanZhang is offline
Flexsim Super Moderator
 
Join Date: Aug 2007
Location: CA
Posts: 289
Downloads: 64
Uploads: 0
Thanks: 88
Thanked 91 Times in 47 Posts
Rep Power: 225
AlanZhang is a jewel in the roughAlanZhang is a jewel in the roughAlanZhang is a jewel in the rough
Default

Hi Brandon,

This works. What I learned here is that racks have a different behavior (I am not sure why.) than other fixed resource objects such as queues. But it always has some solution if you can track down the problem.

Thanks!
__________________
Best,
Alan



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.