Search found 23 matches

by mruud
Mon Jun 02, 2008 12:17 pm
Forum: Vensim
Topic: RESUME function problems
Replies: 1
Views: 2484

RESUME function problems

I have some problems with the RESUME function. I have a small test model called test.vpm witch runs under an application environment with no error messages. For the model there are a base dataset called test.vdf with data from time 0 to 4. I then run the folloving commands: SPECIAL>LOADMODEL|test.vp...
by mruud
Mon Jun 02, 2008 10:13 am
Forum: Vensim
Topic: vdi-file
Replies: 1
Views: 2481

vdi-file

What would be the VENAPPS command to load a vdi-file?
by mruud
Sun Apr 27, 2008 4:24 pm
Forum: Vensim
Topic: Writing data to database
Replies: 1
Views: 2605

Writing data to database

I have a model with defined vdi-file to read from a database, and a vdo-file to write to another database. When running the model from the Vensim environment it reads and writes as it is expected to do. I have written an application that controles the running of the model. When I run the model from ...
by mruud
Thu Feb 28, 2008 12:08 pm
Forum: Vensim
Topic: VDO syntax
Replies: 3
Views: 3126

In the DSS manual Chap 14, Action keywords it says: :INSERT tablename Output Only: Specifies that the values will be put to the database using an INSERT statement (as opposed to an UPDATE statement). The insert statement will take the form INSERT INTO tablename(field1,field2,field3…) VALUES(value1,v...
by mruud
Thu Feb 28, 2008 11:03 am
Forum: Vensim
Topic: VDO syntax
Replies: 3
Views: 3126

VDO syntax

Im struggeling with the vdo file syntax: I want to use the INSERT INTO tablename(field1,field2,field3…) VALUES(value1,valu2,value3…) to write data to a table. How would a complete vdo file look like vhen I have a modell variables var1 and var2 that should be written to a table called tabletest with ...
by mruud
Fri Feb 01, 2008 5:40 pm
Forum: Vensim
Topic: Using the vendll32.dll
Replies: 8
Views: 7224

Hi, The last information did put me on track :). There are probably better ways to do this but this PowerBuilder code did function: B=Blob("SPECIAL>LOADMODEL|C:\Data\MindLabAS\Prosjekter\AST\08Test\test3.vpm ",EncodingUTF8!) kom=string(B) result= vensim_command(kom) As you can see I also h...
by mruud
Thu Jan 31, 2008 8:21 pm
Forum: Vensim
Topic: Using the vendll32.dll
Replies: 8
Views: 7224

Hi
Tryed both without any luck :What can be the difference between VB sending this string and PB doing the same?
Morten

FUNCTION int vensim_command(REF string kommentar) LIBRARY "VENDLL32.DLL"

kom="SPECIAL>LOADMODEL|test3.vmf"
result= vensim_command(kom)
Messagebox(kom,result)
by mruud
Thu Jan 31, 2008 5:14 pm
Forum: Vensim
Topic: Using the vendll32.dll
Replies: 8
Views: 7224

Hi FUNCTION int vensim_command(string kom) LIBRARY "VENDLL32.DLL" FUNCTION int vensim_be_quiet(long quietflag) LIBRARY "VENDLL32.DLL" FUNCTION int vensim_get_info(int infowanted, string beskr, int lengde) LIBRARY "VENDLL32.DLL" FUNCTION int vensim_start_simulation(int l...
by mruud
Thu Jan 31, 2008 1:52 pm
Forum: Vensim
Topic: Data save and import
Replies: 2
Views: 2970

Perfect. Just what i needed. Thank you.
by mruud
Thu Jan 31, 2008 1:51 pm
Forum: Vensim
Topic: Using the vendll32.dll
Replies: 8
Views: 7224

Using the vendll32.dll

Hi, I have from time to time done some simple GUI programming for Vensim models using Visual Basic and VENDLL32.DLL. In other contexts I have been using a tool called PowerBuilder (from Sybase) for database application development. Today I did a simple experiment to see if it was possible to use Pow...
by mruud
Tue Jan 29, 2008 11:58 am
Forum: Vensim
Topic: Data save and import
Replies: 2
Views: 2970

Data save and import

On a daily basis I use a large model which is driven by external data. To run the model with the complete external data set takes a lot of time. The only change from day to day is an extension of the data set with data from the last 24-hour period. Are there any smart way to save all values, not onl...
by mruud
Fri Jan 11, 2008 1:16 pm
Forum: Vensim
Topic: Database import
Replies: 4
Views: 4366

Yes I have read and tryed the ex in chap 14, so my problem is to save more than one value at one time to the same table and row. Fine if you have a look on it. Thank you!
by mruud
Thu Jan 10, 2008 1:14 pm
Forum: Vensim
Topic: Database import
Replies: 4
Views: 4366

writing to database

I have some problems with the syntax for saving data to a database. T

I have the variables inflow_a, inflow_b, inflow_c in the model.
The values should be saved to a table hbv with the filelds day, in_a, in_b, in_c.

What would the syntax look like??
by mruud
Tue Jan 08, 2008 10:39 pm
Forum: Vensim
Topic: Database import
Replies: 4
Views: 4366

Database import

I'm trying to retrieving data from a database. Some of my data tables are
constructed with a column for date+time (datetime format) and a number of columns with data values. Are there any way to import data to vensim from this sort of table and using the date-time column as time in Vensim?
by mruud
Wed Feb 21, 2007 8:23 am
Forum: Vensim
Topic: Powersim arrays- Vensim subscripts?
Replies: 5
Views: 6842

My problem is probably related to how to use subscripts. I continuously getting an error message referring to balancing equations left and right side. I have attached a modified version of the tub-model….
by mruud
Tue Feb 20, 2007 10:48 am
Forum: Vensim
Topic: Powersim arrays- Vensim subscripts?
Replies: 5
Views: 6842

More subscripts

So far, so good. The next step is to have a bidirectional flow between the levels, and to control this flow with the gap between to levels. Se attached model sketch.
by mruud
Mon Feb 12, 2007 7:19 am
Forum: Vensim
Topic: Powersim arrays- Vensim subscripts?
Replies: 5
Views: 6842

Powersim arrays- Vensim subscripts?

I am working with transferring some old Powersim models to Vensim, and have run into a problem that I need some help with. The simplified version of the problem is: I have a model with an array of levels named Level and a array of rates named Rate. Between the levels there are flows going from Level...
by mruud
Fri Mar 26, 2004 4:01 pm
Forum: Vensim
Topic: String variable
Replies: 3
Views: 5908

No, I would like to read the string variable value from VB.
Morten
by mruud
Fri Mar 26, 2004 10:25 am
Forum: Vensim
Topic: String variable
Replies: 3
Views: 5908

String variable

I have a Vensim variable of string type. Is it possible to fetch the value of this variable from an external application?
Morten
by mruud
Wed Mar 24, 2004 1:02 pm
Forum: Vensim
Topic: Subscripts 2...
Replies: 2
Views: 4777

The simpel solution could be used here as well with a small adjustment. Se the attachment.
Morten
by mruud
Wed Mar 24, 2004 12:59 pm
Forum: Vensim
Topic: Subscripts..
Replies: 2
Views: 4819

This was just what I where looking for. Thank you!
Morten
by mruud
Wed Mar 24, 2004 10:14 am
Forum: Vensim
Topic: Subscripts 2...
Replies: 2
Views: 4777

Subscripts 2...

This question have also a more complicated version: If TypeValue has two dimensions (TypeValue[Type,Type]) and ObjectValue also have two dimensions (ObjectValue[Object,Object]), could I still manage to fill up ObjectValue[Object,Object] with values from TypeValue[Type,Type] based on the index in Obj...
by mruud
Wed Mar 24, 2004 10:13 am
Forum: Vensim
Topic: Subscripts..
Replies: 2
Views: 4819

Subscripts..

I have a model with two subscripts, Type and Object. Then I have a subscripted constant TypeValue[Type] and a subscripted constant ObjectType[Object]. The values in ObjectType shows back to the index of Typevalue. How can I fill up the auxiliary ObjectValue[Object] with values from TypeValue based o...