0

I am using the Excel 2010 solver to do some optimizations. Everything is running well except that I would like to run the solver to find a solution such that my decision variables, $A$1:$A$10, are either between 5.1 and 15.3 or between -5.1 and -15.3. I have tried a number of approaches and cannot figure out how to set the constraints. The positive part is OK,

 $A$1:$A$10 >= 5.1
 $A$1:$A$10 <= 15.3

It is the negative range that I am having difficulty with. I have tried

 -$A$1:$A$10 >= 5.1
 -$A$1:$A$10 <= 15.3

and even

 ABS($A$1:$A$10) >= 5.1
 ABS($A$1:$A$10) <= 15.3

but it does not work. I have searched on the net but cannot seem to find anything to help. Is this possible to do, and if so, how would I do it? Any help would be greatly appreciated. Thank you.

1 Answer 1

1

Say you wish the decision variable X to be either between 5.1 and 15.3 or between -5.1 and -15.3. Replace the decision variable with two new decision variables XP and XN where XP is the positive value of X, XN is the negative value, and X = XP – XN. Then add two constraints:

XP + XN >= 5.1
XP + XN <= 15.3
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.