diff --git a/Lbracket/topo.py b/Lbracket/topo.py index 94244281fa0df43fa5d34014a82de346472f24d2..40c77b386d6e04e74fc00779461f092267a806d6 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()