Modeling some constraints. We have two decision variables x in Z^{0+} that is the main decision variable and 0<= y<=1 that is an auxiliary decision variable.

Barrett Osborn

Barrett Osborn

Answered question

2022-11-19

Modeling some constraints
We have two decision variables x Z 0 + that is the main decision variable and 0 y 1 that is an auxiliary decision variable.
Now based on the nature of the problem we are studying, we know that
y = 1 x , x = 0 y = , x > 0 y 0.
Now the challenge is how to formulate the dynamics of these two decision variables in the constraints of a mathematical program. We have x in the denominator and since at optimality x can actually be zero, this would create a problem. Obviously, we cannot write x y = 1 because if the optimal solution is that x = 0, the equality would be violated.
Any suggestions would be much appreciated.

Answer & Explanation

dilettato5t1

dilettato5t1

Beginner2022-11-20Added 25 answers

Step 1
Assume we have an a priori upper bound M (integer) on x. Introduce binary variables z 0 , z 1 , , z M , where z j = 1 if and only if x = j. Add the constraint
x = j = 0 M j z j
to define x in terms of the new variables, and the constraint
j = 0 M z j = 1
to ensure that x is uniquely determined. Finally, add the constraint
y = j = 1 M 1 j z j
to define y. Note that x = 0 implies y = 0 here.
Step 2
There is no way to formulate a proper optimization model so as to make a variable "undefined" under certain circumstances. If letting y = 0 when x = 0 causes problems elsewhere in the model, you need to determine a numerical value for y that can function as "undefined" in the remaining constraints.

Do you have a similar question?

Recalculate according to your conditions!

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?