Let say we call prog.AddCost(...) multiple times and have a triple term cost:
cost(x) = a(x) + b(x) + c(x)
How do we easily access an individual cost?
Each call to AddCost
returns a binding, which can be evaluated directly, for instance via EvalBinding
in MathematicalProgramResult
.