Closed codykarcher closed 8 years ago
You're overwriting the first constraint with another, such that CL is no longer in the problem.
Change the constraints to add your base constraint:
constraints = [CD >= 1. + CL**2,
CL == 1.0,
Re == c*v*rho/mu,
But I have CL==1
, so isn't that keeping it in the problem? Or is something overwriting all my constraints?
Oh, is this the self[0]
thing?
Yup! The constraintset is changing its first element
Ah, it would be very ideal if it didn't have to overwrite constraints, but rather append. Especially once I get multiple high fidelity models in play... Testing now.
Mm, it can append by overwriting a constraint with a ConstraintSet. From the solver's point of view, it's nice if the number of constraints contained is the same both during solving and during sensitivity generation; that's what was causing the problem earlier.
Ok... We maybe should talk about this. Actually, are you free at all tomorrow? I'm actually starting to optimize airfoils now, but I'm getting some odd behavior...
Sure, taking this offline.
It appears the x0 dictionary is changing with iteration... Is it supposed to do this?