Ejemplo n.º 1
0
import pyIbex as ibex
from pyPredicate import pyPdcIn
from pyVisitors import ToVibes
import numpy as np



if __name__ == '__main__':

    params = {'color_in': '#888888[#444444]', 'color_out':
                  '#888888[#DDDDDD]', 'color_maybe': '#888888[w]'}
    vibes.beginDrawing()


    P = IntervalVector(2, [-4, 4])
    A = Paving(P,BoolInterval(YES))
    f = Function("x", "y", "x^2 + y^2")
    pdcA = pyPdcIn(f, IntervalVector(1, [0, 3]), IntervalVector(1, [4, 1000]))
    A.Sivia(pdcA,ibex.op_And,0.03);
    A.visit(ToVibes(10, "Aset"))
    
    B = Paving(P,BoolInterval(YES));
    f = Function("x[2]", 'x[0]^2 + (1 + x[1])^2 + (x[0] + x[1])^2')
    pdcB = pyPdcIn(f, IntervalVector(1, [0, 3]), IntervalVector(1, [6, 10000]))
    B.Sivia(pdcB,ibex.op_And,0.03);
    B.visit(ToVibes(10, "Bset"))
    
    AmoinsB = Paving(P, MAYBE);
    op_binaire(AmoinsB,A,B,ibex.op_Restrict);
    AmoinsB.visit(ToVibes(10, "AmoinsB"))
    
Ejemplo n.º 2
0
from pyIbex import BoolInterval, CmpOp, PdcAnd, PdcOr, PdcNot, op_binaire, op_unaire, op_Restrict, op_Not
from vibes import vibes
import pyIbex as ibex
from pyPredicate import pyPdcIn
from pyVisitors import ToVibes
import numpy as np

if __name__ == '__main__':

    params = {'color_in': '#888888[#444444]', 'color_out':
                      '#888888[#DDDDDD]', 'color_maybe': '#888888[w]'}
    vibes.beginDrawing()
    
    
    P = IntervalVector(2, [-4, 4])
    X = Paving(P,BoolInterval(YES))
    f = Function("x", "y", "x^2 + y^2")
    pdcX = pyPdcIn(f, IntervalVector(1, [0, 3]), IntervalVector(1, [4, 1000]))
    X.Sivia(pdcX,ibex.op_And,0.03);
    X.visit(ToVibes(10, "X"))
    
    B_in = Paving(P,BoolInterval(YES));
    f = Function("x[2]", '(x[0]-0.5)^2 + x[1]^2')
    pdcB_in = pyPdcIn(f, IntervalVector(1, [0, 0.03]))
    B_in.Sivia(pdcB_in,ibex.op_And,0.03);
    B_in.visit(ToVibes(10, "B_in"))

    B_out = Paving(P,BoolInterval(YES));
    f = Function("x[2]", '(x[0]-1)^2 + (x[1]-1)^2')
    pdcB_out = pyPdcIn(f, IntervalVector(1, [0, 0.15]))
    B_out.Sivia(pdcB_out,ibex.op_And,0.03);
Ejemplo n.º 3
0
from pyPredicate import pyPdcIn, pyPdcTransform, pyPdcInSet
from pyVisitors import ToVibes
import numpy as np
import math

if __name__ == '__main__':

    params = {
        'color_in': '#888888[#444444]',
        'color_out': '#888888[#DDDDDD]',
        'color_maybe': '#888888[w]'
    }
    vibes.beginDrawing()

    P = IntervalVector(2, [-4, 4])
    A = Paving(P, YES)
    X = Paving(P, MAYBE)

    B_in = Paving(P, YES)
    B_out = Paving(P, YES)
    eps = 0.02

    f = Function("x", "y", "x^2 + y^2")
    ThickDisk = pyPdcIn(f, IntervalVector(1, [0, 3]))
    f = Function("x[2]", '(x[0]-0.5)^2 + x[1]^2')
    Pastille_in = pyPdcIn(f, IntervalVector(1, [0, 0.3]))
    f = Function("x[2]", '(x[0]-1)^2 + (x[1]-1)^2')
    Pastille_out = pyPdcIn(f, IntervalVector(1, [0, 0.15]))

    A.Sivia(ThickDisk, op_And, eps)
    A.visit(ToVibes(10, "A"))
Ejemplo n.º 4
0
from pyIbex import Set_Contractor_Subset, Set_Contractor_Disjoint
from vibes import vibes
import pyIbex as ibex
from pyPredicate import pyPdcIn, pyPdcTransform, pyPdcInSet
from pyVisitors import ToVibes
import numpy as np
import math

if __name__ == '__main__':

    params = {'color_in': '#888888[#444444]', 'color_out':
                  '#888888[#DDDDDD]', 'color_maybe': '#888888[w]'}
    vibes.beginDrawing()
    
    P = IntervalVector(2, [-4, 4])
    A = Paving(P,YES);
    X = Paving(P,MAYBE);

    B_in = Paving(P,YES);
    B_out = Paving(P,YES);
    eps = 0.02

    f = Function("x", "y", "x^2 + y^2")
    ThickDisk = pyPdcIn(f, IntervalVector(1, [0, 3]))
    f = Function("x[2]", '(x[0]-0.5)^2 + x[1]^2')
    Pastille_in = pyPdcIn(f, IntervalVector(1, [0, 0.3]))
    f = Function("x[2]", '(x[0]-1)^2 + (x[1]-1)^2')
    Pastille_out = pyPdcIn(f, IntervalVector(1, [0, 0.15]))

    A.Sivia(ThickDisk,op_And,eps);
    A.visit(ToVibes(10, "A"))