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 |
#21
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
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); Or should I follow another way? What would be the best way to do it? Thanks. |
#27
|
||||
|
||||
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:
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. 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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
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
|
|||
|
|||
Yasemin,
Here you have a different approach to release an item at a specific time. All the logic is on the queue.
Lars-Olof |
The Following 4 Users Say Thank You to Lars-Olof Leven For This Useful Post: | ||
Yasemin Vatandas (08-10-2008) |
#32
|
||||
|
||||
"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 |
The Following 2 Users Say Thank You to Goksin Yilmaz For This Useful Post: | ||
Yasemin Vatandas (08-10-2008) |
#33
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
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
|
|||
|
|||
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. |
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 |