[gecode-users] python binding - Gecode does not find a solution on first run, finds a solution on consecutive runs.
Christian Schulte
cschulte at kth.se
Tue Jul 14 20:38:57 CEST 2015
Please do not ask questions about Gecode bindings. This is about Gecode and
we do not maintain these indings (explained on the webpages).
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 Stefan Krastanov
> Sent: Tuesday, July 14, 2015 8:24 PM
> To: users at gecode.org
> Subject: [gecode-users] python binding - Gecode does not find a solution
on first
> run, finds a solution on consecutive runs.
>
> Hello,
>
> I am using:
>
> gecode-python 0.27
> gecode 3.7.3
> (newer versions from the debian repository do not work with gecode-python)
>
> I have a python function `my_function` that builds a `gecode.space()`
object with
> around 200 000 linear IRT_NQ constraints and 3 IRT_EQ constraints on 9 int
> variables with domain 1-to-10. One final constraint is `minimize` over the
sum of
> the variables.
>
> My python function returns `list(space.search())` at the end.
>
> The first call to this function usually takes ~1minute and does not return
any
> solutions. Consecutive calls take less than a second and return solutions.
>
> Why is this happening? Is the search non-deterministic?
>
> Can the search give no solutions when there are existing solutions?
>
> Why is the first call slow and returns no solutions while consecutive
calls are fast
> and return solutions? Especially so given that I recreate the space each
time? Is
> there some fancy caching happening?
>
> In any case, thanks for the great software. This is the first time I am
using a
> constraint solver and it is quite amazing what it can do.
>
> Best,
> Stefan
>
> _______________________________________________
> Gecode users mailing list
> users at gecode.org
> https://www.gecode.org/mailman/listinfo/gecode-users
More information about the users
mailing list