MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: FindInstance does not abort with TimeConstrained

  • To: mathgroup at smc.vnet.net
  • Subject: [mg115445] Re: FindInstance does not abort with TimeConstrained
  • From: Yaroslav Bulatov <yaroslavvb at gmail.com>
  • Date: Tue, 11 Jan 2011 06:57:51 -0500 (EST)
  • References: <iggpun$466$1@smc.vnet.net>

On Jan 10, 9:31 pm, leongz <leong... at gmail.com> wrote:
> I am trying to find a solution to a set of three equations in three
> variables using FindInstance. Since I would like the computation to
> abort when it is taking too long, I wrapped it in TimeConstrained.
> However, the computation fails to abort, and even pressing Alt-. does
> not help. Appreciate any help. Thanks.
>
> My code is as follows, on Mathematica 8.
>
> eqnA = -0.41593500000000005*(1 - t)*(1 - u)*(1 - v) -
>   0.5155109999999999*t*(1 - u)*(1 - v) - 0.415706*(1 - t)*u*(1 - v) -
>   0.5152300000000001*t*u*(1 - v) +
>   0.20544400000000002*(1 - t)*(1 - u)*v +
>   0.30929599999999996*t*(1 - u)*v + 0.20519199999999999*(1 - t)*u*v +
>   0.30898500000000007*t*u*v
> eqnB = -0.08238600000000001*(1 - t)*(1 - u)*(1 - v) +
>   0.11608500000000001*t*(1 - u)*(1 - v) -
>   0.082311*(1 - t)*u*(1 - v) + 0.116053*t*u*(1 - v) +
>   0.15861400000000003*(1 - t)*(1 - u)*v +
>   0.5001389999999999*t*(1 - u)*v + 0.15848999999999996*(1 - t)*u*v +
>   0.49979000000000007*t*u*v
> eqnC = 0.12412599999999999*(1 - t)*(1 - u)*(1 - v) +
>   0.160255*t*(1 - u)*(1 - v) + 0.043126*(1 - t)*u*(1 - v) +
>   0.097819*t*u*(1 - v) + 0.404011*(1 - t)*(1 - u)*v +
>   0.5547869999999999*t*(1 - u)*v + 0.308304*(1 - t)*u*v +
>   0.47778400000000004*t*u*v
>
> eqnA = Chop[FullSimplify[eqnA], 0.0001]
> eqnB = Chop[FullSimplify[eqnB], 0.0001]
> eqnC = Chop[FullSimplify[eqnC], 0.0001]
>
> TimeConstrained[
>  FindInstance[{eqnA == 0, eqnB == 0, eqnC == 0, 0 <= t <=
= 1,
>    0 <= u <= 1, 0 <= v <= 1}, {t, u, v}, Reals]
>  , 1]

I have similar problem with FindClique


  • Prev by Date: Re: Problems "Import"ing with Mathematica running Unbuntu
  • Next by Date: Re: original meaning of System` functions
  • Previous by thread: FindInstance does not abort with TimeConstrained
  • Next by thread: Re: FindInstance does not abort with TimeConstrained