Jordan
Jordan

Reputation: 55

Is this a unconstrained multivariable optimization problem, and best way to solve?

I have a dataset that looks like this:

x1 x2 ... xn y1 y2 ... yn z1 z2 ... zn
50 40 3 80 -0.9 0.1 0.9 -0.3 0 0.5 0.9 0.8
20 10 8 20 -0.1 -0.5 0.8 -0.2 0.1 0.4 0.3 0.1

As you can see, each "category" of data in the set has different ranges:

0 <= x <= 100
-1 <= y <= 1
0 <= z <= 1

What I'd like to be able to do is the following:

  1. Select the set of rows of data and their weights which maximizes or minimizes one or more variable across x,y,z
  2. Be able to specify constraints on one or more variable to select the set of rows of data and their weights. E.g. select the best row to optimize 20 <= x2 <= 40, -0.1 <= y <= 0.4.

I'd like to be able to do this in Python, but it feels like that is sort of an irrelevant part of the question as understanding the optimization algorithm that would make this work is more important to me.

Thanks for your help!

Upvotes: 0

Views: 256

Answers (1)

Erwin Kalvelagen
Erwin Kalvelagen

Reputation: 16724

Not really a complete answer, but this is how I would start looking at a model for solving this.

I would start with introducing decision variables:

s(i) = 1 if row i is selected
       0 otherwise

w(i) ≥ 0 weight of row i  (not sure about the role of the weights)

The objective can look like:

min/max sum( (i,j)|j∈C, s(i)*w(i)*a(i,j) )

Here we could sum over a subset of all columns. a(i,j) is our data matrix.

The constraints can look like:

s(i)*20 ≤ s(i)*a(i,'x2') ≤ s(i)*40 
s(i)*(-.1) ≤ s(i)*a(i,'y') ≤ s(i)*.4 

This can be solved with a Mixed-Integer Programming Solver (as long as we keep things linear). The objective looks quadratic right now (s(i)*w(i)) but that can be linearized or we can use a non-convex MIQP solver.

Upvotes: 1

Related Questions