removing ~ and | from changes files
removing ~ and | from changes files
Hello everyone,
im trying to get an old model of ours back running. Whenever I use the old changes file (.cin), VenSim gives me an error at every point where "~~|" is in the file. If I remove it everything works fine, but I am worried that it might effect the outcome? What function did the symbols have and why do they cause an error now and did not in earlier versions?
The documentation states that " The format for .cin (Constant INput) files is much the same as that of Constant and Lookup equations, except that the tildes ~ and bars | are not needed." (https://www.vensim.com/documentation/in ... _files.htm). So I can remove it without effecting the output?
Thank you in advance
im trying to get an old model of ours back running. Whenever I use the old changes file (.cin), VenSim gives me an error at every point where "~~|" is in the file. If I remove it everything works fine, but I am worried that it might effect the outcome? What function did the symbols have and why do they cause an error now and did not in earlier versions?
The documentation states that " The format for .cin (Constant INput) files is much the same as that of Constant and Lookup equations, except that the tildes ~ and bars | are not needed." (https://www.vensim.com/documentation/in ... _files.htm). So I can remove it without effecting the output?
Thank you in advance
-
- Super Administrator
- Posts: 4626
- Joined: Wed Mar 05, 2003 3:10 am
Re: removing ~ and | from changes files
Model files usually have ~~|, not CIN files.
Open it in notepad and take a look, it's probably a model file.
Open it in notepad and take a look, it's probably a model file.
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: removing ~ and | from changes files
However, the documentation does permit ~ for comments in changes files, so the errors should not be ignored silently, I think. I'll take a look.
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Re: removing ~ and | from changes files
Well its one of the files I specify in "load changes from.." before i start the simulation. What would be the difference to a model file and how could I tell?
I mean the documentation states "The format for .cin (Constant INput) files is much the same as that of Constant and Lookup equations, except that the tildes ~ and bars | are not needed."
This is part of the .cin file I'm talking about:
"run number =65
~ ~ |
final time =73249
~ ~ |
Price Cap for Auction by year[B Reg, year] =25,
25.225,
25.453375,
25.685175625,
25.920453259375,
26.1592600582656,
26.4016489591396,
26.6476736935267,
26.8973887989296,
27.1508496309135,
27.4081123753772,
27.6692340610079,
27.934272571923,
~ ~ |"
So can I remove the tildes and waves without messing something up?
Thank you in advance
I mean the documentation states "The format for .cin (Constant INput) files is much the same as that of Constant and Lookup equations, except that the tildes ~ and bars | are not needed."
This is part of the .cin file I'm talking about:
"run number =65
~ ~ |
final time =73249
~ ~ |
Price Cap for Auction by year[B Reg, year] =25,
25.225,
25.453375,
25.685175625,
25.920453259375,
26.1592600582656,
26.4016489591396,
26.6476736935267,
26.8973887989296,
27.1508496309135,
27.4081123753772,
27.6692340610079,
27.934272571923,
~ ~ |"
So can I remove the tildes and waves without messing something up?
Thank you in advance
-
- Super Administrator
- Posts: 4626
- Joined: Wed Mar 05, 2003 3:10 am
Re: removing ~ and | from changes files
That definitely looks like a model file. So no, removing the ~ and | will probably not work.
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
-
- Super Administrator
- Posts: 4626
- Joined: Wed Mar 05, 2003 3:10 am
Re: removing ~ and | from changes files
You'll need to create a new CIN file. Please note, I don't know what the elements of the "year" subscript range are, so this is just a guess.
Code: Select all
run number =65
final time =73249
Price Cap for Auction by year[B Reg, year1] =25
Price Cap for Auction by year[B Reg, year2] =25.225
Price Cap for Auction by year[B Reg, year3] =25.453375
...
...
etc
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: removing ~ and | from changes files
Okey, so its a model file even though i load it in "load changes from..." ?
This is what happens when I try to run it WITH the waves and tildes:
"Reading changes from file data v65.cin
ERROR: Bad line 2 in file data v65.cin not recognized.
~ ~ |.
-^.
Line 2 of file data v65.cin.
ERROR: Bad line 5 in file data v65.cin not recognized.
~ ~ |.
-^.
Line 5 of file data v65.cin.
[...]
"
Removing the waves in tildes does work and the simulation is succesfull. Just wondering if it messes with my results.... Most of the inputs in the file are set up like
"Price Cap for Auction by year[B Reg, year] =25,
25.225,
25.453375,
25.685175625,
25.920453259375,
26.1592600582656,
26.4016489591396,
26.6476736935267,
26.8973887989296,
27.1508496309135,
27.4081123753772,
27.6692340610079,
27.934272571923,
~ ~ |"
So it would be a real pain to change all of them to the format you suggested. I am confused.
This is what happens when I try to run it WITH the waves and tildes:
"Reading changes from file data v65.cin
ERROR: Bad line 2 in file data v65.cin not recognized.
~ ~ |.
-^.
Line 2 of file data v65.cin.
ERROR: Bad line 5 in file data v65.cin not recognized.
~ ~ |.
-^.
Line 5 of file data v65.cin.
[...]
"
Removing the waves in tildes does work and the simulation is succesfull. Just wondering if it messes with my results.... Most of the inputs in the file are set up like
"Price Cap for Auction by year[B Reg, year] =25,
25.225,
25.453375,
25.685175625,
25.920453259375,
26.1592600582656,
26.4016489591396,
26.6476736935267,
26.8973887989296,
27.1508496309135,
27.4081123753772,
27.6692340610079,
27.934272571923,
~ ~ |"
So it would be a real pain to change all of them to the format you suggested. I am confused.
-
- Super Administrator
- Posts: 4626
- Joined: Wed Mar 05, 2003 3:10 am
Re: removing ~ and | from changes files
Look at the constants that are read in using the table tool to see if they have been read in ok.Removing the waves in tildes does work and the simulation is succesfull. Just wondering if it messes with my results
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: removing ~ and | from changes files
Alright, looks like it is read in right. I attached a screenshot so you can take a look. Looks like its working, doesnt it?
Thanks for your help!
Still dont understand the difference between a model file and a changes file if they are both read in through "load changes from..." and fulfill the same job? Or am i missing sth.?Thanks for your help!
-
- Super Administrator
- Posts: 4626
- Joined: Wed Mar 05, 2003 3:10 am
Re: removing ~ and | from changes files
A model file is never read in using the "Load changes from..." button. You load a model in Vensim using File->Open model. Someone has given you a model, and changed the extension from MDL to CIN. You'll need to ask the person who gave you these files why.Still dont understand the difference between a model file and a changes file if they are both read in through "load changes from..." and fulfill the same job? Or am i missing sth.?
The model file contains all the equations and sketch information that you usually see on screen when using Vensim. A CIN file contains constants that are used to initialise the various calculations in the model.
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: removing ~ and | from changes files
The obvious difference is that a model contains dynamic equations, whereas a .cin file is just constants.
It appear that this does actually work due to some old semi-documented syntax. You could probably suppress the warnings by just deleting the ~~|. Or, just ignore them.
It appear that this does actually work due to some old semi-documented syntax. You could probably suppress the warnings by just deleting the ~~|. Or, just ignore them.
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/