-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use additional variables in the blackbox function? #181
Comments
You have the parameter FIXED_VARIABLE to pass some fixed values to the blackbox function. This is managed by Nomad when calling the blackbox function. The values of the true variables and the fixed variables are passed together to the blackbox function in an input file (batch mode) or in the vector x (library mode with eval_x). It is also possible to pass some fixed information to the blackbox function executable in batch mode.
In this example, myBB.exe must be able to accept arguments Val1, Val2 and the input file name (managed by Nomad) for the variables. |
Thank you very much for your response! |
Yes. Some of the n "variables" are fixed and others varies. It should not affect the quality of the optimization. |
How can I pass any additional variables to the blackbox function other than those that will change?
For example, I need to optimize the function f(x) = abs(original_length - current_length)
The variable current_length will be calculated from the vector x, which will be extracted from argv[1].
But original_length is a vector with fixed lengths, that do not depend on the input parameters. How can I give this vector to function?
I studied the user manual and all the examples, but only mathematical functions are used there without any additional variables.
About the batch method it is written that the function should accept only the name of the vector of variables, and the library method in the eval_x function also accepts only the vector x, hMax and countEval.
The text was updated successfully, but these errors were encountered: