0a7bbb0f733a33a072aa1327dc4699d317d4ce56,trunk/SUAVE/Optimization/Nexus.py,Nexus,finite_difference,#Nexus#,156
Before Change
grad_obj = (grad_obj - obj)/(1e-8)
for ii in xrange(0,conlen):
jac_con[ii,:] = (jac_con[ii,:] - con[ii])/(1e-6)
return grad_obj.astype(float), jac_con.astype(float)
After Change
grad_obj = np.zeros(inplen)
jac_con = np.zeros((inplen,conlen))
con2 = (con*np.ones_like(jac_con))
for ii in xrange(0,inplen):
newx = x*1.0
newx[ii] = newx[ii]+ 1e-8
grad_obj[ii] = self.objective(newx)
jac_con[ii,:] = self.all_constraints(newx)
grad_obj = (grad_obj - obj)/(1e-8)
jac_con = (jac_con - con2).T/(1e-8)
grad_obj = grad_obj.astype(float)
jac_con = jac_con.astype(float)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: suavecode/SUAVE
Commit Name: 0a7bbb0f733a33a072aa1327dc4699d317d4ce56
Time: 2015-09-21
Author: ebotero@stanford.edu
File Name: trunk/SUAVE/Optimization/Nexus.py
Class Name: Nexus
Method Name: finite_difference
Project Name: suavecode/SUAVE
Commit Name: 9b994a2c4d364804ea5311e5e0ae3a80d12f4711
Time: 2019-04-08
Author: timdmacdo@gmail.com
File Name: trunk/SUAVE/Methods/Aerodynamics/Common/Fidelity_Zero/Drag/parasite_drag_wing.py
Class Name:
Method Name: compute_parasite_drag
Project Name: suavecode/SUAVE
Commit Name: 4026d5fded446bd0f0c7397c92d59af27576f565
Time: 2017-12-12
Author: ebotero@stanford.edu
File Name: trunk/SUAVE/Components/Energy/Converters/Combustor.py
Class Name: Combustor
Method Name: compute_rayleigh