Project Name: GeoStat-Framework+welltestpy
Language: Python
Statement Type: Constant Assignment

Source Code:
def _addpoints(sol, distances, prec):
    """
    Try for each point to add it to a given solution-approach.

    gives all possibilties and a status about the solution:
        state = 0: possibilities found
        state = 1: no possibilities
        state = 2: solution-approach has a contradiction with a point
    """
    res = []

    posfound = False

    # generate all missing points in the solution approach
    pleft = []
    for n, m in enumerate(sol):
        if np.ndim(m) == 0:
            pleft.append(n)

    # try each point to add to the given solution-approach
    for i in pleft:
        ires, state = _addpoint(sol, i, distances, prec)

        # if a point is addable, add new solution-approach to the result
        if state == 0:
            posfound = True
            for j in ires:
                res.append(dcopy(j))
        # if one point gives a contradiction, return empty result and state 2
        elif state == 2:
            return [], 2

    # if no point is addable, return empty result and state 1
    if posfound:
        return res, 0

    return res, 1

_addpoints(sol=[array([0., 0.]), array([3., 0.]), 0, 0], distances=array([[ 0.,  3.,  4.,  1.],       [ 3.,  0.,  2.,  3.],       [ 4.,  2.,  0., -1.],       [ 1.,  3., -1.,  0.]]), prec=0.1)

Selected Statement: posfound = False

Function Input:
sol: [array([0., 0.]), array([3., 0.]), 0, 0]
distances: array([[ 0.,  3.,  4.,  1.],       [ 3.,  0.,  2.,  3.],       [ 4.,  2.,  0., -1.],       [ 1.,  3., -1.,  0.]])
prec: 0.1

Variable Values Before Statement:
Constant: False

Value After Statement Execution: False

Variable States During Runtime (line, value):
sol: 1
[array([0., 0.]), array([3., 0.]), 0, 0]
distances: 1
array([[ 0.,  3.,  4.,  1.],       [ 3.,  0.,  2.,  3.],       [ 4.,  2.,  0., -1.],       [ 1.,  3., -1.,  0.]])
prec: 1
0.1
res: 10
28
[[array([0., 0.]), array([3., 0.]), array([3.5       , 1.93649167]), 0]]
28
[[array([0., 0.]), array([3., 0.]), array([3.5       , 1.93649167]), 0], [array([0., 0.]), array([3., 0.]), array([ 3.5       , -1.93649167]), 0]]
28
[[array([0., 0.]), array([3., 0.]), array([3.5       , 1.93649167]), 0], [array([0., 0.]), array([3., 0.]), array([ 3.5       , -1.93649167]), 0], [array([0., 0.]), array([3., 0.]), 0, array([0.16666667, 0.9860133 ])]]
28
[[array([0., 0.]), array([3., 0.]), array([3.5       , 1.93649167]), 0], [array([0., 0.]), array([3., 0.]), array([ 3.5       , -1.93649167]), 0], [array([0., 0.]), array([3., 0.]), 0, array([0.16666667, 0.9860133 ])], [array([0., 0.]), array([3., 0.]), 0, array([ 0.16666667, -0.9860133 ])]]
posfound: 12
False
26
True
pleft: 15
18
[2]
18
[2, 3]
n: 16
0
16
1
16
2
16
3
m: 16
array([0., 0.])
16
array([3., 0.])
16
0
i: 21
2
21
3
ires: 22
[[array([0., 0.]), array([3., 0.]), array([3.5       , 1.93649167]), 0], [array([0., 0.]), array([3., 0.]), array([ 3.5       , -1.93649167]), 0]]
22
[[array([0., 0.]), array([3., 0.]), 0, array([0.16666667, 0.9860133 ])], [array([0., 0.]), array([3., 0.]), 0, array([ 0.16666667, -0.9860133 ])]]
state: 22
0
j: 27
[array([0., 0.]), array([3., 0.]), array([3.5       , 1.93649167]), 0]
27
[array([0., 0.]), array([3., 0.]), array([ 3.5       , -1.93649167]), 0]
27
[array([0., 0.]), array([3., 0.]), 0, array([0.16666667, 0.9860133 ])]
27
[array([0., 0.]), array([3., 0.]), 0, array([ 0.16666667, -0.9860133 ])]