Model design question

Hi, what is the best way to design a model where the input is “up to factor” and output is a “reducing factor” e.g.
<=1000 - 4
<=29000 - 3.8 etc

The only thing which seems to work is discreet values e.g.
1000 - 4
29000 - 3.8, but this is not correct as it does not pick up in-betweens

If I try <=
<= 1000 - 4
<= 29000 - 3.8 I get the following error: “Cannot evaluate decision xxxxxxx:4:0c43253f-9f7f-11e8-9e85-0242ac110002: Exception while evaluating decision with key ‘null’”

I’ve tried Ranges but it does not execute e.g.
[0…1000] - 4
[1001…29000] - 3.8
but then I get the same error stated above

Any idea how to get to the bottom of the errors?

Thanks
Andre

Hi @dre,

you can use ranges as input entries. [0..1000] and ]1000..2900]. Please note that the numbers in ranges are split by 2 dots .. not 3.

Or, you can use a comparison if you change the hit policy to FIRST. The input entries must be in descending order because the first rule will match. <= 2900 and <= 1000.

Does this help you?

Best regards,
Philipp

Hi Phillip, the notation was actually […] and not […] like I posted before. On the FIRST hit policy, won’t <= 2900 be hit for a value of 500?

True, it mixed up the comparison operator :wink:

It worked, thanks so much Phillip

Looks like a case for tiered discounts :wink:

not quite, but factor input into a payment calculation