[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] Need help using glpk API
From: |
Andrew Makhorin |
Subject: |
Re: [Help-glpk] Need help using glpk API |
Date: |
Tue, 2 Oct 2007 14:51:06 +0400 |
> I have some problems concerning the use of glpk's API. I want to
> build a complex, mixed integer problem using glpk's API and I have
> already figured out how to add constraints and integer respective
> binary variables to the problem. What I need in addition is a way to
> add IF...THEN...ELSE constraints. Is there a way to add these
> constraints to a glpk program using glpk's api?
> If I understood the GMPL language reference right these
> constraints exists and could be used in conjunction with glpk.
No, neither glpk nor the mathprog language support constraints like
if-then-else. However, if necessary, you can model such constraints
using standard techniques based on binary variables.