/usr/share/swi-prolog/pack/clpBNR/prolog/clpBNR_toolkit.pl
All Application Manual Name SummaryHelp

  • clpBNR
    • prolog
      • clpBNR.pl -- clpBNR: Constraint Logic Programming over Continuous Domain of Reals
      • clpBNR_toolkit.pl -- clpBNR_toolkit: Toolkit of various utilities used for solving problems with clpBNR
        • iterate_until/3
        • mid_split_one/1
        • mid_split/1
        • cf_contractor/2
        • cf_solve/1
        • cf_solve/2
        • taylor_contractor/2
        • taylor_merged_contractor/2
        • lin_minimum/3
        • lin_maximum/3
        • lin_minimize/3
        • lin_maximize/3
        • local_minima/1
        • local_maxima/1
        • local_minima/2
        • local_maxima/2
 cf_solve(+Contractor, +Precision:integer) is nondet
Succeeds if a solution can be found for all variables in the centre form contractor, Contractor, where the resultant domain of any variable is narrower than the limit specified by Precision (for cf_solve/1, default Precision is number of digits as defined by the environment flag clpBNR_default_precision); otherwise fails.

This is done by using iterate_until/3 limited to a count determined by the flag clpBNR_iteration_limit. Examples:

?- X::real, taylor_contractor({X**4-4*X**3+4*X**2-4*X+3==0},T), cf_solve(T).
T = cf_contractor([X], [_A]),
X:: 1.000000000...,
_A::real(-1.0Inf, 1.0Inf) ;
T = cf_contractor([X], [_A]),
X:: 3.00000000...,
_A::real(-1.0Inf, 1.0Inf) ;
false.

?- taylor_contractor({2*X1+5*X1**3+1==X2*(1+X2), 2*X2+5*X2**3+1==X1*(1+X1)},T), cf_solve(T).
T = cf_contractor([X2, X1], [_A, _B]),
X1:: -0.42730462...,
X2:: -0.42730462...,
_B::real(-1.0Inf, 1.0Inf),
_A::real(-1.0Inf, 1.0Inf) ;
false.
See also
- taylor_contractor/2, cf_contractor/2