0

I'm looking to solve problems of the form in R:

enter image description here

where

enter image description here

and

enter image description here

is an indicator function that equals 1 if the argument (.) is true and zero otherwise.

I've looked into packages lpSolve, Rcplex, and crs but I couldn't quite grasp how I would place my problem into the functions offered by those packages. I don't really know how I would incorporate my indicator functions in the objective. I thought about making my controls the binary W's themselves but then I would have to provide the lambdas (weights), however, my interest is finding the optimal combination of lambdas, and not the W's.

0

1 Answer 1

1

You basically want

z<=r => w=1

This can be written as

w=0 => z>r

or

z >= r + 0.001 - M*w

where M is a large enough constant (but preferably not too large). Some solvers like Cplex and Gurobi have indicator constraints: this way the last implication can be expressed directly without resorting to a big-M formulation.

Sign up to request clarification or add additional context in comments.

3 Comments

Thank you kindly for your response. Most of the MIP solvers require the problem be placed in the following way: min c'x s.t. A'x <= b where x are the control variables. In my case, I'm trying to determine the optimal combination of lambda's but they do not appear in my objective function, only the W's do. So I was wondering how to place my problem into this framework.
Not all variables need to go in the objective. This is the same as saying that often many variables have an objective coefficient of zero.
Thanks again. I'm now able to formulate this problem in order to "fit" it into the Rcplex function of the 'Rcplex' package (which was a nightmare to install but that's another story).

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.