help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] How to add an index in GMPL?


From: Jeffrey Kantor
Subject: Re: [Help-glpk] How to add an index in GMPL?
Date: Mon, 21 Dec 2009 23:14:42 -0500

Andrew,

Thanks for reply.  I think I've figured it out.

I've used your example jssp.mod to demonstrate what I'm trying
to do.  The idea is to provide an index for a set of tuples, in this example for the
set of job/machine pairs. This index provides the means to eliminate redundant pairs
or disjunctive constraints of the job-shop scheduling problem.

For jssp.mod, the result is a reduction of 180 to 90 binary variables, and solution time
from 17.5 to 4.99 seconds for solution time. 

Jeff

2009/12/21 Andrew Makhorin <address@hidden>
> I #39;m working on a scheduling problem in , and would like to add an
> index to each member of a set. That is, if I start with a set  A, B,
> C, D, E ..., I #39;d like to end up with a set of tuples (1,A), (2,B),
> (3,C), ....

> I #39;m still crawling up the GMPL learning curve, but not sure of
> exactly the best way to do this.  

Probably you can use something like this:

set S;
/* A, B, C, ... */

param p{i in S};
/* p[i] maps i to 1, 2, 3, ... */

set T := setof{i in S} (p[i], i);
/* resulting set of doublets (1,A), (2,B), ... */


Attachment: jssp_JCK.mod
Description: Binary data


reply via email to

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