diff --git a/Team25/shape.py b/Team25/shape.py index 35e0834e3bdda1c89c7645e0450727f47246997f..70b1dbf0e9cf8dd5edbc0ac95d068eb08d60e7cc 100644 --- a/Team25/shape.py +++ b/Team25/shape.py @@ -133,7 +133,6 @@ while it <= maxIter and c.getString('shape/Action') != 'stop': # compute objective function and constraints c.runSubClient('myGetDP', mygetdp + '-solve GetPerformances') objective = np.sum(readSimpleTable(c.getPath('res_opt/w.txt'))) - constraints = np.array([np.sum(xFromMMA)/np.sum(upperBound)-1.0]) # generate the velocity field of each design variable getVelocityField(x) @@ -146,19 +145,17 @@ while it <= maxIter and c.getString('shape/Action') != 'stop': c.waitOnSubClients() grad_objective = np.asarray([np.sum(readSimpleTable(c.getPath('res_opt/Grad_w_wrt_dv_'+str(dv)+'.txt')))\ for dv in xrange(numVariables)]) - grad_constraints = np.ones(numVariables)/np.sum(upperBound) print('*'*50) print('iteration: ', it) print('change: ', change) print('current point:', xFromMMA) print('objective:', objective) - print('constraints:', constraints) - c.sendInfo('Optimization: it. {}, obj. {}, constr. {}'.format(it,objective,constraints[0])) + c.sendInfo('Optimization: it. {}, obj. {}'.format(it,objective)) # call MMA and update the current point - conveks.mma.setMoveLimits(lowerBound, upperBound, 1.0e-3) - conveks.mma.updateCurrentPoint(grad_objective,constraints,grad_constraints) + conveks.mma.setMoveLimits(lowerBound, upperBound, 0.1) + conveks.mma.updateCurrentPoint(grad_objective) change = conveks.mma.getDesignChange() it = conveks.mma.getOuterIteration()