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 |
#1
|
||||
|
||||
Automated runs / Exporting mdb file..
Hi there,
I have to do a couple of runs with a model. So I load an Excel-Parameterfile at the start of each Scenario. Now I need to export the results to a mdb File so I can analyse the results with the Flexsim Charts. I found a undocumented command exportfullhistory() which is working but I don´t know how to automate the saving process. Each time I call exportfullhistory, I have to give a filename. How can I pass the filename automaticly? Another question is how to compare the results of two or more runs. I can have serveral instances of the Flexchart, but if I want to put a result graph of run1 and run2 in one diagram, I have to export the graphs to excel and link them there. Is there a more easy solution for this?
__________________
kind regards Nico. Last edited by Nico Zahn; 11-28-2007 at 04:35 AM. |
#2
|
||||
|
||||
Nico,
You're trying to record the results of each of his scenarios to a database for Flexsim Chart to read. Right now there's no way to automate that the way you want. That functionality should exist in the next release.
__________________
Jeff Flexsim Support |
#3
|
||||
|
||||
Hi Jeff,
so I have to save the states in the end of each scenario. Maybe write some custom code to export some of the results to excel.... Is there any way to comapre two runs with the flexsimchart tool?
__________________
kind regards Nico. |
#4
|
||||
|
||||
Saving states at the end of scenario
So if you wan´t to save the states in the end of a scenarie there has to be a 'expiriment' folder in the program directory. Otherwise the states don´t get saved. This should be added to the documentation, or the folder should be automaticly created when Flexsim installs.
__________________
kind regards Nico. |
#5
|
||||
|
||||
The event database is not saved with the state
So I just recognized that I can not let Flexsim save the state at the end of each scenary, open the states and look at the Chart in the Flexsim Chart Tool. I guess the event times are not saved with the states.
__________________
kind regards Nico. |
#6
|
||||
|
||||
Quote:
Quote:
Last edited by Anthony Johnson; 11-29-2007 at 10:58 AM. |
The Following User Says Thank You to Anthony Johnson For This Useful Post: | ||
Brandon Peterson (10-08-2009) |
#7
|
||||
|
||||
Just talked to AJ, and he says that in the next version the exportfullhistory command will have an optional parameter where you can pass in the path to the mdb file that you want to save.
|
#8
|
||||
|
||||
Quote:
Last edited by Anthony Johnson; 11-29-2007 at 11:09 AM. |
#9
|
||||
|
||||
I am glad that Nico brings up this issue. I have noticed the problem for a while. Since I am using the experimenter a lot, being able to output full history of a simulation after each replications for a post analysis would benefit me and others a lot. Is this going to happen in the Flexsim v4.1?
Alan
__________________
Best, Alan |
#10
|
||||
|
||||
So the only way I could set up a lot of runs automated was for me to have a input-excelfile and a output one.
The output-file is predefined with diagramms so I can save a lot work in the analysing. When you want to read a excelfile at the start of each scenario and write one in the end you have to call a 'excellaunch' on the 'Start of experiment' trigger and a 'excel quit' on the 'end of experiment' trigger, otherwise you get some OLE - errors. Excel stays open during the runs. In this way I have correlating input and output files. Also setting up the export code and input files is some work, I can use the cpu the whole night without hanging around...
__________________
kind regards Nico. |
#11
|
||||
|
||||
I spend quite a while trying it but the OLE interface is not stable enough for importing a parameter list and exporting a result file with Excel. I could manage some 20 scenarios each with one import at the start an one export at the end of a scenario run. On scenario 21 I found myself in the land of the happy Megabugs. All the nice things like 'Invalid node remove command' , 'Byte Block allocation failed' and OLE errors appeard. The Excelfile seemed to be mixed up with the importfile and the result file. So I guess it is the interface which is not working properly. I varied the parameter now in the experimenter inside Flexsim and only exported the result file and this worked, but if you have a big list of parameters you want to change through the scenarios this is not the appropriate method to do this. So please think in the next release about how a user could automate a lot of runs automated...At least try to get the OLE interface more stable...
__________________
kind regards Nico. |
#12
|
||||
|
||||
OLE instability
Nico,
Can you provide a small model that demonstrates the OLE instability that you're describing? The OLE interface can be fairly picky about how and when certain commands are called. I would be happy to look over your code and see if there's a way to make it more stable and usable. |
#13
|
||||
|
||||
Hi AJ,
I am sorry, I tried to build a small modell and had some 90 runs and it worked. I am not shure by now what caused this errors, but in the big model it doesn´t work. So I need some more time to let the trial modell use the im- and export more excessivly (when I find time). As I hearded you take care of the Chart Tool. So did you regognize that the warm up time is not taken out of the percentage values in the charts?
__________________
kind regards Nico. |
#14
|
||||
|
||||
Nico,
AJ can post his own reply, but I have a feeling that he will concur with my opinion that, since you have the ability to specify a time range for generating a state chart, there is no need to leave the warm-up time out of it by default. Perhaps we could provide an automatic selection for "time after warm-up", but I don't think there is anything "incorrect" in the way it's done right now. The state report takes the warm-up time out, and you have the ability to do that in the state charts by specifying a time range, so I don't see it as an "error", just an "ease-of-use" feature that could be added in the future. |
#15
|
||||
|
||||
Anthony's right. Automatically removing warm-up time is something we can add to Flexsim Chart in the future, but for now use the time range feature in Flexsim Chart to limit the amount of time that the report covers.
|