[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] multiplication of linear forms not allowed
From: |
Andrew Makhorin |
Subject: |
Re: [Help-glpk] multiplication of linear forms not allowed |
Date: |
Thu, 26 Apr 2007 17:06:01 +0400 |
> I have a constraint which looks as follows:
> concordance{j in X, k in X}: sum{i in N} (w[i] * y[i,j,k]) = c[j,k];
> where w,y and c are defined as follows:
> param c{j in X, k in X};
> var w{i in N} >=0, <=1;
> var y{i in N, j in X, k in X} binary;
> y is a variable which depends on three dimensions, for each element
> of N and each pair of X^2
> glpsol stops on this constraint and says:
> multiplication of linear forms not allowed
> Does anybody know how to overcome this problem?
var wy{i in N, j in X, k in X}, >= 0;
/* wy[i,j,k] = (if y[i,j,k] = 0 then 0 else w[i]) */
s.t. aaa{i in N, j in X, k in X}: wy[i,j,k] <= y[i,j,k];
s.t. bbb{i in N, j in X, k in X}: wy[i,j,k] <= w[i];
s.t. ccc{i in N, j in X, k in X}: wy[i,j,k] >= w[i] + y[i,j,k] - 1;
concordance{j in X, k in X}: sum{i in N} wy[i,j,k] = c[j,k];