Ipopt passing extra constant or functions

  c++, ipopt, optimization

I have been recently working with ipopt optimizer using its own example I’m
Able to calculate local minima but I’m not able to pass any extra constant for my equation :
Consider this example which I have to calculate b through my own code before calling ipopt solver :

F(x) = (1-x)/ (x-b)

I have tried to define the static variable and change the value cause me getting linker errors
Is there any way you pass constant In ipopt?

Source: Windows Questions C++

LEAVE A COMMENT