Optimizer: return infeasable error
This commit is contained in:
parent
cea2a8f4bf
commit
26bf54b8ab
1 changed files with 4 additions and 0 deletions
|
|
@ -239,6 +239,10 @@ func (site *Site) optimizerUpdate(battery []types.Measurement) error {
|
|||
return apiError(resp)
|
||||
}
|
||||
|
||||
if resp.JSON200.Status != optimizer.Optimal {
|
||||
return errors.New(string(resp.JSON200.Status))
|
||||
}
|
||||
|
||||
site.publish("evopt", struct {
|
||||
Req optimizer.OptimizationInput `json:"req"`
|
||||
Res optimizer.OptimizationResult `json:"res"`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue