OK, it’s good news that you want to maximize it. So here’s what you do. You need to define some sort of maximum for p_t, let’s call it P. Make it large enough so that it doesn’t really change your problem, but do make it as small as possible for numerical reasons.

Because c_t is binary, we have

$$c_t\log(1+h_tp_t) = \log(1+c_th_tp_t) = \log(1+h_t\min{Pc_t,p_t})$$

So your problem becomes

$$\text{maximize} ~ \sum_{t=1}^T w_t \log(1+h_t\min{Pc_t,p_t})$$

or, in CVX,

```
maximize( sum( w .* log(1 + h .* min(P*c, p) ) ) )
```

But you don’t want to stop there, because frankly CVX doesn’t work very well with logarithms. However, thos problem is equivalent to a weighted geometric mean:

`maximize( geo_mean( 1 + h .* min(P*c, p), 1, w ) )`