mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-14 20:33:30 +01:00
Use levenberg-maquard algo for precise minimization
This commit is contained in:
parent
4536f948f4
commit
81b217bf2e
1 changed files with 4 additions and 6 deletions
|
|
@ -258,13 +258,11 @@ TCAD.parametric.prepare = function(constrs, locked, aux, alg) {
|
|||
if (conflict) return nullResult;
|
||||
if (constrs.length == 0) return nullResult;
|
||||
if (sys.params.length == 0) return nullResult;
|
||||
switch (alg) {
|
||||
case 2:
|
||||
return TCAD.parametric.solve_lm(sys, model, jacobian, rough);
|
||||
case 1:
|
||||
default:
|
||||
return optim.dog_leg(sys, rough);
|
||||
var res = optim.dog_leg(sys, true);
|
||||
if (!rough) {
|
||||
res = TCAD.parametric.solve_lm(sys, model, jacobian, false)
|
||||
}
|
||||
return res;
|
||||
}
|
||||
var systemSolver = {
|
||||
diagnose : function() {return TCAD.parametric.diagnose(sys)},
|
||||
|
|
|
|||
Loading…
Reference in a new issue