Page 1 of 1

Controller

Posted: Thu Feb 04, 2021 5:37 am
by swapple
There are three variables that when I change one of them, I like the two others would change, but sum of them be equals 1..
I meant sum of them must be always equals to 1.
How is it possible?

Re: Controller

Posted: Sun Feb 07, 2021 6:13 pm
by swapple
any response?

Re: Controller

Posted: Mon Feb 08, 2021 11:01 am
by Administrator
Can you explain in more detail what you want to do?

It's easy to do something like

a = 0.5

b = 0.2

c = 1 - a - b

But that probably is not what you need to implement.

You can also call a, b and c weights.

a = 100
b = 100
c = 100

sum of a b and c = a + b + c

relative a = a / sum of a b and c
relative b = b / sum of a b and c
relative c = c / sum of a b and c

check = relative a + relative b + relative c (this should be = 1)

Re: Controller

Posted: Mon Feb 08, 2021 6:20 pm
by tomfid
Also, in Venapp there's a SLIDEVARTIE control that handles this.

Re: Controller

Posted: Tue Mar 09, 2021 5:22 pm
by swapple
Administrator wrote: Mon Feb 08, 2021 11:01 am Can you explain in more detail what you want to do?

It's easy to do something like

a = 0.5

b = 0.2

c = 1 - a - b

But that probably is not what you need to implement.

You can also call a, b and c weights.

a = 100
b = 100
c = 100

sum of a b and c = a + b + c

relative a = a / sum of a b and c
relative b = b / sum of a b and c
relative c = c / sum of a b and c

check = relative a + relative b + relative c (this should be = 1)
thx
what do you mean by check? how the model avoid being anything except 1?

Re: Controller

Posted: Tue Mar 09, 2021 5:23 pm
by swapple
tomfid wrote: Mon Feb 08, 2021 6:20 pm Also, in Venapp there's a SLIDEVARTIE control that handles this.
what is Venapp? seems new to me

Re: Controller

Posted: Tue Mar 09, 2021 6:26 pm
by Administrator

Re: Controller

Posted: Thu Mar 11, 2021 5:11 pm
by tomfid
swapple wrote: Tue Mar 09, 2021 5:22 pm
Administrator wrote: Mon Feb 08, 2021 11:01 am
You can also call a, b and c weights.

a = 100
b = 100
c = 100

sum of a b and c = a + b + c

relative a = a / sum of a b and c
relative b = b / sum of a b and c
relative c = c / sum of a b and c

check = relative a + relative b + relative c (this should be = 1)
thx
what do you mean by check? how the model avoid being anything except 1?
"Check" is literally just a checksum to verify that things are working. You would use relative a/b/c as inputs to your model. The user would adjust the weights a/b/c.

Re: Controller

Posted: Sat Mar 13, 2021 3:38 pm
by swapple
Administrator wrote: Tue Mar 09, 2021 6:26 pm http://www.vensim.com/documentation/venapps.html

Only in Vensim DSS.
thanks

Re: Controller

Posted: Sat Mar 13, 2021 3:39 pm
by swapple
tomfid wrote: Thu Mar 11, 2021 5:11 pm
swapple wrote: Tue Mar 09, 2021 5:22 pm
Administrator wrote: Mon Feb 08, 2021 11:01 am
You can also call a, b and c weights.

a = 100
b = 100
c = 100

sum of a b and c = a + b + c

relative a = a / sum of a b and c
relative b = b / sum of a b and c
relative c = c / sum of a b and c

check = relative a + relative b + relative c (this should be = 1)
thx
what do you mean by check? how the model avoid being anything except 1?
"Check" is literally just a checksum to verify that things are working. You would use relative a/b/c as inputs to your model. The user would adjust the weights a/b/c.
thanks you mean we have to check it by ourselves

Re: Controller

Posted: Mon Mar 15, 2021 2:12 am
by tomfid
No, you don't really have to check it at all - it's just for verification that you've implemented the equations correctly.