1

I am using ojAlgo 55 to solve an optimization problem in standard form:

f(x) = 1/2 x^T Q x + p^T x + r

I am not sure how to specify the constant r in the ExpressionsBasedModel, so that when Optimisation.Result.getValue() is called, the returned value already includes this offset.

Is there a proper way to handle this constant term within the model? If this cannot be handled internally, what is the recommended way to manage it afterwards? Would it be possible to extend ExpressionsBasedModel to store any custom information and, for example, add +r in a custom ExpressionsBasedModel.Integration?

1 Answer 1

0

There is no way to do that. With ExpressionsBasedModel you do not model constant parts of any expression (constraint or objective).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.