diff --git a/Team25/shape.py b/Team25/shape.py index 0bb2d1e2e288867f814925c8e6f9eef7cbc2cced..0557239a6bf3c5a2b853b73dd7485a29decf5ea7 100644 --- a/Team25/shape.py +++ b/Team25/shape.py @@ -139,7 +139,7 @@ while it <= maxIter and c.getString('shape/Action') != 'stop': # generate the velocity field of each design variable getVelocityField(x) - # compute objective function and constraints + # compute objective function and constraints c.runSubClient('myGetDP', mygetdp + '-solve GetPerformances') # as well as their sensitivity with respect to design variables at `x' @@ -151,11 +151,11 @@ while it <= maxIter and c.getString('shape/Action') != 'stop': # get the value of the objective function and of the constraints # as well as their sensitivity with respect to design variables at `x' - objective = np.sum(readSimpleTable('res_opt/w.txt')) + objective = np.sum(readSimpleTable(c.getPath('res_opt/w.txt'))) constraints = np.array([np.sum(xFromMMA)/100.0-1.0]) - grad_objective = np.asarray([np.sum(readSimpleTable('res_opt/Grad_w_wrt_dv_'+str(dv)+'.txt'))\ + 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)/100.0 + grad_constraints = np.ones(numVariables)/100.0 if it == 1: fscale = 1.0 / objective objective *= fscale