Search found 36 matches

by arraywanted
Tue Nov 23, 2010 9:06 am
Forum: Vensim
Topic: Call vensim
Replies: 91
Views: 52428

Thank you very much, Bob - your hint pointed in the right direction: It made me check the function signatures of the library again, and - I have no idea why, maybe someone updated Vensim - they have changed. Previously, the function vensim_command e.g. needed the matlab type VoidPtr as input argumen...
by arraywanted
Wed Nov 17, 2010 4:39 pm
Forum: Vensim
Topic: Call vensim
Replies: 91
Views: 52428

No, Matlab has not been upgraded.

I can't imagine why the strings being passed would not be valid any more, since I did not change the subroutine I use to load models in any way. But I'll take a look at that, thank you.

I'd still appreciate other ideas, though... this is really important.
by arraywanted
Wed Nov 17, 2010 11:39 am
Forum: Vensim
Topic: Call vensim
Replies: 91
Views: 52428

There is a file named 'vensimdll.err'. Is that the same as vendll.err?
This file contains the following:

Vensim® DLL(Full) version 5.9e error log starting Wed Nov 17 12:27:15 2010
ERROR: Class °‡ without command.
by arraywanted
Wed Nov 17, 2010 11:37 am
Forum: Vensim
Topic: Call vensim
Replies: 91
Views: 52428

I am back with a new problem. As you remeber, I managed to control Vensim via Matlab on a WinXP computer. Meanwhile, my intership came to an end, so I didn't work with Vensim for some time. Now I tried again to call Vensim from Matlab on the same computer - and it does not work anymore. I simply can...
by arraywanted
Mon Sep 27, 2010 7:59 am
Forum: Vensim
Topic: vensim link matlab
Replies: 74
Views: 53168

I've never had these warning messages before. Have you checked which functions are contained in the library you loaded? You can do so with "libfunctionsview('vendll32')". My vendll32 does contain 'VensimCGetSubstring', but not vensim_shutdown. That one isn't even mentioned in the manual, s...
by arraywanted
Tue Sep 14, 2010 7:39 am
Forum: Vensim
Topic: Matlab revisited: Work with large model
Replies: 12
Views: 6080

I discovered something new: The model reads some data from excel files. I found out that I have to close all excel files before starting a new simulation from matlab, because otherwise the freezing happens. That's why it worked right after booting the system, because then the excel files were closed...
by arraywanted
Mon Sep 13, 2010 11:18 am
Forum: Vensim
Topic: Matlab revisited: Work with large model
Replies: 12
Views: 6080

If you open the windows task manager you may be able to track down what process is consuming the memory. The process consuming up to 99% of CPU is a process called "system idle process". (I don't know if that is the exact translation, in german it is "Leerlaufprozess".) What doe...
by arraywanted
Mon Sep 13, 2010 8:29 am
Forum: Vensim
Topic: Matlab revisited: Work with large model
Replies: 12
Views: 6080

Meanwhile, I'm not getting the "model cannot be simulated"-error anymore. The situation is: Directly after booting the computer calling vensim functions works just finde. But after a short time, everything slows down and it takes minutes just to retrieve one value. At some time matlab simp...
by arraywanted
Thu Sep 09, 2010 2:11 pm
Forum: Vensim
Topic: Matlab revisited: Work with large model
Replies: 12
Views: 6080

Yes, I am sure. It is the right model and all needed excel files are in the same directory. I should add that once or twice I was actually able to run a simulation. Other times I get the mentioned error. And sometimes (quite often) matlab simply freezes and does nothing, in which case I have to manu...
by arraywanted
Thu Sep 09, 2010 10:56 am
Forum: Vensim
Topic: Matlab revisited: Work with large model
Replies: 12
Views: 6080

Matlab revisited: Work with large model

I opened a new thread since the other one meanwhile covers different subjects. (For those who read my questions according Win7: I'm working with the WinXP-Computer again right now.) Loading models into matlab, setting and getting variables does work in general. However, when I try to work with a cer...
by arraywanted
Fri Sep 03, 2010 9:52 am
Forum: Vensim
Topic: Call vensim
Replies: 91
Views: 52428

The model is, and always was, located in Users\Username\Documents\MATLAB\Vensim.

Is there any attribute of the model I can check which could cause the failure? It is not write-protected.

[Edited on 9-3-2010 by arraywanted]
by arraywanted
Thu Sep 02, 2010 12:21 pm
Forum: Vensim
Topic: Call vensim
Replies: 91
Views: 52428

arraywanted - if LOADMODEL returns 0 it should put up an error dialog - if you set BEQUIET take that setting away. Otherwise see if you can find vendll.err as that may hold a clue. No, there is no dialog showing, LOADMODEL just returns 0 and that's it. I called venim_be_quiet(0) to be sure - that's...
by arraywanted
Wed Sep 01, 2010 9:55 am
Forum: Vensim
Topic: Call vensim
Replies: 91
Views: 52428

I don't know if that was clear: I'm not getting a matlab error this time, vensim_command(SPECIAL>LOADMODEL...) just always returns 0.

By the way, the windows 7-computer has also a 64bit operating system. Connection with my problem possible?
by arraywanted
Tue Aug 31, 2010 1:50 pm
Forum: Vensim
Topic: Call vensim
Replies: 91
Views: 52428

If I try other functions like vensim_check_status or start_simulation, it works. But I just can't load a model.

Please, can anyone help me? I'm getting a bit desperate.
by arraywanted
Tue Aug 31, 2010 9:42 am
Forum: Vensim
Topic: Call vensim
Replies: 91
Views: 52428

No, version 5.9e.
by arraywanted
Tue Aug 31, 2010 9:20 am
Forum: Vensim
Topic: Call vensim
Replies: 91
Views: 52428

No ideas? I am still stuck here and would be really grateful!
by arraywanted
Mon Aug 30, 2010 12:13 pm
Forum: Vensim
Topic: Call vensim
Replies: 91
Views: 52428

I also tried moving the files to another directory, but that didn't help.

I really have no clue what the problem is... anyone? :(
by arraywanted
Mon Aug 30, 2010 10:57 am
Forum: Vensim
Topic: Call vensim
Replies: 91
Views: 52428

I moved all files necessary to the MATLAB folder in Username\Documents, to be on the safe side. Doesn't work still. The vensim.err file contains errors, which I don't really understand: The model which I tried to load has been simulated several times from vensim before and the runs were saved under,...
by arraywanted
Mon Aug 30, 2010 7:44 am
Forum: Vensim
Topic: Call vensim
Replies: 91
Views: 52428

I have a new problem: I tried to call vensim from matlab on another computer, namely my notebook with win7 as operating system. Loading the library does work, but I cannot load any model although I use the exact same commands as on the other computer (which has win xp). Do you have any idea how to m...
by arraywanted
Thu Aug 26, 2010 10:53 am
Forum: Vensim
Topic: Call vensim
Replies: 91
Views: 52428

Thank you, it works with a loop. I haven't tried the option with the cin-file, but I probably will because with loops it is quite ugly.

Next question right away:
Is there any way to display the graph of a variable after a simulation when calling the vensim dll? Or is it impossible from the outside?
by arraywanted
Thu Aug 26, 2010 9:25 am
Forum: Vensim
Topic: Call vensim
Replies: 91
Views: 52428

Well of course, if you haven't managed to load the library, you won't be able to load a model. You will have to fix that first. Unfortunately, I don't understand the error message you posted in the other thread. Maybe one of the others does? I have a question myself: I want to set the value of a sub...
by arraywanted
Wed Aug 25, 2010 2:51 pm
Forum: Vensim
Topic: Call vensim
Replies: 91
Views: 52428

Did you solve the problem posted in the other thread? Here is a subroutine I wrote to load a model: ----------------------- function loadModel(modelName) % Loads a Vensim model specified by the string ModelName % The vendll32 library must have been loaded str=['SPECIAL>LOADMODEL|',ModelName,'.vpm'];...
by arraywanted
Wed Aug 25, 2010 9:06 am
Forum: Vensim
Topic: vensim link matlab
Replies: 74
Views: 53168

I think your header file (matrix.h) is the wrong one. You got that one from the example with the libmx library on the mathworks page, didn't you? That won't work for vensim. The correct header file is vendll.h, it can be found in the same folder as vendll32.lib. Now, if you navigate to that folder a...
by arraywanted
Wed Aug 25, 2010 7:22 am
Forum: Vensim
Topic: Call vensim
Replies: 91
Views: 52428

I finally found out how to pass string arguments to vensim. You have to use the libpointer function in matlab.

All of you, thank you very much for your help. I may have more questions later, though... :)
by arraywanted
Tue Aug 24, 2010 9:59 am
Forum: Vensim
Topic: Call vensim
Replies: 91
Views: 52428

vensim_command("SPECIAL>LOADMODEL|modelname.vpm")

Would that be correct, then?