Hi,
when i use the OptimiseButton in viktor, I am able to present all optimisation result values. But the input values are not presented if I follow the docs.
the code I use:
test_page = Page('TEST')
test_page.new_section = Section('TEST_SECTIE')
test_page.new_section.input_field_1 = NumberField('input 1')
test_page.new_section.optimize_button = OptimiseButton('Optimaliatieknop',
method='test_optimisation_function')
def test_optimisation_function(self, params, **kwargs):
results = []
for i in range(0, 10):
params = {'test_page': {'new_section': {'input_field_1': i}}}
analysis = {'result': i * 2}
results.append(OptimizationResultElement(params=params, analysis_result=analysis))
return OptimizationResult(results=results,
result_column_names_input=['input_field_1'],
output_headers={'result': 'Resultaat'})
The presentation of results I get:
As you can see, the input values are not presented. Iβve tried to replace result_column_names_input=['input_field_1']
with result_column_names_input={'input_field_1': 'Invoer'}
(similar to the output header) But this doesnβt work.