help-glpk
[Top][All Lists]
Advanced

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

[Help-glpk] Subject to two conditions


From: João Vilela
Subject: [Help-glpk] Subject to two conditions
Date: Wed, 10 Nov 2010 14:18:59 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; pt-PT; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6

Dear all,

I'm solving a variation of a max flow problem in a graph, where:

set V, default {1..n};        /* is a set of nodes */
set E, within V cross V;     /* is a set of arcs */
set L, within E cross E;      /* is a set to map edges to edges */
var x2{(i,j) in E}, binary; /* x2[i,j] indicates whether there is any flow going through link (i,j) */

And I have the following condition:

> s.t. condition{(i,j) in E}: (sum{(i,j,i1,j1) in L} x2[i1,j1] <=0) or (sum{(i,j,i1,j1) in L} x2[i1,j1] >= 2);

Basically, this means that I need the sum of those x2[i1,j1] to be different from 1 (i.e. less or equal to 0 *or* bigger or equal than 2). Although, this code gives me the following error:

"operand preceding <= has invalid type"

Any idea?

Thank you,
Joao



reply via email to

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