Hello,
I have encountered a weird error, reporting AttributeError: 'numpy.bool_' object has no attribute 'parameters'
def offline_opt(overall_load):
power_signal = cp.Variable(time_slot)
obj_constraints = []
for time in range(time_slot):
SoC = 0
for i in range(time):
SoC += ((1-agg[3])**(i))*power_signal[time-i]
obj_constraints += [-agg[0]<=SoC, SoC<= agg[0]]
prob = cp.Problem(cp.Minimize(max_peak(power_signal, overall_load)), \
constraints=obj_constraints)
prob.solve(solver=cp.MOSEK)
The problem lies in the red line. But if I replace agg[0] by 10, then it goes through and gives me a result. So I checked the type and value of agg[0],
IPdb [2]: agg[0]
10.0
IPdb [4]: type(agg[0])
<class 'numpy.float64'>
So what is going on?
Thanks!