cureos / csipopt

.NET interface to Ipopt non-linear optimizer
http://code.google.com/p/csipopt/
Eclipse Public License 1.0
19 stars 11 forks source link

Refactoring of Ipopt class #1

Closed cureos closed 12 years ago

cureos commented 12 years ago

Rename Ipopt instance partial class to IpoptProblem and removed sealed directive. Implement additional IpoptProblem constructor that takes native delegates as arguments. Make Dispose(bool) method virtual protected to facilitate subclassing. Have problem classes like HS071 inherit IpoptProblem. Move static interop methods and delegates to static class IpoptAdapter. Remove SetIntermediateCallback method from IpoptProblem; have inheriting classes setting m_intermediate in the constructor instead. Consider making SetScaling method a Scaling property with a setter instead.

cureos commented 12 years ago

SetIntermediateCallback method maintained, but is also conditionally called in the constructor that is intended to be ued in subclassing. SetScaling sets scaling for multiple parameters at once and is therefore best maintained as a method.