You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a feeling this concept is implicit in the usage of Kiwi, but I'm new to this stuff, and wondering if you can help point it out, if in fact the API allows it.
I read the Cassowary paper (API very similar to Kiwi's),
and it mentions that it is great for solving objective function min/maximization problems, however after that brief mention at the top of the doc, it no longer mentions "objective function" anywhere else.
Where exactly in that doc is the "objective function", and is it being minimized or maximized?
(I'm trying to figure it out for use in the TypeScript fork of kiwi, and I'd like to document these concepts more clearly if in fact they are doable).
In Google OR-Tools, there's actually an API for explicitly defining objective functions, with "objective" in the API naming:
The text was updated successfully, but these errors were encountered:
trusktr
changed the title
How to we define an "objective function" and maximize or minimize it?
How do we define an "objective function" and maximize or minimize it?
Jan 26, 2024
Indeed in kiwi one cannot directly access the objective function. Kiwi attempts to satisfy all constraints and minimize the deviation for constraints with a non-required strength.
I am not sure how best to help you however. @sccolbert may have a clearer image of kiwi inner working than I do though.
Broadly, the objective function minimizes the error of non-required constraints, while simultaneously satisfying the required constraints.
For example: if x <= 0 but also x >= -50 | weak and x == 50 | weak, then we can guarantee that x will indeed be <= 0 and that x will tend towards +50 as much as is allowed from the other constraints. So in the absense of any other constraints, the "most optimal" solution to this problem is x = 0, because that's the best solution to the given constraints.
The 'objective function' is the amalgamation of all of these constraints in the system, no matter how many variables, provided they are all linearly related.
Your job as a library author is to present your problem-to-be-solved as a series of linear (in)equality constraints where the solution is the optimal balance of meeting the "required" constraints in full, and then getting as close as possible to the non-required constraints based on their weights.
I have a feeling this concept is implicit in the usage of Kiwi, but I'm new to this stuff, and wondering if you can help point it out, if in fact the API allows it.
I read the Cassowary paper (API very similar to Kiwi's),
https://cassowary.readthedocs.io/_/downloads/en/latest/pdf/
and it mentions that it is great for solving objective function min/maximization problems, however after that brief mention at the top of the doc, it no longer mentions "objective function" anywhere else.
Where exactly in that doc is the "objective function", and is it being minimized or maximized?
(I'm trying to figure it out for use in the TypeScript fork of kiwi, and I'd like to document these concepts more clearly if in fact they are doable).
In Google OR-Tools, there's actually an API for explicitly defining objective functions, with "objective" in the API naming:
https://developers.google.com/optimization/lp/lp_example#define_the_objective_function
The text was updated successfully, but these errors were encountered: