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

  #21  
Old 08-03-2008
Yasemin Vatandas's Avatar
Yasemin Vatandas Yasemin Vatandas is offline
Flexsim User
 
Join Date: Jul 2008
Location: Hamburg, Germany
Posts: 36
Downloads: 9
Uploads: 0
Thanks: 29
Thanked 3 Times in 3 Posts
Rep Power: 146
Yasemin Vatandas is on a distinguished road
Default TS - Node or object?

Hello,
I've been reading the commands documentation and there's something that I couldn't understand clearly.
Concerning the following two commands and their variables options:

getcurtask (node tasksequence)
getnroftasks (obj tasksequence)

What is the difference between a node and an object, and why is the TS being referred to under different types, i.e. node and object?
And I also have seen that a TS may be a treenode (e.g. when creating a new TS). When to use which one?

After having asked that question, I think there's no need to mention that I'm a rookie
Thanks.
  #22  
Old 08-04-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

Yasemin,

An object is a node that has been toggled as an object. Nodes can have their types toggled as: number, string, or object. If they are a string node then they can be just a string, Flexscript, DLL, C++, or Global C++.

The two commands that you are asking about are asking for the same thing. They want a pointer to the node that contains the task sequence. Pointers to nodes are declared with treenode (Flexscript) or fsnode* (C++). So when you see someone metion "treenode" they are merely referencing the way that we would point to a node in Flexscript code.

I hope this helps,
Brandon
__________________
thats not normal.
The Following 2 Users Say Thank You to Brandon Peterson For This Useful Post:
Yasemin Vatandas (08-04-2008)
  #23  
Old 08-04-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

Lin,

If you are importing the schedule directly into the source then you should be able to import the label values as well by setting the number of labels on the source and then adding a column to your schedule in Excel for every label that you set on the flowitems. This should keep you from having to move the data over manually.

Good Luck,
Brandon
__________________
thats not normal.
The Following User Says Thank You to Brandon Peterson For This Useful Post:
Lin Jincong (08-04-2008)
  #24  
Old 08-08-2008
Xavier Jackson's Avatar
Xavier Jackson Xavier Jackson is offline
Flexsim User
 
Join Date: Jun 2008
Posts: 20
Downloads: 11
Uploads: 0
Thanks: 21
Thanked 4 Times in 3 Posts
Rep Power: 147
Xavier Jackson is on a distinguished road
Default

If I have an item entering one processor how can I return the itemtype or a label of an item on a separate processor with an on entry trigger

I thought I would be something like

getitemtype(content(centerobject(current,1)))

but it has not worked yet so I am not sure.
  #25  
Old 08-08-2008
Phil BoBo's Avatar
Phil BoBo Phil BoBo is offline
Flexsim Development
 
Join Date: Jan 2008
Posts: 756
Downloads: 109
Uploads: 18
Thanks: 385
Thanked 1,483 Times in 525 Posts
Rep Power: 1174
Phil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond repute
Default

first() will give you a reference to the first object inside another object.

getitemtype(first(centerobject(current,1)))

rank() will give you a reference to any object inside another object.

getitemtype(rank(centerobject(current,1),4))

content returns the number of items in an object, not a reference to the item(s) in it.
The Following 4 Users Say Thank You to Phil BoBo For This Useful Post:
Yasemin Vatandas (08-08-2008)
  #26  
Old 08-09-2008
Yasemin Vatandas's Avatar
Yasemin Vatandas Yasemin Vatandas is offline
Flexsim User
 
Join Date: Jul 2008
Location: Hamburg, Germany
Posts: 36
Downloads: 9
Uploads: 0
Thanks: 29
Thanked 3 Times in 3 Posts
Rep Power: 146
Yasemin Vatandas is on a distinguished road
Question time-based release of items

Hello,
I have a source and a queue connected to that.
On creation, every item is given a random "Release Date" and it's written to a label.
I want the items to enter the queue and then be released according to their release date.

In OnEntry-trigger of the queue, I gave a 'closeoutput()' command, so that items are blocked until their release time.
Then, I guess, I should use a simple 'if' statement like this:

Code:
 
if(getlabelnum(first(current),"ReleaseDate")==time);
openoutput(current);
But I don't know in which trigger to write this code.
Or should I follow another way?
What would be the best way to do it?

Thanks.
  #27  
Old 08-09-2008
Goksin Yilmaz's Avatar
Goksin Yilmaz Goksin Yilmaz is offline
Flexsim User
 
Join Date: Aug 2007
Location: ON, Canada
Posts: 21
Downloads: 11
Uploads: 0
Thanks: 23
Thanked 13 Times in 6 Posts
Rep Power: 213
Goksin Yilmaz is a jewel in the roughGoksin Yilmaz is a jewel in the roughGoksin Yilmaz is a jewel in the rough
Default RE: time-based release of items

Yasemin,

I don't think "openoutput" is the proper way to go in this scenario (it can be done, but a bit more work.) I think the better method is as follows:
  • In the "Flow" tab of the destination object, check "Pull" box under "Input".
  • "Pull from port" can stay as default: "Any port". (I assume you have only one port to pull from.)
  • "Pull Requirement" will be "Specific label". Use your label name and a condition such as "getlabelnum(item, [your label]<=time()".
  • LATEST: Check "Reevaluate Pull Requirement on ...." flag at the bottom.
If you would like to select the item with the smallest release date, it will be a bit more complicated, e.g. you will need to search through the list of waiting items and find the one with the smallest release date. One other option to make this easier might be to sort the items in your waiting queue according to [your label] at the entry.

I attach a sample model at the end. Please see the output console when the model is running to confirm it does what you have in mind.

I hope this helps.
Attached Files
File Type: zip Pull_Logic_Sample.zip (43.0 KB, 304 views)

Last edited by Goksin Yilmaz; 08-09-2008 at 02:51 PM. Reason: Added bullets and sample
The Following User Says Thank You to Goksin Yilmaz For This Useful Post:
Yasemin Vatandas (08-10-2008)
  #28  
Old 08-09-2008
Yasemin Vatandas's Avatar
Yasemin Vatandas Yasemin Vatandas is offline
Flexsim User
 
Join Date: Jul 2008
Location: Hamburg, Germany
Posts: 36
Downloads: 9
Uploads: 0
Thanks: 29
Thanked 3 Times in 3 Posts
Rep Power: 146
Yasemin Vatandas is on a distinguished road
Default

Thanks for the idea Goksin,
I tried the method but it doesn't seem to be working, at least I couldn't succeed so far
I wonder what I'm doing wrong.
  #29  
Old 08-09-2008
Goksin Yilmaz's Avatar
Goksin Yilmaz Goksin Yilmaz is offline
Flexsim User
 
Join Date: Aug 2007
Location: ON, Canada
Posts: 21
Downloads: 11
Uploads: 0
Thanks: 23
Thanked 13 Times in 6 Posts
Rep Power: 213
Goksin Yilmaz is a jewel in the roughGoksin Yilmaz is a jewel in the roughGoksin Yilmaz is a jewel in the rough
Default RE: time-based release of items

Yasemin,

I added a bullet point and a sample model to my suggestion.

I hope this helps. Any questions, please let me know.
  #30  
Old 08-10-2008
Yasemin Vatandas's Avatar
Yasemin Vatandas Yasemin Vatandas is offline
Flexsim User
 
Join Date: Jul 2008
Location: Hamburg, Germany
Posts: 36
Downloads: 9
Uploads: 0
Thanks: 29
Thanked 3 Times in 3 Posts
Rep Power: 146
Yasemin Vatandas is on a distinguished road
Default

Goksin,
thanks for the sample model.
It works properly, however, the processor doesn't pull any item from the queue until a new one enters it or the processor finishes processing an item.
Of course you would be right by saying that this is due to the characteristic of discrete-event simulation, but I'm still curious about if there is a way of overcoming this problem.
(In my model, items need to be released to the queue periodically, say every 300 time units. Because of this discontiunity problem, items of a previous period are released to the processor only at the beginning of the next period, which results in huge piles.)

How about creating a user-event, which will check the pull requirement for the processor in very short intervals like 0.01 time units? (I tried this way also, but didn't work. Perhaps my code was incorrect, I don't know)

Or is tolerating the deviation in release times the only way? If so, then I'll use your method, thanks.

Last edited by Yasemin Vatandas; 08-10-2008 at 06:26 AM.
  #31  
Old 08-10-2008
Lars-Olof Leven Lars-Olof Leven is offline
Flexsim Distributor
 
Join Date: Aug 2007
Location: Sweden, Borlnge
Posts: 312
Downloads: 278
Uploads: 2
Thanks: 300
Thanked 256 Times in 139 Posts
Rep Power: 330
Lars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to behold
Default

Yasemin,

Here you have a different approach to release an item at a specific time.

All the logic is on the queue.
  • On the queue I set Flow to Do Not Release Item.
  • OnEntry I use a senddelayedmessage to tell when in the future the item entering the queue should be released. On the senddelayedmessage I use the item as a reference as the sending object.
  • OnMessage trigger I release the item.
Do need more explanation, let me know.

Lars-Olof
Attached Files
File Type: zip Time Based Release.zip (39.1 KB, 297 views)
The Following 4 Users Say Thank You to Lars-Olof Leven For This Useful Post:
Yasemin Vatandas (08-10-2008)
  #32  
Old 08-10-2008
Goksin Yilmaz's Avatar
Goksin Yilmaz Goksin Yilmaz is offline
Flexsim User
 
Join Date: Aug 2007
Location: ON, Canada
Posts: 21
Downloads: 11
Uploads: 0
Thanks: 23
Thanked 13 Times in 6 Posts
Rep Power: 213
Goksin Yilmaz is a jewel in the roughGoksin Yilmaz is a jewel in the roughGoksin Yilmaz is a jewel in the rough
Default "Releaseitem"

Yasemin,

Most probably this is almost the same as Lars-Olof's approach (I have not looked at his model yet,) but following your suggestion, I used a user-event to release flowitems to another buffer before the processor in pre-determined time intervals (every 50 minutes.)

I hope this fulfills your requirement.

Good luck, GY
Attached Files
File Type: zip releaseitem_Sample.zip (44.3 KB, 287 views)
The Following 2 Users Say Thank You to Goksin Yilmaz For This Useful Post:
Yasemin Vatandas (08-10-2008)
  #33  
Old 08-10-2008
Yasemin Vatandas's Avatar
Yasemin Vatandas Yasemin Vatandas is offline
Flexsim User
 
Join Date: Jul 2008
Location: Hamburg, Germany
Posts: 36
Downloads: 9
Uploads: 0
Thanks: 29
Thanked 3 Times in 3 Posts
Rep Power: 146
Yasemin Vatandas is on a distinguished road
Default

Lars-Olof, your model works just the way as I want, thanks. You also provided me with a good example of how to use sendmessage and senddelayedmessage, which I've been confused about.

Goksin, when I changed 'repeat event time' to 0.01 and delete the second buffer before the processor in your model, it worked also the way I'd like it to. The code has been of much help, since I've been trying to write a similar code but couldn't succeed so far.

I learned so much today, thanks a lot to both of you.
The Following User Says Thank You to Yasemin Vatandas For This Useful Post:
Lars-Olof Leven (08-11-2008)
  #34  
Old 08-11-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

Yasemin, Goksin,

Rather than havinga user event every .01 time units you would be better off to send a delayed message to happen at the time that you want the flowitem to be released. In the message if you closeoutput and then openoutput of the queue this will cause the pull requirements to fire on the down stream objects if the Reevaluate pull requirement box is checked on the down stream objects.

Good Luck,
Brandon
__________________
thats not normal.
The Following User Says Thank You to Brandon Peterson For This Useful Post:
Yasemin Vatandas (08-11-2008)
  #35  
Old 08-11-2008
Yasemin Vatandas's Avatar
Yasemin Vatandas Yasemin Vatandas is offline
Flexsim User
 
Join Date: Jul 2008
Location: Hamburg, Germany
Posts: 36
Downloads: 9
Uploads: 0
Thanks: 29
Thanked 3 Times in 3 Posts
Rep Power: 146
Yasemin Vatandas is on a distinguished road
Default

Thanks Brandon, I think your suggestion is very similar to that of Lars-Olof.
Which one do you think would be more efficient to use in terms of computational efforts: Incorporating also the processor and evoking the pull requirement as you've mentioned, or just using a "releaseitem" command in the OnMessage-trigger of the Queue, like Lars-Olof did?
  #36  
Old 08-11-2008
Phil BoBo's Avatar
Phil BoBo Phil BoBo is offline
Flexsim Development
 
Join Date: Jan 2008
Posts: 756
Downloads: 109
Uploads: 18
Thanks: 385
Thanked 1,483 Times in 525 Posts
Rep Power: 1174
Phil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond repute
Default

Lars-Olof's suggestion is significantly more efficient than using a Pull Requirement.
The Following User Says Thank You to Phil BoBo For This Useful Post:
Yasemin Vatandas (08-11-2008)
  #37  
Old 08-22-2008
Yasemin Vatandas's Avatar
Yasemin Vatandas Yasemin Vatandas is offline
Flexsim User
 
Join Date: Jul 2008
Location: Hamburg, Germany
Posts: 36
Downloads: 9
Uploads: 0
Thanks: 29
Thanked 3 Times in 3 Posts
Rep Power: 146
Yasemin Vatandas is on a distinguished road
Question Global TS & TS-Priority

Hello all,

I have created two global TS's and dispatched them to a single operator.
I have given one of the TS's the priority 1, with the aim of dispatching that TS to the operator at the first place, in case he's available for both TS's.
However,the operator seems to ignore that priority value and executes only that TS, which has no priority over the other one.
How can I solve this problem?
Thanks in advance.
  #38  
Old 08-23-2008
RalfGruber's Avatar
RalfGruber RalfGruber is offline
FlexSim Software Products
 
Join Date: Jul 2007
Location: Orem, UT, USA
Posts: 195
Downloads: 37
Uploads: 0
Thanks: 518
Thanked 294 Times in 124 Posts
Rep Power: 345
RalfGruber is a splendid one to beholdRalfGruber is a splendid one to beholdRalfGruber is a splendid one to beholdRalfGruber is a splendid one to beholdRalfGruber is a splendid one to beholdRalfGruber is a splendid one to beholdRalfGruber is a splendid one to behold
Default

Hi Yasemin,

if the operator doesn´t have an acitve TS to do he is waiting for the first one to come and starts immidiately to work on this. Priority is only used to evaluate all the TS in the TS queue. If there are more than one TS in the TS queue than the priority value will be used to evaluate which one to execute next.
When you created the two global TS the one you dispatched first will be executed immidiately. I think a proper way to control evaluation order will be to create the TS in priority order, highest priorit first. How to do this depends on how your model is structured.

If you attach your model, you might get a more visible answer

Ralf
aka Ralle
The Following 2 Users Say Thank You to RalfGruber For This Useful Post:
Yasemin Vatandas (08-23-2008)
  #39  
Old 08-23-2008
Yasemin Vatandas's Avatar
Yasemin Vatandas Yasemin Vatandas is offline
Flexsim User
 
Join Date: Jul 2008
Location: Hamburg, Germany
Posts: 36
Downloads: 9
Uploads: 0
Thanks: 29
Thanked 3 Times in 3 Posts
Rep Power: 146
Yasemin Vatandas is on a distinguished road
Default

Ralf,
thank you for the useful information. I'll keep that in mind.
Actually, I've just tried using standard TS's instead of global TS, and that has solved my problem (for now).

Coming to your solution approach:
Since I used the TS-Builder in the tools menu for creating global TS, I don't know how I could have created them in priority order. That's something I should definitely learn. Why I use TS-Builder is that I am just not sure where to write the code for creating global TS's.

I'll send my model if a similar problem arises again, which is for sure
  #40  
Old 08-30-2008
Lin Jincong Lin Jincong is offline
Flexsim User
 
Join Date: Jul 2008
Posts: 7
Downloads: 15
Uploads: 0
Thanks: 7
Thanked 5 Times in 4 Posts
Rep Power: 0
Lin Jincong is on a distinguished road
Default

Hi, I’m using a rack converted to floor storage which is linked to a queue; my ideal flow is like this:
1)Source generates item which is placed in rack
2)Item is to stay in rack for some time (used dwell time for this)
3)Item is batched in quantities of 5 before being sent to the queue
My question is how do I make the rack batch my items while using dwell time as well? I’ve tried using batched processing but could not figure out how to get it working. I’ve considered using a queue as well as it has that batching option but it doesn’t have the dwell time function.
Attached Files
File Type: zip rack.zip (38.5 KB, 269 views)


Thread Thread Starter Forum Replies Last Post
Can coordinated task sequence and "break to requirement" be used together? qin tian Q&A 1 05-26-2008 10:44 AM
error message "Clock overflow, running stopped" Martin Kooijman Q&A 11 04-17-2008 10:29 AM
about "no select" and "show parameter window from side bar" qin tian Gripes and Goodies 3 03-21-2008 08:10 AM
Which variable stores "Properties -> General ->Flags -> Protected" information? KelvinHo Q&A 1 03-06-2008 06:18 AM
"Getting Started" and "Tutorial" models for v4.01 Cliff King Product Announcements 0 12-10-2007 07:34 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.