[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Re: [Help-glpk] Compare two matrices

**From**: |
address@hidden |

**Subject**: |
Re: [Help-glpk] Compare two matrices |

**Date**: |
Tue, 7 Aug 2007 07:34:43 -0400 |

Thanks again,
If anyone is interested.
My solution with a lot of help from Andrew Makhorin:
Problem: Compare two matrices, one including variables, the other including
parameters, both binary. Make sure that at most n changes can be made
between the two matrices.
Background: I use this for a scheduling programme that must make sure that
the schedule is not completely changed everytime a new one is computed.
Solution:
Since both matrices are binaries, I did the following: SUM{a in A, b in B,
c in C} if OLD[a,b,c] = 1 then -1*(NEW[a,b,c]-OLD[a,b,c]) else
(NEW[a,b,c]-OLD[a,b,c] <= n;
It worked for me, maybe someone else can use it as well.
Kind regads,
Timo
Original Message:
-----------------
From: Andrew Makhorin address@hidden
Date: Tue, 7 Aug 2007 14:48:59 +0400
To: address@hidden, address@hidden
Subject: Re: [Help-glpk] Compare two matrices
>* I am trying to implement your information, however there is one*
>* small other problem. In the data section, how should I write down*
>* the values for the A[a,b,c] matrix?*
Please see model train.mod in the subdirectory 'examples'.
--------------------------------------------------------------------
mail2web - Check your email from the web at
http://link.mail2web.com/mail2web