Hi, I think I found the problem. If you use the reified constraints, then you have a problem when the automatically generated lists contain the same value twice. In that case, this value cannot be chosen, because otherwise, two of the Z variables would become 1, which is forbidden by sum(Z_List) #= 1. This may prevent the version with the reified constraints from finding the best solution. Cheers, Thorsten Am 16.11.2011 11:45, schrieb Bogdan Tanasa: > > Hi, > > Thanks for investigating my problem. Try running the code for more > cases. It will happen for sure. > > I am using Eclipse 6.0 on a windows xp 32bit machine. > > *From:*Thorsten Winterer [mailto:thorsten_winterer_at_...126...] > *Sent:* 16 noiembrie 2011 11:37 > *To:* eclipse-clp-users_at_lists.sourceforge.net > *Subject:* Re: [eclipse-clp-users] small problem > > Hi Bogdan, > > can you give more information on the ECLiPSe version that you use? > I tested your program with 6.0#127, and I got identical solutions for > both variants: > > Found a solution with cost 63.600314464631339__63.600314464631467 > Found a solution with cost 59.30430001273087__59.304300012730991 > Found a solution with cost 57.2013985843003__57.201398584300421 > Found a solution with cost 49.919935897394716__49.919935897394772 > Found a solution with cost 47.885279575251481__47.885279575251538 > Found a solution with cost 45.254833995939016__45.254833995939073 > Found a solution with cost 43.312815655415406__43.312815655415456 > Found a solution with cost 40.951190458886522__40.951190458886572 > Found a solution with cost 37.841775856848983__37.841775856849033 > Found a solution with cost 34.9714169000914__34.971416900091448 > Found a solution with cost 32.419130154894638__32.419130154894681 > Found a solution with cost 29.189039038652826__29.189039038652858 > Found a solution with cost 24.637369989509825__24.637369989509853 > Found no solution with cost 0.0 .. 23.637369989509853 > * Bin Configurations: > [0, 0, 0, 0, 1] > [0, 0, 0, 1, 0] > [0, 0, 1, 0, 0] > [0, 1, 0, 0, 0] > [0, 0, 1, 0, 0] > [1, 0, 0, 0, 0] > * Bin Loads: > [42, 23, 27, 27, 24] > * Weigth Configurations: > [14, 33, 24, 49] :: [0, 0, 1, 0] > [41, 49, 9, 27] :: [0, 0, 0, 1] > [6, 49, 10, 12] :: [0, 0, 0, 1] > [41, 9, 23, 45] :: [0, 0, 1, 0] > [49, 19, 15, 51] :: [0, 0, 1, 0] > [47, 12, 42, 47] :: [0, 0, 1, 0] > Found a solution with cost 61.644140029689716__61.644140029689837 > Found a solution with cost 57.2013985843003__57.201398584300421 > Found a solution with cost 49.919935897394716__49.919935897394772 > Found a solution with cost 45.254833995939016__45.254833995939073 > Found a solution with cost 43.312815655415406__43.312815655415456 > Found a solution with cost 37.841775856848983__37.841775856849033 > Found a solution with cost 34.9714169000914__34.971416900091448 > Found a solution with cost 32.419130154894638__32.419130154894681 > Found a solution with cost 24.637369989509825__24.637369989509853 > Found no solution with cost 0.0 .. 23.637369989509853 > * Bin Configurations: > [0, 0, 0, 0, 1] > [0, 0, 0, 1, 0] > [0, 0, 1, 0, 0] > [0, 1, 0, 0, 0] > [0, 0, 1, 0, 0] > [1, 0, 0, 0, 0] > * Bin Loads: > [42, 23, 27, 27, 24] > * Weigth Configurations: > [14, 33, 24, 49] :: [0, 0, 1, 0] > [41, 49, 9, 27] :: [0, 0, 0, 1] > [6, 49, 10, 12] :: [0, 0, 0, 1] > [41, 9, 23, 45] :: [0, 0, 1, 0] > [49, 19, 15, 51] :: [0, 0, 1, 0] > [47, 12, 42, 47] :: [0, 0, 1, 0] > Results: > 24.6373699895098__24.6373699895099 > 24.6373699895098__24.6373699895099 > > > Cheers, > Thorsten > > > Am 16.11.2011 10:56, schrieb Bogdan Tanasa: > > Hi guys, > > I have a small version of the bin covering problem which I try to solve. > > I have to versions of it, the second one uses reified constraints. > > It happens that the second one give different results compared with > the first implementation which does not uses reified constraints. > > Can you please tell me what is wrong_ > > Bogdan. > > > > > ------------------------------------------------------------------------------ > RSA(R) Conference 2012 > Save $700 by Nov 18 > Register now > http://p.sf.net/sfu/rsa-sfdev2dev1 > > > > > _______________________________________________ > ECLiPSe-CLP-Users mailing list > ECLiPSe-CLP-Users_at_lists.sourceforge.net <mailto:ECLiPSe-CLP-Users_at_lists.sourceforge.net> > https://lists.sourceforge.net/lists/listinfo/eclipse-clp-users >Received on Wed Nov 16 2011 - 12:28:54 CET
This archive was generated by hypermail 2.3.0 : Wed Sep 25 2024 - 15:13:20 CEST