@datagrok/compute 1.43.5 → 1.43.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/148.js +1 -1
- package/dist/148.js.map +1 -1
- package/dist/377.js +2 -0
- package/dist/377.js.map +1 -0
- package/dist/44.js +2 -0
- package/dist/44.js.map +1 -0
- package/dist/package-test.js.map +1 -1
- package/dist/package.js +1 -1
- package/dist/package.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Compute changelog
|
|
2
2
|
|
|
3
|
+
## 1.43.7 (2025-05-28)
|
|
4
|
+
|
|
5
|
+
- Help tweaks
|
|
6
|
+
|
|
7
|
+
## 1.43.6 (2025-05-12)
|
|
8
|
+
|
|
9
|
+
- Sensitivity Analysis update
|
|
10
|
+
|
|
11
|
+
## 1.43.5 (2025-05-02)
|
|
12
|
+
|
|
13
|
+
- `OutliersSelectionViewer` improvements
|
|
14
|
+
|
|
3
15
|
## 1.43.4 (2025-05-02)
|
|
4
16
|
|
|
5
17
|
- Compute2 small changes/fixes
|
package/dist/148.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var compute;(()=>{"use strict";var t={241:(t,e,n)=>{n.d(e,{tB:()=>i});var o=function(t,e,n,o){return new(n||(n=Promise))((function(r,a){function i(t){try{l(o.next(t))}catch(t){a(t)}}function s(t){try{l(o.throw(t))}catch(t){a(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,s)}l((o=o.apply(t,e||[])).next())}))};function r(t,e,n,o){for(let r=0;r<e;r++){let a=0;for(let t=0;t<e+1;t++)t!=n&&(a+=o[t][r]);t[r]=a/e}}function a(t,e,n,o,r,a,i,s){for(let l=0;l<a;l++)e[l]=t[l],e[l]+=r*(t[l]-o[n][l]),e[l]<i[l]?e[l]=i[l]:e[l]>s[l]&&(e[l]=s[l])}new Map([["tolerance",{default:1e-6,min:1e-20,max:.1}],["maxIter",{default:50,min:1,max:1e4}],["nonZeroParam",{default:1e-4,min:1e-20,max:.1}],["initialScale",{default:.02,min:1e-20,max:.1}],["scaleReflaction",{default:1,min:1,max:2}],["scaleExpansion",{default:2,min:1,max:2}],["scaleContraction",{default:-.5,min:-.5,max:0}]]),new Map([["tolerance","tolerance"],["maxIter","max iterations"],["nonZeroParam","non-zero param"],["initialScale","initial scale"],["scaleReflaction","scale reflection"],["scaleExpansion","scale expansion"],["scaleContraction","scale contraction"]]);const i=function(t,e,n,i,s){return o(this,void 0,void 0,(function*(){const l=n.get("tolerance"),c=n.get("maxIter"),u=n.get("scaleReflaction"),f=n.get("scaleExpansion"),p=n.get("scaleContraction"),A=e.length+1,m=e.length,[h,d]=yield function(t,e,n,r,a){return o(this,void 0,void 0,(function*(){const o=n.length+1,i=n.length,s=e.get("nonZeroParam"),l=e.get("initialScale"),c=new Array(o),u=new Array(o);for(let e=0;e<o;e++){c[e]=new Float32Array(i);for(let t=0;t<i;t++)c[e][t]=n[t],0!=e&&e-1===t&&(0==n[t]?c[e][t]=s:c[e][t]+=l*n[e-1],c[e][t]<r[t]?c[e][t]=r[t]:c[e][t]>a[t]&&(c[e][t]=a[t]));u[e]=yield t(c[e])}return[c,u]}))}(t,n,e,i,s),E=new Array(A);for(let t=0;t<A;t++)E[t]=t;const I=E.length-1;let T=0,_=0,w=0,S=0;const O=new Float32Array(m),y=new Float32Array(m),R=new Float32Array(m),N=new Float32Array(m),g=new Array(c);if(A>1){for(;E.sort(((t,e)=>d[t]-d[e])),!(T>c);){if(0==T&&(_=d[0],w=2*d[E[0]]),g[T]=_,++T,_=d[E[0]],w-_>l)S=0;else if(++S,S>2*A)break;w=_,r(O,m,E[I],h),a(O,y,E[I],h,u,m,i,s);const e=yield t(y);if(e<d[E[I]]){a(O,R,E[I],h,f,m,i,s);const n=yield t(R);if(n<e){d[E[I]]=n;for(let t=0;t<m;t++)h[E[I]][t]=R[t];continue}d[E[I]]=e;for(let t=0;t<m;t++)h[E[I]][t]=y[t];continue}a(O,N,E[I],h,p,m,i,s);const n=yield t(N);if(!(n<d[E[I]]))break;d[E[I]]=n;for(let t=0;t<m;t++)h[E[I]][t]=N[t]}for(let t=T;t<c;t++)g[t]=d[E[0]]}return{point:h[E[0]],cost:d[E[0]],iterCosts:g,iterCount:T-1}}))}},265:(t,e,n)=>{n.d(e,{q:()=>a});var o=n(9467),r=n(5669);class a extends o.Y{constructor(t){super(),this.maxTime=0,this.startingTime=0,this.maxTime=t,this.startingTime=performance.now()}onIterationStart(){if(performance.now()-this.startingTime>this.maxTime)throw new r.g1(`Max time exceeded (${this.maxTime} ms)`)}}},567:(t,e,n)=>{n.d(e,{$:()=>M});var o=n(5669),r=n(1033);const a=.435866521508459,i=-1.307599564525377,s=i/a,l=i+a,c=-.7098857586097217,u=c/a,f=-.5599673596027777,p=f/a,A=c+f+a,m=-.15550856807552085/a,h=-.9538851657511223/a,d=.6735272123181841/a,E=-.43586652150845895+a,I=1.307599564525377,T=I,_=.3444914319244792,w=-.4538851657511223,S=.6735272123181841,O=.435866521508459,y=_-.5,R=w- -.2573881208652208,N=S-.43542008724775044,g=O-.32196803361747034;function M(t,e){const n=t.func,i=t.arg.start,c=t.arg.finish;let f=t.arg.step;const M=f,L=t.tolerance,F=Math.trunc((c-i)/f)+1,C=t.initial.length,v=C*C,K=new Float64Array(F),U=Array(C);for(let t=0;t<C;++t)U[t]=new Float64Array(F);let D=i+M,P=i,x=i,V=!0,G=1,H=0,b=0,k=0,$=0;const W=new Float64Array(C*C);for(let t=0;t<C;++t)for(let e=0;e<C;++e)W[e+t*C]=t===e?1:0;const Y=new Float64Array(t.initial),q=new Float64Array(t.initial),B=new Float64Array(C),X=new Float64Array(C),Z=new Float64Array(C),Q=new Float64Array(C),j=new Float64Array(v),J=new Float64Array(C),z=new Float64Array(C),tt=new Float64Array(C),et=new Float64Array(C),nt=new Float64Array(C),ot=new Float64Array(C),rt=new Float64Array(C);let at=0;const it=new Float64Array(C),st=new Float64Array(C),lt=new Float64Array(v),ct=new Float64Array(v),ut=new Float64Array(C),ft=new Float64Array(C),pt=C>2;K[0]=i;for(let t=0;t<C;++t)U[t][0]=Y[t];for(;V;){n(P,Y,B),e&&e.onIterationStart();for(let t=0;t<C;++t)X[t]=(0,o.tn)(Y[t])+f*(0,o.tn)(B[t])+o.ZL;for(P+f>c&&(f=c-P,V=!1);;){at=f*a,(0,o.aQ)(P,Y,n,o.HV,ot,rt,j),(0,o.Wv)(P,Y,n,o.HV,ot,rt,nt);for(let t=0;t<v;++t)j[t]=W[t]-at*j[t];pt&&(0,r.kQ)(j,lt,ct,C);for(let t=0;t<C;++t)nt[t]*=f;n(P,Y,it);for(let t=0;t<C;++t)ft[t]=it[t]+a*nt[t];pt?(0,r.fV)(lt,ct,ft,ut,J,C):(0,r.R1)(j,ft,J);for(let t=0;t<C;++t)st[t]=Y[t]+I*f*J[t];n(P+T*f,st,it);for(let t=0;t<C;++t)st[t]=s*J[t];for(let t=0;t<C;++t)ft[t]=it[t]+st[t]+l*nt[t];pt?(0,r.fV)(lt,ct,ft,ut,z,C):(0,r.R1)(j,ft,z);for(let t=0;t<C;++t)z[t]-=st[t];for(let t=0;t<C;++t)st[t]=Y[t]+.5*f*(J[t]+z[t]);n(P+f,st,it);for(let t=0;t<C;++t)st[t]=u*J[t]+p*z[t];for(let t=0;t<C;++t)ft[t]=it[t]+st[t]+A*nt[t];pt?(0,r.fV)(lt,ct,ft,ut,tt,C):(0,r.R1)(j,ft,tt);for(let t=0;t<C;++t)tt[t]-=st[t];for(let t=0;t<C;++t)st[t]=Y[t]+.5*f*(J[t]+z[t]);n(P+f,st,it);for(let t=0;t<C;++t)st[t]=m*J[t]+h*z[t]+d*tt[t];for(let t=0;t<C;++t)ft[t]=it[t]+st[t]+E*nt[t];pt?(0,r.fV)(lt,ct,ft,ut,et,C):(0,r.R1)(j,ft,et);for(let t=0;t<C;++t)et[t]-=st[t];for(let t=0;t<C;++t)Z[t]=Y[t]+f*(_*J[t]+w*z[t]+S*tt[t]+O*et[t]);for(let t=0;t<C;++t)Q[t]=f*(y*J[t]+R*z[t]+N*tt[t]+g*et[t]);H=0;for(let t=0;t<C;++t)H=(0,o.T9)(H,(0,o.tn)(Q[t]/X[t]));if(H/=L,!(H>1)){$=H>o.DX?o.HU*f*Math.pow(H,o.LO):o.y7*f,P+=f;for(let t=0;t<C;++t)Y[t]=Z[t];break}if(b=o.HU*f*Math.pow(H,o.fJ),f=(0,o.T9)(b,o.nP*f),k=P+f,k==P)throw new Error(o.DW.ROS34PRW_FAILS)}for(;D<P;){const t=(P-D)/(P-x),e=1-t;K[G]=D;for(let n=0;n<C;++n)U[n][G]=e*Y[n]+t*q[n];D+=M,++G}f=$,x=P;for(let t=0;t<C;++t)q[t]=Y[t]}e&&e.onComputationsCompleted(),K[F-1]=c;for(let t=0;t<C;++t)U[t][F-1]=Y[t];return[K].concat(U)}},844:(t,e,n)=>{n(3313)},1033:(t,e,n)=>{function o(t,e,n,o){e.fill(0),n.fill(0);for(let t=0;t<o;++t)e[t*o+t]=1;let r=0,a=0,i=0,s=0,l=0,c=0;for(i=0;i<o;++i){for(s=i;s<o;++s){for(r=0,l=0;l<i;++l)r+=e[i*o+l]*n[l*o+s];n[i*o+s]=t[i*o+s]-r}for(c=i+1;c<o;++c){for(a=0,l=0;l<i;++l)a+=e[c*o+l]*n[l*o+i];e[c*o+i]=(t[c*o+i]-a)/n[i*o+i]}}}function r(t,e,n,o,r,a){let i=0;for(let e=0;e<a;++e){i=0;for(let n=0;n<e;++n)i+=t[e*a+n]*o[n];o[e]=(n[e]-i)/t[e*a+e]}let s=0;for(let t=a-1;t>-1;--t){s=0;for(let n=t+1;n<a;++n)s+=e[t*a+n]*r[n];r[t]=(o[t]-s)/e[t*a+t]}}function a(t,e,n){if(1===n.length)return void(n[0]=e[0]/t[0]);const o=t[0]*t[3]-t[1]*t[2];n[0]=(e[0]*t[3]-e[1]*t[1])/o,n[1]=(t[0]*e[1]-t[2]*e[0])/o}n.d(e,{R1:()=>a,fV:()=>r,kQ:()=>o})},1294:(t,e,n)=>{n.d(e,{q:()=>s});var o=n(5669),r=n(1033);const a=1-Math.sqrt(2)/2,i=6+Math.sqrt(2);function s(t,e){const n=t.func,s=t.arg.start,l=t.arg.finish;let c=t.arg.step;const u=c,f=t.tolerance,p=Math.trunc((l-s)/c)+1,A=t.initial.length,m=A*A,h=new Float64Array(p),d=Array(A);for(let t=0;t<A;++t)d[t]=new Float64Array(p);let E=s+u,I=s,T=s,_=0,w=!0,S=1,O=0,y=0,R=0;const N=new Float64Array(A*A);for(let t=0;t<A;++t)for(let e=0;e<A;++e)N[e+t*A]=t===e?1:0;const g=new Float64Array(t.initial),M=new Float64Array(t.initial),L=new Float64Array(A),F=new Float64Array(A),C=new Float64Array(A),v=new Float64Array(A),K=new Float64Array(m),U=new Float64Array(A),D=new Float64Array(A),P=new Float64Array(A),x=new Float64Array(A),V=new Float64Array(A),G=new Float64Array(A),H=new Float64Array(A),b=new Float64Array(A),k=new Float64Array(A),$=new Float64Array(A);let W=0,Y=0;const q=new Float64Array(m),B=new Float64Array(m),X=new Float64Array(A),Z=A>2;h[0]=s;for(let t=0;t<A;++t)d[t][0]=g[t];for(;w;){n(I,g,L),e&&e.onIterationStart();for(let t=0;t<A;++t)F[t]=(0,o.tn)(g[t])+c*(0,o.tn)(L[t])+o.ZL;for(I+c>l&&(c=l-I,w=!1);;){(0,o.Wv)(I,g,n,o.HV,k,$,b),W=c*a;for(let t=0;t<A;++t)b[t]*=W;n(I,g,U),(0,o.aQ)(I,g,n,o.HV,k,$,K);for(let t=0;t<m;++t)K[t]=N[t]-W*K[t];Z&&(0,r.kQ)(K,q,B,A);for(let t=0;t<A;++t)k[t]=U[t]+b[t];Z?(0,r.fV)(q,B,k,X,D,A):(0,r.R1)(K,k,D),Y=.5*c;for(let t=0;t<A;++t)H[t]=g[t]+Y*D[t];n(I+Y,H,P);for(let t=0;t<A;++t)$[t]=P[t]-D[t];Z?(0,r.fV)(q,B,$,X,x,A):(0,r.R1)(K,$,x);for(let t=0;t<A;++t)x[t]=x[t]+D[t];for(let t=0;t<A;++t)C[t]=g[t]+c*x[t];n(I+c,C,V);for(let t=0;t<A;++t)$[t]=V[t]-i*(x[t]-P[t])-2*(D[t]-U[t])+b[t];Z?(0,r.fV)(q,B,$,X,G,A):(0,r.R1)(K,$,G),Y=c/6;for(let t=0;t<A;++t)v[t]=(D[t]-2*x[t]+G[t])*Y;O=0;for(let t=0;t<A;++t)O=(0,o.T9)(O,(0,o.tn)(v[t]/F[t]));if(O/=f,!(O>1)){_=O>o.DX?o.HU*c*Math.pow(O,o.LO):o.y7*c,I+=c;for(let t=0;t<A;++t)g[t]=C[t];break}if(y=o.HU*c*Math.pow(O,o.fJ),c=(0,o.T9)(y,o.nP*c),R=I+c,R==I)throw new Error(o.DW.MRT_FAILS)}for(;E<I;){const t=(I-E)/(I-T),e=1-t;h[S]=E;for(let n=0;n<A;++n)d[n][S]=e*g[n]+t*M[n];E+=u,++S}c=_,T=I;for(let t=0;t<A;++t)M[t]=g[t]}e&&e.onComputationsCompleted(),h[p-1]=l;for(let t=0;t<A;++t)d[t][p-1]=g[t];return[h].concat(d)}},1813:(t,e,n)=>{n.d(e,{H:()=>r});var o=n(6067);class r{constructor(t){this.ivp=t,this.outputNames=(0,o.A)(t)}}},1927:(t,e,n)=>{n.d(e,{$I:()=>a.$,eQ:()=>i.e,n:()=>r.n,qN:()=>o.q});var o=n(1294),r=n(3209),a=n(567),i=(n(5669),n(5271))},2947:(t,e,n)=>{n.d(e,{R:()=>o});const o={name:"OREGO",arg:{name:"t",start:0,finish:360,step:.01},initial:[1,2,3],func:(t,e,n)=>{const o=e[0],r=e[1],a=e[2];n[0]=77.27*(r-o*r+o-8375e-9*o*o),n[1]=1/77.27*(-r-o*r+a),n[2]=.161*(o-a)},tolerance:1e-8,solutionColNames:["y1","y2","y3"]}},2991:(t,e,n)=>{Error},3014:(t,e,n)=>{n.d(e,{r:()=>o.r}),n(8387);var o=n(6950)},3209:(t,e,n)=>{n.d(e,{n:()=>R});var o=n(5669),r=n(1033);const a=.7886751345948129,i=-2.366025403784439,s=i/a,l=i+a,c=-.8679121828035516,u=c/a,f=-.8730669589464232,p=f/a,A=c+f+a,m=2.366025403784439,h=m,d=.5,E=.7679491924311227,I=d+E,T=.5054486784085176,_=-.1157168760363756,w=.610268197627858,S=T-.28973180237214197,O=_-.1,y=w-.610268197627858;function R(t,e){const n=t.func,i=t.arg.start,c=t.arg.finish;let f=t.arg.step;const R=f,N=t.tolerance,g=Math.trunc((c-i)/f)+1,M=t.initial.length,L=M*M,F=new Float64Array(g),C=Array(M);for(let t=0;t<M;++t)C[t]=new Float64Array(g);let v=i+R,K=i,U=i,D=!0,P=1,x=0,V=0,G=0,H=0;const b=new Float64Array(M*M);for(let t=0;t<M;++t)for(let e=0;e<M;++e)b[e+t*M]=t===e?1:0;const k=new Float64Array(t.initial),$=new Float64Array(t.initial),W=new Float64Array(M),Y=new Float64Array(M),q=new Float64Array(M),B=new Float64Array(M),X=new Float64Array(L),Z=new Float64Array(M),Q=new Float64Array(M),j=new Float64Array(M),J=new Float64Array(M),z=new Float64Array(M),tt=new Float64Array(M);let et=0;const nt=new Float64Array(M),ot=new Float64Array(M),rt=new Float64Array(L),at=new Float64Array(L),it=new Float64Array(M),st=new Float64Array(M),lt=M>2;F[0]=i;for(let t=0;t<M;++t)C[t][0]=k[t];for(;D;){n(K,k,W),e&&e.onIterationStart();for(let t=0;t<M;++t)Y[t]=(0,o.tn)(k[t])+f*(0,o.tn)(W[t])+o.ZL;for(K+f>c&&(f=c-K,D=!1);;){et=f*a,(0,o.aQ)(K,k,n,o.HV,z,tt,X),(0,o.Wv)(K,k,n,o.HV,z,tt,J);for(let t=0;t<L;++t)X[t]=b[t]-et*X[t];lt&&(0,r.kQ)(X,rt,at,M);for(let t=0;t<M;++t)J[t]*=f;n(K,k,nt);for(let t=0;t<M;++t)st[t]=nt[t]+a*J[t];lt?(0,r.fV)(rt,at,st,it,Z,M):(0,r.R1)(X,st,Z);for(let t=0;t<M;++t)ot[t]=k[t]+m*f*Z[t];n(K+h*f,ot,nt);for(let t=0;t<M;++t)ot[t]=s*Z[t];for(let t=0;t<M;++t)st[t]=nt[t]+ot[t]+l*J[t];lt?(0,r.fV)(rt,at,st,it,Q,M):(0,r.R1)(X,st,Q);for(let t=0;t<M;++t)Q[t]-=ot[t];for(let t=0;t<M;++t)ot[t]=k[t]+f*(d*Z[t]+E*Q[t]);n(K+I*f,ot,nt);for(let t=0;t<M;++t)ot[t]=u*Z[t]+p*Q[t];for(let t=0;t<M;++t)st[t]=nt[t]+ot[t]+A*J[t];lt?(0,r.fV)(rt,at,st,it,j,M):(0,r.R1)(X,st,j);for(let t=0;t<M;++t)j[t]-=ot[t];for(let t=0;t<M;++t)q[t]=k[t]+f*(T*Z[t]+_*Q[t]+w*j[t]);for(let t=0;t<M;++t)B[t]=f*(S*Z[t]+O*Q[t]+y*j[t]);x=0;for(let t=0;t<M;++t)x=(0,o.T9)(x,(0,o.tn)(B[t]/Y[t]));if(x/=N,!(x>1)){H=x>o.DX?o.HU*f*Math.pow(x,o.LO):o.y7*f,K+=f;for(let t=0;t<M;++t)k[t]=q[t];break}if(V=o.HU*f*Math.pow(x,o.fJ),f=(0,o.T9)(V,o.nP*f),G=K+f,G==K)throw new Error(o.DW.ROS3PRW_FAILS)}for(;v<K;){const t=(K-v)/(K-U),e=1-t;F[P]=v;for(let n=0;n<M;++n)C[n][P]=e*k[n]+t*$[n];v+=R,++P}f=H,U=K;for(let t=0;t<M;++t)$[t]=k[t]}e&&e.onComputationsCompleted(),F[g-1]=c;for(let t=0;t<M;++t)C[t][g-1]=k[t];return[F].concat(C)}},3313:(t,e,n)=>{n.d(e,{Bm:()=>c,HU:()=>l,T$:()=>a,Wt:()=>r,Zf:()=>i,Zg:()=>o,cJ:()=>s});const o=3,r=0,a=.5,i=1e-7,s=1;var l;!function(t){t.START="_t0",t.FINISH="_t1",t.STEP="_h"}(l||(l={}));const c=new Map([[l.START,0],[l.FINISH,1],[l.STEP,2]])},4044:(t,e,n)=>{n.d(e,{V:()=>o.V}),n(1927),n(9865),n(9421),n(3014);var o=n(8948)},4204:(t,e,n)=>{var o,r,a,i,s,l,c,u,f,p;n.d(e,{YI:()=>r}),function(t){t.NELDER_MEAD="Nelder-Mead",t.GRAD_DESC="Gradient descent"}(o||(o={})),new Map([[o.NELDER_MEAD,"The Nelder-Mead method"],[o.GRAD_DESC,"The gradient descent method"]]),function(t){t.MAD="MAD",t.RMSE="RMSE"}(r||(r={})),new Map([[r.MAD,"Maximum absolute deviation"],[r.RMSE,"Root mean square error"]]),function(t){t[t.LOSS_COL_WIDTH=60]="LOSS_COL_WIDTH",t[t.ROW_HEIGHT=280]="ROW_HEIGHT",t[t.LOSS_GRAPH_WIDTH=320]="LOSS_GRAPH_WIDTH",t[t.GOF_VIEWER_WIDTH=320]="GOF_VIEWER_WIDTH",t[t.RADAR_WIDTH=280]="RADAR_WIDTH",t[t.BAR_HEIGHT=100]="BAR_HEIGHT"}(a||(a={})),function(t){t.ITER="Iteration",t.LOSS="Loss",t.LOSS_GRAPH="Fitting profile",t.TARGET="Target",t.FIT="Fit",t.METHOD="method",t.VALUE="Value",t.OBJECTIVE="Target",t.SAMPLES="samples",t.ID="id",t.OBTAINED="Simulation",t.LOSS_LOW="loss",t.SIMILARITY="similarity"}(i||(i={})),function(t){t.GOAL="`Goal`",t.FIT="`Fit`",t.MIN="`min`",t.MAX="`max`",t.TARGET="`Target`",t.METHOD="`method`",t.CONTEXT="`Context Panel (F4)`",t.SAMPLES="`samples`",t.LOSS="`loss`",t.SIMILARITY="`similarity`"}(s||(s={})),function(t){t[t.MS_TO_SLEEP=10]="MS_TO_SLEEP",t[t.STYLE_TIMEOUT=3e3]="STYLE_TIMEOUT",t[t.RADAR=200]="RADAR"}(l||(l={})),function(t){t[t.SIMILARITY_MIN=0]="SIMILARITY_MIN",t[t.SIMILARITY_MAX=100]="SIMILARITY_MAX",t[t.SIMILARITY_DEFAULT=10]="SIMILARITY_DEFAULT",t[t.SAMPLES=10]="SAMPLES"}(c||(c={})),function(t){t[t.SINGLE_VAL=0]="SINGLE_VAL",t[t.SINGLE_CAT=1]="SINGLE_CAT",t[t.DOUBLE_VAL1=0]="DOUBLE_VAL1",t[t.DOUBLE_VAL2=1]="DOUBLE_VAL2",t[t.DOUBLE_CAT=2]="DOUBLE_CAT",t[t.DIFF_STUDIO_OUTPUT=0]="DIFF_STUDIO_OUTPUT",t[t.SCALAR_VALS_COL=1]="SCALAR_VALS_COL",t[t.OLIVE=8]="OLIVE",t[t.LIGHT_OLIVE=16]="LIGHT_OLIVE",t[t.GREY=7]="GREY",t[t.LIGHT_GREY=15]="LIGHT_GREY",t[t.BLUE=0]="BLUE",t[t.ORANGE=1]="ORANGE"}(u||(u={})),function(t){t.CATEGORY="__Category__",t.SIZE="__Size__",t.SIMULATION="Simulation",t.TARGET="Target",t.SCALARS="Scalars",t.NULL="Null"}(f||(f={})),function(t){t[t.LINE_CHART_LINE_WIDTH=2]="LINE_CHART_LINE_WIDTH",t[t.SIMULATION=1]="SIMULATION",t[t.TARGET=2]="TARGET",t[t.MIN_MARKER=1]="MIN_MARKER",t[t.MAX_MARKER=7]="MAX_MARKER",t[t.LIGHTER_PERC=50]="LIGHTER_PERC"}(p||(p={}))},4980:(t,e,n)=>{n(6067),n(1813).H},5174:(t,e,n)=>{n.d(e,{e:()=>o});const o={name:"HIRES",arg:{name:"t",start:0,finish:321.8122,step:.01},initial:[1,0,0,0,0,0,0,.0057],func:(t,e,n)=>{const o=e[0],r=e[1],a=e[2],i=e[3],s=e[4],l=e[5],c=e[6],u=e[7];n[0]=-1.71*o+.43*r+8.32*a+7e-4,n[1]=1.71*o-8.75*r,n[2]=-10.03*a+.43*i+.035*s,n[3]=8.32*r+1.71*a-1.12*i,n[4]=-1.745*s+.43*l+.43*c,n[5]=-280*l*u+.69*i+1.71*s-.43*l+.69*c,n[6]=280*l*u-1.81*c,n[7]=-280*l*u+1.81*c},tolerance:1e-10,solutionColNames:["y1","y2","y3","y4","y5","y6","y7","y8"]}},5271:(t,e,n)=>{n.d(e,{e:()=>a});var o=n(265),r=n(6296);function a(t){if(void 0!==t)return void 0!==t.maxIterations?new r.p(t.maxIterations):void 0!==t.maxTimeMs?new o.q(t.maxTimeMs):void 0}},5565:(t,e,n)=>{n.d(e,{L:()=>o});const o={name:"Robertson",arg:{name:"t",start:0,finish:1e12,step:25e6},initial:[1,0,0],func:(t,e,n)=>{n[0]=-.04*e[0]+1e4*e[1]*e[2],n[1]=.04*e[0]-1e4*e[1]*e[2]-3e7*Math.pow(e[1],2),n[2]=3e7*Math.pow(e[1],2)},tolerance:1e-7,solutionColNames:["A","B","C"]}},5587:(t,e,n)=>{var o;n.d(e,{e5:()=>r}),function(t){t[t.K1=7.89e-10]="K1",t[t.K2=113e7]="K2",t[t.K3=11e6]="K3",t[t.K4=1130]="K4"}(o||(o={}));const r={name:"E5",arg:{name:"t",start:0,finish:1e13,step:25e7},initial:[.00176,0,0,0],func:(t,e,n)=>{const r=e[0],a=e[1],i=e[2],s=e[3];n[0]=-o.K1*r-o.K3*r*i,n[1]=o.K1*r-o.K2*a*i,n[2]=o.K1*r-o.K2*a*i-o.K3*r*i+o.K4*s,n[3]=o.K3*r*i-o.K4*s},tolerance:1e-6,solutionColNames:["y1","y2","y3","y4"]}},5669:(t,e,n)=>{n.d(e,{DW:()=>h,DX:()=>u,HU:()=>a,HV:()=>p,LO:()=>s,T9:()=>r,Wv:()=>A,ZL:()=>f,aQ:()=>m,fJ:()=>i,g1:()=>E,nP:()=>l,tn:()=>o,y7:()=>c});const o=t=>t>0?t:-t,r=(t,e)=>t>e?t:e,a=.9,i=-.25,s=-.2,l=.25,c=4,u=189e-6,f=1e-20,p=1e-10;function A(t,e,n,o,r,a,i){const s=e.length;n(t,e,r),n(t+o,e,a);for(let t=0;t<s;++t)i[t]=(a[t]-r[t])/o}function m(t,e,n,o,r,a,i){const s=e.length;n(t,e,r);for(let l=0;l<s;++l){e[l]+=o,n(t,e,a);for(let t=0;t<s;++t)i[l+t*s]=(a[t]-r[t])/o;e[l]-=o}}var h,d;!function(t){t.MRT_FAILS="The modified Rosenbrock triple method fails",t.ROS3PRW_FAILS="The ROS3PRw method fails",t.ROS34PRW_FAILS="The ROS34PRw method fails"}(h||(h={}));class E extends Error{constructor(t){super(t)}}!function(t){t.SCRIPTING="{maxIterations: 1}",t.NO_CHECKS="{ }"}(d||(d={}))},5925:(t,e,n)=>{n.d(e,{Uj:()=>f});var o=n(4044),r=n(241),a=n(8384),i=n(4204),s=function(t,e,n,o){return new(n||(n=Promise))((function(r,a){function i(t){try{l(o.next(t))}catch(t){a(t)}}function s(t){try{l(o.throw(t))}catch(t){a(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,s)}l((o=o.apply(t,e||[])).next())}))};function l(t,e){const n=e.length,o=Math.min(t.length,n),r=new Uint32Array(o);let a=0,i=0,s=0;for(let l=0;l<o;++l){for(;;){if(i=Math.abs(e[a]-t[l]),++a,!(a<n)){--a;break}if(s=Math.abs(e[a]-t[l]),s>i){--a;break}i=s}r[l]=a}return r}function c(t,e,n,o,r){let a=0;const i=n.length;let s=0;const c=l(t,o),u=c.length;for(let t=0;t<i;++t){s=0;for(let n=0;n<u;++n)s=Math.max(s,Math.abs(e[t][n]-r[t][c[n]]));a=Math.max(a,s/n[t])}return a}function u(t,e,n,o,r){let a=0;const i=n.length;let s=0,c=0,u=0;const f=l(t,o),p=f.length;for(let t=0;t<i;++t){s=n[t],c=0;for(let n=0;n<p;++n)c+=Math.pow((e[t][n]-r[t][f[n]])/s,2),++u;a+=c}return Math.sqrt(a/u)}function f(t,e){return s(this,void 0,void 0,(function*(){const n=t.ivp2ww,l=t.pipeline,f=a.Zg+n.deqsCount+n.paramNames.length,p=new Float64Array(f),A=t.nonParamNames.concat(n.paramNames),m=t.outputNames;let h=0,d=0;for(const n of A)d=t.fixedInputsNames.indexOf(n),d>-1?p[h]=t.fixedInputsVals[d]:(d=t.variedInputNames.indexOf(n),p[h]=e[d]),++h;const E=t.variedInputNames.map((t=>A.indexOf(t))),I=t.targetNames.slice(1).map((t=>{const e=m.indexOf(t);if(e<0)throw new Error(`Inconsistent target dataframe: no ${t} column in the model's output.`);return e})),T=e.length,_=t.targetVals[0],w=t.targetVals.slice(1),S=t.scaleVals.slice(1),O=t.loss==i.YI.MAD?c:u;let y;const R=t=>s(this,void 0,void 0,(function*(){for(let e=0;e<T;++e)p[E[e]]=t[e];return y=(0,o.V)(l,n,p),O(_,w,S,y[a.Wt],I.map((t=>y[t])))})),N=new Float32Array(T);for(let e=0;e<T;++e)N[e]=t.variedInpMin[e]+Math.random()*(t.variedInpMax[e]-t.variedInpMin[e]);R(N);const g=new Map(t.settingNames.map(((e,n)=>[e,t.settingVals[n]])));return yield(0,r.tB)(R,e,g,t.variedInpMin,t.variedInpMax)}))}},6067:(t,e,n)=>{n.d(e,{A:()=>l,b:()=>i});var o=n(6314),r=n(3313);const a=1;function i(t){return null===t.outputs?null:(function(t){if(null===t.outputs)throw new Error("Model has no outputs");if(null!==t.exprs)if(null===t.loop){if(null!==t.updates&&s(t))throw new Error("Non-supported model: expressions in output and updates")}else if(s(t))throw new Error("Non-supported model: expressions in output & loops")}(t),s(t)?function(t){const e=t.outputs;if(null===e)throw new Error("Grok Lib issue: no outputs in the initial value problem");const n=t.exprs;if(!s(t)||null===n)throw new Error("Grok Lib issue: expressions must be given");const i=t.arg.name,l=["const solution = [];"];if(t.usedMathFuncs.forEach((t=>{t!==o.nH?l.push(`const ${o.bc[t]} = (x) => Math.${o.bc[t]}(x);`):l.push("const pow = (x, y) => Math.pow(x, y);")})),t.usedMathConsts.forEach((t=>l.push(`const ${o.Yv[t]} = Math.${o.Yv[t]};`))),null!==t.consts&&t.consts.forEach(((t,e)=>l.push(`const ${e} = ${t.value};`))),null!==t.params){let e=r.Zg+t.deqs.solutionNames.length;t.params.forEach(((t,n)=>{l.push(`const ${n} = arguments[1][${e}];`),++e}))}l.push(""),l.push("const length = arguments[0][0].length;");const c=t.deqs.solutionNames;return l.push(`let ${i} = 0;`),c.forEach((t=>l.push(`let ${t} = 0;`))),l.push(""),n.forEach(((t,n)=>{l.push(`let ${n} = 0;`),e.has(n)&&l.push(`let ${n}Raw = new Float64Array(length);`)})),l.push(""),l.push("for (let k = 0; k < length; ++k) {"),l.push(` ${i} = arguments[0][0][k];`),c.forEach(((t,e)=>l.push(` ${t} = arguments[0][${a+e}][k];`))),l.push(""),n.forEach(((t,n)=>{l.push(` ${n} = ${t};`),e.has(n)&&l.push(` ${n}Raw[k] = ${n};`)})),l.push("}"),l.push(""),e.forEach(((e,o)=>{if(o===i)l.push("solution.push(arguments[0][0]);");else{const e=t.deqs.solutionNames.indexOf(o);e>-1?l.push(`solution.push(arguments[0][${e+1}]);`):n.has(o)&&l.push(`solution.push(${o}Raw);`)}})),l.push("return solution;"),l.join("\n")}(t):function(t){const e=t.outputs;if(null===e)throw new Error("Grok Lib issue: no outputs in the initial value problem");if(s(t))throw new Error("Grok Lib issue: no expressions are allowed");const n=["const solution = [];"];return e.forEach(((e,o)=>{if(o===t.arg.name)n.push("solution.push(arguments[0][0]);");else{const e=t.deqs.solutionNames.indexOf(o);e>-1&&n.push(`solution.push(arguments[0][${e+1}]);`)}})),n.push("return solution;"),n.join("\n")}(t))}function s(t){const e=t.outputs;if(null===e)return!1;const n=t.exprs;if(null===n)return!1;let o=!1;return n.forEach(((t,n)=>o||(o=e.has(n)))),o}function l(t){const e=t.outputs;if(null===e)return[t.arg.name].concat(t.deqs.solutionNames);const n=new Array(e.size);let o=0;return e.forEach((t=>{n[o]=t.caption,++o})),n}},6296:(t,e,n)=>{n.d(e,{p:()=>a});var o=n(9467),r=n(5669);class a extends o.Y{constructor(t){super(),this.maxIter=t,this.currentIter=0}onIterationStart(){if(++this.currentIter,this.currentIter>this.maxIter)throw new r.g1(`Max iterations count exceeded (${this.maxIter})`)}}},6314:(t,e,n)=>{n.d(e,{Yv:()=>a,bc:()=>o,nH:()=>r}),n(7788),n(2991);const o=["pow","sin","cos","tan","asin","acos","atan","sqrt","exp","log","sinh","cosh","tanh"],r=o.indexOf("pow"),a=["PI","E"];var i,s,l,c,u;!function(t){t.ARG_NAME="name",t.COUNT="count",t.DURATION="duration"}(i||(i={})),function(t){t.MAIN_DOCS="/help/compute/diff-studio",t.CORE_BLOCKS="/help/compute/diff-studio#core-blocks",t.COMPS_SYNTAX="/help/compute/diff-studio#model-components-and-syntax",t.LOOP="/help/compute/diff-studio#cyclic-processes",t.UPDATE="/help/compute/diff-studio#multistage-processes",t.UI_OPTS="/help/compute/diff-studio#user-interface-options",t.LOOP_VS_UPDATE="/help/compute/diff-studio#advanced-features",t.SOLVER_CONFIG="/help/compute/diff-studio#solver-configuration",t.MODEL_PARAMS="/help/compute/diff-studio#model-parameters"}(s||(s={})),function(t){t.CTRL_EXPR='Unsupported control expression with the tag **"#"**',t.ARG="'The **#argument** block must consist of 3 lines specifying initial and final time, and solution grid step.",t.LOOP="The **#loop** block must contain at least one line.",t.COUNT="Incorrect loop count",t.LOOP_VS_UPDATE="The **#loop** and **'#update'** blocks cannot be used simultaneously.",t.UPDATE_LINES_COUNT="The **'#update'** block must contain at least one line.",t.DURATION="Incorrect update duration",t.BRACES=" Missing one of the braces (**{**, **}**).",t.COLON='Incorrect position of **":"**.',t.CASE_INSENS="Non-unique name (case-insensitive): use different caption for ",t.MISSING_INIT="Correct the **#inits** block.",t.UNDEF_NAME="Model name missing. Specify the model name in the **#name** block.",t.UNDEF_DEQS="Differential equation(s) are required for this model. Add equation(s) under the **#equations** block.",t.UNDEF_INITS="Initial conditions are required for this model. Add initial conditions under the **#inits** block.",t.UNDEF_ARG="Argument specification is required for this model. Specify an argument, its range, and a grid step in the **#argument** block.",t.CORRECT_ARG_LIM="Correct limits in the **#argument** block.",t.INTERVAL="Incorrect range for",t.NEGATIVE_STEP="Solution grid step must be positive. Correct the **#argument** block.",t.INCOR_STEP="Grid step must less than the length of solution interval. Correct the **#argument** block.",t.MISS_COLON='Missing **":"**',t.NAN="is not a valid number. Correct the line",t.SERVICE_START='Variable names must not begin with **"_"**.',t.REUSE_NAME="Variable reuse (case-insensitive): rename ",t.SOLVER="Incorrect solver options. Correct the **#meta.solver** line."}(l||(l={})),function(t){t.NAME="//name:",t.DESCR="//description:",t.TAGS="//tags:",t.LANG="//language: javascript",t.DOUBLE_INPUT="//input: double",t.INT_INPUT="//input: int",t.OUTPUT="//output: dataframe df",t.EDITOR="//editor: Compute:RichFunctionViewEditor",t.SIDEBAR="//sidebar: @compute",t.CAPTION="caption:",t.ARG_INIT="{caption: Initial; category: Argument}",t.ARG_FIN="{caption: Final; category: Argument}",t.ARG_STEP="{caption: Step; category: Argument}",t.INITS="category: Initial values",t.PARAMS="category: Parameters"}(c||(c={})),function(t){t.CONSTS="// constants",t.ODE_COM="// the problem definition",t.ODE="let odes = {",t.SOLVER_COM="// solve the problem",t.SOLVER="const solver = await grok.functions.eval('DiffStudio:solveEquations');",t.PREPARE="let call = solver.prepare({problem: odes, options: opts});",t.CALL="await call.call();",t.OUTPUT="let df = call.getParamValue('df');",t.SPACE2=" ",t.SPACE4=" ",t.SPACE6=" ",t.SPACE8=" ",t.FUNC_VALS="// extract function values",t.EVAL_EXPR="// evaluate expressions",t.COMP_OUT="// compute output",t.MATH_FUNC_COM="// used Math-functions",t.MATH_CONST_COM="// used Math-constants",t.ONE_STAGE_COM="\n// one stage solution",t.ONE_STAGE_BEGIN="let _oneStage = async (",t.ONE_STAGE_END=") => {",t.ASYNC_OUTPUT="let df = await _oneStage(",t.RETURN_OUTPUT="return call.getParamValue('df');",t.EMPTY_OUTPUT="let df = DG.DataFrame.create();",t.APPEND="df.append(",t.SOLUTION_DF_COM="// solution dataframe",t.LOOP_INTERVAL_COM="// loop interval",t.LOOP_INTERVAL="_interval",t.LAST_IDX="_lastIdx",t.UPDATE_COM="// update ",t.CUSTOM_OUTPUT_COM="// create custom output",t.CUSTOM_COLUMNS="let _columns = [",t.ONE_STAGE="await _oneStage(",t.SEGMENT_COM="// add segment category"}(u||(u={}))},6950:(t,e,n)=>{n.d(e,{r:()=>c});var o=n(1927),r=n(8387);const a=0,i=1,s=2,l=3;function c(t,e){!function(t,e){const n=l+t.deqsCount+t.paramNames.length;if(n>e.length)throw new Error(`Incorrect inputs count, expected: ${n}, current: ${e.length}`)}(t,e);const n=e.length-t.paramNames.length,c=(0,r.h)(t,e.slice(n)),u=new Function(c),f={name:"",arg:{name:"",start:e[a],finish:e[i],step:e[s]},initial:e.slice(s+1,n),func:u,tolerance:t.tolerance,solutionColNames:[]};return function(t){switch(t){case"mrt":return o.qN;case"ros3prw":return o.n;default:return o.$I}}(t.solverOpts.method)(f,(0,o.eQ)(t.solverOpts))}},7031:(t,e,n)=>{var o;n.d(e,{x:()=>r}),function(t){t[t.K1=.35]="K1",t[t.K2=26.6]="K2",t[t.K3=12300]="K3",t[t.K4=86e-5]="K4",t[t.K5=82e-5]="K5",t[t.K6=15e3]="K6",t[t.K7=13e-5]="K7",t[t.K8=24e3]="K8",t[t.K9=16500]="K9",t[t.K10=9e3]="K10",t[t.K11=.022]="K11",t[t.K12=12e3]="K12",t[t.K13=1.88]="K13",t[t.K14=16300]="K14",t[t.K15=48e5]="K15",t[t.K16=35e-5]="K16",t[t.K17=.0175]="K17",t[t.K18=1e8]="K18",t[t.K19=444e9]="K19",t[t.K20=1240]="K20",t[t.K21=2.1]="K21",t[t.K22=5.78]="K22",t[t.K23=.0474]="K23",t[t.K24=1780]="K24",t[t.K25=3.12]="K25"}(o||(o={}));const r={name:"Pollution",arg:{name:"t",start:0,finish:60,step:.002},initial:[0,.2,0,.04,0,0,.1,.3,.01,0,0,0,0,0,0,0,.007,0,0,0],func:(t,e,n)=>{const r=e[0],a=e[1],i=e[2],s=e[3],l=e[4],c=e[5],u=e[6],f=(e[7],e[8]),p=e[9],A=e[10],m=(e[11],e[12]),h=e[13],d=(e[14],e[15]),E=e[16],I=(e[17],e[18]),T=e[19],_=o.K1*r,w=o.K2*a*s,S=o.K3*l*a,O=o.K4*u,y=o.K5*u,R=o.K6*u*c,N=o.K7*f,g=o.K8*f*c,M=o.K9*A*a,L=o.K10*A*r,F=o.K11*m,C=o.K12*p*a,v=o.K13*h,K=o.K14*r*c,U=o.K15*i,D=o.K16*s,P=o.K17*s,x=o.K18*d,V=o.K19*d,G=o.K20*E*c,H=o.K21*I,b=o.K22*I,k=o.K23*r*s,$=o.K24*I*r,W=o.K25*T;n[0]=-(_+L+K+k+$)+(w+S+M+F+C+b+W),n[1]=-w-S-M-C+_+H,n[2]=-U+_+P+V+b,n[3]=-w-D-P-k+U,n[4]=2*O-S+R+N+v+G,n[5]=-R-g-K-G+S+2*x,n[6]=-O-y-R+v,n[7]=O+y+R+N,n[8]=-N-g,n[9]=-C+N+M,n[10]=-M-L+g+F,n[11]=M,n[12]=-F+L,n[13]=-v+C,n[14]=K,n[15]=-x-V+D,n[16]=-G,n[17]=G,n[18]=-H-b-$+k+W,n[19]=-W+$},tolerance:1e-6,solutionColNames:["y1","y2","y3","y4","y5","y6","y7","y8","y9","y10","y11","y12","y13","y14","y15","y16","y17","y18","y19","y20"]}},7134:(t,e,n)=>{},7160:(t,e,n)=>{n.d(e,{V:()=>a});var o=n(3014);function r(t,e){const n=new Float64Array(t.length+e.length);return n.set(t,0),n.set(e,t.length),n}function a(t,e,n){let a,i,s=[],l=new Float64Array(n);const c=t.wrappers;let u,f=!0;const p=c.length;if(p<1)throw new Error(`Incorrect solution pipeline: ${p} steps.`);for(let t=0;t<p;++t)u=c[t],null!==u.preproc&&(i=new Function(u.preproc),l=i(s,l)),a=(0,o.r)(e,l),null!==u.out&&(i=new Function(u.out),a=i(a,l)),f?(s=a,f=!1):a.forEach(((t,e)=>s[e]=r(s[e],t))),null!==u.postproc&&(i=new Function(u.postproc),l=i(s,l));const A=t.out;return null!==A?(i=new Function(A),i(s,n)):s}n(4980),n(8084),n(8511)},7788:(t,e,n)=>{var o,r,a;!function(t){t.NAME="#name",t.TAGS="#tags",t.DESCR="#description",t.DIF_EQ="#equations",t.EXPR="#expressions",t.ARG="#argument",t.INITS="#inits",t.CONSTS="#constants",t.PARAMS="#parameters",t.TOL="#tolerance",t.LOOP="#loop",t.UPDATE="#update",t.RUN_ON_OPEN="#meta.runOnOpen",t.RUN_ON_INPUT="#meta.runOnInput",t.OUTPUT="#output",t.COMMENT="#comment",t.SOLVER="#meta.solver",t.INPUTS="#meta.inputs"}(o||(o={})),function(t){t[t.MIN_LINES_COUNT=1]="MIN_LINES_COUNT",t[t.COUNT_IDX=0]="COUNT_IDX",t.COUNT_NAME="_count",t[t.MIN_COUNT=1]="MIN_COUNT"}(r||(r={})),function(t){t[t.MIN_LINES_COUNT=1]="MIN_LINES_COUNT",t[t.DURATION_IDX=0]="DURATION_IDX",t.DURATION="_duration"}(a||(a={})),new Map([["maxTime",{min:1,max:1e4}],["scale",{min:.5,max:1}]])},8084:(t,e,n)=>{n(6314),n(6067);var o=n(1813);n(3313),o.H},8384:(t,e,n)=>{n.d(e,{OW:()=>i,Un:()=>o,Wt:()=>a,Zg:()=>r});const o="Success",r=3,a=0;var i;!function(t){t[t.SUCCEED=0]="SUCCEED",t[t.FAILED=1]="FAILED"}(i||(i={}))},8387:(t,e,n)=>{function o(t,e){const n=[];return t.paramNames.forEach(((t,o)=>n.push(`const ${t} = ${e[o]};`))),n.concat(t.funcMainBody).join("\n")}n.d(e,{h:()=>o}),n(6314)},8511:(t,e,n)=>{n(6314),n(6067);var o=n(1813);n(3313),o.H},8948:(t,e,n)=>{n.d(e,{V:()=>o.V});var o=n(7160);n(6067),n(1813),n(4980),n(8511),n(8084),n(844)},9312:(t,e,n)=>{n.d(e,{Y:()=>o});const o={name:"van der Pol",arg:{name:"t",start:0,finish:2e3,step:.1},initial:[-1,1],func:(t,e,n)=>{n[0]=e[1],n[1]=-e[0]+1e3*(1-e[0]*e[0])*e[1]},tolerance:1e-12,solutionColNames:["x1","x2"]}},9421:(t,e,n)=>{n(7788),n(6314),n(2991)},9467:(t,e,n)=>{n.d(e,{Y:()=>o});class o{constructor(){}onIterationStart(){}onComputationsCompleted(){}}},9865:(t,e,n)=>{var o=n(5565),r=n(5174),a=n(9312),i=n(2947),s=n(5587),l=n(7031);n(7134),o.L,r.e,a.Y,i.R,s.e5,l.x}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var a=e[o]={exports:{}};return t[o](a,a.exports,n),a.exports}n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var o=n(5925),r=n(8384);onmessage=function(t){return e=this,n=void 0,i=function*(){try{const e=t.data.task,n=t.data.startPoints,a=n.length,i=new Array(a),s=[];for(let t=0;t<a;++t)try{s.push(yield(0,o.Uj)(e,n[t])),i[t]=r.Un}catch(e){i[t]=e instanceof Error?e.message:"Platform issue: in-webworker optimization failed"}postMessage({callResult:r.OW.SUCCEED,extremums:s,fitRes:i})}catch(t){postMessage({callResult:r.OW.FAILED,msg:t instanceof Error?t.message:"Platform issue: in-webworker optimization failed"})}},new((a=void 0)||(a=Promise))((function(t,o){function r(t){try{l(i.next(t))}catch(t){o(t)}}function s(t){try{l(i.throw(t))}catch(t){o(t)}}function l(e){var n;e.done?t(e.value):(n=e.value,n instanceof a?n:new a((function(t){t(n)}))).then(r,s)}l((i=i.apply(e,n||[])).next())}));var e,n,a,i},compute={}})();
|
|
1
|
+
var compute;(()=>{"use strict";var t,e,n={241:(t,e,n)=>{n.d(e,{tB:()=>i});var a=function(t,e,n,a){return new(n||(n=Promise))((function(r,o){function i(t){try{l(a.next(t))}catch(t){o(t)}}function c(t){try{l(a.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,c)}l((a=a.apply(t,e||[])).next())}))};function r(t,e,n,a){for(let r=0;r<e;r++){let o=0;for(let t=0;t<e+1;t++)t!=n&&(o+=a[t][r]);t[r]=o/e}}function o(t,e,n,a,r,o,i,c){for(let l=0;l<o;l++)e[l]=t[l],e[l]+=r*(t[l]-a[n][l]),e[l]<i[l]?e[l]=i[l]:e[l]>c[l]&&(e[l]=c[l])}new Map([["tolerance",{default:1e-6,min:1e-20,max:.1}],["maxIter",{default:50,min:1,max:1e4}],["nonZeroParam",{default:1e-4,min:1e-20,max:.1}],["initialScale",{default:.02,min:1e-20,max:.1}],["scaleReflaction",{default:1,min:1,max:2}],["scaleExpansion",{default:2,min:1,max:2}],["scaleContraction",{default:-.5,min:-.5,max:0}]]),new Map([["tolerance","tolerance"],["maxIter","max iterations"],["nonZeroParam","non-zero param"],["initialScale","initial scale"],["scaleReflaction","scale reflection"],["scaleExpansion","scale expansion"],["scaleContraction","scale contraction"]]);const i=function(t,e,n,i,c){return a(this,void 0,void 0,(function*(){const l=n.get("tolerance"),s=n.get("maxIter"),f=n.get("scaleReflaction"),u=n.get("scaleExpansion"),I=n.get("scaleContraction"),E=e.length+1,A=e.length,[m,p]=yield function(t,e,n,r,o){return a(this,void 0,void 0,(function*(){const a=n.length+1,i=n.length,c=e.get("nonZeroParam"),l=e.get("initialScale"),s=new Array(a),f=new Array(a);for(let e=0;e<a;e++){s[e]=new Float32Array(i);for(let t=0;t<i;t++)s[e][t]=n[t],0!=e&&e-1===t&&(0==n[t]?s[e][t]=c:s[e][t]+=l*n[e-1],s[e][t]<r[t]?s[e][t]=r[t]:s[e][t]>o[t]&&(s[e][t]=o[t]));f[e]=yield t(s[e])}return[s,f]}))}(t,n,e,i,c),T=new Array(E);for(let t=0;t<E;t++)T[t]=t;const L=T.length-1;let _=0,d=0,S=0,h=0;const R=new Float32Array(A),M=new Float32Array(A),O=new Float32Array(A),g=new Float32Array(A),v=new Array(s);if(E>1){for(;T.sort(((t,e)=>p[t]-p[e])),!(_>s);){if(0==_&&(d=p[0],S=2*p[T[0]]),v[_]=d,++_,d=p[T[0]],S-d>l)h=0;else if(++h,h>2*E)break;S=d,r(R,A,T[L],m),o(R,M,T[L],m,f,A,i,c);const e=yield t(M);if(e<p[T[L]]){o(R,O,T[L],m,u,A,i,c);const n=yield t(O);if(n<e){p[T[L]]=n;for(let t=0;t<A;t++)m[T[L]][t]=O[t];continue}p[T[L]]=e;for(let t=0;t<A;t++)m[T[L]][t]=M[t];continue}o(R,g,T[L],m,I,A,i,c);const n=yield t(g);if(!(n<p[T[L]]))break;p[T[L]]=n;for(let t=0;t<A;t++)m[T[L]][t]=g[t]}for(let t=_;t<s;t++)v[t]=p[T[0]]}return{point:m[T[0]],cost:p[T[0]],iterCosts:v,iterCount:_-1}}))}},4204:(t,e,n)=>{var a,r,o,i,c,l,s,f,u,I;n.d(e,{YI:()=>r}),function(t){t.NELDER_MEAD="Nelder-Mead",t.GRAD_DESC="Gradient descent"}(a||(a={})),new Map([[a.NELDER_MEAD,"The Nelder-Mead method"],[a.GRAD_DESC,"The gradient descent method"]]),function(t){t.MAD="MAD",t.RMSE="RMSE"}(r||(r={})),new Map([[r.MAD,"Maximum absolute deviation"],[r.RMSE,"Root mean square error"]]),function(t){t[t.LOSS_COL_WIDTH=60]="LOSS_COL_WIDTH",t[t.ROW_HEIGHT=280]="ROW_HEIGHT",t[t.LOSS_GRAPH_WIDTH=320]="LOSS_GRAPH_WIDTH",t[t.GOF_VIEWER_WIDTH=320]="GOF_VIEWER_WIDTH",t[t.RADAR_WIDTH=280]="RADAR_WIDTH",t[t.BAR_HEIGHT=100]="BAR_HEIGHT"}(o||(o={})),function(t){t.ITER="Iteration",t.LOSS="Loss",t.LOSS_GRAPH="Fitting profile",t.TARGET="Target",t.FIT="Fit",t.METHOD="method",t.VALUE="Value",t.OBJECTIVE="Target",t.SAMPLES="samples",t.ID="id",t.OBTAINED="Simulation",t.LOSS_LOW="loss",t.SIMILARITY="similarity"}(i||(i={})),function(t){t.GOAL="`Goal`",t.FIT="`Fit`",t.MIN="`min`",t.MAX="`max`",t.TARGET="`Target`",t.METHOD="`method`",t.CONTEXT="`Context Panel (F4)`",t.SAMPLES="`samples`",t.LOSS="`loss`",t.SIMILARITY="`similarity`"}(c||(c={})),function(t){t[t.MS_TO_SLEEP=10]="MS_TO_SLEEP",t[t.STYLE_TIMEOUT=3e3]="STYLE_TIMEOUT",t[t.RADAR=200]="RADAR"}(l||(l={})),function(t){t[t.SIMILARITY_MIN=0]="SIMILARITY_MIN",t[t.SIMILARITY_MAX=100]="SIMILARITY_MAX",t[t.SIMILARITY_DEFAULT=10]="SIMILARITY_DEFAULT",t[t.SAMPLES=10]="SAMPLES"}(s||(s={})),function(t){t[t.SINGLE_VAL=0]="SINGLE_VAL",t[t.SINGLE_CAT=1]="SINGLE_CAT",t[t.DOUBLE_VAL1=0]="DOUBLE_VAL1",t[t.DOUBLE_VAL2=1]="DOUBLE_VAL2",t[t.DOUBLE_CAT=2]="DOUBLE_CAT",t[t.DIFF_STUDIO_OUTPUT=0]="DIFF_STUDIO_OUTPUT",t[t.SCALAR_VALS_COL=1]="SCALAR_VALS_COL",t[t.OLIVE=8]="OLIVE",t[t.LIGHT_OLIVE=16]="LIGHT_OLIVE",t[t.GREY=7]="GREY",t[t.LIGHT_GREY=15]="LIGHT_GREY",t[t.BLUE=0]="BLUE",t[t.ORANGE=1]="ORANGE"}(f||(f={})),function(t){t.CATEGORY="__Category__",t.SIZE="__Size__",t.SIMULATION="Simulation",t.TARGET="Target",t.SCALARS="Scalars",t.NULL="Null"}(u||(u={})),function(t){t[t.LINE_CHART_LINE_WIDTH=2]="LINE_CHART_LINE_WIDTH",t[t.SIMULATION=1]="SIMULATION",t[t.TARGET=2]="TARGET",t[t.MIN_MARKER=1]="MIN_MARKER",t[t.MAX_MARKER=7]="MAX_MARKER",t[t.LIGHTER_PERC=50]="LIGHTER_PERC"}(I||(I={}))},5925:(t,e,n)=>{n.d(e,{Uj:()=>u});var a=n(4044),r=n(241),o=n(8384),i=n(4204),c=function(t,e,n,a){return new(n||(n=Promise))((function(r,o){function i(t){try{l(a.next(t))}catch(t){o(t)}}function c(t){try{l(a.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,c)}l((a=a.apply(t,e||[])).next())}))};function l(t,e){const n=e.length,a=Math.min(t.length,n),r=new Uint32Array(a);let o=0,i=0,c=0;for(let l=0;l<a;++l){for(;;){if(i=Math.abs(e[o]-t[l]),++o,!(o<n)){--o;break}if(c=Math.abs(e[o]-t[l]),c>i){--o;break}i=c}r[l]=o}return r}function s(t,e,n,a,r){let o=0;const i=n.length;let c=0;const s=l(t,a),f=s.length;for(let t=0;t<i;++t){c=0;for(let n=0;n<f;++n)c=Math.max(c,Math.abs(e[t][n]-r[t][s[n]]));o=Math.max(o,c/n[t])}return o}function f(t,e,n,a,r){let o=0;const i=n.length;let c=0,s=0,f=0;const u=l(t,a),I=u.length;for(let t=0;t<i;++t){c=n[t],s=0;for(let n=0;n<I;++n)s+=Math.pow((e[t][n]-r[t][u[n]])/c,2),++f;o+=s}return Math.sqrt(o/f)}function u(t,e){return c(this,void 0,void 0,(function*(){const n=t.ivp2ww,l=t.pipeline,u=o.Zg+n.deqsCount+n.paramNames.length,I=new Float64Array(u),E=t.nonParamNames.concat(n.paramNames),A=t.outputNames;let m=0,p=0;for(const n of E)p=t.fixedInputsNames.indexOf(n),p>-1?I[m]=t.fixedInputsVals[p]:(p=t.variedInputNames.indexOf(n),I[m]=e[p]),++m;const T=t.variedInputNames.map((t=>E.indexOf(t))),L=t.targetNames.slice(1).map((t=>{const e=A.indexOf(t);if(e<0)throw new Error(`Inconsistent target dataframe: no ${t} column in the model's output.`);return e})),_=e.length,d=t.targetVals[0],S=t.targetVals.slice(1),h=t.scaleVals.slice(1),R=t.loss==i.YI.MAD?s:f;let M;const O=t=>c(this,void 0,void 0,(function*(){for(let e=0;e<_;++e)I[T[e]]=t[e];return M=(0,a.V)(l,n,I),R(d,S,h,M[o.Wt],L.map((t=>M[t])))})),g=new Float32Array(_);for(let e=0;e<_;++e)g[e]=t.variedInpMin[e]+Math.random()*(t.variedInpMax[e]-t.variedInpMin[e]);O(g);const v=new Map(t.settingNames.map(((e,n)=>[e,t.settingVals[n]])));return yield(0,r.tB)(O,e,v,t.variedInpMin,t.variedInpMax)}))}},7148:(t,e,n)=>{var a=n(5925),r=n(8384);onmessage=function(t){return e=this,n=void 0,i=function*(){try{const e=t.data.task,n=t.data.startPoints,o=n.length,i=new Array(o),c=[];for(let t=0;t<o;++t)try{c.push(yield(0,a.Uj)(e,n[t])),i[t]=r.Un}catch(e){i[t]=e instanceof Error?e.message:"Platform issue: in-webworker optimization failed"}postMessage({callResult:r.OW.SUCCEED,extremums:c,fitRes:i})}catch(t){postMessage({callResult:r.OW.FAILED,msg:t instanceof Error?t.message:"Platform issue: in-webworker optimization failed"})}},new((o=void 0)||(o=Promise))((function(t,a){function r(t){try{l(i.next(t))}catch(t){a(t)}}function c(t){try{l(i.throw(t))}catch(t){a(t)}}function l(e){var n;e.done?t(e.value):(n=e.value,n instanceof o?n:new o((function(t){t(n)}))).then(r,c)}l((i=i.apply(e,n||[])).next())}));var e,n,o,i}},8384:(t,e,n)=>{n.d(e,{OW:()=>i,Un:()=>a,Wt:()=>o,Zg:()=>r});const a="Success",r=3,o=0;var i;!function(t){t[t.SUCCEED=0]="SUCCEED",t[t.FAILED=1]="FAILED"}(i||(i={}))}},a={};function r(t){var e=a[t];if(void 0!==e)return e.exports;var o=a[t]={exports:{}};return n[t](o,o.exports,r),o.exports}r.m=n,r.x=()=>{var t=r.O(void 0,[44],(()=>r(7148)));return r.O(t)},t=[],r.O=(e,n,a,o)=>{if(!n){var i=1/0;for(f=0;f<t.length;f++){for(var[n,a,o]=t[f],c=!0,l=0;l<n.length;l++)(!1&o||i>=o)&&Object.keys(r.O).every((t=>r.O[t](n[l])))?n.splice(l--,1):(c=!1,o<i&&(i=o));if(c){t.splice(f--,1);var s=a();void 0!==s&&(e=s)}}return e}o=o||0;for(var f=t.length;f>0&&t[f-1][2]>o;f--)t[f]=t[f-1];t[f]=[n,a,o]},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.f={},r.e=t=>Promise.all(Object.keys(r.f).reduce(((e,n)=>(r.f[n](t,e),e)),[])),r.u=t=>t+".js",r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{var t;r.g.importScripts&&(t=r.g.location+"");var e=r.g.document;if(!t&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");if(n.length)for(var a=n.length-1;a>-1&&(!t||!/^http(s?):/.test(t));)t=n[a--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=t})(),(()=>{var t={148:1};r.f.i=(e,n)=>{t[e]||importScripts(r.p+r.u(e))};var e=self.webpackChunkcompute=self.webpackChunkcompute||[],n=e.push.bind(e);e.push=e=>{var[a,o,i]=e;for(var c in o)r.o(o,c)&&(r.m[c]=o[c]);for(i&&i(r);a.length;)t[a.pop()]=1;n(e)}})(),e=r.x,r.x=()=>r.e(44).then(e);var o=r.x();compute=o})();
|
|
2
2
|
//# sourceMappingURL=148.js.map
|