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
FAQ Downloads Calendar Search Mark Forums Read

Q&A Using Flexsim and building models

Reply
 
Thread Tools Display Modes
  #1  
Old 08-04-2009
Alistair Smitheman Alistair Smitheman is offline
Flexsim User
 
Join Date: Aug 2007
Location: Nottingham, England
Posts: 43
Downloads: 6
Uploads: 0
Thanks: 21
Thanked 1 Time in 1 Post
Rep Power: 153
Alistair Smitheman is on a distinguished road
Default reservoir stops releasing

hi,
i've got a reservoir that releases an item that doesn't show as an outputed item and and inputed item on the downstream combiner. it is not the first item out of this reservoir or included in the first cycle on the combiner so it has node reason to stop outputting. it just dissappears from the reservoir at the correct point in time though.
the model was built in a previous version of flexsim but the parts of the model have been replaced with v4.52 parts (although the coding is still the same).
any ideas
__________________
How much can I get any with and still go to heaven?
Reply With Quote
  #2  
Old 08-04-2009
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: 1170
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

It would be much easier to figure out what is going on if we could see the model.
Reply With Quote
  #3  
Old 08-05-2009
Alistair Smitheman Alistair Smitheman is offline
Flexsim User
 
Join Date: Aug 2007
Location: Nottingham, England
Posts: 43
Downloads: 6
Uploads: 0
Thanks: 21
Thanked 1 Time in 1 Post
Rep Power: 153
Alistair Smitheman is on a distinguished road
Default

here is the model.

the model's problem is when the output of the reservoir "UNSS_Day_Bin" reaches 6293.
Attached Files
File Type: zip reservoir releasing problem.zip (61.6 KB, 208 views)
__________________
How much can I get any with and still go to heaven?
Reply With Quote
  #4  
Old 08-05-2009
Tom David's Avatar
Tom David Tom David is offline
Flexsim User
 
Join Date: Aug 2007
Location: Schwaebisch Gmuend, Germany
Posts: 430
Downloads: 157
Uploads: 47
Thanks: 486
Thanked 450 Times in 233 Posts
Rep Power: 516
Tom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant future
Default

I had a look into your model. Yes, at output 6293 it stops with the output because the Output of the object (closeoutput()) is closed. I can tell because of the little red square next to the output port.
If I do an
openoutput
(node("/UNSS_Day_Bin",model()))
in a Script window, it starts emtying again. So the object's output is closed.
I tried to figure out, where this happens and the only code I found which could do it is in the trigger OnFallThroughLowMark.
But because the Low Mark is defined 1000 this is strange.
I changed the Low Mark to 100 just to test it and it stops now at different output (6428), so it looks like that here is the issue.
I don't understand, what is going on, but here is the point to have a look.


__________________
tom the (A)tom: "We have solved our problems ... now we have to fight the solutions."
Reply With Quote
The Following User Says Thank You to Tom David For This Useful Post:
Alistair Smitheman (08-05-2009)
  #5  
Old 08-12-2009
Alistair Smitheman Alistair Smitheman is offline
Flexsim User
 
Join Date: Aug 2007
Location: Nottingham, England
Posts: 43
Downloads: 6
Uploads: 0
Thanks: 21
Thanked 1 Time in 1 Post
Rep Power: 153
Alistair Smitheman is on a distinguished road
Question further digging

I've done some digging on this issue around the reservoir and have found what looks like a more serious problem with the reservoir program itself.
When the program runs it fills and waits, once it begins to release items it does so correctly until gets to 4772 items released.
At this point the window for the reservoir shows that the content of the reservoir is 15228 but when the reservoir is opened up in the tree view it shows a content of 9990.83 which is incorrect (see screen dump).

Can anyone offer any advice, as I have imported new reservoirs and copied the code over several times times and even re-installed flexsim.
Attached Files
File Type: zip UNSS Day Bin Issue.fsm.zip (229.6 KB, 193 views)
__________________
How much can I get any with and still go to heaven?
Reply With Quote
  #6  
Old 08-12-2009
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: 486
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

Alistair,

I built a sample model with a source, reservoir, and sink. The source creates 20,000 flowitems at time zero and the reservoir has an incoming delay time of 0 so all 20,000 items enter the reservoir immediately. The outgoing delay time is 1. I have the same max content, high mark, middle mark, and low mark as you do in your model.

I could not duplicate your problem. This would suggest to me that you have something else going on in your model that is causing this issue.

In your model the actual content is correct. It is the curcontent variable that is getting off. It seems to be happening during the openoutputs event for the reservoir. However, it doesn't happen every time and seems to be somewhat random.

I would like to be able to narrow it down further for you but I don't have the time to go through your model that detailed. I am wondering though, why have you set your model up so that you have to compile? Is it a speed issue? Right now my guess is that there is code somewhere else in the model being executed when the flowitem leaves the reservoir, but I couldn't find anything on the combiner or reservoir.

Brandon
Attached Files
File Type: zip reservoir test.zip (61.3 KB, 194 views)
__________________
thats not normal.
Reply With Quote
The Following User Says Thank You to Brandon Peterson For This Useful Post:
Scott Mackay (10-08-2009)
  #7  
Old 08-12-2009
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: 486
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

Alistair,

Curiosity got the best of me and I looked into it further. In the library object of the Resource the on send has the following code:

double
contentamount= frgetvar(
item, 1);

I do not know what node (if any) this function is looking at and I can not find it. I did find the following code in the On Recieve of the library object:

frsetvar(
item, 1, v_unitsinitem);
v_curcontent+=v_unitsinitem;


Because the curcontent variable of the reservoir is correct at the end of the filling of the reservoir, this suggests that the value should be correct on the flow item.

So, it seems to me that the problem is occuring sometime after entry to the reservoir but before exit. Another interesting point is that when the value gets corrupted it seems to be corrupted with the last move time of the flow item.

Good Luck,
Brandon
__________________
thats not normal.
Reply With Quote
The Following User Says Thank You to Brandon Peterson For This Useful Post:
Scott Mackay (10-08-2009)
  #8  
Old 08-14-2009
Alistair Smitheman Alistair Smitheman is offline
Flexsim User
 
Join Date: Aug 2007
Location: Nottingham, England
Posts: 43
Downloads: 6
Uploads: 0
Thanks: 21
Thanked 1 Time in 1 Post
Rep Power: 153
Alistair Smitheman is on a distinguished road
Default

I have now been through the coding and I have found some answers but also more questions. The reservoir in questionis only referenced in the model by it's outobject and in this case the reference is a check on contents. However, if the problem could lay in the library code would this not affect all the reservoirs in the model and not just this one?

An Addition:
Going through the model, what ever occurs occurs at the event count of 3222562 as the reservoir in question releases 5.6 items instead of just 1.
__________________
How much can I get any with and still go to heaven?

Last edited by Alistair Smitheman; 08-14-2009 at 06:41 AM.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Releasing to a Combiner Alistair Smitheman Q&A 7 05-15-2009 04:04 AM
Problem holding, releasing, duplicate and destroy flowitems dynamically Sebastian Dransfeld Q&A 1 05-14-2008 09:08 AM


All times are GMT -6. The time now is 05:11 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.