I am trying to find a particular number from a basic math formula using optimization method so it can tweak slider on it own. For example: if x/y + y/z + z/x = 6.125 , my input would be with three sliders for each x,y,z and I need combinations of different numbers giving 6.125

if x = 16, y = 4, z = 2 it gives 6.125 from above equation but I need all possible combinations within certain range. Is it possible to set galapogos or octopus to find particular combination for the number we need?

Surely thereās an infinite amount of combinations that yield that result, or are x, y and z always integers?

This sounds like an algebraic problem, not an optimisation problem. Youāre looking for all answers to a specific question, which means either writing them down algebraically or solving the relationships as equations.

HI,
donāt want to interrupt, but I think this is similar to a question I had (If I misunderstood, just ignore me)

What I think he is saying is this:
letās say x+y=z
can you give all variables x,y,z as an input but z being a āhardā input, so if for example z=12
when you take the x slider to 6, y will slide on its own to 6
when you take the x slider to 5, y will go (again on its own) to 7 and so onā¦

Aris you are right, am trying to find something like that

David May I know how the result will give me 6.125 with equations? I think you made into curves but am talking about simple algebra / quadratic equations

The curves are just there to aid intuitive insight. Whenever the curve intersects an integer coordinate you have a solution. Hereās a brute force approach with tolerance: xyz_bruteforce.gh (25.3 KB)

If you want to search much bigger ranges, or add more variables, it probably makes more sense to switch to genuine code, as that allows you to iterate over all possible solutions without having to remember the wrong ones too. Although of course a genuine algebraic solution would be preferable.

I feel that Iām being intrusive here,
but since @greatsaiyamandbz agreed, I am continuing for the last time:
this is an imaginary component that with a range of 1 component, it locks a given value and whenever one of the inputs changes, the other one changes accordingly (and I guess this could be made to work with more than two inputs with some kind of hierarchy)
I know drawing pictures is much easier than doing the code, and it might conflict with the entire architecture of GH. but Iām just saying it would be nice!

Thereās no functionality build into the GH SDK that would allow components to operate in reverse. Indeed for almost all components that would be impossible, really simple ones like adding two numbers being the exception. But what if the addition has an extra input, how do you distribute the āerrorā to B and C when A changes?

"some kind of hierarchy"
from the top of my hat, top inputs (as you see them on the battery) come first.
Here Iām showing the addition but where this would REALLY rock would be with expression
I understand there are many complications
for example if you had a trig. function it would probably not only have to change the values of the sliders but their nature as well (from Natural to Real/ negative/ what have you)
I was reluctant to pose this question in the past for exactly these reasons.
(but many times I find myself doing the operations on paper when this way -if it could be done- it would just be a matter of identifying the result you want and let the machine do the work for you-)

Not entirely sure, but is seems like combinatorial generation might be appropriate here (see a GHPython implementation here), where in your case one might generate all the combinations for a set, and then check the results against the function to find best fit candidates within the generated combinations.

No! No!
itās just a picture I drew! Iām just saying it would be nice if it existed!
Ignore my posts, Iām being theoretical. Not going to help you with your problem.
Listen to the other guys.

Aha! would be cool to generate combinations. It will be very useful for me when I was trying to find constants (value used in Engineering) that I use in formulations.

Expression component gave this error ā1. Expression generated an error for (x, y, z): Left hand value of operator / is Nullā when I increased range