[gecode-users] Classify the solutions

Christian Schulte cschulte at kth.se
Mon Sep 29 10:43:12 CEST 2014


Hi,

 

What you could do is adding a "sum" variable and branch over the variable so
that values are tried in increasing order. Then the solutions will be found
in that order.

 

Best

Christian

 

--

Christian Schulte, Professor of Computer Science, KTH,
www.gecode.org/~schulte/

 

From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of mehdi m
Sent: Monday, September 29, 2014 10:09 AM
To: users at gecode.org
Subject: [gecode-users] Classify the solutions

 

Hello, 

i'm building a model , and the solutions are vectors like this "3 5 9 4 7",
i have an constraint that express the sum of the vectors must to be > than
an threshold M. 

My question is can i add an constraint or any parameter to tell to gecode :
the solutions returned must be ordered according to a criterion, for example
from the smallest to the largest sum.

 

Thank you for your help

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20140929/81aedadf/attachment.html>


More information about the users mailing list