We have a stock that can be negative as well as positive. If it is positive then there are inventory costs and if it is negative then there are backordering costs. We wanted to model this in aimms with different methods. On the one hand we got the error that it was not linear, If we wanted to only have the stock if it is positive and otherwise return the value 0. If we tried to use other methods, such as a binary value that would return the value 0 if the stock was smaller than 0 and 1 if the stock was bigger than 0 we got the following error
"The mathematical program "CostMinimization" is not linear, look for bracketed numbers in the constraint listing, for example in the constraint Inventory_definition(4,12)."
How can we best model this situation, so that it is still a linear model?