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 02-16-2009
ankus d ankus d is offline
Flexsim User
 
Join Date: Jan 2009
Posts: 19
Downloads: 0
Uploads: 0
Thanks: 9
Thanked 0 Times in 0 Posts
Rep Power: 132
ankus d is on a distinguished road
Post User Event as Experimenter?

Hi All..

I am quite a newbie in Flexsim, so i often ask in this forum.
because, i want to explore my knowledge in Flexsim.

I have another problem to ask.
Suppose i have a simple model( source, queue, processor, sink);
I wanna know the effect of different processing time in term of output.

I know, i can deal this problem with experimenter, but it seem difficult to update experimenter with calculation.

So, here i am curious about user event.
I wanna build user event that can update variable (i.e processing time) through iteration in User event and write result of each iteration in global table.
(ex: for (h=0; h<=5; h++)
{
double test = h+4;
setvarnum("/processor3","value", test);
etc..
}

I want to use user event as experimenter in my model.
Is it possible?
Can share your knowledge to me...? can you give me example model?
Thanks in advance

Ankus
Attached Files
File Type: zip UserEvent01.zip (40.2 KB, 232 views)

Last edited by ankus d; 02-17-2009 at 02:22 AM.
Reply With Quote
  #2  
Old 02-17-2009
tobias.biemueller tobias.biemueller is offline
Flexsim User
 
Join Date: Aug 2007
Location: Bielefeld, Germany
Posts: 42
Downloads: 22
Uploads: 0
Thanks: 23
Thanked 18 Times in 16 Posts
Rep Power: 158
tobias.biemueller is on a distinguished road
Default

I dont know if i understand it right.. but i looked into your example..

Code:
int h;
for(h=1; h<=5; h++)
{
    double test = h + 4;
    setvarnum("/Processor3","value",test);
    if(time()==200)
    {
    settablenum("GlobalTable01",gettablerows("GlobalTable01"),1,h);
    settablenum("GlobalTable01",gettablerows("GlobalTable01"),2,getinput("/Sink4"));
    }
    reset();
    go();
}
I think that using a label instead of direct the setvarnum, in the processtime (if you want to change it) you refer to the label.
Another point is the time()==200, that mean that only if time (the simulationtime) is on 200 the if statement is executed.. The most important thing is, you fire this event on 0 and so the model run into nirvana..
At 0 the model will be reset and go and reset and go and reset and go etc.

I modified your model a little bit.. maybe it gives you some ideas.. (Version 4.5, hope you can handle it). Its not the best solution, but it work..

best regards
Tobias
Attached Files
File Type: zip UserEvent01_TB.zip (74.6 KB, 224 views)
Reply With Quote
The Following User Says Thank You to tobias.biemueller For This Useful Post:
ankus d (02-17-2009)
  #3  
Old 02-17-2009
ankus d ankus d is offline
Flexsim User
 
Join Date: Jan 2009
Posts: 19
Downloads: 0
Uploads: 0
Thanks: 9
Thanked 0 Times in 0 Posts
Rep Power: 132
ankus d is on a distinguished road
Default

Hi Tobias...

Thanks for your sharing. Your model as expected. Great !
So, there is no reason for not to press "Thanks Button".

Ankus
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
time event Donatus Minio Q&A 8 02-17-2009 01:12 PM
User Event firing - precision problems Shankar Narayan Q&A 6 02-16-2009 07:01 AM
Problem with user event Yasemin Vatandas Q&A 2 08-06-2008 02:49 AM
Experimenter User Guide davidubb Gripes and Goodies 1 06-03-2008 01:33 PM
question about User Event Ning Wang Q&A 3 04-22-2008 10:56 AM


All times are GMT -6. The time now is 07:57 AM.


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