help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] initialization of LP


From: glpk xypron
Subject: Re: [Help-glpk] initialization of LP
Date: Thu, 21 Feb 2008 23:52:13 +0100

Hello Jinwei,

Function abs() is not available for LPs.

Use two inequalities instead:
penalty >= x-x_0;
penalty >= x0-x;

Best regards

Xypron


-------- Original-Nachricht --------
> Datum: Thu, 21 Feb 2008 17:31:59 -0500
> Von: "Jinwei Gu" <address@hidden>
> An: "Andrew Makhorin" <address@hidden>
> CC: address@hidden
> Betreff: Re: [Help-glpk] initialization of LP

> Thanks a lot for your help,  xypron and Andrew. I think the problem can be
> solved by adding a term like |x-x_0| in my objective function where x_0 is
> my initial solution, as you suggested.
> 
> I looked at glp_set_row_stat and glp_set_col_stat, but I do not understand
> how they can be used to set initial values (say, for columns)? In these
> functions, I can only set the status for rows/columns to be basic (GLP_BS)
> or non-basic (GLP_NL).
> 
> Thanks.
> 
> --Jinwei
> 

-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger




reply via email to

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