CountableIntRange not working properly

10 views
Skip to first unread message

Amarjith Vishnu

unread,
Nov 24, 2022, 1:31:52 PM11/24/22
to OptaPlanner development
Hi,
Product/Location A B C D
Product1                 x x x x
Product2                 x x x x
Product3                 x x x x

I have products of different quantity and I want to distribute it to different locations. Basically I want fill the matrix above with values for 'x'.
I am using CountableValueRange like this:

@ValueRangeProvider(id = "quantityRange")
public CountableValueRange<Long> getQuantityRange() {
 return ValueRangeFactory.createLongValueRange(0, 1000);
}

But values assigned are always 999 or 0 for each x.

What could be the issue?
My planningEntity is each combination of product and location. Is there is a better way to do it?
Reply all
Reply to author
Forward
0 new messages