Varformat error 1071225242

Use this forum to post Vensim related questions.
Post Reply
pbreach
Member
Posts: 29
Joined: Mon Oct 26, 2015 5:23 pm
Vensim version: DSS

Varformat error 1071225242

Post by pbreach »

I get this error when I try to open a particular model with Vensim. This only started happening after I copy and pasted in components from a separate model that I was working on in a different file. After trying to open the model and getting the error a few times in a row, I opened Vensim first and tried loading in the file from there. I got a message that said to back up the model then use reform and clean. I tried this and am still getting the same error.

Do you have any suggestions on where to go from here? I've attached the .mdl file as well.
Attachments
Global_model_adjusted.mdl
(608.25 KiB) Downloaded 192 times
pbreach
Member
Posts: 29
Joined: Mon Oct 26, 2015 5:23 pm
Vensim version: DSS

Re: Varformat error 1071225242

Post by pbreach »

Here is version information if needed as well:

Windows-10-10.0.17763-SP0
Vensim DSS for Windows Version 6.4c (x32)
tomfid
Administrator
Posts: 3804
Joined: Wed May 24, 2006 4:54 am

Re: Varformat error 1071225242

Post by tomfid »

Do you have an earlier, working version we can compare?
tomfid
Administrator
Posts: 3804
Joined: Wed May 24, 2006 4:54 am

Re: Varformat error 1071225242

Post by tomfid »

I can open the model using File>Edit File to bring it into the text editor. There seem to be a lot of subscript errors:

Code: Select all

ERROR:       Unspecified subscript equation for - j10.    
ERROR:       Unspecified subscript equation for - j11.    
ERROR:       Unspecified subscript equation for - j12.    
ERROR:       Unspecified subscript equation for - j7.    
ERROR:       Unspecified subscript equation for - j8.    
ERROR:       Unspecified subscript equation for - j9.    
ERROR:       Unspecified subscript equation for - N.    
ERROR:       Unspecified subscript equation for - P.    
ERROR:       -C- is used as but not defined as a Subscript Range.    
ERROR:       Subscript 3 of variable -F- is a member of the -P-.    
             family when it should be a member of the -N- family.    
ERROR:       -C- is used as but not defined as a Subscript Range.    
ERROR:       Subscript 2 of variable -Init- is a member of the -N-.    
             family when it should be a member of the -P- family.    
ERROR:       -C- is used as but not defined as a Subscript Range.    
ERROR:       Subscript 3 of variable -rc- is a member of the -P-.    
             family when it should be a member of the -N- family.    
ERROR:       -C- is used as but not defined as a Subscript Range.    
ERROR:       Incorrect number of subscripts for -Init-.    
ERROR:       Incorrect number of subscripts for -rc-.    
ERROR:       Incorrect number of subscripts for -rc-.    
ERROR:       Incorrect number of subscripts for -F-.    
ERROR:       Incorrect number of subscripts for -F-.    
ERROR:       Incorrect number of subscripts for -F-.    
ERROR:       Incorrect number of subscripts for -F-.    
ERROR:       Incorrect number of subscripts for -rc-.    
ERROR:       Incorrect number of subscripts for -rc-.    
ERROR:       -C- is used as but not defined as a Subscript Range.    
ERROR:       Incorrect number of subscripts for -F-.    
ERROR:       Incorrect number of subscripts for -F-.    
ERROR:       -C- is used as but not defined as a Subscript Range.    
ERROR:       Incorrect number of subscripts for -F-.    
ERROR:       Incorrect number of subscripts for -F-.    
ERROR:       -C- is used as but not defined as a Subscript Range.    
ERROR:       Incorrect number of subscripts for -Init-.    
ERROR:       Incorrect number of subscripts for -Init-.    
ERROR:       Incorrect number of subscripts for -Init-.    
ERROR:       Incorrect number of subscripts for -F-.    
ERROR:       -C- is used as but not defined as a Subscript Range.    
ERROR:       -C- is used as but not defined as a Subscript Range.    
ERROR:       Incorrect number of subscripts for -rc-.    
ERROR:       -C- is used as but not defined as a Subscript Range.    
ERROR:       Incorrect number of subscripts for -Init-.    
ERROR:       Incorrect number of subscripts for -Init-.    
ERROR:       -C- is used as but not defined as a Subscript Range.    
ERROR:       Incorrect number of subscripts for -Init-.    
ERROR:       Incorrect number of subscripts for -Init-.    
ERROR:       -C- is used as but not defined as a Subscript Range.    
ERROR:       Incorrect number of subscripts for -rc-.    
ERROR:       Incorrect number of subscripts for -rc-.    
ERROR:       -C- is used as but not defined as a Subscript Range.    
ERROR:       Incorrect number of subscripts for -rc-.    
ERROR:       Incorrect number of subscripts for -rc-.    
ERROR:       -C- is used as but not defined as a Subscript Range.    
ERROR:       -C- is used as but not defined as a Subscript Range.    
ERROR:       Incorrect number of subscripts for -Init-.    
ERROR:       Incorrect number of subscripts for -Init-.    
ERROR:       Incorrect number of subscripts for -rc-.    
ERROR:       Incorrect number of subscripts for -rc-.    
ERROR:       Incorrect number of subscripts for -rc-.    
ERROR:       Incorrect number of subscripts for -rc-.    
ERROR:       -C- is used as but not defined as a Subscript Range.    
ERROR:       -C- is used as but not defined as a Subscript Range.    
ERROR:       -C- is used as but not defined as a Subscript Range.    
ERROR:       Incorrect number of subscripts for -F-.    
ERROR:       Incorrect number of subscripts for -F-.    
ERROR:       Incorrect number of subscripts for -F-.    
ERROR:       Incorrect number of subscripts for -F-.    
ERROR:       Incorrect number of subscripts for -F-.    
ERROR:       Incorrect number of subscripts for -F-.    
ERROR:       Incorrect number of subscripts for -F-.    
ERROR:       -C- is used as but not defined as a Subscript Range.    
ERROR:       Incorrect number of subscripts for -rc-.    
ERROR:       Incorrect number of subscripts for -rc-.    
ERROR:       -C- is used as but not defined as a Subscript Range.    
ERROR:       -C- is used as but not defined as a Subscript Range.    
ERROR:       Incorrect number of subscripts for -Init-.    
ERROR:       Incorrect number of subscripts for -Init-.    
ERROR:       Incorrect number of subscripts for -F-.    
ERROR:       -C- is used as but not defined as a Subscript Range.    
ERROR:       -C- is used as but not defined as a Subscript Range.    
ERROR:       Incorrect number of subscripts for -Init-.    
ERROR:       Incorrect number of subscripts for -Init-.    
ERROR:       -C- is used as but not defined as a Subscript Range.    
ERROR:       Incorrect number of subscripts for -Init-.    
ERROR:       Incorrect number of subscripts for -Init-.    
ERROR:       Incorrect number of subscripts for -rc-.    
ERROR:       -C- is used as but not defined as a Subscript Range.    
ERROR:       Incorrect number of subscripts for -Init-.    
ERROR:       Incorrect number of subscripts for -Init-.    
ERROR:       -C- is used as but not defined as a Subscript Range.    
ERROR:       Incorrect number of subscripts for -Init-.    
ERROR:       Incorrect number of subscripts for -F-.    
ERROR:       -C- is used as but not defined as a Subscript Range.    
ERROR:       -C- is used as but not defined as a Subscript Range.    
ERROR:       Incorrect number of subscripts for -rc-.    
ERROR:       Incorrect number of subscripts for -rc-.    
ERROR:       Incorrect number of subscripts for -rc-.    
ERROR:       -C- is used as but not defined as a Subscript Range.    
ERROR:       -C- is used as but not defined as a Subscript Range.    
ERROR:       -C- is used as but not defined as a Subscript Range.    
ERROR:       Incorrect number of subscripts for -F-.    
ERROR:       Incorrect number of subscripts for -F-.    
ERROR:       Incorrect number of subscripts for -F-.    
ERROR:       Incorrect number of subscripts for -F-.    
ERROR:       Incorrect number of subscripts for -F-.    
ERROR:       Incorrect number of subscripts for -F-.    
ERROR:       Incorrect number of subscripts for -F-.    
ERROR:       Incorrect number of subscripts for -rc-.    
ERROR:       Incorrect number of subscripts for -rc-.    
ERROR:       Incorrect number of subscripts for -rc-.    
ERROR:       -C- is used as but not defined as a Subscript Range.    
ERROR:       -C- is used as but not defined as a Subscript Range.    
ERROR:       Incorrect number of subscripts for -rc-.    
ERROR:       Incorrect number of subscripts for -rc-.    
ERROR:       -C- is used as but not defined as a Subscript Range.    
ERROR:       Incorrect number of subscripts for -rc-.    
ERROR:       Incorrect number of subscripts for -rc-.    
ERROR:       -C- is used as but not defined as a Subscript Range.    
ERROR:       Incorrect number of subscripts for -rc-.    
ERROR:       Incorrect number of subscripts for -rc-.    
ERROR:       -C- is used as but not defined as a Subscript Range.    
ERROR:       Incorrect number of subscripts for -Init-.    
ERROR:       Incorrect number of subscripts for -Init-.    
ERROR:       -C- is used as but not defined as a Subscript Range.    
ERROR:       Incorrect number of subscripts for -rc-.    
ERROR:       Incorrect number of subscripts for -rc-.    
ERROR:       -C- is used as but not defined as a Subscript Range.    
ERROR:       Incorrect number of subscripts for -rc-.    
ERROR:       Incorrect number of subscripts for -rc-.    
ERROR:       ... further error messages suppressed ....    
pbreach
Member
Posts: 29
Joined: Mon Oct 26, 2015 5:23 pm
Vensim version: DSS

Re: Varformat error 1071225242

Post by pbreach »

That is actually very helpful seeing these errors. I tried doing this (File>Edit file...) but Vensim crashes before I can get there. My guess is that I have to add in the subscripts that were used in the previous model before pasting it in?

The attachment "BIOGEOCHEM.mdl" is the one that I am trying to paste into the other attachment "Global_model.mdl". "Global_model.mdl" doesn't actually run yet (in the process of having a model sector being gutted).
Attachments
Global_model.mdl
(550.03 KiB) Downloaded 180 times
BIOGEOCHEM.mdl
(52.97 KiB) Downloaded 179 times
tomfid
Administrator
Posts: 3804
Joined: Wed May 24, 2006 4:54 am

Re: Varformat error 1071225242

Post by tomfid »

When you paste across models, Vensim generally tries to bring the needed subscript families along. However, if there are overlapping names of elements, ranges or subranges, this may cause a conflict. I think that might be what's happened here. When I look at the subscript control in my copy (in 7.3.5), it's clearly confused - it thinks the Bottom5 layers are part of the C range, and I don't see a definition for C.

7.x probably works better in edit mode; 6.4 is fairly old. But it's still possible to crash it if you simply open the model. We'll look into that.
tomfid
Administrator
Posts: 3804
Joined: Wed May 24, 2006 4:54 am

Re: Varformat error 1071225242

Post by tomfid »

I think part of the problem may be that you have j and k ranges in both models, presumably with different ranges and interpretations. Since the biogeochem model is simpler, I'd rename all the ranges, subranges and elements there before doing the copy/paste.

In any case, i, j, k etc. would usually be better if replaced by descriptive names, at least for the range if not the elements.
https://metasd.com/2019/03/towards-prin ... ng-models/
pbreach
Member
Posts: 29
Joined: Mon Oct 26, 2015 5:23 pm
Vensim version: DSS

Re: Varformat error 1071225242

Post by pbreach »

After renaming the subscripts i, j, and k to source, sink, and element (as well as their subscript elements), I pasted BIOGEOCHEM.mdl into Global_model.mdl (attached).

After checking the subscript control window there doesn't seem to be any conflicts and the subscripts from the pasted model seem to be recognized except for the newly renamed subscript from "k" to "element". If I save the model and re-open I get the same error.

I'm hoping that this resolved a good chunk of the errors from the readout you posted earlier but it seems like there might still be more. Would it be possible to check again with the attached file? I still get a crash when trying File>Edit file

Thanks for all of your help on this.
Attachments
Global_model_BIOGEOCHEM1.mdl
(603.11 KiB) Downloaded 186 times
tomfid
Administrator
Posts: 3804
Joined: Wed May 24, 2006 4:54 am

Re: Varformat error 1071225242

Post by tomfid »

Was the modified BIOGEOCHEM model runnable before you attempted the paste? It appears that it uses a lot of individual subscript elements in the equations, so it would be nontrivial to rename the elements.
pbreach
Member
Posts: 29
Joined: Mon Oct 26, 2015 5:23 pm
Vensim version: DSS

Re: Varformat error 1071225242

Post by pbreach »

Yes it was runnable. I didn't mention this part but the equations weren't modified by Vensim after changing the subscript names. I had to open the .mdl file in a text editor to find and replace the subscript element names using a regex. The BIOGEOCHEM model runs from start to finish (had to make a small change from the file I sent before. One of the constants was misplaced and resulted in an overflow on the first time step but replacing the subscript elements did work).
Attachments
BIOGEOCHEM.mdl
(59.2 KiB) Downloaded 177 times
tomfid
Administrator
Posts: 3804
Joined: Wed May 24, 2006 4:54 am

Re: Varformat error 1071225242

Post by tomfid »

Global_model-mod+biogeochem.mdl
(602.96 KiB) Downloaded 227 times
This is a working merger (it parses and runs, but crashes with an fp error pretty quickly). I had to modify the equations differently - modifying the host global model's j and k ranges rather than the biogeochem model.
pbreach
Member
Posts: 29
Joined: Mon Oct 26, 2015 5:23 pm
Vensim version: DSS

Re: Varformat error 1071225242

Post by pbreach »

Awesome! I didn't expect the model to run yet anyhow. It was connected using a C-extension to a CGE based energy-economy model and ran into a lot of issues because of it. We're currently replacing that model with another one that I think you would be familiar with.

Thanks again,

Patrick
tomfid
Administrator
Posts: 3804
Joined: Wed May 24, 2006 4:54 am

Re: Varformat error 1071225242

Post by tomfid »

Great - hopefully things can move forward now.
Post Reply