/** * WPML compatibility functions * * @global array $duplicated_posts Array to store the posts being duplicated. * * @package Yoast\WP\Duplicate_Post * @since 3.2 */ add_action( 'admin_init', 'duplicate_post_wpml_init' ); /** * Add handlers for WPML compatibility. */ function duplicate_post_wpml_init() { if ( defined( 'ICL_SITEPRESS_VERSION' ) ) { add_action( 'dp_duplicate_page', 'duplicate_post_wpml_copy_translations', 10, 3 ); add_action( 'dp_duplicate_post', 'duplicate_post_wpml_copy_translations', 10, 3 ); add_action( 'shutdown', 'duplicate_wpml_string_packages', 11 ); } } global $duplicated_posts; // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals -- Reason: Renaming a global variable is a BC break. $duplicated_posts = []; /** * Copy post translations. * * @global SitePress $sitepress Instance of the Main WPML class. * @global array $duplicated_posts Array of duplicated posts. * * @param int $post_id ID of the copy. * @param WP_Post $post Original post object. * @param string $status Status of the new post. */ function duplicate_post_wpml_copy_translations( $post_id, $post, $status = '' ) { global $sitepress; global $duplicated_posts; remove_action( 'dp_duplicate_page', 'duplicate_post_wpml_copy_translations', 10 ); remove_action( 'dp_duplicate_post', 'duplicate_post_wpml_copy_translations', 10 ); $current_language = $sitepress->get_current_language(); $trid = $sitepress->get_element_trid( $post->ID ); if ( ! empty( $trid ) ) { $translations = $sitepress->get_element_translations( $trid ); $new_trid = $sitepress->get_element_trid( $post_id ); foreach ( $translations as $code => $details ) { if ( $code !== $current_language ) { if ( $details->element_id ) { $translation = get_post( $details->element_id ); if ( ! $translation ) { continue; } $new_post_id = duplicate_post_create_duplicate( $translation, $status ); if ( ! is_wp_error( $new_post_id ) ) { $sitepress->set_element_language_details( $new_post_id, 'post_' . $translation->post_type, $new_trid, $code, $current_language ); } } } } // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals -- Reason: see above. $duplicated_posts[ $post->ID ] = $post_id; } } /** * Duplicate string packages. * * @global array() $duplicated_posts Array of duplicated posts. */ function duplicate_wpml_string_packages() { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals -- Reason: renaming the function would be a BC-break. global $duplicated_posts; foreach ( $duplicated_posts as $original_post_id => $duplicate_post_id ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals -- Reason: using WPML native filter. $original_string_packages = apply_filters( 'wpml_st_get_post_string_packages', false, $original_post_id ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals -- Reason: using WPML native filter. $new_string_packages = apply_filters( 'wpml_st_get_post_string_packages', false, $duplicate_post_id ); if ( is_array( $original_string_packages ) ) { foreach ( $original_string_packages as $original_string_package ) { $translated_original_strings = $original_string_package->get_translated_strings( [] ); foreach ( $new_string_packages as $new_string_package ) { $cache = new WPML_WP_Cache( 'WPML_Package' ); $cache->flush_group_cache(); $new_strings = $new_string_package->get_package_strings(); foreach ( $new_strings as $new_string ) { if ( isset( $translated_original_strings[ $new_string->name ] ) ) { foreach ( $translated_original_strings[ $new_string->name ] as $language => $translated_string ) { do_action( // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals -- Reason: using WPML native filter. 'wpml_add_string_translation', $new_string->id, $language, $translated_string['value'], $translated_string['status'] ); } } } } } } } } Work Center Parameters | Odoo MRP – Raqqa

Work Center Parameters | Odoo MRP

🏭 Odoo MRP|Work Center Parameters の仕組みと計算ロジック


✅ 基本パラメータの説明(製造 > 作業区 > 一般情報)

パラメータ説明
Time Efficiency(時間効率)作業区の処理速度の効率を % で指定。100%=標準時間通り。50%なら実際は2倍かかる。
Capacity(処理能力)同時に処理できる製品数。例えば「5」なら5個ずつ並列処理可能。
OEE Target(OEE目標)Overall Equipment Effectiveness(設備総合効率)の目標値。実績と比較して改善指標に。
Setup Time(セットアップ時間)作業の前準備にかかる固定時間(生産数量に関係なく一定)
Cleanup Time(クリーンアップ時間)作業終了後の後処理にかかる固定時間

🧮 Work Order の Expected Duration(予想所要時間)の計算ロジック


🔧 ベンチ製造の具体例(条件)

  • 製造数量:10台
  • 1台あたりの工程時間:10分
  • 作業区パラメータ:
    • Time Efficiency:50%
    • Capacity:5
    • Setup Time:15分
    • Cleanup Time:10分

🔍 計算ステップ

1. 基本所要時間(製品×単位時間)

コピーする編集する10台 × 10分 = 100分

2. 時間効率の反映(効率50% → 実時間は2倍)

matlabコピーする編集する100分 ÷ 50% = 200分

3. 並列処理の効果(Capacity 5 → 5台同時処理可能)

コピーする編集する200分 ÷ 5台 = 40分

4. セットアップ + クリーンアップの加算

コピーする編集する40分 + 15分 + 10分 = 65分

📦 結果:Work Order の Expected Duration = 65分


✅ まとめ:Expected Duration の計算式(一般化)

plaintextコピーする編集するExpected Duration = ((数量 × 単位時間) ÷ 時間効率 ÷ Capacity) + Setup Time + Cleanup Time

※ 時間効率は「%」表記 → 計算時には「1.0 = 100%」「0.5 = 50%」で使用


🧠 補足ポイント

  • Time Efficiency が低いほど、実作業時間は増加
  • Capacity が大きいほど、並列処理により時間が短縮
  • Setup/Cleanup は数量に関係なく常に加算される
  • この計算結果は「製造オーダー内の作業指示(Work Order)」に表示され、スケジューリングやOEE分析にも反映される

Comments

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です