Re: Recommend please : free math library
- From: Erwin Kalvelagen <erwin@xxxxxxxx>
- Date: Wed, 19 Oct 2005 22:27:08 GMT
If I read the problem correctly, this can be formulated as a MIP (mixed integer programming) problem or a CP (constraint programming) problem. E.g.
x(1) - 1024*x(3) = 1024 x(2) - 1024*x(4) = 1024 0 <= x(i) <= 1024 x(i) integer x(i) alldifferent
A MIP formulation could look like:
min dummy x(1) - 1024*x(3) = 1024 x(2) - 1024*x(4) = 1024 x(i) <= x(j) - 1 + d(i,j)*M for i>j x(i) >= x(j) + 1 - (1-d(i,j))*M for i>j 0 <= x(i) <= 1024 x(i) integer d(i,j) binary for i>j where M is an appropriate constant e.g. 1025. and dummy is a dummy objective function, e.g. minimize x(1).
Solvers (including free ones) for such problems are readily available.
Erwin
linq936@xxxxxxxxxxx wrote:
Hi Peter, Thanks, I will check that out.
Please let me add some more constraints to the original matrix, 1) x1, x2, x3 and x4 are all integer which is less than 1024 and larger than or equal to 0 2) x1, x2, x3 and x4 do not equal
And the last, the program only need one numeric solution, do not care the whole solution set.
Given the above, how should I proceed then?
All I had in mind was to work out some symbolic expression for each variable and then somehow apply the the 2 constraints I mentioned in this email. Since these 2 are not equations, I do not know how to combine them with matrix algebra.
Any suggestion is highly appreciated.
---------------------------------------------------------------- Erwin Kalvelagen GAMS Development Corp., http://www.gams.com erwin@xxxxxxxx, http://www.gams.com/~erwin ---------------------------------------------------------------- .
- References:
- Recommend please : free math library
- From: linq936
- Re: Recommend please : free math library
- From: linq936
- Re: Recommend please : free math library
- From: Peter Spellucci
- Re: Recommend please : free math library
- From: linq936
- Recommend please : free math library
- Prev by Date: Re: Recommend please : free math library
- Next by Date: Re: Optimization
- Previous by thread: Re: Recommend please : free math library
- Next by thread: Question in PCA - Differentiating problem
- Index(es):
Relevant Pages
|