Changeset 17004 for branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Regression.Symbolic.Extensions/ConstrainedConstantOptimizationEvaluator.cs
- Timestamp:
- 06/11/19 20:58:17 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Regression.Symbolic.Extensions/ConstrainedConstantOptimizationEvaluator.cs
r16941 r17004 325 325 326 326 327 alglib.minn lcstate state;328 alglib.minn lcreport rep;327 alglib.minnsstate state; 328 alglib.minnsreport rep; 329 329 try { 330 alglib.minn lccreate(thetaValues.Count, thetaValues.ToArray(), out state);331 alglib.minnlcsetalgoslp(state); // SLP is more robust but slower332 alglib.minn lcsetbc(state, thetaValues.Select(_ => -10000.0).ToArray(), thetaValues.Select(_ => +10000.0).ToArray());333 alglib.minn lcsetcond(state, 1E-7, maxIterations);330 alglib.minnscreate(thetaValues.Count, thetaValues.ToArray(), out state); 331 // alglib.minnssetalgoslp(state); // SLP is more robust but slower 332 alglib.minnssetbc(state, thetaValues.Select(_ => -10000.0).ToArray(), thetaValues.Select(_ => +10000.0).ToArray()); 333 alglib.minnssetcond(state, 1E-7, maxIterations); 334 334 var s = Enumerable.Repeat(1d, thetaValues.Count).ToArray(); // scale is set to unit scale 335 alglib.minn lcsetscale(state, s);335 alglib.minnssetscale(state, s); 336 336 337 337 // set non-linear constraints: 0 equality constraints, constraintTrees inequality constraints 338 alglib.minn lcsetnlc(state, 0, constraintTrees.Count);339 340 alglib.minn lcoptimize(state, calculate_jacobian, null, null);341 alglib.minn lcresults(state, out double[] xOpt, out rep);338 alglib.minnssetnlc(state, 0, constraintTrees.Count); 339 340 alglib.minnsoptimize(state, calculate_jacobian, null, null); 341 alglib.minnsresults(state, out double[] xOpt, out rep); 342 342 343 343
Note: See TracChangeset
for help on using the changeset viewer.