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
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:
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). https://nomad-4-user-guide.readthedocs.io/en/latest/AdvancedFunctionalities.html#fixed-variable
It is also possible to pass some fixed information to the blackbox function executable in batch mode.
If your blackbox executable accepts some extra arguments and an argument for an input file name you can define the BB_EXE as in the example below
BB_EXE "myBB.exe Val1 Val2"
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!
So the problem dimension will be the number of dependent variables + the number of fixed variables?
Will this somehow affect the performance or the quality of 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: