From b5b900b57e865745ff97fdd80f88d90f874a8cfb Mon Sep 17 00:00:00 2001 From: ErinKuci <Erin.Kuci@ulg.ac.be> Date: Fri, 19 Oct 2018 19:31:15 +0200 Subject: [PATCH] some cleaning --- Lbracket/topo.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/Lbracket/topo.py b/Lbracket/topo.py index 9424428..40c77b3 100644 --- a/Lbracket/topo.py +++ b/Lbracket/topo.py @@ -3,8 +3,8 @@ # import numpy as np -import conveks import onelab +import conveks c = onelab.client(__file__) @@ -92,13 +92,7 @@ conveks.mma.initialize(x, lowerBound, upperBound) # Set appropriate options for MMA conveks.mma.option.setNumber('General.Verbosity', 4) -conveks.mma.option.setNumber('General.SaveHistory', 0) -conveks.mma.option.setNumber('SubProblem.isRobustMoveLimit', 1) -conveks.mma.option.setNumber('SubProblem.isRobustAsymptotes', 1) -conveks.mma.option.setNumber('SubProblem.type', 0) -conveks.mma.option.setNumber('SubProblem.addConvexity', 1) -conveks.mma.option.setNumber('SubProblem.asymptotesRmax', 100.0) -conveks.mma.option.setNumber('SubProblem.asymptotesRmin', 0.001) +conveks.mma.option.setNumber('SubProblem.move', 0.1) # Get iteration count (here it will be 1 - could be different in case of restart) it = conveks.mma.getOuterIteration() @@ -112,7 +106,7 @@ while change > maxChange and it <= maxIter and c.getString('topo/Action') != 'st attributes={'Highlight':'LightYellow'}) # get (copy of) current point - x = np.array(conveks.mma.getCurrentPoint()) + x = conveks.mma.getCurrentPoint() if filtering: setElementTable('Optimization/Results/filterInput', elements, x) @@ -160,7 +154,7 @@ while change > maxChange and it <= maxIter and c.getString('topo/Action') != 'st c.sendInfo('Optimization: it. {}, obj. {}, constr. {}, change {}'.format(it,objective,constraints[0], change)) # call MMA and update the current point - conveks.mma.setMoveLimits(lowerBound, upperBound, 0.1) + #conveks.mma.setMoveLimits(lowerBound, upperBound, 0.1) conveks.mma.updateCurrentPoint(constraints, grad_objective, grad_constraints) change = conveks.mma.getDesignChange() it = conveks.mma.getOuterIteration() -- GitLab