help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-glpk] How to linearize a weighted average with a decision variable


From: Matt
Subject: [Help-glpk] How to linearize a weighted average with a decision variable?
Date: Tue, 24 Apr 2018 22:15:13 -0300

Hi all,

I'm trying to model a problem but it turned out to be non linear.

A simplified version of the model is written below. Basically it averages the weighted value of all enabled points, provided there are exactly M enabled points.

max sum(i) { enabled[i] * value[i] * weight[i] } / sum(i) { enabled[i] * weight[i] }
s.t. sum (i) enabled[i] = M

- value is a vector of decimal numbers in [0, 1] (precomputed)
- weight is a vector of decimal numbers in [0, 1] (precomputed)
- enabled is a vector of either 0 or 1 (decision variable)

The model is very simple so I'm guessing there probably is a way to linearize it or some workaround I'm not aware of.

Thanks,
Matt

reply via email to

[Prev in Thread] Current Thread [Next in Thread]