Skip to content

Commit

Permalink
L2-Sea: Make propagation benchmark have only 1 output as documented (…
Browse files Browse the repository at this point in the history
…drop optimization constraints here)
  • Loading branch information
linusseelinger authored Jun 11, 2024
1 parent 7c8f329 commit 0cf47bd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions models/l2-sea/umbridge-server.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def get_input_sizes(self, config):
return [2]

def get_output_sizes(self, config):
return [5]
return [1]

def __call__(self, parameters, config):
# Write first (and only) parameter vector to file
Expand Down Expand Up @@ -92,7 +92,7 @@ def __call__(self, parameters, config):
print(config)
return_value = os.system('cd /NATO-AVT-331-L2-Sea-Benchmark/examples/DTMB-5415; mv SBDF.aux SBDF.nml; ../../bin/L2-Sea')
if return_value != 0:
return [[0,0,0,0,0]]
return [[0]]


# Read second line of output file, split and return last 5 elements as output
Expand All @@ -102,7 +102,7 @@ def __call__(self, parameters, config):
line_split = line.split()[-5:] # Split and keep last 5 elements
model_output = [float(i) for i in line_split] # Convert to float

return [model_output]
return [[model_output[0]]]

def supports_evaluate(self):
return True
Expand Down

0 comments on commit 0cf47bd

Please sign in to comment.