Input buildinfo: https://buildinfos.debian.net/buildinfo-pool/o/octave-optim/octave-optim_1.6.0-6_amd64.buildinfo Use metasnap for getting required timestamps New buildinfo file: /tmp/octave-optim-1.6.0-6q83i5a_2/octave-optim_1.6.0-6_amd64.buildinfo Get source package info: octave-optim=1.6.0-6 Source URL: http://snapshot.notset.fr/mr/package/octave-optim/1.6.0-6/srcfiles?fileinfo=1 env -i PATH=/usr/sbin:/usr/bin:/sbin:/bin TMPDIR=/tmp mmdebstrap --arch=amd64 --include=aglfn=1.7+git20191031.4036a9c-2 autoconf=2.69-11.1 automake=1:1.16.3-1 autopoint=0.19.8.1-10 autotools-dev=20180224.1 base-files=11 base-passwd=3.5.48 bash=5.1-1 binutils=2.35.1-4 binutils-common=2.35.1-4 binutils-x86-64-linux-gnu=2.35.1-4 bsdextrautils=2.36.1-2 bsdutils=1:2.36.1-2 build-essential=12.8 bzip2=1.0.8-4 ca-certificates=20200601 cme=1.032-1 coreutils=8.32-4+b1 cpp=4:10.2.0-1 cpp-10=10.2.1-1 dash=0.5.11+git20200708+dd9ef66-2 debconf=1.5.74 debhelper=13.3 debianutils=4.11.2 dh-autoreconf=19 dh-octave=1.0.2 dh-octave-autopkgtest=1.0.2 dh-strip-nondeterminism=1.9.0-1 diffstat=1.63-1 diffutils=1:3.7-3 dpkg=1.20.5 dpkg-dev=1.20.5 dwz=0.13+20201015-2 file=1:5.39-3 findutils=4.7.0+git20201010-2 fontconfig=2.13.1-4.2 fontconfig-config=2.13.1-4.2 fonts-dejavu-core=2.37-2 fonts-freefont-otf=20120503-10 fonts-lmodern=2.004.5-6 fonts-urw-base35=20200910-1 g++=4:10.2.0-1 g++-10=10.2.1-1 gcc=4:10.2.0-1 gcc-10=10.2.1-1 gcc-10-base=10.2.1-1 gettext=0.19.8.1-10 gettext-base=0.19.8.1-10 gfortran=4:10.2.0-1 gfortran-10=10.2.1-1 ghostscript=9.53.3~dfsg-5 gnuplot-data=5.4.1+dfsg1-1 gnuplot-nox=5.4.1+dfsg1-1 gpg=2.2.20-1 gpgconf=2.2.20-1 grep=3.6-1 groff-base=1.22.4-5 gzip=1.10-2 hdf5-helpers=1.10.6+repack-2 hostname=3.23 init-system-helpers=1.59 intltool-debian=0.35.0+20060710.5 libacl1=2.2.53-8 libaec-dev=1.0.4-1 libaec0=1.0.4-1 libalgorithm-c3-perl=0.11-1 libaliased-perl=0.34-1 libamd2=1:5.8.1+dfsg-2 libapp-cmd-perl=0.331-1 libapt-pkg-perl=0.1.36+b4 libapt-pkg6.0=2.1.12 libarchive-zip-perl=1.68-1 libarpack2=3.8.0-1 libarray-intspan-perl=2.004-1 libasan6=10.2.1-1 libasound2=1.2.4-1 libasound2-data=1.2.4-1 libassuan0=2.5.3-7.1 libatomic1=10.2.1-1 libattr1=1:2.4.48-5 libaudit-common=1:2.8.5-3.1 libaudit1=1:2.8.5-3.1+b1 libavahi-client3=0.8-3 libavahi-common-data=0.8-3 libavahi-common3=0.8-3 libb-hooks-endofscope-perl=0.24-1 libb-hooks-op-check-perl=0.22-1+b3 libbinutils=2.35.1-4 libblas-dev=3.9.0-3 libblas3=3.9.0-3 libblkid1=2.36.1-2 libboolean-perl=0.46-1 libbrotli1=1.0.9-2+b2 libbsd0=0.10.0-1 libbz2-1.0=1.0.8-4 libc-bin=2.31-5 libc-dev-bin=2.31-5 libc6=2.31-5 libc6-dev=2.31-5 libcairo2=1.16.0-4 libcamd2=1:5.8.1+dfsg-2 libcap-ng0=0.7.9-2.2+b1 libcapture-tiny-perl=0.48-1 libcarp-assert-more-perl=1.24-1 libcarp-assert-perl=0.21-1 libcc1-0=10.2.1-1 libccolamd2=1:5.8.1+dfsg-2 libcholmod3=1:5.8.1+dfsg-2 libclass-c3-perl=0.35-1 libclass-data-inheritable-perl=0.08-3 libclass-load-perl=0.25-1 libclass-method-modifiers-perl=2.13-1 libclass-xsaccessor-perl=1.19-3+b6 libclone-choose-perl=0.010-1 libclone-perl=0.45-1+b1 libcolamd2=1:5.8.1+dfsg-2 libcom-err2=1.45.6-1 libconfig-model-backend-yaml-perl=2.133-2 libconfig-model-dpkg-perl=2.139 libconfig-model-perl=2.140-1 libconfig-tiny-perl=2.24-1 libconvert-binhex-perl=1.125-1 libcpanel-json-xs-perl=4.25-1+b1 libcroco3=0.6.13-1 libcrypt-dev=1:4.4.17-1 libcrypt1=1:4.4.17-1 libctf-nobfd0=2.35.1-4 libctf0=2.35.1-4 libcups2=2.3.3op1-3 libcurl3-gnutls=7.72.0-1 libcxsparse3=1:5.8.1+dfsg-2 libdata-dpath-perl=0.58-1 libdata-messagepack-perl=1.00-4+b1 libdata-optlist-perl=0.110-1 libdata-section-perl=0.200007-1 libdata-validate-domain-perl=0.10-1 libdatrie1=0.2.12-3 libdb5.3=5.3.28+dfsg1-0.6 libdbus-1-3=1.12.20-1 libdebconfclient0=0.255 libdebhelper-perl=13.3 libdevel-callchecker-perl=0.008-1+b2 libdevel-size-perl=0.83-1+b2 libdevel-stacktrace-perl=2.0400-1 libdouble-conversion3=3.1.5-6.1 libdpkg-perl=1.20.5 libdrm-amdgpu1=2.4.103-2 libdrm-common=2.4.103-2 libdrm-intel1=2.4.103-2 libdrm-nouveau2=2.4.103-2 libdrm-radeon1=2.4.103-2 libdrm2=2.4.103-2 libdynaloader-functions-perl=0.003-1 libedit2=3.1-20191231-1 libegl-dev=1.3.2-1 libegl-mesa0=20.2.4-1 libegl1=1.3.2-1 libelf1=0.182-1 libemail-address-xs-perl=1.04-1+b3 libencode-locale-perl=1.05-1 liberror-perl=0.17029-1 libevdev2=1.10.0+dfsg-1 libexception-class-perl=1.44-1 libexpat1=2.2.10-1 libexporter-lite-perl=0.08-1 libexporter-tiny-perl=1.002002-1 libffi7=3.3-5 libfftw3-bin=3.3.8-2 libfftw3-dev=3.3.8-2 libfftw3-double3=3.3.8-2 libfftw3-long3=3.3.8-2 libfftw3-quad3=3.3.8-2 libfftw3-single3=3.3.8-2 libfile-basedir-perl=0.08-1 libfile-find-rule-perl=0.34-1 libfile-homedir-perl=1.006-1 libfile-listing-perl=6.14-1 libfile-stripnondeterminism-perl=1.9.0-1 libfile-which-perl=1.23-1 libflac8=1.3.3-1 libfltk-gl1.3=1.3.5-2 libfltk1.3=1.3.5-2 libfont-ttf-perl=1.06-1 libfontconfig1=2.13.1-4.2 libfreetype6=2.10.4+dfsg-1 libfribidi0=1.0.8-2 libgbm1=20.2.4-1 libgcc-10-dev=10.2.1-1 libgcc-s1=10.2.1-1 libgcrypt20=1.8.7-2 libgd3=2.3.0-2 libgdbm-compat4=1.18.1-5.1 libgdbm6=1.18.1-5.1 libgetopt-long-descriptive-perl=0.105-1 libgfortran-10-dev=10.2.1-1 libgfortran5=10.2.1-1 libgl-dev=1.3.2-1 libgl1=1.3.2-1 libgl1-mesa-dev=20.2.4-1 libgl1-mesa-dri=20.2.4-1 libgl2ps1.4=1.4.2+dfsg1-1 libglapi-mesa=20.2.4-1 libgles-dev=1.3.2-1 libgles1=1.3.2-1 libgles2=1.3.2-1 libglib2.0-0=2.66.3-2 libglpk40=4.65-2 libglu1-mesa=9.0.1-1 libglvnd-dev=1.3.2-1 libglvnd0=1.3.2-1 libglx-dev=1.3.2-1 libglx-mesa0=20.2.4-1 libglx0=1.3.2-1 libgmp10=2:6.2.1+dfsg-1 libgnutls30=3.7.0-3 libgomp1=10.2.1-1 libgpg-error0=1.38-2 libgraphicsmagick++-q16-12=1.4+really1.3.35+hg16394-1 libgraphicsmagick-q16-3=1.4+really1.3.35+hg16394-1 libgraphite2-3=1.3.14-1 libgs9=9.53.3~dfsg-5 libgs9-common=9.53.3~dfsg-5 libgssapi-krb5-2=1.18.3-4 libgudev-1.0-0=234-1 libharfbuzz0b=2.6.7-1 libhash-fieldhash-perl=0.15-1+b3 libhash-merge-perl=0.302-1 libhdf5-103-1=1.10.6+repack-2 libhdf5-cpp-103-1=1.10.6+repack-2 libhdf5-dev=1.10.6+repack-2 libhdf5-fortran-102=1.10.6+repack-2 libhdf5-hl-100=1.10.6+repack-2 libhdf5-hl-cpp-100=1.10.6+repack-2 libhdf5-hl-fortran-100=1.10.6+repack-2 libhogweed6=3.6-2 libhtml-html5-entities-perl=0.004-1 libhtml-parser-perl=3.75-1+b1 libhtml-tagset-perl=3.20-4 libhtml-tree-perl=5.07-2 libhttp-cookies-perl=6.09-1 libhttp-date-perl=6.05-1 libhttp-message-perl=6.26-1 libhttp-negotiate-perl=6.01-1 libice6=2:1.0.10-1 libicu67=67.1-5 libidn11=1.33-2.4 libidn2-0=2.3.0-4 libijs-0.35=0.35-15 libimport-into-perl=1.002005-1 libinput-bin=1.16.4-1 libinput10=1.16.4-1 libio-html-perl=1.001-1 libio-socket-ssl-perl=2.068-1 libio-string-perl=1.08-3 libio-stringy-perl=2.111-3 libio-tiecombine-perl=1.005-1 libipc-run3-perl=0.048-2 libipc-system-simple-perl=1.30-1 libisl23=0.23-1 libiterator-perl=0.03+ds1-1 libiterator-util-perl=0.02+ds1-1 libitm1=10.2.1-1 libjack-jackd2-0=1.9.16~dfsg-1 libjbig0=2.1-3.1+b2 libjbig2dec0=0.19-1 libjpeg-dev=1:2.0.5-1.1 libjpeg62-turbo=1:2.0.5-1.1 libjpeg62-turbo-dev=1:2.0.5-1.1 libjson-maybexs-perl=1.004003-1 libjson-perl=4.02000-2 libk5crypto3=1.18.3-4 libkeyutils1=1.6.1-2 libkpathsea6=2020.20200327.54578-5 libkrb5-3=1.18.3-4 libkrb5support0=1.18.3-4 liblapack-dev=3.9.0-3 liblapack3=3.9.0-3 liblcms2-2=2.9-4+b1 libldap-2.4-2=2.4.56+dfsg-1 liblist-compare-perl=0.55-1 liblist-moreutils-perl=0.416-1+b6 liblist-someutils-perl=0.58-1 liblist-utilsby-perl=0.11-1 libllvm11=1:11.0.0-5+b1 liblog-any-adapter-screen-perl=0.140-1 liblog-any-perl=1.708-1 liblog-log4perl-perl=1.53-1 liblsan0=10.2.1-1 libltdl7=2.4.6-14 liblua5.4-0=5.4.2-1 liblwp-mediatypes-perl=6.04-1 liblwp-protocol-https-perl=6.09-1 liblz4-1=1.9.2-2 liblzma5=5.2.4-1+b1 liblzo2-2=2.10-2 libmagic-mgc=1:5.39-3 libmagic1=1:5.39-3 libmailtools-perl=2.21-1 libmarkdown2=2.2.6-1 libmd4c0=0.4.6-1 libmetis5=5.1.0.dfsg-7 libmime-tools-perl=5.509-1 libmodule-implementation-perl=0.09-1 libmodule-pluggable-perl=5.2-1 libmodule-runtime-perl=0.016-1 libmoo-perl=2.004004-1 libmoox-aliases-perl=0.001006-1 libmoox-struct-perl=0.020-1 libmount1=2.36.1-2 libmouse-perl=2.5.10-1+b1 libmousex-nativetraits-perl=1.09-2 libmousex-strictconstructor-perl=0.02-2 libmpc3=1.2.0-1 libmpfr6=4.1.0-3 libmro-compat-perl=0.13-1 libmtdev1=1.1.6-1 libnamespace-autoclean-perl=0.29-1 libnamespace-clean-perl=0.27-1 libncurses-dev=6.2+20201114-1 libncurses6=6.2+20201114-1 libncursesw6=6.2+20201114-1 libnet-domain-tld-perl=1.75-1 libnet-http-perl=6.19-1 libnet-smtp-ssl-perl=1.04-1 libnet-ssleay-perl=1.88-3+b1 libnettle8=3.6-2 libnghttp2-14=1.42.0-1 libnsl-dev=1.3.0-2 libnsl2=1.3.0-2 libnumber-compare-perl=0.03-1 libnumber-range-perl=0.12-1 libobject-id-perl=0.1.2-2 liboctave-dev=6.1.0-2 liboctave8=6.1.0-2 libogg0=1.3.2-1+b1 libopengl-dev=1.3.2-1 libopengl0=1.3.2-1 libopenjp2-7=2.3.1-1 libp11-kit0=0.23.21-2 libpackage-stash-perl=0.39-1 libpam-modules=1.3.1-5 libpam-modules-bin=1.3.1-5 libpam-runtime=1.3.1-5 libpam0g=1.3.1-5 libpango-1.0-0=1.46.2-3 libpangocairo-1.0-0=1.46.2-3 libpangoft2-1.0-0=1.46.2-3 libpaper-utils=1.1.28+b1 libpaper1=1.1.28+b1 libparams-classify-perl=0.015-1+b3 libparams-util-perl=1.102-1+b1 libparams-validate-perl=1.30-1+b1 libparse-debcontrol-perl=2.005-4 libparse-recdescent-perl=1.967015+dfsg-2 libpath-iterator-rule-perl=1.014-1 libpath-tiny-perl=0.114-1 libpciaccess0=0.16-1 libpcre2-16-0=10.35-2 libpcre2-8-0=10.35-2 libpcre3=2:8.39-13 libperl5.32=5.32.0-5 libperlio-gzip-perl=0.19-1+b7 libpipeline1=1.5.3-1 libpixman-1-0=0.40.0-1 libpng16-16=1.6.37-3 libpod-constants-perl=0.19-2 libpod-parser-perl=1.63-2 libpod-pom-perl=2.01-3 libportaudio2=19.6.0-1.1 libproc-processtable-perl=0.59-2+b1 libpsl5=0.21.0-1.1 libptexenc1=2020.20200327.54578-5 libpthread-stubs0-dev=0.4-1 libqhull8.0=2020.2-3 libqrupdate1=1.1.2-4 libqscintilla2-qt5-15=2.11.6+dfsg-1 libqscintilla2-qt5-l10n=2.11.6+dfsg-1 libqt5core5a=5.15.1+dfsg-4 libqt5dbus5=5.15.1+dfsg-4 libqt5gui5=5.15.1+dfsg-4 libqt5help5=5.15.1-2+b1 libqt5network5=5.15.1+dfsg-4 libqt5printsupport5=5.15.1+dfsg-4 libqt5sql5=5.15.1+dfsg-4 libqt5widgets5=5.15.1+dfsg-4 libqt5xml5=5.15.1+dfsg-4 libquadmath0=10.2.1-1 libre-engine-re2-perl=0.13-5+b5 libre2-9=20201101+dfsg-2 libreadline-dev=8.1-1 libreadline8=8.1-1 libregexp-common-perl=2017060201-1 libregexp-pattern-license-perl=3.4.0-1 libregexp-pattern-perl=0.2.14-1 librole-tiny-perl=2.001004-1 librtmp1=2.4+20151223.gitfa8646d.1-2+b2 libsamplerate0=0.1.9-2 libsasl2-2=2.1.27+dfsg-2 libsasl2-modules-db=2.1.27+dfsg-2 libseccomp2=2.5.0-3+b1 libselinux1=3.1-2+b2 libsensors-config=1:3.6.0-2 libsensors5=1:3.6.0-2 libsereal-decoder-perl=4.018+ds-1+b1 libsereal-encoder-perl=4.018+ds-1+b1 libsigsegv2=2.12-2 libsm6=2:1.2.3-1 libsmartcols1=2.36.1-2 libsndfile1=1.0.28-8 libsoftware-license-perl=0.103014-2 libsoftware-licensemoreutils-perl=1.005-1 libsort-key-perl=1.33-2+b3 libsort-versions-perl=1.62-1 libsqlite3-0=3.34.0-1 libssh2-1=1.9.0-1 libssl1.1=1.1.1i-1 libstdc++-10-dev=10.2.1-1 libstdc++6=10.2.1-1 libstrictures-perl=2.000006-1 libstring-copyright-perl=0.003006-1 libstring-escape-perl=2010.002-2 libstring-rewriteprefix-perl=0.008-1 libsub-exporter-perl=0.987-1 libsub-exporter-progressive-perl=0.001013-1 libsub-identify-perl=0.14-1+b3 libsub-install-perl=0.928-1 libsub-name-perl=0.26-1+b1 libsub-override-perl=0.09-2 libsub-quote-perl=2.006006-1 libsub-uplevel-perl=0.2800-1 libsuitesparseconfig5=1:5.8.1+dfsg-2 libsynctex2=2020.20200327.54578-5 libsystemd0=247.1-3 libsz2=1.0.4-1 libtasn1-6=4.16.0-2 libteckit0=2.5.10+ds1-3 libtest-exception-perl=0.43-1 libtexlua53=2020.20200327.54578-5 libtexluajit2=2020.20200327.54578-5 libtext-autoformat-perl=1.750000-1 libtext-glob-perl=0.11-1 libtext-levenshtein-damerau-perl=0.41-1 libtext-levenshteinxs-perl=0.03-4+b8 libtext-markdown-discount-perl=0.12-1+b1 libtext-reform-perl=1.20-3 libtext-template-perl=1.59-1 libtext-unidecode-perl=1.30-1 libtext-xslate-perl=3.5.8-1+b1 libthai-data=0.1.28-3 libthai0=0.1.28-3 libtiff5=4.1.0+git191117-2 libtime-duration-perl=1.21-1 libtime-moment-perl=0.44-1+b3 libtimedate-perl=2.3300-1 libtinfo6=6.2+20201114-1 libtirpc-common=1.2.6-3 libtirpc-dev=1.2.6-3 libtirpc3=1.2.6-3 libtool=2.4.6-14 libtry-tiny-perl=0.30-1 libtsan0=10.2.1-1 libtype-tiny-perl=1.012000-1 libubsan1=10.2.1-1 libuchardet0=0.0.7-1 libudev1=247.1-3 libumfpack5=1:5.8.1+dfsg-2 libunicode-utf8-perl=0.62-1+b2 libunistring2=0.9.10-4 liburi-perl=5.05-1 libuuid1=2.36.1-2 libvariable-magic-perl=0.62-1+b3 libvorbis0a=1.3.7-1 libvorbisenc2=1.3.7-1 libvulkan1=1.2.154.1-1 libwacom-common=1.6-1 libwacom2=1.6-1 libwayland-client0=1.18.0-2~exp1.1 libwayland-server0=1.18.0-2~exp1.1 libwebp6=0.6.1-2+b1 libwebpmux3=0.6.1-2+b1 libwmf0.2-7=0.2.8.4-17 libwww-perl=6.49-1 libwww-robotrules-perl=6.02-1 libx11-6=2:1.6.12-1 libx11-data=2:1.6.12-1 libx11-dev=2:1.6.12-1 libx11-xcb1=2:1.6.12-1 libxau-dev=1:1.0.8-1+b2 libxau6=1:1.0.8-1+b2 libxaw7=2:1.0.13-1+b2 libxcb-dri2-0=1.14-2 libxcb-dri3-0=1.14-2 libxcb-glx0=1.14-2 libxcb-icccm4=0.4.1-1.1 libxcb-image0=0.4.0-1+b3 libxcb-keysyms1=0.4.0-1+b2 libxcb-present0=1.14-2 libxcb-randr0=1.14-2 libxcb-render-util0=0.3.9-1+b1 libxcb-render0=1.14-2 libxcb-shape0=1.14-2 libxcb-shm0=1.14-2 libxcb-sync1=1.14-2 libxcb-util1=0.4.0-1+b1 libxcb-xfixes0=1.14-2 libxcb-xinerama0=1.14-2 libxcb-xinput0=1.14-2 libxcb-xkb1=1.14-2 libxcb1=1.14-2 libxcb1-dev=1.14-2 libxcursor1=1:1.2.0-2 libxdamage1=1:1.1.5-2 libxdmcp-dev=1:1.1.2-3 libxdmcp6=1:1.1.2-3 libxext6=2:1.3.3-1+b2 libxfixes3=1:5.0.3-2 libxft2=2.3.2-2 libxi6=2:1.7.10-1 libxinerama1=2:1.1.4-2 libxkbcommon-x11-0=1.0.3-2 libxkbcommon0=1.0.3-2 libxml-libxml-perl=2.0134+dfsg-2+b1 libxml-namespacesupport-perl=1.12-1 libxml-sax-base-perl=1.09-1 libxml-sax-perl=1.02+dfsg-1 libxml2=2.9.10+dfsg-6.3+b1 libxmu6=2:1.1.2-2+b3 libxpm4=1:3.5.12-1 libxrender1=1:0.9.10-1 libxshmfence1=1.3-1 libxt6=1:1.2.0-1 libxxf86vm1=1:1.1.4-1+b2 libyaml-0-2=0.2.2-1 libyaml-libyaml-perl=0.82+repack-1+b1 libyaml-perl=1.30-1 libyaml-tiny-perl=1.73-1 libz3-4=4.8.9-1 libzstd1=1.4.5+dfsg-4 libzzip-0-13=0.13.62-3.2 licensecheck=3.0.47-1 lintian=2.104.0 linux-libc-dev=5.9.11-1 login=1:4.8.1-1 lsb-base=11.1.0 lzip=1.21-8 lzop=1.04-2 m4=1.4.18-4 make=4.3-4 man-db=2.9.3-2 mawk=1.3.4.20200120-2 ncurses-base=6.2+20201114-1 ncurses-bin=6.2+20201114-1 netbase=6.2 octave=6.1.0-2 octave-common=6.1.0-2 octave-io=2.6.3-1+b1 octave-statistics=1.4.2-2 octave-struct=1.0.16-8 openssl=1.1.1i-1 patch=2.7.6-6 patchutils=0.4.2-1 perl=5.32.0-5 perl-base=5.32.0-5 perl-modules-5.32=5.32.0-5 perl-openssl-defaults=5 po-debconf=1.0.21 poppler-data=0.4.10-1 readline-common=8.1-1 sed=4.7-1 sensible-utils=0.0.12+nmu1 shared-mime-info=2.0-1 sysvinit-utils=2.96-5 t1utils=1.41-4 tar=1.32+dfsg-1 tex-common=6.15 texinfo=6.7.0.dfsg.2-5+b1 texlive=2020.20201203-2 texlive-base=2020.20201203-2 texlive-binaries=2020.20200327.54578-5 texlive-fonts-recommended=2020.20201203-2 texlive-latex-base=2020.20201203-2 texlive-latex-recommended=2020.20201203-2 ucf=3.0043 unzip=6.0-25 util-linux=2.36.1-2 x11-common=1:7.7+21 x11proto-core-dev=2020.1-1 x11proto-dev=2020.1-1 xdg-utils=1.1.3-2 xkb-data=2.29-2 xorg-sgml-doctools=1:1.11-1 xtrans-dev=1.4.0-1 xz-utils=5.2.4-1+b1 zlib1g=1:1.2.11.dfsg-2 zlib1g-dev=1:1.2.11.dfsg-2 --variant=apt --aptopt=Acquire::Check-Valid-Until "false" --aptopt=Acquire::http::Dl-Limit "1000"; --aptopt=Acquire::https::Dl-Limit "1000"; --aptopt=Acquire::Retries "5"; --aptopt=APT::Get::allow-downgrades "true"; --keyring=/usr/share/keyrings/ --essential-hook=chroot "$1" sh -c "apt-get --yes install fakeroot util-linux" --essential-hook=copy-in /usr/share/keyrings/debian-archive-bullseye-automatic.gpg /usr/share/keyrings/debian-archive-bullseye-security-automatic.gpg /usr/share/keyrings/debian-archive-bullseye-stable.gpg /usr/share/keyrings/debian-archive-buster-automatic.gpg /usr/share/keyrings/debian-archive-buster-security-automatic.gpg /usr/share/keyrings/debian-archive-buster-stable.gpg /usr/share/keyrings/debian-archive-keyring.gpg /usr/share/keyrings/debian-archive-removed-keys.gpg /usr/share/keyrings/debian-archive-stretch-automatic.gpg /usr/share/keyrings/debian-archive-stretch-security-automatic.gpg /usr/share/keyrings/debian-archive-stretch-stable.gpg /usr/share/keyrings/debian-ports-archive-keyring-removed.gpg /usr/share/keyrings/debian-ports-archive-keyring.gpg /usr/share/keyrings/debian-keyring.gpg /etc/apt/trusted.gpg.d/ --essential-hook=chroot "$1" sh -c "rm /etc/apt/sources.list && echo 'deb http://snapshot.notset.fr/archive/debian/20210814T212851Z/ bookworm main deb-src http://snapshot.notset.fr/archive/debian/20210814T212851Z/ bookworm main deb http://snapshot.notset.fr/archive/debian/20201210T083846Z/ unstable main' >> /etc/apt/sources.list && apt-get update" --customize-hook=chroot "$1" useradd --no-create-home -d /nonexistent -p "" builduser -s /bin/bash --customize-hook=chroot "$1" env sh -c "apt-get source --only-source -d octave-optim=1.6.0-6 && mkdir -p /build/octave-optim-KjBwfn && dpkg-source --no-check -x /*.dsc /build/octave-optim-KjBwfn/octave-optim-1.6.0 && chown -R builduser:builduser /build/octave-optim-KjBwfn" --customize-hook=chroot "$1" env --unset=TMPDIR runuser builduser -c "cd /build/octave-optim-KjBwfn/octave-optim-1.6.0 && env DEB_BUILD_OPTIONS="parallel=4" LC_ALL="C.UTF-8" SOURCE_DATE_EPOCH="1607592559" dpkg-buildpackage -uc -a amd64 --build=any" --customize-hook=sync-out /build/octave-optim-KjBwfn /tmp/octave-optim-1.6.0-6q83i5a_2 bullseye /dev/null deb http://snapshot.notset.fr/archive/debian/20201210T083846Z unstable main I: automatically chosen mode: root I: chroot architecture amd64 is equal to the host's architecture I: automatically chosen format: tar I: using /tmp/mmdebstrap.NMxyg_a9hv as tempdir I: running apt-get update... I: downloading packages with apt... I: extracting archives... I: installing essential packages... I: running --essential-hook in shell: sh -c 'chroot "$1" sh -c "apt-get --yes install fakeroot util-linux"' exec /tmp/mmdebstrap.NMxyg_a9hv Reading package lists... Building dependency tree... util-linux is already the newest version (2.36.1-2). The following NEW packages will be installed: fakeroot libfakeroot 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 134 kB of archives. After this operation, 397 kB of additional disk space will be used. Get:1 http://snapshot.notset.fr/archive/debian/20201210T083846Z unstable/main amd64 libfakeroot amd64 1.25.3-1.1 [47.0 kB] Get:2 http://snapshot.notset.fr/archive/debian/20201210T083846Z unstable/main amd64 fakeroot amd64 1.25.3-1.1 [87.0 kB] debconf: delaying package configuration, since apt-utils is not installed Fetched 134 kB in 0s (1073 kB/s) Selecting previously unselected package libfakeroot:amd64. (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 4616 files and directories currently installed.) Preparing to unpack .../libfakeroot_1.25.3-1.1_amd64.deb ... Unpacking libfakeroot:amd64 (1.25.3-1.1) ... Selecting previously unselected package fakeroot. Preparing to unpack .../fakeroot_1.25.3-1.1_amd64.deb ... Unpacking fakeroot (1.25.3-1.1) ... Setting up libfakeroot:amd64 (1.25.3-1.1) ... Setting up fakeroot (1.25.3-1.1) ... update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (fakeroot) in auto mode Processing triggers for libc-bin (2.31-5) ... I: running special hook: copy-in /usr/share/keyrings/debian-archive-bullseye-automatic.gpg /usr/share/keyrings/debian-archive-bullseye-security-automatic.gpg /usr/share/keyrings/debian-archive-bullseye-stable.gpg /usr/share/keyrings/debian-archive-buster-automatic.gpg /usr/share/keyrings/debian-archive-buster-security-automatic.gpg /usr/share/keyrings/debian-archive-buster-stable.gpg /usr/share/keyrings/debian-archive-keyring.gpg /usr/share/keyrings/debian-archive-removed-keys.gpg /usr/share/keyrings/debian-archive-stretch-automatic.gpg /usr/share/keyrings/debian-archive-stretch-security-automatic.gpg /usr/share/keyrings/debian-archive-stretch-stable.gpg /usr/share/keyrings/debian-ports-archive-keyring-removed.gpg /usr/share/keyrings/debian-ports-archive-keyring.gpg /usr/share/keyrings/debian-keyring.gpg /etc/apt/trusted.gpg.d/ I: running --essential-hook in shell: sh -c 'chroot "$1" sh -c "rm /etc/apt/sources.list && echo 'deb http://snapshot.notset.fr/archive/debian/20210814T212851Z/ bookworm main deb-src http://snapshot.notset.fr/archive/debian/20210814T212851Z/ bookworm main deb http://snapshot.notset.fr/archive/debian/20201210T083846Z/ unstable main' >> /etc/apt/sources.list && apt-get update"' exec /tmp/mmdebstrap.NMxyg_a9hv Get:1 http://snapshot.notset.fr/archive/debian/20210814T212851Z bookworm InRelease [81.6 kB] Hit:2 http://snapshot.notset.fr/archive/debian/20201210T083846Z unstable InRelease Ign:3 http://snapshot.notset.fr/archive/debian/20210814T212851Z bookworm/main Sources Ign:4 http://snapshot.notset.fr/archive/debian/20210814T212851Z bookworm/main amd64 Packages Ign:3 http://snapshot.notset.fr/archive/debian/20210814T212851Z bookworm/main Sources Ign:4 http://snapshot.notset.fr/archive/debian/20210814T212851Z bookworm/main amd64 Packages Ign:3 http://snapshot.notset.fr/archive/debian/20210814T212851Z bookworm/main Sources Ign:4 http://snapshot.notset.fr/archive/debian/20210814T212851Z bookworm/main amd64 Packages Get:3 http://snapshot.notset.fr/archive/debian/20210814T212851Z bookworm/main Sources [11.4 MB] Get:4 http://snapshot.notset.fr/archive/debian/20210814T212851Z bookworm/main amd64 Packages [11.1 MB] Fetched 22.6 MB in 20s (1125 kB/s) Reading package lists... I: installing remaining packages inside the chroot... I: running --customize-hook in shell: sh -c 'chroot "$1" useradd --no-create-home -d /nonexistent -p "" builduser -s /bin/bash' exec /tmp/mmdebstrap.NMxyg_a9hv I: running --customize-hook in shell: sh -c 'chroot "$1" env sh -c "apt-get source --only-source -d octave-optim=1.6.0-6 && mkdir -p /build/octave-optim-KjBwfn && dpkg-source --no-check -x /*.dsc /build/octave-optim-KjBwfn/octave-optim-1.6.0 && chown -R builduser:builduser /build/octave-optim-KjBwfn"' exec /tmp/mmdebstrap.NMxyg_a9hv Reading package lists... NOTICE: 'octave-optim' packaging is maintained in the 'Git' version control system at: https://salsa.debian.org/pkg-octave-team/octave-optim.git Please use: git clone https://salsa.debian.org/pkg-octave-team/octave-optim.git to retrieve the latest (possibly unreleased) updates to the package. Need to get 433 kB of source archives. Get:1 http://snapshot.notset.fr/archive/debian/20210814T212851Z bookworm/main octave-optim 1.6.0-6 (dsc) [2120 B] Get:2 http://snapshot.notset.fr/archive/debian/20210814T212851Z bookworm/main octave-optim 1.6.0-6 (tar) [423 kB] Get:3 http://snapshot.notset.fr/archive/debian/20210814T212851Z bookworm/main octave-optim 1.6.0-6 (diff) [8288 B] Fetched 433 kB in 0s (1166 kB/s) Download complete and in download only mode W: Download is performed unsandboxed as root as file 'octave-optim_1.6.0-6.dsc' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied) dpkg-source: info: extracting octave-optim in /build/octave-optim-KjBwfn/octave-optim-1.6.0 dpkg-source: info: unpacking octave-optim_1.6.0.orig.tar.gz dpkg-source: info: unpacking octave-optim_1.6.0-6.debian.tar.xz dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: applying add-info-dir.patch dpkg-source: info: applying info-file-path.patch dpkg-source: info: applying octave6.patch I: running --customize-hook in shell: sh -c 'chroot "$1" env --unset=TMPDIR runuser builduser -c "cd /build/octave-optim-KjBwfn/octave-optim-1.6.0 && env DEB_BUILD_OPTIONS="parallel=4" LC_ALL="C.UTF-8" SOURCE_DATE_EPOCH="1607592559" dpkg-buildpackage -uc -a amd64 --build=any"' exec /tmp/mmdebstrap.NMxyg_a9hv dpkg-buildpackage: info: source package octave-optim dpkg-buildpackage: info: source version 1.6.0-6 dpkg-buildpackage: info: source distribution unstable dpkg-buildpackage: info: source changed by Sébastien Villemot dpkg-source --before-build . dpkg-buildpackage: info: host architecture amd64 dpkg-source: info: using options from octave-optim-1.6.0/debian/source/options: --extend-diff-ignore=doc/optim\.info|doc/optim\.texi debian/rules clean dh clean --buildsystem=octave --with=octave dh_auto_clean -O--buildsystem=octave dh_octave_clean make[1]: Entering directory '/build/octave-optim-KjBwfn/octave-optim-1.6.0/src' make[1]: *** No rule to make target 'clean'. make[1]: Leaving directory '/build/octave-optim-KjBwfn/octave-optim-1.6.0/src' dh_autoreconf_clean -O--buildsystem=octave dh_clean -O--buildsystem=octave debian/rules binary-arch dh binary-arch --buildsystem=octave --with=octave dh_update_autotools_config -a -O--buildsystem=octave dh_autoreconf -a -O--buildsystem=octave dh_octave_version -a -O--buildsystem=octave Checking the Octave version... ok dh_auto_configure -a -O--buildsystem=octave dh_auto_build -a -O--buildsystem=octave dh_auto_test -a -O--buildsystem=octave create-stamp debian/debhelper-build-stamp dh_testroot -a -O--buildsystem=octave dh_prep -a -O--buildsystem=octave debian/rules override_dh_auto_install make[1]: Entering directory '/build/octave-optim-KjBwfn/octave-optim-1.6.0' dh_auto_install octave --no-gui --no-history --silent --no-init-file --no-window-system /usr/share/dh-octave/install-pkg.m warning: creating installation directory /build/octave-optim-KjBwfn/octave-optim-1.6.0/debian/octave-optim/usr/share/octave/packages warning: called from install at line 36 column 5 pkg at line 568 column 9 /usr/share/dh-octave/install-pkg.m at line 47 column 1 checking for mkoctfile... /usr/bin/mkoctfile --verbose checking for octave-config... /usr/bin/octave-config checking for a sed that does not truncate output... /bin/sed checking whether the C++ compiler works... yes checking for C++ compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for gcc... gcc checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking float.h usability... yes checking float.h presence... yes checking for float.h... yes checking for stdbool.h that conforms to C99... yes checking for _Bool... yes checking for error_at_line... yes checking for sqrt... no checking feval or octave::feval... octave::feval checking xisnan or octave::math::isnan... octave::math::isnan checking is_cell or iscell... iscell checking octave_execution_exception or octave::execution_exception... octave::execution_exception checking octave_vformat or octave::vformat... octave::vformat checking identity_matrix or octave::identity_matrix... octave::identity_matrix configure: creating ./config.status config.status: creating Makefile config.status: creating config.h make[2]: Entering directory '/build/octave-optim-KjBwfn/octave-optim-1.6.0/src' ./mkdoc.pl ../inst/LinearRegression.m ../inst/__all_stat_opts__.m ../inst/adsmax.m ../inst/battery.m ../inst/bfgsmin.m ../inst/bfgsmin_example.m ../inst/brent_line_min.m ../inst/cdiff.m ../inst/cg_min.m ../inst/cpiv_bard.m ../inst/curvefit_stat.m ../inst/dcdp.m ../inst/de_min.m ../inst/deriv.m ../inst/dfdp.m ../inst/dfpdp.m ../inst/dfxpdp.m ../inst/expfit.m ../inst/fmincon.m ../inst/fmins.m ../inst/gjp.m ../inst/jacobs.m ../inst/leasqr.m ../inst/line_min.m ../inst/linprog.m ../inst/lsqcurvefit.m ../inst/lsqlin.m ../inst/lsqnonlin.m ../inst/mdsmax.m ../inst/nelder_mead_min.m ../inst/nlinfit.m ../inst/nmsmax.m ../inst/nonlin_curvefit.m ../inst/nonlin_min.m ../inst/nonlin_residmin.m ../inst/nrm.m ../inst/optim_doc.m ../inst/optim_problems.m ../inst/poly_2_ex.m ../inst/polyconf.m ../inst/polyfitinf.m ../inst/powell.m ../inst/quadprog.m ../inst/residmin_stat.m ../inst/rosenbrock.m ../inst/statget.m ../inst/statset.m ../inst/test_min_1.m ../inst/test_min_2.m ../inst/test_min_3.m ../inst/test_min_4.m ../inst/test_nelder_mead_min_1.m ../inst/test_nelder_mead_min_2.m ../inst/test_wpolyfit.m ../inst/vfzero.m ../inst/wpolyfit.m ../inst/wrap_f_dfdp.m ../inst/wsolve.m > MFDOCSTRINGS if grep -q DEFUN_DLD_REPLACEMENT_FOR_PACKAGE_DOCS __bfgsmin.cc; then echo "The string 'DEFUN_DLD_REPLACEMENT_FOR_PACKAGE_DOCS' must not be present in source code, but is in __bfgsmin.cc."; exit 1; fi if grep -q DEFUN_DLD_REPLACEMENT_FOR_PACKAGE_DOCS numgradient.cc; then echo "The string 'DEFUN_DLD_REPLACEMENT_FOR_PACKAGE_DOCS' must not be present in source code, but is in numgradient.cc."; exit 1; fi if grep -q DEFUN_DLD_REPLACEMENT_FOR_PACKAGE_DOCS numhessian.cc; then echo "The string 'DEFUN_DLD_REPLACEMENT_FOR_PACKAGE_DOCS' must not be present in source code, but is in numhessian.cc."; exit 1; fi if grep -q DEFUNX_DLD_REPLACEMENT_FOR_PACKAGE_DOCS __bfgsmin.cc; then echo "The string 'DEFUNX_DLD_REPLACEMENT_FOR_PACKAGE_DOCS' must not be present in source code, but is in __bfgsmin.cc."; exit 1; fi if grep -q DEFUN_DLD_REPLACEMENT_FOR_PACKAGE_DOCS __disna_optim__.cc; then echo "The string 'DEFUN_DLD_REPLACEMENT_FOR_PACKAGE_DOCS' must not be present in source code, but is in __disna_optim__.cc."; exit 1; fi if grep -q DEFUNX_DLD_REPLACEMENT_FOR_PACKAGE_DOCS numgradient.cc; then echo "The string 'DEFUNX_DLD_REPLACEMENT_FOR_PACKAGE_DOCS' must not be present in source code, but is in numgradient.cc."; exit 1; fi if grep -q DEFUNX_DLD_REPLACEMENT_FOR_PACKAGE_DOCS numhessian.cc; then echo "The string 'DEFUNX_DLD_REPLACEMENT_FOR_PACKAGE_DOCS' must not be present in source code, but is in numhessian.cc."; exit 1; fi CXXFLAGS="-g -O2 -fstack-protector-strong -Wformat -Werror=format-security" /usr/bin/mkoctfile --verbose -c error-helpers.cc (echo "#include "; echo "int main () {"; sed -e s/DEFUN_DLD/DEFUN_DLD_REPLACEMENT_FOR_PACKAGE_DOCS/g -e s/DEFUNX_DLD/DEFUNX_DLD_REPLACEMENT_FOR_PACKAGE_DOCS/g __bfgsmin.cc | g++ -E `/usr/bin/mkoctfile --verbose -p INCFLAGS` -x c++ -iquote '.' -D'DEFUN_DLD_REPLACEMENT_FOR_PACKAGE_DOCS(name,args,nargout,doc)=DEFUN_DLD_REPLACEMENT_FOR_PACKAGE_DOCS(name,doc)' -D'DEFUNX_DLD_REPLACEMENT_FOR_PACKAGE_DOCS(name,fname,gname,args,nargout,doc)=DEFUN_DLD_REPLACEMENT_FOR_PACKAGE_DOCS(name,doc)' - | sed -e '/.*DEFUN_DLD_REPLACEMENT_FOR_PACKAGE_DOCS/!D'; echo "}";) | g++ -x c++ -D'DEFUN_DLD_REPLACEMENT_FOR_PACKAGE_DOCS(name,doc)=printf("%c" #name "\n@c " #name " __bfgsmin.cc\n" doc "\n\n", 0x1D);' -o __bfgsmin.bin - if grep -q DEFUNX_DLD_REPLACEMENT_FOR_PACKAGE_DOCS __disna_optim__.cc; then echo "The string 'DEFUNX_DLD_REPLACEMENT_FOR_PACKAGE_DOCS' must not be present in source code, but is in __disna_optim__.cc."; exit 1; fi (echo "#include "; echo "int main () {"; sed -e s/DEFUN_DLD/DEFUN_DLD_REPLACEMENT_FOR_PACKAGE_DOCS/g -e s/DEFUNX_DLD/DEFUNX_DLD_REPLACEMENT_FOR_PACKAGE_DOCS/g numgradient.cc | g++ -E `/usr/bin/mkoctfile --verbose -p INCFLAGS` -x c++ -iquote '.' -D'DEFUN_DLD_REPLACEMENT_FOR_PACKAGE_DOCS(name,args,nargout,doc)=DEFUN_DLD_REPLACEMENT_FOR_PACKAGE_DOCS(name,doc)' -D'DEFUNX_DLD_REPLACEMENT_FOR_PACKAGE_DOCS(name,fname,gname,args,nargout,doc)=DEFUN_DLD_REPLACEMENT_FOR_PACKAGE_DOCS(name,doc)' - | sed -e '/.*DEFUN_DLD_REPLACEMENT_FOR_PACKAGE_DOCS/!D'; echo "}";) | g++ -x c++ -D'DEFUN_DLD_REPLACEMENT_FOR_PACKAGE_DOCS(name,doc)=printf("%c" #name "\n@c " #name " numgradient.cc\n" doc "\n\n", 0x1D);' -o numgradient.bin - g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-6.1.0/octave/.. -I/usr/include/octave-6.1.0/octave -pthread -fopenmp -g -O2 -fstack-protector-strong -Wformat -Werror=format-security error-helpers.cc -o error-helpers.o (echo "#include "; echo "int main () {"; sed -e s/DEFUN_DLD/DEFUN_DLD_REPLACEMENT_FOR_PACKAGE_DOCS/g -e s/DEFUNX_DLD/DEFUNX_DLD_REPLACEMENT_FOR_PACKAGE_DOCS/g numhessian.cc | g++ -E `/usr/bin/mkoctfile --verbose -p INCFLAGS` -x c++ -iquote '.' -D'DEFUN_DLD_REPLACEMENT_FOR_PACKAGE_DOCS(name,args,nargout,doc)=DEFUN_DLD_REPLACEMENT_FOR_PACKAGE_DOCS(name,doc)' -D'DEFUNX_DLD_REPLACEMENT_FOR_PACKAGE_DOCS(name,fname,gname,args,nargout,doc)=DEFUN_DLD_REPLACEMENT_FOR_PACKAGE_DOCS(name,doc)' - | sed -e '/.*DEFUN_DLD_REPLACEMENT_FOR_PACKAGE_DOCS/!D'; echo "}";) | g++ -x c++ -D'DEFUN_DLD_REPLACEMENT_FOR_PACKAGE_DOCS(name,doc)=printf("%c" #name "\n@c " #name " numhessian.cc\n" doc "\n\n", 0x1D);' -o numhessian.bin - (echo "#include "; echo "int main () {"; sed -e s/DEFUN_DLD/DEFUN_DLD_REPLACEMENT_FOR_PACKAGE_DOCS/g -e s/DEFUNX_DLD/DEFUNX_DLD_REPLACEMENT_FOR_PACKAGE_DOCS/g __disna_optim__.cc | g++ -E `/usr/bin/mkoctfile --verbose -p INCFLAGS` -x c++ -iquote '.' -D'DEFUN_DLD_REPLACEMENT_FOR_PACKAGE_DOCS(name,args,nargout,doc)=DEFUN_DLD_REPLACEMENT_FOR_PACKAGE_DOCS(name,doc)' -D'DEFUNX_DLD_REPLACEMENT_FOR_PACKAGE_DOCS(name,fname,gname,args,nargout,doc)=DEFUN_DLD_REPLACEMENT_FOR_PACKAGE_DOCS(name,doc)' - | sed -e '/.*DEFUN_DLD_REPLACEMENT_FOR_PACKAGE_DOCS/!D'; echo "}";) | g++ -x c++ -D'DEFUN_DLD_REPLACEMENT_FOR_PACKAGE_DOCS(name,doc)=printf("%c" #name "\n@c " #name " __disna_optim__.cc\n" doc "\n\n", 0x1D);' -o __disna_optim__.bin - (echo "### This file is generated automatically from the"; echo "### corresponding .cc file by a Makefile rule."; echo ""; ./__bfgsmin.bin) > __bfgsmin.cc.docstrings (echo "### This file is generated automatically from the"; echo "### corresponding .cc file by a Makefile rule."; echo ""; ./numhessian.bin) > numhessian.cc.docstrings (echo "### This file is generated automatically from the"; echo "### corresponding .cc file by a Makefile rule."; echo ""; ./numgradient.bin) > numgradient.cc.docstrings (echo "### This file is generated automatically from the"; echo "### corresponding .cc file by a Makefile rule."; echo ""; ./__disna_optim__.bin) > __disna_optim__.cc.docstrings ./munge-texi.pl MFDOCSTRINGS __bfgsmin.cc.docstrings numgradient.cc.docstrings numhessian.cc.docstrings __disna_optim__.cc.docstrings < ../doc/optim.txi > ../doc/optim.texi makeinfo ../doc/optim.texi -o ../doc/optim.info ../doc/macros.texi:51: warning: redefining Texinfo language command: @seealso CXXFLAGS="-g -O2 -fstack-protector-strong -Wformat -Werror=format-security" /usr/bin/mkoctfile --verbose __bfgsmin.cc error-helpers.o CXXFLAGS="-g -O2 -fstack-protector-strong -Wformat -Werror=format-security" /usr/bin/mkoctfile --verbose numgradient.cc error-helpers.o CXXFLAGS="-g -O2 -fstack-protector-strong -Wformat -Werror=format-security" /usr/bin/mkoctfile --verbose numhessian.cc error-helpers.o g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-6.1.0/octave/.. -I/usr/include/octave-6.1.0/octave -pthread -fopenmp -g -O2 -fstack-protector-strong -Wformat -Werror=format-security numgradient.cc -o /tmp/oct-QqExnO.o g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-6.1.0/octave/.. -I/usr/include/octave-6.1.0/octave -pthread -fopenmp -g -O2 -fstack-protector-strong -Wformat -Werror=format-security __bfgsmin.cc -o /tmp/oct-qnXIwW.o CXXFLAGS="-g -O2 -fstack-protector-strong -Wformat -Werror=format-security" /usr/bin/mkoctfile --verbose -llapack -lblas __disna_optim__.cc error-helpers.o g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-6.1.0/octave/.. -I/usr/include/octave-6.1.0/octave -pthread -fopenmp -g -O2 -fstack-protector-strong -Wformat -Werror=format-security numhessian.cc -o /tmp/oct-H7vp4j.o g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-6.1.0/octave/.. -I/usr/include/octave-6.1.0/octave -pthread -fopenmp -g -O2 -fstack-protector-strong -Wformat -Werror=format-security __disna_optim__.cc -o /tmp/oct-a6aa1E.o In file included from __bfgsmin.cc:30: __bfgsmin.cc: In function ‘int __bfgsmin_obj(double&, std::string, octave_value_list, ColumnVector, int)’: error-helpers.h:119:13: warning: ‘error_state’ is deprecated: [6]: this variable is obsolete and always has the value 0 [-Wdeprecated-declarations] 119 | if (error_state) \ | ^~~~~~~~~~~ __bfgsmin.cc:39:3: note: in expansion of macro ‘SET_ERR’ 39 | SET_ERR (f_return = OCTAVE__FEVAL (f, f_args_new), err); | ^~~~~~~ In file included from /usr/include/octave-6.1.0/octave/oct.h:36, from __bfgsmin.cc:23: /usr/include/octave-6.1.0/octave/error.h:495:26: note: declared here 495 | extern OCTINTERP_API int error_state; | ^~~~~~~~~~~ In file included from __bfgsmin.cc:30: error-helpers.h:121:13: warning: ‘error_state’ is deprecated: [6]: this variable is obsolete and always has the value 0 [-Wdeprecated-declarations] 121 | error_state = 0; \ | ^~~~~~~~~~~ __bfgsmin.cc:39:3: note: in expansion of macro ‘SET_ERR’ 39 | SET_ERR (f_return = OCTAVE__FEVAL (f, f_args_new), err); | ^~~~~~~ In file included from /usr/include/octave-6.1.0/octave/oct.h:36, from __bfgsmin.cc:23: /usr/include/octave-6.1.0/octave/error.h:495:26: note: declared here 495 | extern OCTINTERP_API int error_state; | ^~~~~~~~~~~ In file included from __bfgsmin.cc:30: error-helpers.h:119:13: warning: ‘error_state’ is deprecated: [6]: this variable is obsolete and always has the value 0 [-Wdeprecated-declarations] 119 | if (error_state) \ | ^~~~~~~~~~~ __bfgsmin.cc:42:7: note: in expansion of macro ‘SET_ERR’ 42 | SET_ERR (obj = f_return(0).double_value(), err); | ^~~~~~~ In file included from /usr/include/octave-6.1.0/octave/oct.h:36, from __bfgsmin.cc:23: /usr/include/octave-6.1.0/octave/error.h:495:26: note: declared here 495 | extern OCTINTERP_API int error_state; | ^~~~~~~~~~~ In file included from __bfgsmin.cc:30: error-helpers.h:121:13: warning: ‘error_state’ is deprecated: [6]: this variable is obsolete and always has the value 0 [-Wdeprecated-declarations] 121 | error_state = 0; \ | ^~~~~~~~~~~ __bfgsmin.cc:42:7: note: in expansion of macro ‘SET_ERR’ 42 | SET_ERR (obj = f_return(0).double_value(), err); | ^~~~~~~ In file included from /usr/include/octave-6.1.0/octave/oct.h:36, from __bfgsmin.cc:23: /usr/include/octave-6.1.0/octave/error.h:495:26: note: declared here 495 | extern OCTINTERP_API int error_state; | ^~~~~~~~~~~ In file included from numhessian.cc:24: numhessian.cc: In function ‘bool any_bad_argument(const octave_value_list&)’: error-helpers.h:119:13: warning: ‘error_state’ is deprecated: [6]: this variable is obsolete and always has the value 0 [-Wdeprecated-declarations] 119 | if (error_state) \ | ^~~~~~~~~~~ numhessian.cc:47:7: note: in expansion of macro ‘SET_ERR’ 47 | SET_ERR (tmp = args(2).int_value(), err); | ^~~~~~~ In file included from /usr/include/octave-6.1.0/octave/oct.h:36, from numhessian.cc:18: /usr/include/octave-6.1.0/octave/error.h:495:26: note: declared here 495 | extern OCTINTERP_API int error_state; | ^~~~~~~~~~~ In file included from numhessian.cc:24: error-helpers.h:121:13: warning: ‘error_state’ is deprecated: [6]: this variable is obsolete and always has the value 0 [-Wdeprecated-declarations] 121 | error_state = 0; \ | ^~~~~~~~~~~ numhessian.cc:47:7: note: in expansion of macro ‘SET_ERR’ 47 | SET_ERR (tmp = args(2).int_value(), err); | ^~~~~~~ In file included from /usr/include/octave-6.1.0/octave/oct.h:36, from numhessian.cc:18: /usr/include/octave-6.1.0/octave/error.h:495:26: note: declared here 495 | extern OCTINTERP_API int error_state; | ^~~~~~~~~~~ In file included from __disna_optim__.cc:21: __disna_optim__.cc: In function ‘octave_value_list F__disna_optim__(const octave_value_list&, int)’: error-helpers.h:48:13: warning: ‘error_state’ is deprecated: [6]: this variable is obsolete and always has the value 0 [-Wdeprecated-declarations] 48 | if (error_state) \ | ^~~~~~~~~~~ __disna_optim__.cc:74:3: note: in expansion of macro ‘CHECK_ERROR’ 74 | CHECK_ERROR (job_str = args(0).string_value (), retval, | ^~~~~~~~~~~ In file included from /usr/include/octave-6.1.0/octave/../octave/oct.h:36, from __disna_optim__.cc:18: /usr/include/octave-6.1.0/octave/../octave/error.h:495:26: note: declared here 495 | extern OCTINTERP_API int error_state; | ^~~~~~~~~~~ In file included from __disna_optim__.cc:21: error-helpers.h:48:13: warning: ‘error_state’ is deprecated: [6]: this variable is obsolete and always has the value 0 [-Wdeprecated-declarations] 48 | if (error_state) \ | ^~~~~~~~~~~ __disna_optim__.cc:94:7: note: in expansion of macro ‘CHECK_ERROR’ 94 | CHECK_ERROR (d = args(1).float_column_vector_value (), retval, | ^~~~~~~~~~~ In file included from /usr/include/octave-6.1.0/octave/../octave/oct.h:36, from __disna_optim__.cc:18: /usr/include/octave-6.1.0/octave/../octave/error.h:495:26: note: declared here 495 | extern OCTINTERP_API int error_state; | ^~~~~~~~~~~ In file included from __disna_optim__.cc:21: error-helpers.h:48:13: warning: ‘error_state’ is deprecated: [6]: this variable is obsolete and always has the value 0 [-Wdeprecated-declarations] 48 | if (error_state) \ | ^~~~~~~~~~~ __disna_optim__.cc:100:7: note: in expansion of macro ‘CHECK_ERROR’ 100 | CHECK_ERROR (d = args(1).column_vector_value (), retval, | ^~~~~~~~~~~ In file included from /usr/include/octave-6.1.0/octave/../octave/oct.h:36, from __disna_optim__.cc:18: /usr/include/octave-6.1.0/octave/../octave/error.h:495:26: note: declared here 495 | extern OCTINTERP_API int error_state; | ^~~~~~~~~~~ In file included from __disna_optim__.cc:21: error-helpers.h:48:13: warning: ‘error_state’ is deprecated: [6]: this variable is obsolete and always has the value 0 [-Wdeprecated-declarations] 48 | if (error_state) \ | ^~~~~~~~~~~ __disna_optim__.cc:127:11: note: in expansion of macro ‘CHECK_ERROR’ 127 | CHECK_ERROR (m = TO_F77_INT (args(2).idx_type_value ()), retval, | ^~~~~~~~~~~ In file included from /usr/include/octave-6.1.0/octave/../octave/oct.h:36, from __disna_optim__.cc:18: /usr/include/octave-6.1.0/octave/../octave/error.h:495:26: note: declared here 495 | extern OCTINTERP_API int error_state; | ^~~~~~~~~~~ In file included from __disna_optim__.cc:21: error-helpers.h:48:13: warning: ‘error_state’ is deprecated: [6]: this variable is obsolete and always has the value 0 [-Wdeprecated-declarations] 48 | if (error_state) \ | ^~~~~~~~~~~ __disna_optim__.cc:130:11: note: in expansion of macro ‘CHECK_ERROR’ 130 | CHECK_ERROR (n = TO_F77_INT (args(3).idx_type_value ()), retval, | ^~~~~~~~~~~ In file included from /usr/include/octave-6.1.0/octave/../octave/oct.h:36, from __disna_optim__.cc:18: /usr/include/octave-6.1.0/octave/../octave/error.h:495:26: note: declared here 495 | extern OCTINTERP_API int error_state; | ^~~~~~~~~~~ In file included from numgradient.cc:24: numgradient.cc: In function ‘bool any_bad_argument(const octave_value_list&)’: error-helpers.h:119:13: warning: ‘error_state’ is deprecated: [6]: this variable is obsolete and always has the value 0 [-Wdeprecated-declarations] 119 | if (error_state) \ | ^~~~~~~~~~~ numgradient.cc:47:7: note: in expansion of macro ‘SET_ERR’ 47 | SET_ERR (tmp = args(2).int_value(), err); | ^~~~~~~ In file included from /usr/include/octave-6.1.0/octave/oct.h:36, from numgradient.cc:18: /usr/include/octave-6.1.0/octave/error.h:495:26: note: declared here 495 | extern OCTINTERP_API int error_state; | ^~~~~~~~~~~ In file included from numgradient.cc:24: error-helpers.h:121:13: warning: ‘error_state’ is deprecated: [6]: this variable is obsolete and always has the value 0 [-Wdeprecated-declarations] 121 | error_state = 0; \ | ^~~~~~~~~~~ numgradient.cc:47:7: note: in expansion of macro ‘SET_ERR’ 47 | SET_ERR (tmp = args(2).int_value(), err); | ^~~~~~~ In file included from /usr/include/octave-6.1.0/octave/oct.h:36, from numgradient.cc:18: /usr/include/octave-6.1.0/octave/error.h:495:26: note: declared here 495 | extern OCTINTERP_API int error_state; | ^~~~~~~~~~~ g++ -I/usr/include/octave-6.1.0/octave/.. -I/usr/include/octave-6.1.0/octave -pthread -fopenmp -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -o __disna_optim__.oct error-helpers.o /tmp/oct-a6aa1E.o -shared -Wl,-Bsymbolic -Wl,-z,relro -llapack -lblas -L/usr/lib/x86_64-linux-gnu -Wl,-z,relro g++ -I/usr/include/octave-6.1.0/octave/.. -I/usr/include/octave-6.1.0/octave -pthread -fopenmp -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -o numgradient.oct error-helpers.o /tmp/oct-QqExnO.o -shared -Wl,-Bsymbolic -Wl,-z,relro -L/usr/lib/x86_64-linux-gnu -Wl,-z,relro g++ -I/usr/include/octave-6.1.0/octave/.. -I/usr/include/octave-6.1.0/octave -pthread -fopenmp -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -o numhessian.oct error-helpers.o /tmp/oct-H7vp4j.o -shared -Wl,-Bsymbolic -Wl,-z,relro -L/usr/lib/x86_64-linux-gnu -Wl,-z,relro g++ -I/usr/include/octave-6.1.0/octave/.. -I/usr/include/octave-6.1.0/octave -pthread -fopenmp -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -o __bfgsmin.oct error-helpers.o /tmp/oct-qnXIwW.o -shared -Wl,-Bsymbolic -Wl,-z,relro -L/usr/lib/x86_64-linux-gnu -Wl,-z,relro rm numhessian.bin numgradient.cc.docstrings MFDOCSTRINGS numgradient.bin __disna_optim__.cc.docstrings __disna_optim__.bin numhessian.cc.docstrings __bfgsmin.bin __bfgsmin.cc.docstrings make[2]: Leaving directory '/build/octave-optim-KjBwfn/octave-optim-1.6.0/src' copyfile /build/octave-optim-KjBwfn/octave-optim-1.6.0/./src/__bfgsmin.oct /build/octave-optim-KjBwfn/octave-optim-1.6.0/./src/__disna_optim__.oct /build/octave-optim-KjBwfn/octave-optim-1.6.0/./src/numgradient.oct /build/octave-optim-KjBwfn/octave-optim-1.6.0/./src/numhessian.oct /build/octave-optim-KjBwfn/octave-optim-1.6.0/./inst/x86_64-pc-linux-gnu-api-v55 For information about changes from previous versions of the optim package, run 'news optim'. chmod: cannot access 'debian/*/usr/lib/*/octave/packages/*/*/*.mex': No such file or directory ( cd src ; ./configure ; make doc ) checking for mkoctfile... mkoctfile checking for octave-config... octave-config checking for a sed that does not truncate output... /bin/sed checking whether the C++ compiler works... yes checking for C++ compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for gcc... gcc checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking float.h usability... yes checking float.h presence... yes checking for float.h... yes checking for stdbool.h that conforms to C99... yes checking for _Bool... yes checking for error_at_line... yes checking for sqrt... no checking feval or octave::feval... octave::feval checking xisnan or octave::math::isnan... octave::math::isnan checking is_cell or iscell... iscell checking octave_execution_exception or octave::execution_exception... octave::execution_exception checking octave_vformat or octave::vformat... octave::vformat checking identity_matrix or octave::identity_matrix... octave::identity_matrix configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged make[2]: Entering directory '/build/octave-optim-KjBwfn/octave-optim-1.6.0/src' make[2]: Nothing to be done for 'doc'. make[2]: Leaving directory '/build/octave-optim-KjBwfn/octave-optim-1.6.0/src' mkdir -p debian/octave-optim/usr/share/info/ cp doc/optim.info debian/octave-optim/usr/share/info/octave-optim.info make[1]: Leaving directory '/build/octave-optim-KjBwfn/octave-optim-1.6.0' dh_octave_check -a -O--buildsystem=octave Checking package... Checking m files ... [inst/polyconf.m] >>>>> /build/octave-optim-KjBwfn/octave-optim-1.6.0/inst/polyconf.m ***** test # data from Hocking, RR, "Methods and Applications of Linear Models" temperature=[40;40;40;45;45;45;50;50;50;55;55;55;60;60;60;65;65;65]; strength=[66.3;64.84;64.36;69.70;66.26;72.06;73.23;71.4;68.85;75.78;72.57;76.64;78.87;77.37;75.94;78.82;77.13;77.09]; [p,s] = polyfit(temperature,strength,1); [y,dy] = polyconf(p,40,s,0.05,'ci'); assert([y,dy],[66.15396825396826,1.71702862681486],200*eps); [y,dy] = polyconf(p,40,s,0.05,'pi'); assert(dy,4.45345484470743,200*eps); 1 test, 1 passed, 0 known failure, 0 skipped [inst/nlinfit.m] >>>>> /build/octave-optim-KjBwfn/octave-optim-1.6.0/inst/nlinfit.m ***** test modelfun = @(b, x) (b(1) + b(2) * exp (- b(3) * x)); b = [1;3;2]; v = rande ("state"); rande ("seed", 1234); xdata = exprnd (2,100,1); rande ("state", v); v = randn ("state"); randn ("seed", 1234); ydata = modelfun (b,xdata) + normrnd (0,0.1,100,1); randn ("state", v); beta0 = [2;2;3]; beta = nlinfit(xdata,ydata,modelfun,beta0); assert (beta, [1;3;2], 1e-1) ***** demo modelfun = @(b, x) (b(1) + b(2) * exp (- b(3) * x)); %% actual value beta_without_noise = [1; 3; 2]; x = [3.49622; 0.33751; 1.25675; 3.66981; 0.26237; 5.51095; ... 2.11407; 1.48774; 6.22436; 2.04519]; y_actual = modelfun (beta_without_noise, x); noise = [0.176110; -0.066850; 0.231000; -0.047570; -0.108230; ... 0.122790; 0.062940; 0.151510; 0.116010; -0.097460]; y_noisy = y_actual + noise; %% initial guess beta0 = [2; 2; 2]; %% weights vector weights = [5; 16; 1; 20; 12; 11; 17; 8; 11; 13]; [beta, R, J, covb, mse] = nlinfit (x, y_noisy, modelfun, beta0) [beta_w, R_w, J_w, covb_w, mse_w] = nlinfit (x, y_noisy, modelfun, beta0, [], "weights", weights) 1 test, 1 passed, 0 known failure, 0 skipped [inst/nonlin_residmin.m] >>>>> /build/octave-optim-KjBwfn/octave-optim-1.6.0/inst/nonlin_residmin.m ***** demo ## Example for linear inequality constraints ## (see also the same example in 'demo nonlin_curvefit') ## independents indep = 1:5; ## residual function: f = @ (p) p(1) * exp (p(2) * indep) - [1, 2, 4, 7, 14]; ## initial values: init = [.25; .25]; ## linear constraints, A.' * parametervector + B >= 0 A = [1; -1]; B = 0; # p(1) >= p(2); settings = optimset ("inequc", {A, B}); ## start optimization [p, residuals, cvg, outp] = nonlin_residmin (f, init, settings) ***** test ## independents indep = 1:5; ## residual function: f = @ (p) p(1) * exp (p(2) * indep) - [1, 2, 4, 7, 14]; ## initial values: init = [.25; .25]; ## linear constraints, A.' * parametervector + B >= 0 A = [1; -1]; B = 0; # p(1) >= p(2); settings = optimset ("inequc", {A, B}); assert (nonlin_residmin (f, init, settings), [.6203; .6203], .0001); ***** test ## independents indep = 1:5; ## residual function: f = @ (p) p(1) * exp (p(2) * indep) - [1, 2, 4, 7, 14]; ## initial values: init = single ([.25; .25]); ## linear constraints, A.' * parametervector + B >= 0 A = [1; -1]; B = 0; # p(1) >= p(2); settings = optimset ("inequc", {A, B}, "complex_step_derivative_f", true); result = nonlin_residmin (f, init, settings); assert (result, [.6203; .6203], .0001); assert (isa (result, "single")); ***** test ***** shared x, misc x = [.871, .643, .550; .228, .669, .854; .528, .229, .170; .110, .354, .337; .911, .056, .493; .476, .154, .918; .655, .421, .077; .649, .140, .199; .995, .045, NA; .130, .016, .195; .823, .690, .690; .768, .992, .389; .203, .740, .120; .302, .519, .221; .991, .450, .249; .224, .030, .502; .428, .127, .772; .552, .494, .110; .461, .824, .714; .799, .494, .295]; misc = [4.36, 5.21, 5.35; 4.99, 3.30, 3.10; 1.67, NA, 2.75; 2.17, 1.48, 1.49; 2.98, 4.69, 4.23; 4.46, 3.87, 3.15; 1.79, 3.18, 3.57; 1.71, 3.13, 3.07; 3.07, 5.01, 4.58; 0.94, 0.93, 0.74; 4.97, 5.37, 5.35; 4.32, 4.85, 5.46; 2.17, 1.78, 2.43; 2.22, 2.18, 2.44; 2.88, 4.90, 5.11; 2.29, 1.94, 1.46; 3.76, 3.39, 2.71; 1.99, 2.93, 3.31; 4.95, 4.08, 4.19; 2.96, 4.26, 4.48]; pin = struct ("a", .1 * ones (3, 1), "b", .1, "c", .1, "d", 1); pconf.a.lbound = [-Inf, 0, NA]; pconf.b.diff_onesided = true; pconf.b.lbound = 0; pconf.c.ubound = .3; pconf.d.fixed = true; settings = optimset ("param_config", pconf, "f_pstruct", true); f = @ (p) ... subsasgn (x, struct ("type", "()", "subs", {{9, 3}}), p.c) ... * horzcat (p.a, p.a([3, 1, 2]), p.a([3, 2, 1])) ... - p.d * subsasgn (misc, struct ("type", "()", "subs", {{3, 2}}), p.b); [p, ~, ~, outp] = nonlin_residmin (f, pin, settings); assert (p.a, [1.0590; 1.9266; 4.0456], .0001); assert (p.b, 2.7061, .0001); assert (p.c, .3, .000001); assert (p.d, 1); assert (isempty (outp.lambda.ineqlin)); assert (isempty (outp.lambda.eqlin)); assert (isempty (outp.lambda.ineqnonlin)); assert (isempty (outp.lambda.eqnonlin)); assert (! any (outp.lambda.lower.a)); assert (! outp.lambda.lower.b); assert (! outp.lambda.lower.c); assert (! any (outp.lambda.upper.a)); assert (! outp.lambda.upper.b); assert (outp.lambda.upper.c > 0); ***** test pin = zeros (6, 1); pin(6) = 1; settings = optimset ("lbound", [-Inf; 0; NA; 0; -Inf; -Inf], "ubound", [Inf; Inf; Inf; Inf; .3; Inf], "diff_onesided", true, "fixed", [false; false; false; false; false; true]); f = @ (p) ... subsasgn (x, struct ("type", "()", "subs", {{9, 3}}), p(5)) ... * horzcat (p([1, 2, 3]), p([3, 1, 2]), p([3, 2, 1])) ... - p(6) * subsasgn (misc, struct ("type", "()", "subs", {{3, 2}}), p(4)); p = nonlin_residmin (f, pin, settings); assert (p, [1.0590; 1.9266; 4.0456; 2.7061; .3; 1], .0001); 4 tests, 4 passed, 0 known failure, 0 skipped [inst/nonlin_min.m] >>>>> /build/octave-optim-KjBwfn/octave-optim-1.6.0/inst/nonlin_min.m ***** demo ## Example for default optimization (Levenberg/Marquardt with ## BFGS), one non-linear equality constraint. Constrained optimum is ## at p = [0; 1]. objective_function = @ (p) p(1)^2 + p(2)^2; pin = [-2; 5]; constraint_function = @ (p) p(1)^2 + 1 - p(2); [p, objf, cvg, outp] = nonlin_min (objective_function, pin, optimset ("equc", {constraint_function})) ***** demo ## Example for simulated annealing, two parameters, "trace_steps" ## is true; t_init = .2; t_min = .002; mu_t = 1.002; iters_fixed_t = 10; init_p = [2; 2]; max_rand_step = [.2; .2]; [p, objf, cvg, outp] = nonlin_min (@ (p) (p(1)/10)^2 + (p(2)/10)^2 + .1 * (-cos(4*p(1)) - cos(4*p(2))), init_p, optimset ("algorithm", "siman", "max_rand_step", max_rand_step, "t_init", t_init, "T_min", t_min, "mu_t", mu_t, "iters_fixed_T", iters_fixed_t, "trace_steps", true)); p objf x = (outp.trace(:, 1) - 1) * iters_fixed_t + outp.trace(:, 2); x(1) = 0; plot (x, cat (2, outp.trace(:, 3:end), t_init ./ (mu_t .^ outp.trace(:, 1)))) legend ({"objective function value", "p(1)", "p(2)", "Temperature"}) xlabel ("subiteration") ***** test ## independents indep = 1:5; ## objective function: f = @ (p) sumsq (p(1) * exp (p(2) * indep) - [1, 2, 4, 7, 14]); ## initial values: init = [.25; .25]; ## linear constraints, A.' * parametervector + B >= 0 A = [1; -1]; B = 0; # p(1) >= p(2); settings = optimset ("inequc", {A, B}); assert (nonlin_min (f, init, settings), [.6203; .6203], .0001); ***** test ***** shared x, misc x = [.871, .643, .550; .228, .669, .854; .528, .229, .170; .110, .354, .337; .911, .056, .493; .476, .154, .918; .655, .421, .077; .649, .140, .199; .995, .045, NA; .130, .016, .195; .823, .690, .690; .768, .992, .389; .203, .740, .120; .302, .519, .221; .991, .450, .249; .224, .030, .502; .428, .127, .772; .552, .494, .110; .461, .824, .714; .799, .494, .295]; misc = [4.36, 5.21, 5.35; 4.99, 3.30, 3.10; 1.67, NA, 2.75; 2.17, 1.48, 1.49; 2.98, 4.69, 4.23; 4.46, 3.87, 3.15; 1.79, 3.18, 3.57; 1.71, 3.13, 3.07; 3.07, 5.01, 4.58; 0.94, 0.93, 0.74; 4.97, 5.37, 5.35; 4.32, 4.85, 5.46; 2.17, 1.78, 2.43; 2.22, 2.18, 2.44; 2.88, 4.90, 5.11; 2.29, 1.94, 1.46; 3.76, 3.39, 2.71; 1.99, 2.93, 3.31; 4.95, 4.08, 4.19; 2.96, 4.26, 4.48]; pin = struct ("a", .1 * ones (3, 1), "b", .1, "c", .1, "d", 1); pconf.a.lbound = [-Inf, 0, NA]; pconf.b.diff_onesided = true; pconf.b.lbound = 0; pconf.c.ubound = .3; pconf.d.fixed = true; settings = optimset ("param_config", pconf, "objf_pstruct", true); f = @ (p) sumsq (( ... subsasgn (x, struct ("type", "()", "subs", {{9, 3}}), p.c) ... * horzcat (p.a, p.a([3, 1, 2]), p.a([3, 2, 1])) ... - p.d ... * subsasgn (misc, struct ("type", "()", "subs", {{3, 2}}), p.b))(:)); [p, ~, ~, outp] = nonlin_min (f, pin, settings); assert (p.a, [1.0590; 1.9266; 4.0456], .005); assert (p.b, 2.7061, .005); assert (p.c, .3, .000001); assert (p.d, 1); ***** test pin = zeros (6, 1); pin(6) = 1; settings = optimset ("lbound", [-Inf; 0; NA; 0; -Inf; -Inf], "ubound", [Inf; Inf; Inf; Inf; .3; Inf], "diff_onesided", true, "fixed", [false; false; false; false; false; true]); f = @ (p) sumsq (( ... subsasgn (x, struct ("type", "()", "subs", {{9, 3}}), p(5)) ... * horzcat (p([1, 2, 3]), p([3, 1, 2]), p([3, 2, 1])) ... - p(6) ... * subsasgn (misc, struct ("type", "()", "subs", {{3, 2}}), p(4)))(:)); p = nonlin_min (f, pin, settings); assert (p, [1.0590; 1.9266; 4.0456; 2.7061; .3; 1], .005); 3 tests, 3 passed, 0 known failure, 0 skipped [inst/lsqnonlin.m] >>>>> /build/octave-optim-KjBwfn/octave-optim-1.6.0/inst/lsqnonlin.m ***** test t = [0 .3 .8 1.1 1.6 2.3]; y = [.82 .72 .63 .60 .55 .50]; yhat = @(c,t) c(1) + c(2)*exp(-t); opt = optimset('TolFun',1e-10); [c,resnorm,residual] = lsqnonlin(@(c)yhat(c,t)-y,[1 1],[0 0],[],opt); assert (c, [ 0.47595; 0.34132], 1e-5) assert (resnorm, 3.2419e-004, 1e-8) assert(residual, [-2.7283e-003, 8.8079e-003, -6.8307e-004, -1.0432e-002, -5.1366e-003, 1.0172e-002], 1e-5) ***** test problem.solver = "lsqnonlin"; xdata = [0 .3 .8 1.1 1.6 2.3]; ydata = [.82 .72 .63 .60 .55 .50]; problem.objective = @(p) p(1) + p(2)*exp(-xdata) - ydata; problem.x0 = [1, 1]; problem.lb = [0, 0]; problem.ub = []; problem.options = optimset('TolFun',1e-100); [p, resnorm, residual] = lsqnonlin (problem); assert (p, [ 0.47595; 0.34132], 1e-5) assert (resnorm, 3.2419e-004, 1e-8) assert(residual, [-2.7283e-003, 8.8079e-003, -6.8307e-004, -1.0432e-002, -5.1366e-003, 1.0172e-002], 1e-5) ***** demo %% Example for user specified Jacobian. %% independents x = [1:10:100]'; %% observed data y =[9.2160e-001, 3.3170e-001, 8.9789e-002, 2.8480e-002, 2.6055e-002,... 8.3641e-003, 4.2362e-003, 3.1693e-003, 1.4739e-004, 2.9406e-004]'; %% initial values: p0=[0.8; 0.05]; %% bounds lb=[0; 0]; ub=[]; %% Jacobian setting opts = optimset ("Jacobian", "on") %% model function: function [F,J] = myfun (p, x, y) F = p(1) * exp (-p(2) * x) - y; if nargout > 1 J = [exp(- p(2) * x), - p(1) * x .* exp(- p(2) * x)]; endif endfunction [c, resnorm, residual, flag, output, lambda, jacob] = ... lsqnonlin(@(p) myfun(p, x, y), p0, lb, ub, opts) 2 tests, 2 passed, 0 known failure, 0 skipped [inst/lsqcurvefit.m] >>>>> /build/octave-optim-KjBwfn/octave-optim-1.6.0/inst/lsqcurvefit.m ***** test xdata = [0 .3 .8 1.1 1.6 2.3]; ydata = [.82 .72 .63 .60 .55 .50]; yhat = @(p,x) p(1) + p(2)*exp(-x); opt = optimset('TolFun',1e-100); [p, resnorm, residual] = lsqcurvefit(yhat,[1 1], xdata, ydata,[0 0],[],opt); assert (p, [ 0.47595; 0.34132], 1e-5) assert (resnorm, 3.2419e-004, 1e-8) assert(residual, [-2.7283e-003, 8.8079e-003, -6.8307e-004, -1.0432e-002, -5.1366e-003, 1.0172e-002], 1e-5) ***** test problem.solver = "lsqcurvefit"; problem.objective = @(p,x) p(1) + p(2)*exp(-x); problem.x0 = [1, 1]; problem.xdata = [0 .3 .8 1.1 1.6 2.3]; problem.ydata = [.82 .72 .63 .60 .55 .50]; problem.lb = [0, 0]; problem.ub = []; problem.options = optimset('TolFun',1e-100); [p, resnorm, residual] = lsqcurvefit (problem); assert (p, [ 0.47595; 0.34132], 1e-5) assert (resnorm, 3.2419e-004, 1e-8) assert(residual, [-2.7283e-003, 8.8079e-003, -6.8307e-004, -1.0432e-002, -5.1366e-003, 1.0172e-002], 1e-5) ***** demo %% Example for user specified Jacobian. %% independents x = [1:10:100]'; %% observed data y =[9.2160e-001, 3.3170e-001, 8.9789e-002, 2.8480e-002, 2.6055e-002,... 8.3641e-003, 4.2362e-003, 3.1693e-003, 1.4739e-004, 2.9406e-004]'; %% initial values: p0=[0.8; 0.05]; %% bounds lb=[0; 0]; ub=[]; %% Jacobian setting opts = optimset ("Jacobian", "on") %% model function: function [F,J] = myfun (p, x) F = p(1) * exp (-p(2) * x); if nargout > 1 J = [exp(- p(2) * x), - p(1) * x .* exp(- p(2) * x)]; endif endfunction [c, resnorm, residual, flag, output, lambda, jacob] = ... lsqcurvefit (@ (varargin) myfun(varargin{:}), p0, x, y, lb, ub, opts) 2 tests, 2 passed, 0 known failure, 0 skipped [inst/linprog.m] >>>>> /build/octave-optim-KjBwfn/octave-optim-1.6.0/inst/linprog.m ***** test f = [1; -1]; A = []; b = []; Aeq = [1, 0]; beq = [2]; lb = [0; Inf]; ub = [-Inf; 0]; x_exp = [2; 0]; assert (linprog (f, A, b, Aeq, beq, lb, ub), x_exp); ***** shared f, A, b, lb, ub, x_exp, fval_exp f = [21 25 31 34 23 19 32 36 27 25 19]'; A1 = [ 1 0 0 0 1 0 0 1 0 0 0; 0 1 0 0 0 1 0 0 1 0 0; 0 0 1 0 0 0 0 0 0 1 0; 0 0 0 1 0 0 1 0 0 0 1]; A2 = [ 1 1 1 1 0 0 0 0 0 0 0; 0 0 0 0 1 1 1 0 0 0 0; 0 0 0 0 0 0 0 1 1 1 1]; A = [-A1; A2]; b1 = [40; 50; 50; 70]; b2 = [100; 60; 50]; b = [-b1; b2]; lb = zeros (rows (f), 1); ub = Inf (rows (f), 1); x_exp = [40 0 50 10 0 50 10 0 0 0 50]'; fval_exp = f' * x_exp; ***** test Aeq = []; beq = []; [x_obs fval_obs] = linprog (f, A, b, Aeq, beq, lb, ub); assert ([x_obs; fval_obs], [x_exp; fval_exp]); ***** test Aeq = zeros (1, rows (f)); beq = 0; assert (linprog (f, A, b, Aeq, beq, lb, ub), x_exp); 3 tests, 3 passed, 0 known failure, 0 skipped [inst/vfzero.m] >>>>> /build/octave-optim-KjBwfn/octave-optim-1.6.0/inst/vfzero.m ***** shared opt0 opt0 = optimset ("tolx", 0); ***** assert(vfzero(@cos, [0, 3], opt0), pi/2, 10*eps) ***** assert(vfzero(@(x) x^(1/3) - 1e-8, [0,1], opt0), 1e-24, 1e-22*eps) 2 tests, 2 passed, 0 known failure, 0 skipped [inst/statset.m] >>>>> /build/octave-optim-KjBwfn/octave-optim-1.6.0/inst/statset.m ***** assert (isfield (statset (), "TolFun")) ***** assert (isfield (statset ("tolFun", 1e-3), "TolFun")) ***** error statset ("1_Parameter") ***** error statset ("%NOT_A_REAL_FUNCTION_NAME%") ***** warning statset ("foobar", 13); 5 tests, 5 passed, 0 known failure, 0 skipped [inst/de_min.m] >>>>> /build/octave-optim-KjBwfn/octave-optim-1.6.0/inst/de_min.m ***** function result = f(x); result = 100 * (x(2) - x(1)^2)^2 + (1 - x(1))^2; ***** test tol = 1.0e-4; ctl.tol = 0.0; ctl.VTR = 1.0e-6; ctl.XVmin = [-2 -2]; ctl.XVmax = [ 2 2]; rand("state", 11) [x, obj_value, nfeval, convergence] = de_min (@f, ctl); assert (convergence == 1); assert (f(x) == obj_value); assert (obj_value < ctl.VTR); ***** demo ## define a simple example function f = @(x) peaks(x(1), x(2)); ## plot the function to see where the minimum might be peaks() ## first we set the region where we expect the minimum ctl.XVmin = [-3 -3]; ctl.XVmax = [ 3 3]; ## and solve it with de_min [x, obj_value, nfeval, convergence] = de_min (f, ctl) 1 test, 1 passed, 0 known failure, 0 skipped [inst/jacobs.m] >>>>> /build/octave-optim-KjBwfn/octave-optim-1.6.0/inst/jacobs.m ***** assert (jacobs (1, @(x) x), 1) ***** assert (jacobs (6, @(x) x^2), 12) ***** assert (jacobs ([1; 1], @(x) [x(1)^2; x(1)*x(2)]), [2, 0; 1, 1]) ***** assert (jacobs ([1; 2], @(x) [x(1)^2 + x(2); x(2)*exp(x(1))]), [2, 1; 2*exp(1), exp(1)]) ***** error jacobs () ***** error jacobs (1) ***** error jacobs (1, 2, 3, 4) ***** error jacobs (@sin, 1, [1, 1]) ***** error jacobs (@sin, 1, ones(2, 2)) ***** demo # Relative error against several h-values k = 3:20; h = 10 .^ (-k); x = 0.3*pi; err = zeros (1, numel (k)); for count = 1 : numel (k) err(count) = abs (jacobs (x, @sin, struct ("h", h(count))) - cos (x)) / abs (cos (x)) + eps; endfor loglog (h, err); grid minor; xlabel ("h"); ylabel ("|Df(x) - cos(x)| / |cos(x)|") title ("f(x)=sin(x), f'(x)=cos(x) at x = 0.3pi") 9 tests, 9 passed, 0 known failure, 0 skipped [inst/quadprog.m] >>>>> /build/octave-optim-KjBwfn/octave-optim-1.6.0/inst/quadprog.m ***** test H= diag([1; 0]); f = [3; 4]; A= [-1 -3; 2 5; 3 4]; b = [-15; 100; 80]; l= zeros(2,1); [x,fval,exitflag,output] = quadprog(H,f,A,b,[],[],l,[]); assert(x,[0;5]) assert(fval,20) assert(exitflag,1) assert(output.iterations,1) ***** demo C = [0.9501 0.7620 0.6153 0.4057 0.2311 0.4564 0.7919 0.9354 0.6068 0.0185 0.9218 0.9169 0.4859 0.8214 0.7382 0.4102 0.8912 0.4447 0.1762 0.8936]; %% Linear Inequality Constraints d = [0.0578; 0.3528; 0.8131; 0.0098; 0.1388]; A =[0.2027 0.2721 0.7467 0.4659 0.1987 0.1988 0.4450 0.4186 0.6037 0.0152 0.9318 0.8462]; b =[0.5251; 0.2026; 0.6721]; %% Linear Equality Constraints Aeq = [3 5 7 9]; beq = 4; %% Bound constraints lb = -0.1*ones(4,1); ub = ones(4,1); H = C' * C; f = -C' * d; [x, obj, flag, output, lambda]=quadprog (H, f, A, b, Aeq, beq, lb, ub) 1 test, 1 passed, 0 known failure, 0 skipped [inst/__all_stat_opts__.m] >>>>> /build/octave-optim-KjBwfn/octave-optim-1.6.0/inst/__all_stat_opts__.m ***** assert (1) 1 test, 1 passed, 0 known failure, 0 skipped [inst/statget.m] >>>>> /build/octave-optim-KjBwfn/octave-optim-1.6.0/inst/statget.m ***** shared opts opts = statset ("maxit", 100); ***** assert (statget (opts, "maxit"), 100) ***** assert (statget (opts, "MaxITer"), 100) ***** assert (statget (opts, "TolFun"), []) ***** assert (statget (opts, "TolFun", 1e-3), 1e-3) ***** error statget () ***** error statget (1) ***** error statget (1,2,3,4,5) ***** error statget (1, "name") ***** error statget (struct (), 2) 9 tests, 9 passed, 0 known failure, 0 skipped [inst/lsqlin.m] >>>>> /build/octave-optim-KjBwfn/octave-optim-1.6.0/inst/lsqlin.m ***** test ***** shared C,d,A,b C = [0.9501,0.7620,0.6153,0.4057;... 0.2311,0.4564,0.7919,0.9354;... 0.6068,0.0185,0.9218,0.9169;... 0.4859,0.8214,0.7382,0.4102;... 0.8912,0.4447,0.1762,0.8936]; d = [0.0578; 0.3528; 0.8131; 0.0098; 0.1388]; A =[0.2027, 0.2721, 0.7467, 0.4659;... 0.1987, 0.1988, 0.4450, 0.4186;... 0.6037 , 0.0152, 0.9318, 0.8462]; b =[0.5251;0.2026;0.6721]; Aeq = [3, 5, 7, 9]; beq = 4; lb = -0.1*ones(4,1); ub = 2*ones(4,1); [x,resnorm,residual,exitflag] = lsqlin(C,d,A,b,Aeq,beq,lb,ub); assert(x,[-0.10000; -0.10000; 0.15991; 0.40896],10e-5) assert(resnorm,0.16951,10e-5) assert(residual, [0.035297; 0.087623; -0.353251; 0.145270; 0.121232],10e-5) assert(exitflag,1) warning: colon arguments should be scalars warning: called from null at line 67 column 14 quadprog at line 302 column 13 lsqlin at line 123 column 21 __test__ at line 17 column 32 test at line 677 column 11 /tmp/tmp.ezphnBN6Kw at line 126 column 31 ***** test Aeq = []; beq = []; lb = []; ub = []; x0 = 0.1*ones(4,1); x = lsqlin(C,d,A,b,Aeq,beq,lb,ub,x0); [x,resnorm,residual,exitflag] = lsqlin(C,d,A,b,Aeq,beq,lb,ub,x0); assert(x,[ 0.12986; -0.57569 ; 0.42510; 0.24384],10e-5) assert(resnorm,0.017585,10e-5) assert(residual, [-0.0126033; -0.0208040; -0.1295084; -0.0057389; 0.01372462],10e-5) assert(exitflag,1) ***** demo C = [0.9501 0.7620 0.6153 0.4057 0.2311 0.4564 0.7919 0.9354 0.6068 0.0185 0.9218 0.9169 0.4859 0.8214 0.7382 0.4102 0.8912 0.4447 0.1762 0.8936]; d = [0.0578; 0.3528; 0.8131; 0.0098; 0.1388]; %% Linear Inequality Constraints A =[0.2027 0.2721 0.7467 0.4659 0.1987 0.1988 0.4450 0.4186 0.6037 0.0152 0.9318 0.8462]; b =[0.5251; 0.2026; 0.6721]; %% Linear Equality Constraints Aeq = [3 5 7 9]; beq = 4; %% Bound constraints lb = -0.1*ones(4,1); ub = ones(4,1); [x, resnorm, residual, flag, output, lambda] = lsqlin (C, d, A, b, Aeq, beq, lb, ub) 2 tests, 2 passed, 0 known failure, 0 skipped [inst/residmin_stat.m] >>>>> /build/octave-optim-KjBwfn/octave-optim-1.6.0/inst/residmin_stat.m ***** test ## independents indep = 1:5; ## residual function: f = @ (p) p(1) * exp (p(2) * indep) - [1, 2, 4, 7, 14]; ## parameters: p = [.53203; .65307]; settings = optimset ("objf_type", "wls", "ret_dfdp", true, "ret_covd", true, "ret_covp", true, "ret_corp", true); info = residmin_stat (f, p, settings); assert (info.corp, [1, -.98918; -.98918, 1], .0001); ***** test ## independents indep = 1:5; ## residual function: f = @ (p) p(1) * exp (p(2) * indep) - [1, 2, 4, 7, 14]; ## parameters: p = single ([.53203; .65307]); settings = optimset ("objf_type", "wls", "ret_dfdp", true, "ret_covd", true, "ret_covp", true, "ret_corp", true); info = residmin_stat (f, p, settings); assert (info.corp, [1, -.98918; -.98918, 1], .0001); assert (isa (info.dfdp, "single")); assert (isa (info.covd, "single")); assert (isa (info.covp, "single")); assert (isa (info.corp, "single")); ***** test ***** shared x, misc, corp x = [.871, .643, .550; .228, .669, .854; .528, .229, .170; .110, .354, .337; .911, .056, .493; .476, .154, .918; .655, .421, .077; .649, .140, .199; .995, .045, NA; .130, .016, .195; .823, .690, .690; .768, .992, .389; .203, .740, .120; .302, .519, .221; .991, .450, .249; .224, .030, .502; .428, .127, .772; .552, .494, .110; .461, .824, .714; .799, .494, .295]; misc = [4.36, 5.21, 5.35; 4.99, 3.30, 3.10; 1.67, NA, 2.75; 2.17, 1.48, 1.49; 2.98, 4.69, 4.23; 4.46, 3.87, 3.15; 1.79, 3.18, 3.57; 1.71, 3.13, 3.07; 3.07, 5.01, 4.58; 0.94, 0.93, 0.74; 4.97, 5.37, 5.35; 4.32, 4.85, 5.46; 2.17, 1.78, 2.43; 2.22, 2.18, 2.44; 2.88, 4.90, 5.11; 2.29, 1.94, 1.46; 3.76, 3.39, 2.71; 1.99, 2.93, 3.31; 4.95, 4.08, 4.19; 2.96, 4.26, 4.48]; corp = [1.000000, -0.396899, -0.402479, -0.019351, -0.167128; -0.396899, 1.000000, -0.462988, -0.053813, 0.214705; -0.402479, -0.462988, 1.000000, 0.127128, -0.187121; -0.019351, -0.053813, 0.127128, 1.000000, -0.035904; -0.167128, 0.214705, -0.187121, -0.035904, 1.000000]; p = struct ("a", [.9925145; 2.005293; 3.999732], "b", 2.680371, "c", .4977683); pconf.a.TypicalX = .5 * ones (3, 1); pconf.a. diffp = [.0001; .00001; .0001]; pconf.b.diff_onesided = true; settings = optimset ("param_config", pconf, "f_pstruct", true, "objf_type", "wls", "ret_dfdp", true, "ret_covd", true, "ret_covp", true, "ret_corp", true); f = @ (p) ... subsasgn (x, struct ("type", "()", "subs", {{9, 3}}), p.c) ... * horzcat (p.a, p.a([3, 1, 2]), p.a([3, 2, 1])) ... - subsasgn (misc, struct ("type", "()", "subs", {{3, 2}}), p.b); info = residmin_stat (f, p, settings); assert (info.corp, corp, .0001); ***** test p = [.9925145; 2.005293; 3.999732; 2.680371; .4977683]; settings = optimset ("TypicalX", .5, "diffp", [.0001; .00001; .0001; .00001; .0001], "diff_onesided", true, "objf_type", "wls", "ret_dfdp", true, "ret_covd", true, "ret_covp", true, "ret_corp", true); f = @ (p) ... subsasgn (x, struct ("type", "()", "subs", {{9, 3}}), p(5)) ... * horzcat (p([1, 2, 3]), p([3, 1, 2]), p([3, 2, 1])) ... - subsasgn (misc, struct ("type", "()", "subs", {{3, 2}}), p(4)); info = residmin_stat (f, p, settings); assert (info.corp, corp, .0001); 4 tests, 4 passed, 0 known failure, 0 skipped [inst/fmincon.m] >>>>> /build/octave-optim-KjBwfn/octave-optim-1.6.0/inst/fmincon.m ***** demo ## Example for default optimization (Levenberg/Marquardt with ## BFGS), one non-linear equality constraint. Constrained optimum is ## at p = [0; 1]. objective_function = @ (p) p(1)^2 + p(2)^2; pin = [-2; 5]; constraint_function = @ (p) - (p(1)^2 + 1 - p(2)); [p, objf, cvg, outp] = fmincon (objective_function, pin, [], [], [], [], [], [], @ (p) {[], constraint_function(p)}{:}) ***** test ## equality constraint objective_function = @ (p) p(1)^2 + p(2)^2; pin = [-2; 5]; constraint_function = @ (p) - (p(1)^2 + 1 - p(2)); [p, objf, cvg, outp] = fmincon (objective_function, pin, [], [], [], [], [], [], @ (p) {[], constraint_function(p)}{:}, optimset ("Algorithm", "lm_feasible")); assert (p, [0; 1], 1e-6) ***** test ## inequality constraint objective_function = @ (p) p(1)^2 + p(2)^2; pin = [2; 6]; constraint_function = @ (p) p(1)^2 + 1 - p(2); [p, objf, cvg, outp] = fmincon (objective_function, pin, [], [], [], [], [], [], @ (p) {constraint_function(p), []}{:}, optimset ("Algorithm", "lm_feasible")); assert (p, [0; 1], 1e-6) ***** test ## independents indep = 1:5; ## objective function: f = @ (p) sumsq (p(1) * exp (p(2) * indep) - [1, 2, 4, 7, 14]); ## initial values: init = [.25; .25]; ## linear constraints, A.' * parametervector + B >= 0 A = [1; -1]; B = 0; # p(1) >= p(2); assert (fmincon (f, init, -A, B), [.6203; .6203], .0001); ***** test ## problem structure indep = 1:5; problem = struct ("objective", @ (p) sumsq (p(1) * exp (p(2) * indep) - [1, 2, 4, 7, 14]), "x0", [.25; .25], "Aineq", [-1; 1], "bineq", 0, "solver", "fmincon"); assert (fmincon (problem), [.6203; .6203], .0001); ***** test ## Octave sqp solver with a lot of inequality constraints objf = @ (p) sumsq (p(4:9)); init = [300; -100; -.1997; -127; -151; 379; 421; 460; 426]; lbound = [-Inf; -Inf; -Inf; 0; 0; 0; 0; 0; 0]; inequc = @ (p) vertcat ( ... p(1) + p(2) * exp (-5 * p(3)) + p(4) - 127, p(1) + p(2) * exp (-3 * p(3)) + p(5) - 151, p(1) + p(2) * exp (-p(3)) + p(6) - 379, p(1) + p(2) * exp (p(3)) + p(7) - 421, p(1) + p(2) * exp (3 * p(3)) + p(8) - 460, p(1) + p(2) * exp (5 * p(3)) + p(9) - 426, -p(1) - p(2) * exp (-5 * p(3)) + p(4) + 127, -p(1) - p(2) * exp (-3 * p(3)) + p(5) + 151, -p(1) - p(2) * exp (-p(3)) + p(6) + 379, -p(1) - p(2) * exp (p(3)) + p(7) + 421, -p(1) - p(2) * exp (3 * p(3)) + p(8) + 460, -p(1) - p(2) * exp (5 * p(3)) + p(9) + 426); [p, objf, cvg, outp] = fmincon (objf, init, [], [], [], [], lbound, [], @ (p) {- inequc(p), []}{:}, optimset ("Algorithm", "octave_sqp")); assert (p, [5.2330e+02; -1.5694e+02; -1.9966e-01; 2.9607e+01; 8.6615e+01; 4.7326e+01; 2.6235e+01; 2.2915e+01; 3.9470e+01], .01); 5 tests, 5 passed, 0 known failure, 0 skipped [inst/nonlin_curvefit.m] >>>>> /build/octave-optim-KjBwfn/octave-optim-1.6.0/inst/nonlin_curvefit.m ***** demo ## Example for linear inequality constraints ## (see also the same example in 'demo nonlin_residmin') ## independents and observations indep = 1:5; obs = [1, 2, 4, 7, 14]; ## model function: f = @ (p, x) p(1) * exp (p(2) * x); ## initial values: init = [.25; .25]; ## linear constraints, A.' * parametervector + B >= 0 A = [1; -1]; B = 0; # p(1) >= p(2); settings = optimset ("inequc", {A, B}); ## start optimization [p, model_values, cvg, outp] = nonlin_curvefit (f, init, indep, obs, settings) ***** test t = optim_problems ().curve.schittkowski_327; cp = nonlin_curvefit (@ (p, x) t.f (x, p), t.init_p, t.data.x, t.data.y, optimset ("lbound", t.non_strict_inequc.bounds(:, 1), "ubound", t.non_strict_inequc.bounds(:, 2), "inequc", {t.non_strict_inequc.general}, "dfdp", @ (p, x) t.dfdp (x, p))); assert (cp, t.result.p, [.0001; .001]); 1 test, 1 passed, 0 known failure, 0 skipped Checking C++ files ... Summary: 56 tests, 56 passed, 0 known failures, 0 skipped dh_installdocs -a -O--buildsystem=octave dh_installchangelogs -a -O--buildsystem=octave dh_octave_changelogs -a -O--buildsystem=octave dh_octave_examples -a -O--buildsystem=octave dh_installsystemduser -a -O--buildsystem=octave dh_perl -a -O--buildsystem=octave dh_link -a -O--buildsystem=octave dh_strip_nondeterminism -a -O--buildsystem=octave dh_compress -a -O--buildsystem=octave dh_fixperms -a -O--buildsystem=octave dh_missing -a -O--buildsystem=octave dh_dwz -a -a -O--buildsystem=octave dh_strip -a -a -O--buildsystem=octave dh_makeshlibs -a -a -O--buildsystem=octave dh_shlibdeps -a -a -O--buildsystem=octave dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/octave-optim/usr/lib/x86_64-linux-gnu/octave/packages/optim-1.6.0/x86_64-pc-linux-gnu-api-v55/__disna_optim__.oct debian/octave-optim/usr/lib/x86_64-linux-gnu/octave/packages/optim-1.6.0/x86_64-pc-linux-gnu-api-v55/numgradient.oct debian/octave-optim/usr/lib/x86_64-linux-gnu/octave/packages/optim-1.6.0/x86_64-pc-linux-gnu-api-v55/__bfgsmin.oct debian/octave-optim/usr/lib/x86_64-linux-gnu/octave/packages/optim-1.6.0/x86_64-pc-linux-gnu-api-v55/numhessian.oct were not linked against libpthread.so.0 (they use none of the library's symbols) dh_octave_substvar -a -O--buildsystem=octave dh_installdeb -a -O--buildsystem=octave dh_gencontrol -a -O--buildsystem=octave dpkg-gencontrol: warning: package octave-optim: substitution variable ${octave:Upstream-Description} unused, but is defined dpkg-gencontrol: warning: package octave-optim: substitution variable ${octave:Upstream-Description} unused, but is defined dh_md5sums -a -O--buildsystem=octave dh_builddeb -a -O--buildsystem=octave dpkg-deb: building package 'octave-optim' in '../octave-optim_1.6.0-6_amd64.deb'. dpkg-deb: building package 'octave-optim-dbgsym' in '../octave-optim-dbgsym_1.6.0-6_amd64.deb'. dpkg-genbuildinfo --build=any dpkg-genchanges --build=any >../octave-optim_1.6.0-6_amd64.changes dpkg-genchanges: info: binary-only arch-specific upload (source code and arch-indep packages not included) dpkg-source --after-build . dpkg-source: info: using options from octave-optim-1.6.0/debian/source/options: --extend-diff-ignore=doc/optim\.info|doc/optim\.texi dpkg-buildpackage: info: binary-only upload (no source included) I: running special hook: sync-out /build/octave-optim-KjBwfn /tmp/octave-optim-1.6.0-6q83i5a_2 I: cleaning package lists and apt cache... I: creating tarball... I: done I: removing tempdir /tmp/mmdebstrap.NMxyg_a9hv... I: success in 1084.2022 seconds md5: octave-optim-dbgsym_1.6.0-6_amd64.deb: OK md5: octave-optim_1.6.0-6_amd64.deb: OK sha1: octave-optim-dbgsym_1.6.0-6_amd64.deb: OK sha1: octave-optim_1.6.0-6_amd64.deb: OK sha256: octave-optim-dbgsym_1.6.0-6_amd64.deb: OK sha256: octave-optim_1.6.0-6_amd64.deb: OK Checksums: OK