help-glpk
[Top][All Lists]
Advanced

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

[Help-glpk] abs() function


From: Ajay Joshi
Subject: [Help-glpk] abs() function
Date: Wed, 15 Jun 2005 18:16:59 -0400

Hi,
    I have the following code

var x{NODES} integer;
var y{NODES} integer;
.
.
.
.
.
s.t. dist{i in NODES, j in NODES}: dis[i,j] = abs(x[i] - x[j]) +
abs(y[i] -y[j]);

When I ran this code using glpsol, it gave me an error

wpm.mod:75: argument for abs has invalid type
Context:  , j ] == 1 ) then dis [ i , j ] = abs ( x [ i ] - x [ j ] )
Model processing error


How do I correct this error?

Thanks,
Ajay





reply via email to

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