public SolverResult Solve(Double[] averageValues, Double[] standardDeviations, Double[] initialValues) { Double obj; this._averageValues = averageValues; this._standardDeviations = standardDeviations; var code = this.SolveProblem(initialValues, out obj); var result = new SolverResult(initialValues, (Int32)code); return(result); }
private static SolverResult Solve(JacobianHelper jacobianHelper, Double[] lowerBounds, Double[] upperBounds, Double[] cLowerBounds, Double[] cUpperBoundsBounds, Func <Double[], Double[]> constraintCallback, Jacobian jac, IpoptParams ipoptParams, Double[] avg, Double[] stdDev) { var res = new SolverResult(new Double[0], -1); using (var sut = new IpoptReconciliationProblem(jacobianHelper, lowerBounds, upperBounds, cLowerBounds, cUpperBoundsBounds, constraintCallback, jac, ipoptParams, ir => { })) { res = sut.Solve(avg, stdDev); } return(res); }