[gecode-users] MinimizeScript: Beginners Question

Christian Schulte cschulte at kth.se
Tue Jan 17 14:31:56 CET 2012


Hi,

Please let me take your questions in turn.

1. Changing the relation from strict (that is, "<") to a non-strict (that
is, "<=") will typically not work. It would entail that you do not only find
all _optimal_ solutions but all solution for each and every cost value! So
normally that will be way too many solutions! Try it out with Gist on a
small example and you will see that this will make things break down.

Should I add a tip in MPG that the order must be strict for things to work?

2. To find all optimal solutions, I would first find _one_ optimal solution
as normal. Then I would find all solutions (starting a new search) where the
cost value is equal to the optimal const value.

3. You see that printing "all" optimal solutions with respect to 1. and 2.
does not really make much sense.

I hope that helps

Best
Christian

--
Christian Schulte, www.ict.kth.se/~cschulte/


-----Original Message-----
From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of Josef Eisl
Sent: Tuesday, January 17, 2012 11:17 AM
To: users at gecode.org
Subject: [gecode-users] MinimizeScript: Beginners Question

Hello,

I am currently modelling my first optimisation problem using Gecode.
Apparently MinimizeScript (as well as MinimizeSpace) consider all solutions,
not only the one with the minimal cost() value.
As far as I understood it, the constraint(Space&) method is used to add
restrictions so that the next solution is better than the current. That
means that the last solution must be the optimal solution.
If I want to find all optimal solutions I have to change constrain form
cost_value < old.cost() to something like cost_value <= old.cost(). Are
these assumptions correct?
Now the real question. Is it possible to configure MinimizeScript in a way
that it only prints the very last (optimal) solution?
Is it possible that the commandline option -solutions is used in respect to
optimal solutions s.t. -solutions 0 means "print all optimal solution",
-solutions 1 "print the first optimal solution" and so on.

I am sorry if the answer to my questions is obvious but I didn't manage to
find it in the docs or mailing list.

Thanks for making such a great piece of software and for keeping it
available for everyone!

br
Josef

_______________________________________________
Gecode users mailing list
users at gecode.org
https://www.gecode.org/mailman/listinfo/gecode-users




More information about the users mailing list