-3

I get the following error, when I run the program. I have attached my error and program as follow. What's wrong with my program?

        error_x= x - x_old
        error_y= y - y_old
        reglage.input['position'] = int(x)
        reglage.input['vitesse'] = int(error_x - error_precedent_x)
        reglage.compute()
        x_angle=reglage.output['angle']
        print x_angle
        reglage.input['position'] = int(y)
        reglage.input['vitesse'] = int(error_y - error_precedent_y)  #dy/dt
        reglage.compute()
        y_angle=reglage.output['angle']
        print y_angle

value = np.fmax(value, np.var.universe.min()) AttributeError: 'function' object has no attribute 'universe'

1 Answers1

0
reglage.input['position'] = int(x)
reglage.input['vitesse'] = int(error_x - error_precedent_x)

inputs should be in the marge of the declared universe:

position = ctrl.Antecedent(np.arange(0, 400, 1), 'position')
vitesse = ctrl.Antecedent(np.arange(-200, 200, 1), 'vitesse')

for this example : x in [0 400] AND error_x - error_precedent_x in [-200 200]