Re: [eclipse-clp-users] bb_min problem

From: Bogdan Tanasa <g-bogta_at_...107...>
Date: Mon, 4 Apr 2011 20:40:11 +0200
Hi,

Sorry for the uncommented code. I had to do write it quickly. 
I tried to avoid getting symmetrical by imposing that signals have to be
sorted according to their index in the input file. The problem regarding
getting the same solution twice as reported by the bb_min remains.

To be honest I suspect the suspend statements, but I don't understand what
can be wrong with them. 

Thanks,
Bogdan.

-----Original Message-----
From: Stephan Schiffel [mailto:stephan.schiffel@...1...] 
Sent: 4 aprilie 2011 19:03
To: eclipse-clp-users_at_lists.sourceforge.net
Subject: Re: [eclipse-clp-users] bb_min problem

Hi Bogdan,

On Monday 04 April 2011 15:25:55 Bogdan Tanasa wrote:
> I have a piece of CLP which is designed to do some kind of bin packing. If
> I use bb_min with continue strategy the same solution is printed several
> times. Can someone please have a look on my code am give me some hints ?

This seems like an awful lot of uncommented code to go through. Without 
looking at it, I suspect the following:
In your input you have several signals with the same parameters, e.g.,
signal(7640, 8000, 8000, 64).
signal(7640, 8000, 8000, 64).
signal(7640, 8000, 8000, 64).

When setting up the constraints you probably treat these as different
signals 
and, because they have identical parameters, they can be freely exchanged in

the solution of your problem (whatever the problem is).

As far as I know, there are two ways to remove those symmetric solutions:

1. Add additional constraints that break the symmetry. E.g., if you know
that 
signals 1 and 2 are equal, add a constraint that ensures that signal 1 is 
always used before signal 2.

2. Reformulate the problem variables and constraints such that they do not 
contain symmetries. E.g., instead of a list of signals (that may contain 
duplicates) use a set of pairs Signal-Number that specifies for each signal
how 
often it occurs.

Best regards,
Stephan

----------------------------------------------------------------------------
--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
ECLiPSe-CLP-Users mailing list
ECLiPSe-CLP-Users_at_lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/eclipse-clp-users
Received on Mon Apr 04 2011 - 18:40:22 CEST

This archive was generated by hypermail 2.2.0 : Mon Jul 09 2018 - 02:05:29 CEST