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

Incorrect benefit-unit equivalence scale understates equivalised income for multi-adult units

オープン 初心者向け
#541 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
89/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
java
領域
backend, databases

調査の方向性

src/main/java/simpaths/model/BenefitUnit.java の BenefitUnit.getEquivalisedWeight() を読み、成人の重み付けを文書化された尺度および src/main/java/simpaths/model/Household.java の世帯計算と比較してください。issue に記載された成人2人のケースを確認してください。給付単位の等価尺度は1.5、月間可処分所得が£3,000の場合の年間等価所得は£24,000になるはずです。

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

説明

Problem

In BenefitUnit.getEquivalisedWeight(), firstAdult is initialised to true but never set to false. Consequently, every member aged at least AGE_TO_BECOME_RESPONSIBLE receives a weight of 1.0, rather than 1.0 for the first adult and 0.5 for subsequent adults.

This differs from the scale documented above the method and from the household calculation, which does update the flag.

Reproduction and effect

For a household containing one benefit unit with two adults aged 40 and 38, and total disposable income of £3,000 per month:

  • Expected equivalence scale: 1.5; annual equivalised income: £24,000.
  • Current benefit-unit calculation: 2.0; annual equivalised income: £18,000.
  • The household calculation correctly returns £24,000 for those same people and income.

The error therefore understates benefit-unit equivalised income by 25% in this example. Cash income itself is unchanged. It can affect quantities and regressors derived from benefit-unit equivalised income; the aggregate effect on model outputs has not been established by this check.

Proposed correction and verification

Setting the flag after the first adult's contribution resolves the tested cases:

if (firstAdult) {
    weight += 1.0;
    firstAdult = false;
} else {
    weight += 0.5;
}

The error remains in the latest shared code. Although the existing automated tests pass, a direct check shows that two adults receive an equivalence scale of 2 rather than 1.5.

主要言語
Java
スター
26
フォーク
38
平均マージ
13時間 5分
マージ済み PR(30日)
7

環境構築

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

はじめの一歩

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

simpaths/SimPaths のほかの issue

simpaths/SimPaths の issue をすべて見る

似ている issue

Java の issue をもっと見る

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

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