I would like to write some linear equations and inequations to state that the sum of all possive
x - C is smaller than
As my math knowlegde is very limited I'm looking for some way to only sum up the
x - C that are not negative. Is there maybe some trick to add additional binary dummy variables? Or is this just not possible and I have to formulate my problem as a non-linear problem.
Some background to clarify the problem:
I want to add a limitation to my simplex tableau to check if a bucket is too full. A bucket is limited by the constant L. Items can fall into mutiple neighbouring buckets, e.g. 40% in the fourth bucket, and 60% in the fifth. The only way to find out how much of an item is placed into the bucket is by substracting the location of each bucket and adding the total length of the item (summarised in
C) from the absolute location of the beginning of the item
x is a variable as its choice affects the optimisation. Checking that no bucket overflows is only a limitation, and the amount of buckets is known in advance.
The problem arises, as substracting
x can result in negative values. If I now sum up all
x - C I cannot check if it is smaller than
L, as the negative values will allow more items to be placed in the bucket, as
Alternativly, it would be sufficient if I could check that
x1 + its size is either smaller than another
x2, or that
x1 is langer than
x2 + its size.
If I however write both constraints in my simplex tableau the problem has no solution, as the two notations contradict.