Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Add Batched{S} set

オープン
#2,904 コメント 15 件 リアクション 7 件 担当者 0 名 GitHub で見る

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
静か
技術スタック
julia

調査の方向性

Issue に記載されている MOI.set、ConstraintSet、ConstraintIndex のエントリポイントから始め、次に Parameter の値と result_count がどのように表現されているかを確認します。プロジェクトが、一貫したバッチ長と記載された結果の挙動を備えた batched-set アプローチについて合意し、実装した時点で作業は完了です。

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

説明

Type: Set Request

@amontoison wants this. There are also some folks in the GPU/cvxpy domain sniffing around this (https://github.com/cvxpy/cvxpy/issues/2485).

We have almost everything we need. There's just a choice between two approaches.

First, we could set the value of Parameter to a vector of sets:

MOI.set(
    ::Optimizer,
    ::MOI.ConstraintSet,
    ::MOI.ConstraintIndex{MOI.VariableIndex,MOI.Parameter{T}},
    ::Vector{MOI.Parameter{T}},
)

But this might be hard to get through the various MOI layers.

The easier alternative is to add a new Batched{S<:MOI.AbstractSet} set.

If there are multiple batched sets, they all must have the same length. Then the results are returned via result_count and we don't support returning multiple solutions within a batch.

Then a solver could choose to natively support batched parameters. And we could have a fallback optimizer like:

using JuMP
import Ipopt
import MathOptBatchOptimizer as MOBO
model = Model(() -> MOBO.Optimizer(Ipopt.Optimizer))
@variable(model, x)
@variable(model, p in Parameter(1))
set_parameter_value(p, 1:100) # <-- set as a vector, not a scalar
@objective(model, Min, x)
@constraint(model, x >= p)
optimize!(model)
@assert result_count(model) == 100
主要言語
Julia
スター
506
フォーク
103
平均マージ
1日 1時間
マージ済み PR(30日)
9

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

jump-dev/MathOptInterface.jl のほかの issue

jump-dev/MathOptInterface.jl の issue をすべて見る

似ている issue

Julia の issue をもっと見る

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

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