Skip to content
Snippets Groups Projects
Commit b5b900b5 authored by Erin Kuci's avatar Erin Kuci
Browse files

some cleaning

parent 8f0c0cdc
No related branches found
No related tags found
No related merge requests found
......@@ -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()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment