[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] Absolute Value in Objective Function
From: |
Michael Hennebry |
Subject: |
Re: [Help-glpk] Absolute Value in Objective Function |
Date: |
Fri, 30 Jan 2009 12:03:14 -0600 (CST) |
User-agent: |
Alpine 1.00 (DEB 882 2007-12-20) |
On Fri, 30 Jan 2009, Simone Atzeni wrote:
Hi,
I have a problem.
My objective function is (in LaTex):
minimize: \delta + \sum_{\tau=t-k+1}^t \lvert\lvert {\bf a}(t+1) -
{\bf a}(\tau) \rvert\rvert
where:
a(t+1): my variables (a is a vector)
a(\tau): coefficients (a is a verctor of coefficients)
\delta: coefficient
It can't be done directly.
The objective has to be linear.
The usual trick is:
absx>= x
absx>=-x
and use absx in the objective function.
It works on a minimization problem if the coefficient is >=0.
--
Michael address@hidden
"Pessimist: The glass is half empty.
Optimist: The glass is half full.
Engineer: The glass is twice as big as it needs to be."