Hi
I wanted to look at a model that I sent in a thread:
http://ventanasystems.co.uk/forum/viewtopic.php?t=4076
I sent two models rent12 and rent12_bis. When I tried to run both models with the 5.10 version it showed an error and doing the ctrl T it shows a simultaneous error. I downloaded back the 5.9e version and both models work very well with the last version. I tried to figure out if there was a simultaneous error in both models, but obviously there are none.
I join the rent12_bis model to check it.
Regards.
JJ
problem with the last 5.10 version
problem with the last 5.10 version
- Attachments
-
- rent12_bis.mdl
- (42.39 KiB) Downloaded 577 times
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm
Hi JJ,
You have the equation
table probabilité de choix d'agences cumulée[l1,agences suivantes] =
vector elm map(table probabilité de choix d'agences cumulée[l1,l1],
ident agence[agences suivantes] - 2) + table probabilité de choix d'agences[l1,agences suivantes]
Since table probabilité de choix d'agences cumulée appears inside of the VECTOR ELM MAP function all values for it must be known before any computation can take place. For example in your equation if
ident agence[agences suivantes] - 2
were to evaluate to -1 the model would not be computable.
I think you can probably get what you need using the VECTOR SELECT function with unchangeable constants.
Meanwhile I will see if it is possible to make the error message a little bit clearer.
[Edited on 2010-7-31 by bob@vensim.com]
You have the equation
table probabilité de choix d'agences cumulée[l1,agences suivantes] =
vector elm map(table probabilité de choix d'agences cumulée[l1,l1],
ident agence[agences suivantes] - 2) + table probabilité de choix d'agences[l1,agences suivantes]
Since table probabilité de choix d'agences cumulée appears inside of the VECTOR ELM MAP function all values for it must be known before any computation can take place. For example in your equation if
ident agence[agences suivantes] - 2
were to evaluate to -1 the model would not be computable.
I think you can probably get what you need using the VECTOR SELECT function with unchangeable constants.
Meanwhile I will see if it is possible to make the error message a little bit clearer.
[Edited on 2010-7-31 by bob@vensim.com]
Hi Bob
Why does it work with the 5.9e version, and not the 5.10?
In the model, there are successive equations and every equation needs values calculated by the preceding equations. If the software computes each equation in the correct order (1,2,3,4) , there is no simultaneous error. It seems that the 5.9e version works this way, because it does not detect any error and computes the values correctly.
Is the 5.10 computing differently successive equations?
you write:
<You have the equation
<table probabilité de choix d'agences cumulée[l1,agences suivantes] =
<vector elm map(table probabilité de choix d'agences cumulée[l1,l1],ident agence[agences suivantes] - 2) +
<table probabilité de choix d'agences[l1,agences suivantes]
<Since table probabilité de choix d'agences cumulée appears inside of the VECTOR ELM MAP function all values for it must be known before any computation can take place. For example in
<your equation if
<ident agence[agences suivantes] - 2
<were to evaluate to -1 the model would not be computable.
In the above equation, ident agence[agences suivates] - 2 can never be equal to -1 because agences suivantes = l2,l3,
and ident agence[agences suivantes] can only be equal to 2 or 3.
Regards.
JJ
[Edited on 31-7-2010 by LAUJJL]
Why does it work with the 5.9e version, and not the 5.10?
In the model, there are successive equations and every equation needs values calculated by the preceding equations. If the software computes each equation in the correct order (1,2,3,4) , there is no simultaneous error. It seems that the 5.9e version works this way, because it does not detect any error and computes the values correctly.
Is the 5.10 computing differently successive equations?
you write:
<You have the equation
<table probabilité de choix d'agences cumulée[l1,agences suivantes] =
<vector elm map(table probabilité de choix d'agences cumulée[l1,l1],ident agence[agences suivantes] - 2) +
<table probabilité de choix d'agences[l1,agences suivantes]
<Since table probabilité de choix d'agences cumulée appears inside of the VECTOR ELM MAP function all values for it must be known before any computation can take place. For example in
<your equation if
<ident agence[agences suivantes] - 2
<were to evaluate to -1 the model would not be computable.
In the above equation, ident agence[agences suivates] - 2 can never be equal to -1 because agences suivantes = l2,l3,
and ident agence[agences suivantes] can only be equal to 2 or 3.
Regards.
JJ
[Edited on 31-7-2010 by LAUJJL]
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm
Hi JJ,
Version 5.9 was not properly checking for this, and was not catching this type of problem. If it turns out that you did not make any mistake and things were set up correctly you did get the right results. If things were not set up correctly, or you made a mistake, the computations would not have been sensible. Since the second arguments to VECTOR ELM MAP can be dynamic, or altered by a .cin file etc, there is no way to guarantee correct computation. This was one of the reasons for the introduction of VECTOR SELECT and unchangeable constants which actually order equations based on the value of such constants.
Version 5.9 was not properly checking for this, and was not catching this type of problem. If it turns out that you did not make any mistake and things were set up correctly you did get the right results. If things were not set up correctly, or you made a mistake, the computations would not have been sensible. Since the second arguments to VECTOR ELM MAP can be dynamic, or altered by a .cin file etc, there is no way to guarantee correct computation. This was one of the reasons for the introduction of VECTOR SELECT and unchangeable constants which actually order equations based on the value of such constants.
problem with the last 5.10 version
Hi Bob
I understand the reasons of the change in 5.10. It avoids people misusing the vector elm map function.
I hope that I can find another way to make the calculations I want using for instance the vector select function, otherwise I will be annoyed. Until I find a solution, I will use the 5.9e version that works as well as the 5.10 at least for my own applications.
Thanks for the explanation.
Regards.
JJ
[Edited on 1-8-2010 by LAUJJL]
I understand the reasons of the change in 5.10. It avoids people misusing the vector elm map function.
I hope that I can find another way to make the calculations I want using for instance the vector select function, otherwise I will be annoyed. Until I find a solution, I will use the 5.9e version that works as well as the 5.10 at least for my own applications.
Thanks for the explanation.
Regards.
JJ
[Edited on 1-8-2010 by LAUJJL]
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm
problem with the last 5.10 version
Hi Bob
I have already found a solution. I use mapping as you suggest. But I have two subscripts, so I have created a subscript that is the cartesian product of the two subscripts and I make the mapping on this subscript and I convert back the array with one subscript back to the original array with two subscripts.
Regards.
JJ
I have already found a solution. I use mapping as you suggest. But I have two subscripts, so I have created a subscript that is the cartesian product of the two subscripts and I make the mapping on this subscript and I convert back the array with one subscript back to the original array with two subscripts.
Regards.
JJ
problem with the last 5.10 version
Hi Bob
I have changed the formulation of the problem and it now works with the 5.10 version. It gives the same result than the rent12_bis version compiled with the 5.9e version.
I still have a problem; the compilation takes more than 20 minutes, whatever the version and the formulation.
I use the microsoft c/C++ version 9 (2008) compiler and have changed acoordingly the mdl.bat file downloaded with the 5.10 version.
20 minutes is rather long! I have noticed sometimes extreme difference in compiling time totally unrelated with the complexity of the model.
I join the new model if anybody is interested by the modification and wants to use the model with the new Vensim version.
Regards.
JJ
I have changed the formulation of the problem and it now works with the 5.10 version. It gives the same result than the rent12_bis version compiled with the 5.9e version.
I still have a problem; the compilation takes more than 20 minutes, whatever the version and the formulation.
I use the microsoft c/C++ version 9 (2008) compiler and have changed acoordingly the mdl.bat file downloaded with the 5.10 version.
20 minutes is rather long! I have noticed sometimes extreme difference in compiling time totally unrelated with the complexity of the model.
I join the new model if anybody is interested by the modification and wants to use the model with the new Vensim version.
Regards.
JJ
- Attachments
-
- rent14.mdl
- (42.05 KiB) Downloaded 586 times
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm
Hi JJ,
There is another thread on this topic - http://www.ventanasystems.co.uk/forum/v ... php?t=4137
There is another thread on this topic - http://www.ventanasystems.co.uk/forum/v ... php?t=4137