Search is not available for this dataset
repo stringlengths 2 152 ⌀ | file stringlengths 15 239 | code stringlengths 0 58.4M | file_length int64 0 58.4M | avg_line_length float64 0 1.81M | max_line_length int64 0 12.7M | extension_type stringclasses 364
values |
|---|---|---|---|---|---|---|
fmm3dbie | fmm3dbie-master/src/surface_routs/rwg.f90 | !
! This collection of routines designed for converting between RWG
! basis functions and the standard Nystrom discretization on
! Vioreanu-Rokhlin nodes, most of the routines are descendants of the
! ones that Felipe Vico wrote.
!
subroutine test()
return
end subroutine test
| 282 | 20.769231 | 69 | f90 |
fmm3dbie | fmm3dbie-master/src/surface_routs/stell_geom_wrappers.f90 |
subroutine setup_stell_geom(istelltype,norder,ns,nt,npatches,norders,ixyzs, &
iptype,npts,srccoefs,srcvals)
!-----------------------
! This subroutine discretizes one of the two stellarator types
! w7x or ncsx in the fmm3dbie discretization format. The fourier coeffs
! of the r and z components of the torus are ... | 7,973 | 24.476038 | 78 | f90 |
fmm3dbie | fmm3dbie-master/src/surface_routs/surf_routs.f90 | ! This file contains the following user callable subroutines
! surf_fun_error - estimate the resolution of a function on
! a surface
!
! get_centroid_rads - compute the centroid and bounding sphere
! radii for a collection of patches
!
! get_centroid_rads_tri - compute the ce... | 50,898 | 24.837056 | 85 | f90 |
fmm3dbie | fmm3dbie-master/src/surface_routs/vtk_routs.f90 | !
! FIX this file for quad patches
!
!
! surf_quadratic_msh_vtk_plot - generate a vtk file to
! plot a quadratic mesh corresponding to discretization
!
! surf_flat_msh_vtk_plot - generate a vtk file to plot
! a flat mesh corresponding to discretization
!
! surf_vtk_plot - generate a ... | 28,501 | 23.69844 | 79 | f90 |
fmm3dbie | fmm3dbie-master/src/surface_routs/write_go3.f90 | subroutine write_wtorus(fname,radii,scales,nosc,nu,nv,norder,pmax)
!
!f2py intent(in) fname,radii,scales,nosc,nu,nv,norder
!f2py intent(out) pmax
!
implicit real *8 (a-h,o-z)
character (len=*), intent(in) :: fname
real *8, intent(in), target :: radii(3),scales(3)
integer, intent(in) :: nu,nv,nosc,norder
real ... | 5,566 | 22.892704 | 70 | f90 |
fmm3dbie | fmm3dbie-master/src/surface_routs/xquad_routs/xquad_parametrizations.f90 | !
!
!
subroutine xquad_wtorus_eval(iquad, u, v, xyz, dxyzduv, quadinfo, &
radii, scales, p4)
implicit real *8 (a-h,o-z)
real *8 :: xyz(3), dxyzduv(3,2), quadinfo(3,3,*), scales(3)
real *8 :: radii(3)
!
! project the quad iquad in quadinfo onto a torus
!
! Input:
! iquad - quad number to map
... | 17,812 | 19.761072 | 69 | f90 |
fmm3dbie | fmm3dbie-master/src/surface_routs/xtri_routs/xtri_parameterizations.f90 |
subroutine xtri_wtorus_eval(itri, u, v, xyz, dxyzduv, triainfo, &
radii, scales, p4)
implicit real *8 (a-h,o-z)
real *8 :: xyz(3), dxyzduv(3,2), triainfo(3,3,*), scales(3)
real *8 :: radii(3)
!
! project the triangle itri in triainfo onto a torus
!
! Input:
! itri - triangle number to map
!... | 24,467 | 18.764136 | 83 | f90 |
fmm3dbie | fmm3dbie-master/src/surface_routs/xtri_routs/xtri_plot.f90 |
!
!
! xtri plotting library (c) 2018 Mike O'Neil
! Contact: oneil@cims.nyu.edu
!
! This file contains plotting routines to accompany the xtri
! surface triangulation routines
!
!
subroutine xtri_vtk_surf(fname, ntri, xeval, &
par1, par2, par3, par4, norder0,title)
implicit real *8 (a-h,o-z)
real *8 :: xtri... | 10,069 | 23.501217 | 70 | f90 |
fmm3dbie | fmm3dbie-master/src/tria_routs/README.md | This folder contains files for handling routines on the standard
triangular simplex (T_{0}) (0,0), (1,0), (0,1) or the equilateral
triangle
ctriaints_main.f - wrapper for adaptive integration for a family of
functions on T_{0}
triaintrouts.f - routines for adaptive integration for a family of
functions on T_{... | 624 | 27.409091 | 68 | md |
fmm3dbie | fmm3dbie-master/src/tria_routs/ctriaints_main.f |
c
c
c
c
subroutine ctriaints(eps,istrat,intype,npatches,norder,npols,
2 srccoefs,ndtarg,ntarg,xyztarg,ifp,
3 xyzproxy,itargptr,ntargptr,nporder,nppols,
3 fker,ndd,dpars,ndz,zpars,ndi,ipars,nqorder,ntrimax,
4 rfac,cintvals,ifmetric,rn1,n2)
c
c
c this subroutine computes t... | 16,203 | 32.758333 | 79 | f |
fmm3dbie | fmm3dbie-master/src/tria_routs/dtriaintrouts.f | c
c
c routines in this file
c
c dtriaints_dist - refine until targets/proxy separated
c by triangle by rfac*r_{t}
c where r_{t} is the radius of enclosing
c sphere for triangle
c
c dtriaints_adap - completely adaptive in... | 83,893 | 27.142905 | 79 | f |
fmm3dbie | fmm3dbie-master/src/tria_routs/dtriaints_main.f |
c
c
c
c
subroutine dtriaints(eps,istrat,intype,npatches,norder,npols,
2 srccoefs,ndtarg,ntarg,xyztarg,ifp,
3 xyzproxy,itargptr,ntargptr,nporder,nppols,
3 fker,ndd,dpars,ndz,zpars,ndi,ipars,nqorder,ntrimax,
4 rfac,cintvals,ifmetric,rn1,n2)
c
c
c this subroutine computes t... | 15,669 | 32.554604 | 79 | f |
fmm3dbie | fmm3dbie-master/src/tria_routs/koornexps.f90 |
!
! Orthgonal polynomials on the simplex (Koornwinder pols)
! (c) 2017 Mike O'Neil
! Contact: oneil@cims.nyu.edu
!
! These codes are similar in nature to those in ortho2eva.f and
! ortho2exps.f, however they *only* compute polynomials on the
! simplex, and not the "standard" equilateral triangle or
! Koornwinders or... | 27,165 | 22.378657 | 77 | f90 |
fmm3dbie | fmm3dbie-master/src/tria_routs/triaintrouts.f | c
c
c routines in this file
c
c ctriaints_dist - refine until targets/proxy separated
c by triangle by rfac*r_{t}
c where r_{t} is the radius of enclosing
c sphere for triangle
c
c ctriaints_adap - completely adaptive in... | 84,649 | 27.188478 | 79 | f |
fmm3dbie | fmm3dbie-master/src/tria_routs/triasymq.f | cc Copyright (C) 2009: Zydrunas Gimbutas and Hong Xiao
cc Contact: Zydrunas Gimbutas <gimbutas@courant.nyu.edu>
cc Hong Xiao <hxiao@ucdavis.edu>
cc
cc This program is free software; you can redistribute it and/or modify
cc it under the terms of the GNU General Public License as published by
cc the Free Soft... | 287,601 | 40.717726 | 79 | f |
fmm3dbie | fmm3dbie-master/src/tria_routs/triatreerouts.f | c
cc
cc
c
subroutine gettritree(npatches,norder,npols,srccoefs,ntarg,
1 xyztarg,itargptr,ntargptr,ntrimax,nlmax,rfac,ntri,nlev,
2 ichild_start,da,tricm,trirad,tverts,itrirel,ier)
c
c
cc this subroutine identifies the relevant quad tree on
c the standard simplex relevant for all target... | 13,243 | 24.323136 | 81 | f |
fmm3dbie | fmm3dbie-master/test/common/test_common.f | implicit real *8 (a-h,o-z)
ntests = 8
call test_get_uni(i1,i2)
call test_setdecomp(i3)
call test_cumsum(i4)
call test_sort(i5)
call test_conv_csc(i6)
call test_findnear(i7)
call test_rsc_to_csc(i8)
nsuccess = i1+i2+i3+i4+i5+i6+i7+i8
open(unit=33,file=... | 13,553 | 22.820738 | 72 | f |
fmm3dbie | fmm3dbie-master/test/common/test_sparse_reps.f | implicit real *8 (a-h,o-z)
call test_conv_to_csc()
call test_csc_to_rsc()
stop
end
subroutine test_conv_to_csc()
implicit real *8 (a-h,o-z)
return
end
subroutine test_csc_to_rsc()
implicit real *8 (a-h,o-z)
integer, all... | 1,618 | 20.302632 | 69 | f |
fmm3dbie | fmm3dbie-master/test/helm_wrappers/test_Helmholtz_Transmission.f90 | implicit real *8 (a-h,o-z)
real *8, allocatable :: srcvals(:,:),srccoefs(:,:)
real *8, allocatable :: wts(:),rsigma(:)
integer ipars(2)
integer, allocatable :: norders(:),ixyzs(:),iptype(:)
real *8 xyz_out(3),xyz_in(3)
complex *16, allocatable :: sigma(:),rhs(:)
comple... | 5,490 | 22.566524 | 117 | f90 |
fmm3dbie | fmm3dbie-master/test/helm_wrappers/test_helm_wrappers_qg_lp.f | implicit real *8 (a-h,o-z)
real *8, allocatable :: srcvals(:,:),srccoefs(:,:),targs(:,:)
real *8, allocatable :: wts(:)
real *8, allocatable :: cms(:,:),rads(:),rad_near(:)
real *8 errs(6),ts(2)
real *8, allocatable :: rfacs(:,:)
character *100 fname
integer ipars(2)
... | 12,760 | 24.831984 | 71 | f |
fmm3dbie | fmm3dbie-master/test/lap_wrappers/test_lap_wrappers_qg_lp.f | implicit real *8 (a-h,o-z)
real *8, allocatable :: srcvals(:,:),srccoefs(:,:),targs(:,:)
real *8, allocatable :: wts(:)
real *8, allocatable :: cms(:,:),rads(:),rad_near(:)
real *8 errs(6),ts(2)
real *8, allocatable :: rfacs(:,:)
complex *16 zk
character *100 fname
... | 10,404 | 23.832936 | 71 | f |
fmm3dbie | fmm3dbie-master/test/maxwell_wrappers/Test_DFIE.f90 | implicit real *8 (a-h,o-z)
real *8, allocatable :: srcvals(:,:),srccoefs(:,:)
real *8, allocatable :: wts(:),rsigma(:)
integer ipars(2)
integer, allocatable :: norders(:),ixyzs(:),iptype(:)
real *8 xyz_out(3),xyz_in(3)
complex *16, allocatable :: sigma(:),rhs(:)
comple... | 8,850 | 23.586111 | 117 | f90 |
fmm3dbie | fmm3dbie-master/test/quad_routs/test_dquadintrouts.f |
subroutine dquadintrouts_testing(istrat,ifp,intype,ipoly,ttype,
1 isuccess)
implicit real *8 (a-h,o-z)
real *8 xyztarg(3,3),xyztarg0(3,3)
real *8, allocatable :: srcvals(:,:,:)
real *8, allocatable :: srccoefs(:,:,:)
real *8, allocatable :: umatr(:,:),vmatr(:,:),uvs(:,:),wts(... | 6,240 | 22.911877 | 72 | f |
fmm3dbie | fmm3dbie-master/test/quad_routs/test_quadintrouts.f |
subroutine quadintrouts_testing(istrat,ifp,intype,ipoly,ttype,
1 isuccess)
implicit real *8 (a-h,o-z)
real *8 xyztarg(3,3),xyztarg0(3,3)
real *8, allocatable :: srcvals(:,:,:)
real *8, allocatable :: srccoefs(:,:,:)
real *8, allocatable :: umatr(:,:),vmatr(:,:),uvs(:,:),wts(... | 7,161 | 25.82397 | 72 | f |
fmm3dbie | fmm3dbie-master/test/quad_routs/test_quadrouts.f | implicit real *8 (a-h,o-z)
character *1 ttype
ifp = 0
ttype = 'F'
istot = 0
ntot = 0
do istrat = 1,3
do intype=1,2
do ipoly = 0,1
isuccess = 0
call dquadintrouts_testing(istrat,ifp,intype,ipoly,ttype,
1 isuccess)
... | 821 | 23.909091 | 69 | f |
fmm3dbie | fmm3dbie-master/test/quadratures/test_find_near.f | implicit real *8 (a-h,o-z)
real *8, allocatable :: src(:,:),targ(:,:),rads(:)
integer, allocatable :: row_ptr(:),row_ptr2(:)
integer, allocatable :: col_ind(:),col_ind2(:)
integer, allocatable :: isort(:),wsort(:),isort2(:),wsort2(:)
call prini(6,13)
ns = 101
nt = 1000... | 2,334 | 25.83908 | 69 | f |
fmm3dbie | fmm3dbie-master/test/stok_wrappers/test_stok_wrappers_qg_lp.f | implicit real *8 (a-h,o-z)
real *8, allocatable :: srcvals(:,:),srccoefs(:,:),targs(:,:)
real *8, allocatable :: wts(:)
real *8 ts(2), rres
real *8, allocatable :: rfacs(:,:), errs(:)
character *100 fname
integer ipars(2)
integer, allocatable :: row_ptr(:),col_ind... | 10,792 | 26.11809 | 72 | f |
fmm3dbie | fmm3dbie-master/test/surface_routs/test_surf_routs.f | implicit real *8 (a-h,o-z)
ntests = 2
nsuccess = 0
call test_surf_lap(nsuccess)
open(unit=33,file='../../print_testres.txt',access='append')
write(33,'(a,i1,a,i1,a)') 'Successfully completed ',nsuccess,
1 ' out of ',ntests,' in surface routs testing suite'
close(33)
... | 9,686 | 24.559367 | 71 | f |
fmm3dbie | fmm3dbie-master/test/tria_routs/test_dtriaintrouts.f | subroutine test_dtriarouts(nsuccess)
implicit real *8 (a-h,o-z)
real *8 uvs(2,10000),wts(10000)
real *8, allocatable :: umatr(:,:),vmatr(:,:)
real *8, allocatable :: xyzvals(:,:,:)
real *8, allocatable :: srccoefs(:,:,:)
real *8, allocatable :: dxyzvals(:,:,:)
real... | 22,255 | 22.551323 | 72 | f |
fmm3dbie | fmm3dbie-master/test/tria_routs/test_koornexps.f |
subroutine test_koornf_ders(ipass)
implicit real *8 (a-h,o-z)
integer ntest
real *8, allocatable :: pols(:),ders(:,:)
real *8, allocatable :: polsex(:),dersex(:,:),ders2ex(:,:)
real *8, allocatable :: rat1(:,:),rat2(:,:,:),rsc1(:,:)
real *8 uv(2)
integer nordert(5)
... | 2,021 | 27.885714 | 70 | f |
fmm3dbie | fmm3dbie-master/test/tria_routs/test_triaintrouts.f | subroutine test_triarouts(nsuccess)
implicit real *8 (a-h,o-z)
real *8 uvs(2,10000),wts(10000)
real *8, allocatable :: umatr(:,:),vmatr(:,:)
real *8, allocatable :: xyzvals(:,:,:)
real *8, allocatable :: srccoefs(:,:,:)
real *8, allocatable :: dxyzvals(:,:,:)
real ... | 22,586 | 22.800843 | 72 | f |
fmm3dbie | fmm3dbie-master/test/tria_routs/test_triarouts.f | implicit real *8 (a-h,o-z)
ntests = 7
call test_triarouts(i1)
ntests = ntests + 6
call test_triarouts_vec(i2)
nsuccess = i1+i2
ntests = ntests+ 7
call test_dtriarouts(i1)
ntests = ntests + 6
call test_dtriarouts_vec(i2)
nsuccess = nsuccess + i1+i2
... | 669 | 19.9375 | 67 | f |
null | ConjVI-main/README.md | # ConjVI
Conjugate Value Iteration (ConjVI) MATLAB Package - By M.A.S. Kolarijani & P. Mohajerin Esfahani
*** NOTE: See [1] for a detailed description of the algorithm included in this package.
*** NOTE: The steps described below have been already carried out for the numerical examples provided in [1]; see the conte... | 1,711 | 49.352941 | 195 | md |
null | ConjVI-main/Example 1 (synthetic)/CVI_Alg.m | function [VF, delta_VF, run_time] = CVI_Alg(ProblemData, CVI_Data)
% This function contains the implementation of the Conjugate VI (CVI)
% algorithm and computes the optimal value function.
% Please see Section 3 of the following article for more details:
%
% M.A.S. Kolarijani, C.F. Max, and P. Mohajerin Esfahani ... | 6,639 | 30.923077 | 105 | m |
null | ConjVI-main/Example 1 (synthetic)/LLT.m | function f_conj = LLT(X,f,S)
% Disclosure: This routine is borrowed from the d-CDP MATLAB package
% avialable at "https://github.com/AminKolarijani/d-CDP"; see also
% M.A.S. Kolarijani and P. Mohajerin Esfahani (2020),
% Fast approximate dynamic programming for input-affine dynamics,
% preprint arXi... | 2,727 | 25.230769 | 95 | m |
null | ConjVI-main/Example 1 (synthetic)/LLTd.m | function [SS,Conj]=LLTd(X,Y,S)
% Disclosure: This routine is borrowed from the LLT MATLAB package
% avialable at "netlib.org/numeralgo/na13"; see also
% YVES LUCET, FASTER THAN THE FAST LEGENDRE TRANSFORM, THE LINEAR-TIME
% LEGENDRE TRANSFORM, NUMERICAL ALGORITHMS, 16 (1997), PP. 171-185
%
% LLTd computes ... | 1,461 | 30.782609 | 76 | m |
null | ConjVI-main/Example 1 (synthetic)/MAIN.m | % This file is an example of implementation of the CVI and VI algorithms
% for solving the infinite-horizon optimal control problem for a
% stochastic linear dyanmics.
% Please also see Section 4.1 of the following article for more details:
%
% M.A.S. Kolarijani, C.F. Max, and P. Mohajerin Esfahani (2021),
% ... | 20,109 | 36.87194 | 135 | m |
null | ConjVI-main/Example 1 (synthetic)/VI_Alg.m | function [VF, delta_VF, run_time] = VI_Alg(ProblemData, VI_Data)
% This function contains the implementation of the VI algorithm and
% computes the optimal value function.
% Please see Section 2 of the following article for more details:
%
% M.A.S. Kolarijani, C.F. Max, and P. Mohajerin Esfahani (2020),
% Fast ... | 3,923 | 28.503759 | 95 | m |
null | ConjVI-main/Example 1 (synthetic)/bb.m | function [bbx,bby] = bb (X,Y)
% Disclosure: This routine is borrowed from the LLT MATLAB package
% avialable at "netlib.org/numeralgo/na13"; see also
% YVES LUCET, FASTER THAN THE FAST LEGENDRE TRANSFORM, THE LINEAR-TIME
% LEGENDRE TRANSFORM, NUMERICAL ALGORITHMS, 16 (1997), PP. 171-185
%
% bb computes the... | 1,699 | 25.5625 | 76 | m |
null | ConjVI-main/Example 1 (synthetic)/conj_ExpL1_box.m | function g_conj = conj_ExpL1_box(u_min,u_max,v)
% Disclosure: This routine is borrowed from the d-CDP MATLAB package
% avialable at "https://github.com/AminKolarijani/d-CDP"; see also
% M.A.S. Kolarijani and P. Mohajerin Esfahani (2020),
% Fast approximate dynamic programming for input-affine dynamics,
%... | 1,727 | 31 | 76 | m |
null | ConjVI-main/Example 1 (synthetic)/conj_L1_box.m | function g_conj = conj_L1_box(u_min,u_max,v)
% Disclosure: This routine is borrowed from the d-CDP MATLAB package
% avialable at "https://github.com/AminKolarijani/d-CDP"; see also
% M.A.S. Kolarijani and P. Mohajerin Esfahani (2020),
% Fast approximate dynamic programming for input-affine dynamics,
% ... | 1,478 | 30.468085 | 76 | m |
null | ConjVI-main/Example 1 (synthetic)/conj_Quad_ball.m | function g_conj = conj_Quad_ball(R,r,v)
% Disclosure: This routine is borrowed from the d-CDP MATLAB package
% avialable at "https://github.com/AminKolarijani/d-CDP"; see also
% M.A.S. Kolarijani and P. Mohajerin Esfahani (2020),
% Fast approximate dynamic programming for input-affine dynamics,
% pr... | 1,235 | 30.692308 | 79 | m |
null | ConjVI-main/Example 1 (synthetic)/conj_Quad_box.m | function g_conj = conj_Quad_box(R,u_min,u_max,v)
% Disclosure: This routine is borrowed from the d-CDP MATLAB package
% avialable at "https://github.com/AminKolarijani/d-CDP"; see also
% M.A.S. Kolarijani and P. Mohajerin Esfahani (2020),
% Fast approximate dynamic programming for input-affine dynamics,
... | 1,590 | 32.851064 | 76 | m |
null | ConjVI-main/Example 1 (synthetic)/eval_func.m | function F = eval_func(f,X)
% Disclosure: This routine is borrowed from the d-CDP MATLAB package
% avialable at "https://github.com/AminKolarijani/d-CDP"; see also
% M.A.S. Kolarijani and P. Mohajerin Esfahani (2020),
% Fast approximate dynamic programming for input-affine dynamics,
% preprint arXiv... | 1,851 | 21.864198 | 102 | m |
null | ConjVI-main/Example 1 (synthetic)/eval_func_constr.m | function F_h = eval_func_constr(f,X,h)
% Disclosure: This routine is borrowed from the d-CDP MATLAB package
% avialable at "https://github.com/AminKolarijani/d-CDP"; see also
% M.A.S. Kolarijani and P. Mohajerin Esfahani (2020),
% Fast approximate dynamic programming for input-affine dynamics,
% pre... | 2,222 | 24.551724 | 102 | m |
null | ConjVI-main/Example 1 (synthetic)/ext_constr.m | function f_g_y = ext_constr(X,f,Y,g,h,interpol,extrapol)
% Disclosure: This routine is borrowed from the d-CDP MATLAB package
% avialable at "https://github.com/AminKolarijani/d-CDP"; see also
% M.A.S. Kolarijani and P. Mohajerin Esfahani (2020),
% Fast approximate dynamic programming for input-affine dyna... | 2,822 | 31.448276 | 126 | m |
null | ConjVI-main/Example 1 (synthetic)/ext_constr_expect.m | function E_f_g_y = ext_constr_expect(X,f,Y,g,h,W,P,interpol,extrapol)
% Disclosure: This routine is borrowed from the d-CDP MATLAB package
% avialable at "https://github.com/AminKolarijani/d-CDP"; see also
% M.A.S. Kolarijani and P. Mohajerin Esfahani (2020),
% Fast approximate dynamic programming for inpu... | 3,761 | 32.891892 | 114 | m |
null | ConjVI-main/Example 1 (synthetic)/feasibility_check.m | function [] = feasibility_check(ProblemData)
% Disclosure: This routine is modified versioin of the "feas_check_2"
% routineborrowed in the d-CDP MATLAB package avialable at
% "https://github.com/AminKolarijani/d-CDP"; see also
% M.A.S. Kolarijani and P. Mohajerin Esfahani (2020),
% Fast approximate dynam... | 4,885 | 23.80203 | 111 | m |
null | ConjVI-main/Example 1 (synthetic)/forward_iter.m | function [x,u,traj_cost] = forward_iter(ProblemData, VF)
% Disclosure: This routine is a modification of a similar routine borrowed
% from the d-CDP MATLAB package avialable at
% "https://github.com/AminKolarijani/d-CDP"; see also
% M.A.S. Kolarijani and P. Mohajerin Esfahani (2020),
% Fast approximate dy... | 4,035 | 31.288 | 92 | m |
null | ConjVI-main/Example 1 (synthetic)/fusionma.m | function [fS,fH]=fusionma(C,S)
% Disclosure: This routine is borrowed from the LLT MATLAB package
% avialable at "netlib.org/numeralgo/na13"; see also
% YVES LUCET, FASTER THAN THE FAST LEGENDRE TRANSFORM, THE LINEAR-TIME
% LEGENDRE TRANSFORM, NUMERICAL ALGORITHMS, 16 (1997), PP. 171-185
%
% fusionma(C,S) ... | 1,288 | 30.439024 | 77 | m |
null | ConjVI-main/Example 1 (synthetic)/slope_range.m | function Delta_s = slope_range(X,J)
% Disclosure: This routine is borrowed from the d-CDP MATLAB package
% avialable at "https://github.com/AminKolarijani/d-CDP"; see also
% M.A.S. Kolarijani and P. Mohajerin Esfahani (2020),
% Fast approximate dynamic programming for input-affine dynamics,
% prepri... | 3,251 | 30.882353 | 124 | m |
null | ConjVI-main/Example 1 (synthetic)/unif_grid.m | function X = unif_grid(Delta_x,N_vec)
% Disclosure: This routine is borrowed from the d-CDP MATLAB package
% avialable at "https://github.com/AminKolarijani/d-CDP"; see also
% M.A.S. Kolarijani and P. Mohajerin Esfahani (2020),
% Fast approximate dynamic programming for input-affine dynamics,
% prep... | 1,180 | 31.805556 | 125 | m |
null | ConjVI-main/Example 2 (inverted pendulum)/CVI_Alg.m | function [VF, delta_VF, run_time] = CVI_Alg(ProblemData, CVI_Data)
% This function contains the implementation of the Conjugate VI (CVI)
% algorithm and computes the optimal value function.
% Please see Section 3 of the following article for more details:
%
% M.A.S. Kolarijani, C.F. Max, and P. Mohajerin Esfahani ... | 6,639 | 30.923077 | 105 | m |
null | ConjVI-main/Example 2 (inverted pendulum)/LLT.m | function f_conj = LLT(X,f,S)
% Disclosure: This routine is borrowed from the d-CDP MATLAB package
% avialable at "https://github.com/AminKolarijani/d-CDP"; see also
% M.A.S. Kolarijani and P. Mohajerin Esfahani (2020),
% Fast approximate dynamic programming for input-affine dynamics,
% preprint arXi... | 2,727 | 25.230769 | 95 | m |
null | ConjVI-main/Example 2 (inverted pendulum)/LLTd.m | function [SS,Conj]=LLTd(X,Y,S)
% Disclosure: This routine is borrowed from the LLT MATLAB package
% avialable at "netlib.org/numeralgo/na13"; see also
% YVES LUCET, FASTER THAN THE FAST LEGENDRE TRANSFORM, THE LINEAR-TIME
% LEGENDRE TRANSFORM, NUMERICAL ALGORITHMS, 16 (1997), PP. 171-185
%
% LLTd computes ... | 1,461 | 30.782609 | 76 | m |
null | ConjVI-main/Example 2 (inverted pendulum)/MAIN.m | % This file is an example of implementation of the CVI and VI algorithms
% for solving the infinite-horizon optimal control problem for a noisy
% inverted pendulum.
% Please also see Section 4.2 of the following article for more details:
%
% M.A.S. Kolarijani, C.F. Max, and P. Mohajerin Esfahani (2021),
% Fas... | 20,963 | 37.966543 | 140 | m |
null | ConjVI-main/Example 2 (inverted pendulum)/VI_Alg.m | function [VF, delta_VF, run_time] = VI_Alg(ProblemData, VI_Data)
% This function contains the implementation of the VI algorithm and
% computes the optimal value function.
% Please see Section 2 of the following article for more details:
%
% M.A.S. Kolarijani, C.F. Max, and P. Mohajerin Esfahani (2020),
% Fast ... | 3,923 | 28.503759 | 95 | m |
null | ConjVI-main/Example 2 (inverted pendulum)/bb.m | function [bbx,bby] = bb (X,Y)
% Disclosure: This routine is borrowed from the LLT MATLAB package
% avialable at "netlib.org/numeralgo/na13"; see also
% YVES LUCET, FASTER THAN THE FAST LEGENDRE TRANSFORM, THE LINEAR-TIME
% LEGENDRE TRANSFORM, NUMERICAL ALGORITHMS, 16 (1997), PP. 171-185
%
% bb computes the... | 1,699 | 25.5625 | 76 | m |
null | ConjVI-main/Example 2 (inverted pendulum)/conj_ExpL1_box.m | function g_conj = conj_ExpL1_box(u_min,u_max,v)
% Disclosure: This routine is borrowed from the d-CDP MATLAB package
% avialable at "https://github.com/AminKolarijani/d-CDP"; see also
% M.A.S. Kolarijani and P. Mohajerin Esfahani (2020),
% Fast approximate dynamic programming for input-affine dynamics,
%... | 1,727 | 31 | 76 | m |
null | ConjVI-main/Example 2 (inverted pendulum)/conj_L1_box.m | function g_conj = conj_L1_box(u_min,u_max,v)
% Disclosure: This routine is borrowed from the d-CDP MATLAB package
% avialable at "https://github.com/AminKolarijani/d-CDP"; see also
% M.A.S. Kolarijani and P. Mohajerin Esfahani (2020),
% Fast approximate dynamic programming for input-affine dynamics,
% ... | 1,478 | 30.468085 | 76 | m |
null | ConjVI-main/Example 2 (inverted pendulum)/conj_Quad_ball.m | function g_conj = conj_Quad_ball(R,r,v)
% Disclosure: This routine is borrowed from the d-CDP MATLAB package
% avialable at "https://github.com/AminKolarijani/d-CDP"; see also
% M.A.S. Kolarijani and P. Mohajerin Esfahani (2020),
% Fast approximate dynamic programming for input-affine dynamics,
% pr... | 1,235 | 30.692308 | 79 | m |
null | ConjVI-main/Example 2 (inverted pendulum)/conj_Quad_box.m | function g_conj = conj_Quad_box(R,u_min,u_max,v)
% Disclosure: This routine is borrowed from the d-CDP MATLAB package
% avialable at "https://github.com/AminKolarijani/d-CDP"; see also
% M.A.S. Kolarijani and P. Mohajerin Esfahani (2020),
% Fast approximate dynamic programming for input-affine dynamics,
... | 1,590 | 32.851064 | 76 | m |
null | ConjVI-main/Example 2 (inverted pendulum)/eval_func.m | function F = eval_func(f,X)
% Disclosure: This routine is borrowed from the d-CDP MATLAB package
% avialable at "https://github.com/AminKolarijani/d-CDP"; see also
% M.A.S. Kolarijani and P. Mohajerin Esfahani (2020),
% Fast approximate dynamic programming for input-affine dynamics,
% preprint arXiv... | 1,851 | 21.864198 | 102 | m |
null | ConjVI-main/Example 2 (inverted pendulum)/eval_func_constr.m | function F_h = eval_func_constr(f,X,h)
% Disclosure: This routine is borrowed from the d-CDP MATLAB package
% avialable at "https://github.com/AminKolarijani/d-CDP"; see also
% M.A.S. Kolarijani and P. Mohajerin Esfahani (2020),
% Fast approximate dynamic programming for input-affine dynamics,
% pre... | 2,222 | 24.551724 | 102 | m |
null | ConjVI-main/Example 2 (inverted pendulum)/ext_constr.m | function f_g_y = ext_constr(X,f,Y,g,h,interpol,extrapol)
% Disclosure: This routine is borrowed from the d-CDP MATLAB package
% avialable at "https://github.com/AminKolarijani/d-CDP"; see also
% M.A.S. Kolarijani and P. Mohajerin Esfahani (2020),
% Fast approximate dynamic programming for input-affine dyna... | 2,822 | 31.448276 | 126 | m |
null | ConjVI-main/Example 2 (inverted pendulum)/ext_constr_expect.m | function E_f_g_y = ext_constr_expect(X,f,Y,g,h,W,P,interpol,extrapol)
% Disclosure: This routine is borrowed from the d-CDP MATLAB package
% avialable at "https://github.com/AminKolarijani/d-CDP"; see also
% M.A.S. Kolarijani and P. Mohajerin Esfahani (2020),
% Fast approximate dynamic programming for inpu... | 3,761 | 32.891892 | 114 | m |
null | ConjVI-main/Example 2 (inverted pendulum)/feasibility_check.m | function [] = feasibility_check(ProblemData)
% Disclosure: This routine is modified versioin of the "feas_check_2"
% routineborrowed in the d-CDP MATLAB package avialable at
% "https://github.com/AminKolarijani/d-CDP"; see also
% M.A.S. Kolarijani and P. Mohajerin Esfahani (2020),
% Fast approximate dynam... | 4,885 | 23.80203 | 111 | m |
null | ConjVI-main/Example 2 (inverted pendulum)/forward_iter.m | function [x,u,traj_cost] = forward_iter(ProblemData, VF)
% Disclosure: This routine is a modification of a similar routine borrowed
% from the d-CDP MATLAB package avialable at
% "https://github.com/AminKolarijani/d-CDP"; see also
% M.A.S. Kolarijani and P. Mohajerin Esfahani (2020),
% Fast approximate dy... | 4,052 | 31.424 | 92 | m |
null | ConjVI-main/Example 2 (inverted pendulum)/fusionma.m | function [fS,fH]=fusionma(C,S)
% Disclosure: This routine is borrowed from the LLT MATLAB package
% avialable at "netlib.org/numeralgo/na13"; see also
% YVES LUCET, FASTER THAN THE FAST LEGENDRE TRANSFORM, THE LINEAR-TIME
% LEGENDRE TRANSFORM, NUMERICAL ALGORITHMS, 16 (1997), PP. 171-185
%
% fusionma(C,S) ... | 1,288 | 30.439024 | 77 | m |
null | ConjVI-main/Example 2 (inverted pendulum)/slope_range.m | function Delta_s = slope_range(X,J)
% Disclosure: This routine is borrowed from the d-CDP MATLAB package
% avialable at "https://github.com/AminKolarijani/d-CDP"; see also
% M.A.S. Kolarijani and P. Mohajerin Esfahani (2020),
% Fast approximate dynamic programming for input-affine dynamics,
% prepri... | 3,251 | 30.882353 | 124 | m |
null | ConjVI-main/Example 2 (inverted pendulum)/unif_grid.m | function X = unif_grid(Delta_x,N_vec)
% Disclosure: This routine is borrowed from the d-CDP MATLAB package
% avialable at "https://github.com/AminKolarijani/d-CDP"; see also
% M.A.S. Kolarijani and P. Mohajerin Esfahani (2020),
% Fast approximate dynamic programming for input-affine dynamics,
% prep... | 1,180 | 31.805556 | 125 | m |
null | ConjVI-main/Exapmle 3 (batch reactor)/CVI_Alg.m | function [VF, delta_VF, run_time] = CVI_Alg(ProblemData, CVI_Data)
% This function contains the implementation of the Conjugate VI (CVI)
% algorithm and computes the optimal value function.
% Please see Section 3 of the extended manuscript for more details.
%
% Input:
% Data structure containing the problem data and... | 6,425 | 30.655172 | 105 | m |
null | ConjVI-main/Exapmle 3 (batch reactor)/LLT.m | function f_conj = LLT(X,f,S)
% Computes the discrete cojugate of the funcction "f" defined on the grid
% "X" at the slopes given by the grid "S".
% It uses the univariate Linear-time Legendre Transform (LLTd) algorithm
% developed by
% "Y. Lucet. Faster than the fast Legendre transform, the linear-time
% Le... | 2,420 | 23.704082 | 95 | m |
null | ConjVI-main/Exapmle 3 (batch reactor)/LLTd.m | function [SS,Conj]=LLTd(X,Y,S)
% Disclosure: This routine is borrowed from the LLT MATLAB package
% avialable at "netlib.org/numeralgo/na13"; see also
% YVES LUCET, FASTER THAN THE FAST LEGENDRE TRANSFORM, THE LINEAR-TIME
% LEGENDRE TRANSFORM, NUMERICAL ALGORITHMS, 16 (1997), PP. 171-185
%
% LLTd computes ... | 1,461 | 30.782609 | 76 | m |
null | ConjVI-main/Exapmle 3 (batch reactor)/MAIN.m | % This file is an example of implementation of the CVI and VI algorithms
% for solving the infinite-horizon optimal control problem for an
% unstable batch reactor.
% Please also see Section 4.3 of the following article for more details:
%
% M.A.S. Kolarijani, C.F. Max, and P. Mohajerin Esfahani (2021),
% Fa... | 12,767 | 34.966197 | 129 | m |
null | ConjVI-main/Exapmle 3 (batch reactor)/VI_Alg.m | function [VF, delta_VF, run_time] = VI_Alg(ProblemData, VI_Data)
% This function contains the implementation of the VI algorithm and
% computes the optimal value function.
% Please see Section 2 of the extended manuscript for more details.
%
%
% Inputs:
% Data structure containing the problem data and d-DP config... | 3,714 | 27.79845 | 95 | m |
null | ConjVI-main/Exapmle 3 (batch reactor)/bb.m | function [bbx,bby] = bb (X,Y)
% Disclosure: This routine is borrowed from the LLT MATLAB package
% avialable at "netlib.org/numeralgo/na13"; see also
% YVES LUCET, FASTER THAN THE FAST LEGENDRE TRANSFORM, THE LINEAR-TIME
% LEGENDRE TRANSFORM, NUMERICAL ALGORITHMS, 16 (1997), PP. 171-185
%
% bb computes the... | 1,699 | 25.5625 | 76 | m |
null | ConjVI-main/Exapmle 3 (batch reactor)/conj_ExpL1_box.m | function g_conj = conj_ExpL1_box(u_min,u_max,v)
% Computes the conjugate of the extended real-valued function
% g(u) = sum_i {exp(abs(u_i)) - m},
% at the point "v", where
% (a) "m" is the dimension of the variables "u" and "m";
% (b) the effective domain of "g" is the hyper-rectangle given by
% ... | 1,420 | 28.604167 | 76 | m |
null | ConjVI-main/Exapmle 3 (batch reactor)/conj_L1_box.m | function g_conj = conj_L1_box(u_min,u_max,v)
% Computes the conjugate of the extended real-valued function
% g(u) = sum_i {abs(u_i)}, [L_1 norm]
% at the point "v", where
% (a) the effective domain of "g" is the hyper-rectangle given by
% u_min <= u <= u_max;
% (b) the effect... | 1,171 | 27.585366 | 76 | m |
null | ConjVI-main/Exapmle 3 (batch reactor)/conj_Quad_ball.m | function g_conj = conj_Quad_ball(R,r,v)
% Computes the conjugate of the extended real-valued function
% g(u) = u'*R*u, [weighted L_2 norm]
% at the point "v", where
% (a) the effective domain of "g" is ball of radius "r", centered at origin ;
% (b) the weight matrix "R" is positive definite.
%
% Usag... | 928 | 27.151515 | 79 | m |
null | ConjVI-main/Exapmle 3 (batch reactor)/conj_Quad_box.m | function g_conj = conj_Quad_box(R,u_min,u_max,v)
% Computes the conjugate of the extended real-valued function
% g(u) = u'*R*u, [weighted L_2 norm]
% at the point "v", where
% (a) the effective domain of "g" is the hyper-rectangle given by
% u_min <= u <= u_max;
% (b) the eff... | 1,283 | 30.317073 | 76 | m |
null | ConjVI-main/Exapmle 3 (batch reactor)/eval_func.m | function F = eval_func(f,X)
% FUNCTION EVALUATION:
% Evalutes the possibly vector valued function given by the handle "f" at
% the points given by the grid "X".
%
% Usage:
% F = eval_func(f,X)
%
% Inputs:
% f - Function handle, takes an n-dimsional column verctor and outputs an m-dimesional column vector
% X - C... | 1,544 | 19.6 | 102 | m |
null | ConjVI-main/Exapmle 3 (batch reactor)/eval_func_constr.m | function F_h = eval_func_constr(f,X,h)
% CONSTRAINED FUNCTION EVALUATION
% Evalutes the function given by the handle "f" at points given by the grid
% "X", while checking the constraints "h(x)<=0" [component-wise], given by
% the other function handle "h".
%
% Usage:
% F = eval_func_constr(f,X,h)
%
% Inputs:
% f ... | 1,915 | 22.654321 | 102 | m |
null | ConjVI-main/Exapmle 3 (batch reactor)/ext_constr.m | function f_g_y = ext_constr(X,f,Y,g,h,interpol,extrapol)
% CONSTRAINED EXTENSION:
% Uses the discrete data points (X,f(X)) of the function "f" over the grid "X",
% to approximate the values "f(g(Y))" over the points "g(Y)" given by the
% function handle "g" and the grid "Y". It also checks the constraints
% "h(g(Y))... | 2,516 | 30.074074 | 126 | m |
null | ConjVI-main/Exapmle 3 (batch reactor)/ext_constr_expect.m | function E_f_g_y = ext_constr_expect(X,f,Y,g,h,W,P,interpol,extrapol)
% EXPECTATION USING CONSTRAINED EXTENION:
% An extension of the routine "ext_constr.m" -- computes the expected value
% E_w[f(g(y+w))] for "y \in Y",
% where "w \in W" are the disturbances, and "P" is the corresponding pmf.
%
% ... | 3,454 | 31.904762 | 114 | m |
null | ConjVI-main/Exapmle 3 (batch reactor)/feasibility_check.m | function [] = feasibility_check(ProblemData)
% This function checks if the discrettization of the state and input spaces
% is feasible corresponding to in the sense that
% (a) all "x \in X_discrete" satisfy the state constraints
% (b) all "u \in U_discrete" satisfy the input constraints
% (c) for each "x \in X_d... | 4,530 | 22.847368 | 111 | m |
null | ConjVI-main/Exapmle 3 (batch reactor)/forward_iter.m | function [x,u,traj_cost] = forward_iter(ProblemData, VF)
% This function solves an instance (determined by the given initial state)
% of optimal control problem using the optimal value functions "VF" given
% over the discrete state space, via a brute force minimization over the
% discrete input space.
%
% Inputs:
%... | 3,705 | 30.142857 | 92 | m |
null | ConjVI-main/Exapmle 3 (batch reactor)/fusionma.m | function [fS,fH]=fusionma(C,S)
% Disclosure: This routine is borrowed from the LLT MATLAB package
% avialable at "netlib.org/numeralgo/na13"; see also
% YVES LUCET, FASTER THAN THE FAST LEGENDRE TRANSFORM, THE LINEAR-TIME
% LEGENDRE TRANSFORM, NUMERICAL ALGORITHMS, 16 (1997), PP. 171-185
%
% fusionma(C,S) ... | 1,288 | 30.439024 | 77 | m |
null | ConjVI-main/Exapmle 3 (batch reactor)/slope_range.m | function Delta_s = slope_range(X,J)
% Uses the discrete data points (X,J(X)) of the "extended real-valued
% convex" function "J" over the grid "X",to compute the ragnge of slopes
% (differences) of the discrete function J in each dimension corresponding
% to the grid "X".
%
% Usage:
% Delta_s = slope_range(X,J)
%
%... | 2,944 | 29.677083 | 124 | m |
null | ConjVI-main/Exapmle 3 (batch reactor)/unif_grid.m | function X = unif_grid(Delta_x,N_vec)
% Generarates a uniform gird "X", with the number of points in each
% dimension given by the vector N_vec, over the heper-rectangle
% given by "Delta_x".
%
% Usage:
% X = unif_grid(Delta_x,N_vec)
%
% Inputs:
% Delat_x - Matrix of size (n,2), where each row i=1,...,n determines... | 873 | 28.133333 | 125 | m |
null | ConjVI-main/MATLAB package with illustration/CVI_Alg.m | function [VF, delta_VF, run_time] = CVI_Alg(ProblemData, CVI_Data)
% This function contains the implementation of the Conjugate VI (CVI)
% algorithm and computes the optimal value function.
% Please see Section 3 of the following article for more details:
%
% M.A.S. Kolarijani, C.F. Max, and P. Mohajerin Esfahani ... | 6,639 | 30.923077 | 105 | m |
null | ConjVI-main/MATLAB package with illustration/LLT.m | function f_conj = LLT(X,f,S)
% Disclosure: This routine is borrowed from the d-CDP MATLAB package
% avialable at "https://github.com/AminKolarijani/d-CDP"; see also
% M.A.S. Kolarijani and P. Mohajerin Esfahani (2020),
% Fast approximate dynamic programming for input-affine dynamics,
% preprint arXi... | 2,727 | 25.230769 | 95 | m |
null | ConjVI-main/MATLAB package with illustration/LLTd.m | function [SS,Conj]=LLTd(X,Y,S)
% Disclosure: This routine is borrowed from the LLT MATLAB package
% avialable at "netlib.org/numeralgo/na13"; see also
% YVES LUCET, FASTER THAN THE FAST LEGENDRE TRANSFORM, THE LINEAR-TIME
% LEGENDRE TRANSFORM, NUMERICAL ALGORITHMS, 16 (1997), PP. 171-185
%
% LLTd computes ... | 1,461 | 30.782609 | 76 | m |
null | ConjVI-main/MATLAB package with illustration/MAIN.m | % This is an illustration of the usage of the developed MATLAB pakage for
% solving infinite-horizon, discounted cost, optimal control problems
% using the devepoled Conjugate VI (CVI) algorithm. Also included is the
% implementations of the benchmark VI algorithm.
% Please see the follwing article for more ... | 14,849 | 42.421053 | 125 | m |
null | ConjVI-main/MATLAB package with illustration/VI_Alg.m | function [VF, delta_VF, run_time] = VI_Alg(ProblemData, VI_Data)
% This function contains the implementation of the VI algorithm and
% computes the optimal value function.
% Please see Section 2 of the following article for more details:
%
% M.A.S. Kolarijani, C.F. Max, and P. Mohajerin Esfahani (2020),
% Fast ... | 3,923 | 28.503759 | 95 | m |
null | ConjVI-main/MATLAB package with illustration/bb.m | function [bbx,bby] = bb (X,Y)
% Disclosure: This routine is borrowed from the LLT MATLAB package
% avialable at "netlib.org/numeralgo/na13"; see also
% YVES LUCET, FASTER THAN THE FAST LEGENDRE TRANSFORM, THE LINEAR-TIME
% LEGENDRE TRANSFORM, NUMERICAL ALGORITHMS, 16 (1997), PP. 171-185
%
% bb computes the... | 1,699 | 25.5625 | 76 | m |
null | ConjVI-main/MATLAB package with illustration/conj_ExpL1_box.m | function g_conj = conj_ExpL1_box(u_min,u_max,v)
% Disclosure: This routine is borrowed from the d-CDP MATLAB package
% avialable at "https://github.com/AminKolarijani/d-CDP"; see also
% M.A.S. Kolarijani and P. Mohajerin Esfahani (2020),
% Fast approximate dynamic programming for input-affine dynamics,
%... | 1,727 | 31 | 76 | m |
null | ConjVI-main/MATLAB package with illustration/conj_L1_box.m | function g_conj = conj_L1_box(u_min,u_max,v)
% Disclosure: This routine is borrowed from the d-CDP MATLAB package
% avialable at "https://github.com/AminKolarijani/d-CDP"; see also
% M.A.S. Kolarijani and P. Mohajerin Esfahani (2020),
% Fast approximate dynamic programming for input-affine dynamics,
% ... | 1,478 | 30.468085 | 76 | m |
null | ConjVI-main/MATLAB package with illustration/conj_Quad_ball.m | function g_conj = conj_Quad_ball(R,r,v)
% Disclosure: This routine is borrowed from the d-CDP MATLAB package
% avialable at "https://github.com/AminKolarijani/d-CDP"; see also
% M.A.S. Kolarijani and P. Mohajerin Esfahani (2020),
% Fast approximate dynamic programming for input-affine dynamics,
% pr... | 1,235 | 30.692308 | 79 | m |
null | ConjVI-main/MATLAB package with illustration/conj_Quad_box.m | function g_conj = conj_Quad_box(R,u_min,u_max,v)
% Disclosure: This routine is borrowed from the d-CDP MATLAB package
% avialable at "https://github.com/AminKolarijani/d-CDP"; see also
% M.A.S. Kolarijani and P. Mohajerin Esfahani (2020),
% Fast approximate dynamic programming for input-affine dynamics,
... | 1,590 | 32.851064 | 76 | m |