Commit 6931c211 authored by alexander.dornheim's avatar alexander.dornheim
Browse files

Output is now returned as a dictionary in AP, RAAR

Phase was adjusted for new output
This should allow different algorithms to return different arguments
Still need to adjust other algorithms, Sudoku, pythography...
parent aa425018
......@@ -136,4 +136,4 @@ class AP(Algorithm):
change = change[1:iters+1];
gap = gap[1:iters+1];
return u1, u2, iters, change, gap;
return {'u1': u1, 'u2': u2, 'iter': iter, 'change': change, 'gap': gap}
......@@ -175,7 +175,8 @@ class RAAR(Algorithm):
change = change[1:iter+1];
gap = gap[1:iter+1];
shadow_change = shadow_change[1:iter+1]
return u1, u2, iter, change, gap#, shadow_change
output = {'u1': u1, 'u2': u2, 'iter': iter, 'change': change, 'gap': gap, 'shadow_change' : shadow_change}
if hasattr(self, 'truth'):
return output
......@@ -212,10 +212,7 @@ class Phase(Problem):
# algorithm = self.config['algorithm'](self.config)
self.output = dict();
self.output['u1'],self.output['u2'],self.output['iter'],self.output['change'],self.output['gap'] = \['u_0'],self.config['TOL'],self.config['MAXIT'])
self.output =['u_0'],self.config['TOL'],self.config['MAXIT'])
def _postsolve(self):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment