help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] Linear program - Difficulty expressing a constraint


From: Oscar Gustafsson
Subject: Re: [Help-glpk] Linear program - Difficulty expressing a constraint
Date: Sun, 30 Sep 2007 10:46:16 +0200 (MEST)

Use n additional binary variables, z_i, and impose constraints as shown on the scip-list (binary variable non-zero if continuous variable non-zero).

x_i <= M*z_i;

where M is the largest possible value for x_i

Then add constraint

sum z_i <= n-1;

Regards

Oscar




reply via email to

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