`argtrig` is not what it claims

オープン
#477 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
julia
領域
testing-qa

調査の方向性

Start by comparing the argtrig implementation in both ADNLPProblems and PureJuMP with the cited MGH problem and CUTEst definitions; the issue links the ADNLPProblems source and describes the discrepancies. Then inspect the metadata and the PureJuMP docstring, which the issue says is copied from arglina. Done when the function, metadata, and docstring consistently describe the intended problem; the issue does not specify which formulation should be authoritative.

索引モデルが issue の本文から書いたものです。

説明

bug

argtrig (both ADNLPProblems and PureJuMP) minimizes the scalar function https://github.com/JuliaSmoothOptimizers/OptimizationProblems.jl/blob/739fc30814878775f500d76284834b366fcdcc68/src/ADNLPProblems/argtrig.jl#L5

The metadata cites problem 26 of Moré, Garbow and Hillstrom (1981) and CUTEst:ARGTRIG, but this function matches neither:

  • MGH problem 26 (the trigonometric function) is a nonlinear least-squares problem with n residuals r_i(x) = n - sum_j cos x_j + i (1 - cos x_i) - sin x_i, objective sum_i r_i^2, and minimum 0.
  • CUTEst's ARGTRIG.SIF poses these residuals as a system of n nonlinear equations (classification NOR2-AN-V-V), but multiplies sin x_i by i. ARGTRIGLS.SIF is the least-squares form of ARGTRIG. ARGTRIG2 and ARGTRIGLS2 use the coefficient 1 on sin x_i from the source.

argtrig's f looks like the sum of the residuals (not their squares), with i replaced by j. It equals n - n(n+1)/2 + sum_j [(j-1) cos x_j + sin x_j], which is separable, and its minimum is n - n(n+1)/2 - sum_j sqrt((j-1)^2 + 1): -92.306 for n = 10 and -9903.48 for n = 100. The metadata's :best_known_upper_bound => 0.0 is the minimum of the MGH problem, not of this function.

The metadata are also inconsistent. The notes (copied from the SIF header) describe "a sum of n least-squares groups" with classification NOR2-AN-V-V, while :objtype => :other and :ncon => 0. The PureJuMP docstring, "Linear function with n parameters and m observations - full rank", is the one for arglina.

主要言語
Julia
スター
90
フォーク
48
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

JuliaSmoothOptimizers/OptimizationProblems.jl のほかの issue

JuliaSmoothOptimizers/OptimizationProblems.jl の issue をすべて見る

似ている issue

Julia の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。