[gecode-users] python binding - Gecode does not find a solution on first run, finds a solution on consecutive runs.

Stefan Krastanov stefan.krastanov at yale.edu
Tue Jul 14 20:46:06 CEST 2015


Hopefully you can still help me with the questions about determinism:

Is the search for solution always exhaustive?

Can the search give no solutions when there are existing solutions?

On 14 July 2015 at 14:38, Christian Schulte <cschulte at kth.se> wrote:
> 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://urldefense.proofpoint.com/v2/url?u=https-3A__www.gecode.org_mailman_listinfo_gecode-2Dusers&d=AwICAg&c=-dg2m7zWuuDZ0MUcV7Sdqw&r=ag5oVRuiZInvprFp2PYfMKAexpGCTVWGL34DzpqCiik&m=ooI8YWFt5F7JewPeoyMUGhdVfuU8PUgp2eVdX6XslPU&s=RjHJtgLJqMydfeqEGmrbAitzyxKhxgQkswqqaOTNaxE&e=
>



More information about the users mailing list