Allocation must add up to exactly 100%

spork
Posts: 4
Joined: Sat May 09, 2015 9:38 pm

Allocation must add up to exactly 100%

Postby spork » Sat May 09, 2015 9:45 pm

I'm running cfiresim with a few scenarios once a day via a script. (If that's a problem, tell me to stop. I try to be nice and sleep a little between each submission.)

I have noticed I get some occasional strange errors where I get no data. I've made all sorts of logging on my end to try to sort it out and it appears there are some scenarios where I get the message "Allocation must add up to exactly 100%". The funny thing is... it DOES add up to 100%.

I *think* I have masked the issue on my end by rounding all percentages to an integer.... but thought you might be interested anyway.

I can recreate this using the default values and entering these allocation percentages:
bond:15.6, stock:74.3, gold:0, cash:10.1

If I change it to either of these values, it works:
bond:15.5, stock:74.4, gold:0, cash:10.1
bond:15.6, stock:74.4, gold:0, cash:10.0

I'm not sure what all values fail, but I know the one shown fails.

User avatar
bo_knows
Site Admin
Posts: 660
Joined: Fri Jun 28, 2013 4:33 pm

Re: Allocation must add up to exactly 100%

Postby bo_knows » Mon May 18, 2015 1:51 am

spork wrote:I'm running cfiresim with a few scenarios once a day via a script. (If that's a problem, tell me to stop. I try to be nice and sleep a little between each submission.)


My host isn't complaining, so I don't care :)


I have noticed I get some occasional strange errors where I get no data. I've made all sorts of logging on my end to try to sort it out and it appears there are some scenarios where I get the message "Allocation must add up to exactly 100%". The funny thing is... it DOES add up to 100%.

I *think* I have masked the issue on my end by rounding all percentages to an integer.... but thought you might be interested anyway.

I can recreate this using the default values and entering these allocation percentages:
bond:15.6, stock:74.3, gold:0, cash:10.1

If I change it to either of these values, it works:
bond:15.5, stock:74.4, gold:0, cash:10.1
bond:15.6, stock:74.4, gold:0, cash:10.0

I'm not sure what all values fail, but I know the one shown fails.


Hmmm. You know, I never did testing with decimal places in the allocation. I definitely do rounding in various places. Let me look into this. Worse case scenario, I might force users to go with whole integers for allocations as a band-aid fix.
-Bo (Creator and Admin for cFIREsim)

secondcor521
Posts: 4
Joined: Thu Aug 28, 2014 9:57 pm

Re: Allocation must add up to exactly 100%

Postby secondcor521 » Thu Jun 02, 2016 12:44 am

I've seen this too doing manual runs. My solution has been to round off to the nearest whole percentage, but I'd rather have decimals supported ;-)


Return to “cFIREsim Bugs”

Who is online

Users browsing this forum: No registered users and 2 guests