[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] Newbie question
From: |
Andrew Makhorin |
Subject: |
Re: [Help-glpk] Newbie question |
Date: |
Wed, 16 Jul 2008 17:36:24 +0400 |
> I am trying to write
> a model how to minimize the production cost
> given the total
> demand and production cost per production plant.
> The thing is that I
> don't want have all production plants in use as it is now given my
> model below.
> I would only like to start up a new plant when the demand of all
> the cheaper production isn't suffient.
> I think my problem
> is a mix of different kind of problems and not a pure minimize
> problem.
> Please, can someone
> help me out on this?
Probably you need to introduce binary variables:
var z{i in PLANTS}, binary;
where z[i] = 1 means that plant i is used, otherwise z[i] = 0. If plant
i is not used, it can produce nothing, therefore:
s.t. limits1{i in PLANTS} : p[i] >= z[i] * minlim[i];
s.t. limits2{i in PLANTS} : p[i] <= z[i] * maxlim[i];
/* for each plant within production limits */