Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Non Linear Integer Programming

I would like to know if there is a package in R handling non linear integer optimization.

"Basically", I would like to solve the following problem:

max f(x) s.t x in (0,10) and x is integer.

I know that some branching algorithms are able to handle the linear version of this problem, but here my function f() might be more complicated. (I can't even make sure it would be quadratic of the form f(x)=xQx).

I guess there is always the brute force solution to test all the possibilities as long as they are bounded, but I was wondering if there wasn't anything smarter.

like image 784
SRKX Avatar asked Jul 13 '10 07:07

SRKX


People also ask

What do you mean by non linear programming?

In mathematics, nonlinear programming (NLP) is the process of solving an optimization problem where some of the constraints or the objective function are nonlinear.

What is linear and non linear programming?

Definition. Linear programming is a method to achieve the best outcome in a mathematical model whose requirements are represented by linear relationships whereas nonlinear programming is a process of solving an optimization problem where the constraints or the objective functions are nonlinear.

How do you solve non linear programming?

The least complex method for solving nonlinear programming problems is referred to as substitution. This method is restricted to models that contain only equality constraints, and typically only one of these. The method involves solving the constraint equation for one variable in terms of another.

What are the uses of nonlinear programming?

There are several applications for nonlinear programming. Some of the most common are engineering design, control, data fitting, and economic planning. These applications usually share some attributes regarding problem structure that make convex optimization algorithms very effective.


2 Answers

I have a few options for you, but none of them is the silver bullet, although it looks like your silver bullet is in the works under the rino project: http://r-forge.r-project.org/projects/rino/.

Since your function is complicated, you may want to use a genetic algorithm (i.e., gradient-based optimizers may not be reliable). genoud in the rgenoud library may do the trick (link text). If you set data.type.int=TRUE it should do the trick. I have not used this library, but have some experience with GAs in matlab and the time to convergence is sensitive to the settings, so you'll be well served to read the man page a few times through.

Or, if your function in strictly concave (unlikely, since you say it may be complicated) you can solve with a gradient solver (e.g., optim) then check the neighborhood around the optimum (can't be more than 2^n points to check).

Sorry, I can't be of more help.

like image 184
Richard Herron Avatar answered Oct 21 '22 19:10

Richard Herron


If it is hardly nonlinear there is no better method than brute force (you will never know if the minimum is local or if some flat-looking fragment doesn't have any narrow and deep valleys), except of course symbolic computation (which probably won't work because the function is too complicated) or soft computing, I mean things like genetic algorithms, Monte-Carlo, swarms, etc. (here you don't have a guarantee that it will find the very global minimum and because you have integer x it can be slower than brute force).

like image 41
mbq Avatar answered Oct 21 '22 20:10

mbq