Ask Your Question

How to use the solver with a constraint on multiples cells?

asked 2018-03-11 18:31:21 +0200

Pico051 gravatar image

I want to minimize this function in LibreOffice Calc:

f = 5*x1 + 3*x2 + 2*x3 + 0*x4

With respect to this constraints:

A1 < x1 < B1
A2 < x2 < B2
A3 < x3 < B3
A4 < x4 < B4
x1 + x2 + x3 + x4 = 1

I want to use the solver to resolve this problem. I can easily do it if I only care about the 4 first constraints. But I don't know how to implement the last one. An idea?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2018-03-12 15:05:53 +0200

Jim K gravatar image

Sum x1 through x4 in a formula, and then add the requirement to the solver that the result equals 1. For example, put this in E5:



Attached example file.ods

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-03-11 18:31:21 +0200

Seen: 32 times

Last updated: Mar 12