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 02-08-2012
Jack Lai Jack Lai is offline
Flexsim User
 
Join Date: Nov 2011
Posts: 32
Downloads: 17
Uploads: 0
Thanks: 22
Thanked 0 Times in 0 Posts
Rep Power: 106
Jack Lai is on a distinguished road
Default Question on routing and time

In the model, I use three processors to serve items in FIFO, and each processor will have breakdown which is set by timetable. When the processor breakdown, I hope the item in the processor will flow to the [breakdown pool] immediately,and then I will set a higher priority to those items when they go back to the queue.

Is it has functions to flow the items immediately when breakdown occurred? I am now using the stopinput() function at the timetable, this function can stop input items when breakdown occur, but I found the items in the processor will still processing until the processing time, not flow to next point immediately.
Attached Thumbnails
Click image for larger version
Name:	model.jpg
Views:	136
Size:	120.0 KB
ID:	1654   Click image for larger version
Name:	code.jpg
Views:	120
Size:	163.7 KB
ID:	1655  
Attached Files
File Type: fsm try route(edit).fsm (47.6 KB, 81 views)
  #2  
Old 02-08-2012
Jörg Vogel's Avatar
Jörg Vogel Jörg Vogel is offline
Flexsim User
 
Join Date: Sep 2007
Location: Hannover, Germany
Posts: 643
Downloads: 35
Uploads: 0
Thanks: 802
Thanked 665 Times in 410 Posts
Rep Power: 642
Jörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond repute
Default

Hello Jack,

what you have discovered, is the behaviour I would expect from every processor. If you want the flowitem to be released immediately I would change the eventtime of processfinishing of the flowitem to the current time and close the input of the normal routing of the next object. Though the flowitem leave the processor to the breakdown pool.
Try the command delayeventsofobject(...).

Then stop the object a bit later with a delayed message. Otherwise the flowitem will stick to the processor.
Jörg

Last edited by Jörg Vogel; 02-08-2012 at 04:01 AM. Reason: how to implement the stopfunction
The Following User Says Thank You to Jörg Vogel For This Useful Post:
Jack Lai (02-19-2012)
  #3  
Old 02-08-2012
Jack Lai Jack Lai is offline
Flexsim User
 
Join Date: Nov 2011
Posts: 32
Downloads: 17
Uploads: 0
Thanks: 22
Thanked 0 Times in 0 Posts
Rep Power: 106
Jack Lai is on a distinguished road
Default

Hello Jörg,

I have edit the model by adding labels to record the breakdown time and calculate remaining process time. But I still don't know how to release the item immediately using coding.

As I am not a programmar, I am not very familiar with Flexcripet, I have found the users manual, but I can't find any descriptions about delayeventsofobject(...). and processfinishing functions. Can you please give me some advice on how to use these functions or some coding example?

As you said " Then stop the object a bit later with a delayed message. Otherwise the flowitem will stick to the processor. " , so I need to use [stopInput] function first, then use [stopObject] function? I am not fully understand what you mean.

Jack

try route(edit_2).fsm
  #4  
Old 02-09-2012
Sebastian Hemmann's Avatar
Sebastian Hemmann Sebastian Hemmann is offline
Flexsim User
 
Join Date: Sep 2009
Location: Braunschweig (Germany)
Posts: 439
Downloads: 52
Uploads: 0
Thanks: 472
Thanked 217 Times in 154 Posts
Rep Power: 319
Sebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to behold
Default

I think to release Item to your Pool it even should be possible to use
moveobject(...)
short before you stop the machine. This should be an easy solution if you know the references to the stopped machine.
Think Jörg may can help you with this!?
__________________
Hemmi
  #5  
Old 02-09-2012
Jack Lai Jack Lai is offline
Flexsim User
 
Join Date: Nov 2011
Posts: 32
Downloads: 17
Uploads: 0
Thanks: 22
Thanked 0 Times in 0 Posts
Rep Power: 106
Jack Lai is on a distinguished road
Default

Sebastian
Can you give me an example about the coding of moveobject(...) function. I tried the code as below in the down function of a timetable :

treenode item = first(downobject);
if (objectexists(item)){
moveobject(item,node("/breakdown pool"));
};
stopobject(downobject ,state, id, priority);


However, when scheduled occurred, the item still stay in the processor, can you give me some advice??
Attached Files
File Type: fsm try route(edit_3).fsm (49.4 KB, 84 views)
  #6  
Old 02-09-2012
Sebastian Hemmann's Avatar
Sebastian Hemmann Sebastian Hemmann is offline
Flexsim User
 
Join Date: Sep 2009
Location: Braunschweig (Germany)
Posts: 439
Downloads: 52
Uploads: 0
Thanks: 472
Thanked 217 Times in 154 Posts
Rep Power: 319
Sebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to behold
Default

treenode item = first(downobject);
if (objectexists(item)){
moveobject(item,node("/breakdown pool",model()));
};
stopobject(downobject ,state, id, priority);

Should work. If not, try to set "breakdown pool" as variable in your code or as global variable.
__________________
Hemmi
The Following User Says Thank You to Sebastian Hemmann For This Useful Post:
Jack Lai (02-09-2012)
  #7  
Old 02-09-2012
Jörg Vogel's Avatar
Jörg Vogel Jörg Vogel is offline
Flexsim User
 
Join Date: Sep 2007
Location: Hannover, Germany
Posts: 643
Downloads: 35
Uploads: 0
Thanks: 802
Thanked 665 Times in 410 Posts
Rep Power: 642
Jörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond repute
Default

Hello Jack,

Quote:
Originally Posted by Jack Lai View Post
Can you give me an example about the coding of moveobject(...) function. I tried the code as below in the down function of a timetable :

treenode item = first(downobject);
if (objectexists(item)){
moveobject(item,node("/breakdown pool"));
};
stopobject(downobject ,state, id, priority);
The Command node(str relative path, obj container) needs two parameters. The second one ist the reference to the container of the string path. Try moveobject(node("/breakdown pool", model()))

Please disconnect all the output connections of your breakdown pool queue. There will be a difference of input statistic and the content. Some Items will disappear. But without an output connection, where are they gone. They have taken part on the normal flow process, which would have happened without the moveobject command. The moveobject command doesn't update the eventlist in your model.

Edit: Sebastian beats me with his post

Jörg
The Following User Says Thank You to Jörg Vogel For This Useful Post:
Jack Lai (02-19-2012)
  #8  
Old 02-09-2012
Jörg Vogel's Avatar
Jörg Vogel Jörg Vogel is offline
Flexsim User
 
Join Date: Sep 2007
Location: Hannover, Germany
Posts: 643
Downloads: 35
Uploads: 0
Thanks: 802
Thanked 665 Times in 410 Posts
Rep Power: 642
Jörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond repute
Default

Hello Jack,

in the attched model I have build a small process which compares the different solutions. Moveobject vs. Delayeventsofobj
ReleasingItemOnScheduledDown_JV.fsm
As mentioned above you receive a delayed message in the processor to stop the object.

Jörg

Last edited by Jörg Vogel; 12-03-2014 at 03:41 AM.
The Following User Says Thank You to Jörg Vogel For This Useful Post:
Jack Lai (02-19-2012)
  #9  
Old 02-15-2012
Jack Lai Jack Lai is offline
Flexsim User
 
Join Date: Nov 2011
Posts: 32
Downloads: 17
Uploads: 0
Thanks: 22
Thanked 0 Times in 0 Posts
Rep Power: 106
Jack Lai is on a distinguished road
Default

Hello Jörg,

I tried the moveobject function in my model, but how can I flowback the breakdown item to my own queue without any output connection??

My logic flow of a item is:

queue-->processor--> (if breakdown occur, go back to queue )

Also, I have set a unique processing time for each item, and I hope to record down the breakdown time, and then the model can calculate the remaining processing time. If there is no breakdown, the item will go to a checking queue, if the calculated remaining processing rime is zero, the item will leave the model, if not, it will route to the queue again.

However, many error occurred at the[ system console ], eg:

Time: 169.000000. The label named "Remaining processing time" was referenced but does not exist on MAIN:/project/model/Gang_2>stats/content/stats_contentgraph/197

I actually don't know how the error occurred and how to solve it. Can you help on this?? For the output result, some record are not correct in remaining processing time( not equal to 0 ) , is it affected by the moveobject function??
Attached Thumbnails
Click image for larger version
Name:	error message.jpg
Views:	125
Size:	335.8 KB
ID:	1674   Click image for larger version
Name:	model.jpg
Views:	105
Size:	181.7 KB
ID:	1675  
Attached Files
File Type: fsm error on system console.fsm (187.9 KB, 85 views)
File Type: doc error.doc (30.0 KB, 104 views)
  #10  
Old 02-15-2012
Jörg Vogel's Avatar
Jörg Vogel Jörg Vogel is offline
Flexsim User
 
Join Date: Sep 2007
Location: Hannover, Germany
Posts: 643
Downloads: 35
Uploads: 0
Thanks: 802
Thanked 665 Times in 410 Posts
Rep Power: 642
Jörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond repute
Angry

Hello Jack,

I am now crude, but don't use moveobject. The command moveobject doesn't update your eventlist. The Eventlist is the main control mechanism of your simulation. If there exists some events to an object and the involved item is referencing something relative to its position over numbered path "/3>3/20/1" than the simulation may fail. You move some items before the process finishes. The item isn't anymore in the processor, but your event, which executes the processfinish trigger and some other internals still exists. The involved item isn't relative to the processor where it should be for this event. That must resolve into an error. You can use moveobject, but you have to know that it isn't dangerous to your simulation.
Maybe you read the whole thread again and test the given models.

Jörg
The Following User Says Thank You to Jörg Vogel For This Useful Post:
Jack Lai (02-19-2012)
  #11  
Old 02-19-2012
Jack Lai Jack Lai is offline
Flexsim User
 
Join Date: Nov 2011
Posts: 32
Downloads: 17
Uploads: 0
Thanks: 22
Thanked 0 Times in 0 Posts
Rep Power: 106
Jack Lai is on a distinguished road
Default

Thanks for teaching me the moethod, I can use delayeventofobject() to solve the routing. However, we I add more servers and let the item go to any availavle server, there is another system console problem occurred, it is called "createvent: event time is in past: event time changed to present. Object: Processor10 advancetime: -6.250000, clock: 63.750000 Box" it that sill anything wrong in the model?? many thanks for any advice =]
Attached Files
File Type: fsm error on event time.fsm (46.2 KB, 74 views)
  #12  
Old 02-20-2012
Jörg Vogel's Avatar
Jörg Vogel Jörg Vogel is offline
Flexsim User
 
Join Date: Sep 2007
Location: Hannover, Germany
Posts: 643
Downloads: 35
Uploads: 0
Thanks: 802
Thanked 665 Times in 410 Posts
Rep Power: 642
Jörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond repute
Default

What simulation time has your model, when this error occurs. That gives you the hint. To be more precise, your run time is eg 100, the process finishes at 105 and you delays the events with a value of -10. Then the shortened process finish time is in the past of your simulation time. That can't work!

Jörg
The Following User Says Thank You to Jörg Vogel For This Useful Post:
Jack Lai (02-20-2012)


Thread Thread Starter Forum Replies Last Post
Displaying the simulation time with the various date/time formats. Regan Blackett Tips and Tricks 12 11-12-2012 08:01 AM
customized routing for traveler David Chan Q&A 3 02-08-2012 07:19 PM
routing items Private Q&A 12 05-13-2010 05:18 AM
HC Routing to two areas Kenny Macleod FlexSim HC: Q&A 2 02-26-2010 09:05 AM
All time related values 0,0000001 time units delayed Patrick Cap Q&A 2 05-01-2009 01:50 AM


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.