In my model, I have equations where I use min and max with more than two values. For example, max(A,B.C). I am getting an error. It looks like vensim can find min or max of only two values. Is that correct?
And if so, how to find min/max of more than two values?
Thanks,
Steve
max/min of more than two values
-
- Junior Member
- Posts: 17
- Joined: Mon Jun 04, 2018 5:25 pm
- Vensim version: PLE+
Re: max/min of more than two values
What version are you on? Recent 10.x can handle variable arguments.
You can always write MIN(a,MIN(b,c)).
You can always write MIN(a,MIN(b,c)).
/*
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
*/
-
- Junior Member
- Posts: 17
- Joined: Mon Jun 04, 2018 5:25 pm
- Vensim version: PLE+
Re: max/min of more than two values
Thanks Tom.
I have an older version - 7.3.5.
Are you referring to vmin/vmax in version 10.x?
Thanks,
Steve
I have an older version - 7.3.5.
Are you referring to vmin/vmax in version 10.x?
Thanks,
Steve
-
- Super Administrator
- Posts: 4834
- Joined: Wed Mar 05, 2003 3:10 am
Re: max/min of more than two values
No, VMIN/VMAX are for working with subscripted/arrayed variabled.SteveVijayan wrote: ↑Tue Dec 17, 2024 2:41 pmI have an older version - 7.3.5.
Are you referring to vmin/vmax in version 10.x?
In the latest version of Vensim, you can use
some value = max (a,b,c,d)
Prior to this, you would need to use
some value = max (a,max(b,max(c,d)))
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
-
- Junior Member
- Posts: 17
- Joined: Mon Jun 04, 2018 5:25 pm
- Vensim version: PLE+
Re: max/min of more than two values
Thanks Tom.
I have not extended maintenance for a few years.
If I extend maintenance, will I be able to get the latest version?
Thanks,
Steve
I have not extended maintenance for a few years.
If I extend maintenance, will I be able to get the latest version?
Thanks,
Steve
-
- Super Administrator
- Posts: 4834
- Joined: Wed Mar 05, 2003 3:10 am
Re: max/min of more than two values
Yes. But you can just nest the min/max calls as well if you need to. Vensim now has a completely different interface to the one you are used to.SteveVijayan wrote: ↑Tue Dec 17, 2024 2:53 pm I have not extended maintenance for a few years.
If I extend maintenance, will I be able to get the latest version?
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
-
- Junior Member
- Posts: 17
- Joined: Mon Jun 04, 2018 5:25 pm
- Vensim version: PLE+
Re: max/min of more than two values
Thanks Tom.
If I download the new version, I will still be able to use my files/models created using my current (old) version - correct?
Thanks,
Steve
If I download the new version, I will still be able to use my files/models created using my current (old) version - correct?
Thanks,
Steve
-
- Super Administrator
- Posts: 4834
- Joined: Wed Mar 05, 2003 3:10 am
Re: max/min of more than two values
Yes, of course.SteveVijayan wrote: ↑Tue Dec 17, 2024 3:03 pmIf I download the new version, I will still be able to use my files/models created using my current (old) version - correct?
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
-
- Junior Member
- Posts: 17
- Joined: Mon Jun 04, 2018 5:25 pm
- Vensim version: PLE+
Re: max/min of more than two values
Thanks for patiently answering my questions.
Steve
Steve
Re: max/min of more than two values
v10 is a pretty big upgrade from 7. There will be some interface changes that take getting used to, but it's worth it.
/*
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
*/