Normalizing Variables

Use this forum to post Vensim related questions.
Post Reply
geo_curious
Senior Member
Posts: 136
Joined: Tue Mar 14, 2023 2:05 am
Vensim version: DSS

Normalizing Variables

Post by geo_curious »

Hi All,

I would like to normalize a variable output from 0 to 1. The formula for this is normalized_var = (var - min_var) / (max_var - min_var)

How do I implement this in DSS? The subscript protocol is not entirely clear to me for iterating. MIN and MAX take two variables and their use is not appropriate in this case.

I found very little on the forum about this, but it is a pretty standard operation. Perhaps I missed something. I just need to know the implementation formulas in Vensim DSS.

Thanks!
Administrator
Super Administrator
Posts: 4829
Joined: Wed Mar 05, 2003 3:10 am

Re: Normalizing Variables

Post by Administrator »

I think we need more info.

When you mention min_var and max_var, are you referring to the min/max of a variable over the entire simulation?

The following is perfectly valid Vensim syntax, so I'm not sure why it's troublesome to just use this.
normalized_var = (var - min_var) / (max_var - min_var)
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
geo_curious
Senior Member
Posts: 136
Joined: Tue Mar 14, 2023 2:05 am
Vensim version: DSS

Re: Normalizing Variables

Post by geo_curious »

The problem is that there is no way to search for the min and max, from what I can see in the documentation. If someone could provide the built-in formula for how to find the min and max of a variable output, then I could use the equation.
Thank you!
Administrator
Super Administrator
Posts: 4829
Joined: Wed Mar 05, 2003 3:10 am

Re: Normalizing Variables

Post by Administrator »

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
geo_curious
Senior Member
Posts: 136
Joined: Tue Mar 14, 2023 2:05 am
Vensim version: DSS

Re: Normalizing Variables

Post by geo_curious »

Interesting. The MIN(A, B) must be MIN(self1,self1) for that to work. The “minimum of two alternatives.” That is a bit of nonsense but I can guess and check.
Administrator
Super Administrator
Posts: 4829
Joined: Wed Mar 05, 2003 3:10 am

Re: Normalizing Variables

Post by Administrator »

I'm very confused by this thread.

If you want the min/max during a simulation, you can use those two functions.

If you want the min/max once a simulation has ended, the stats tool will give you these.

Does this solve the problem?
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
Post Reply