fix calculation sum column (finally!)
This commit is contained in:
parent
99696b7c9e
commit
a3d4b24e09
@ -50,17 +50,20 @@ namespace EvoCalculator.Core.Calculation.Columns
|
||||
|
||||
public override void ComputeValues(decimal requiredValue)
|
||||
{
|
||||
var DIFFICULT_CASE = _percentPaymentColumn.Values.Take(_percentPaymentColumn.Values.Length - 1)
|
||||
.Any(x => x < 3 && x > 0);
|
||||
|
||||
var goalSeek = new GoalSeek(this);
|
||||
goalSeek.SeekResult(requiredValue,
|
||||
new GoalSeekOptions(
|
||||
startingStabPoint: Convert.ToDecimal(
|
||||
(_postValues.BaseCost.Value - _preparedValues.FirstPaymentSum) /
|
||||
_preparedValues.Nmper - 2)
|
||||
// , tineExplorePercentage: 10
|
||||
// , maximumAttempts: 100000
|
||||
, initialTineSpacing: 10m
|
||||
, focusPercentage: 50
|
||||
// , trimFinalInputValue: true
|
||||
startingStabPoint:
|
||||
(_postValues.BaseCost.Value - _preparedValues.FirstPaymentSum) /
|
||||
(_preparedValues.Nmper - 3) * (DIFFICULT_CASE
|
||||
? 0.1m
|
||||
: 1m)
|
||||
, maximumAttempts: 1000
|
||||
, initialTineSpacing: DIFFICULT_CASE ? 10000m : 1000m
|
||||
// , focusPercentage: 50
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user