@@ -558,25 +558,12 @@ namespace OpenMagnetics {
558558 FourSwitchBuckBoost::run_checks (_assertErrors);
559559 Inputs inputs;
560560 const double L = get_desired_inductance ();
561- if (L <= 0.0 ) {
562- throw std::invalid_argument (
563- " AdvancedFourSwitchBuckBoost::process: desiredInductance must be > 0" );
564- }
565561
566562 std::vector<double > inputVoltages;
567563 std::vector<std::string> inputVoltagesNames;
568564 Topology::collect_input_voltages (get_input_voltage (), inputVoltages, inputVoltagesNames);
569565
570- DesignRequirements dr;
571- dr.get_mutable_turns_ratios ().clear ();
572- DimensionWithTolerance Lwt;
573- Lwt.set_nominal (roundFloat (L, 10 ));
574- dr.set_magnetizing_inductance (Lwt);
575- std::vector<IsolationSide> isolationSides;
576- isolationSides.push_back (get_isolation_side_from_index (0 ));
577- dr.set_isolation_sides (isolationSides);
578- dr.set_topology (Topologies::FOUR_SWITCH_BUCK_BOOST_CONVERTER );
579- inputs.set_design_requirements (dr);
566+ inputs.set_design_requirements (process_design_requirements ());
580567
581568 for (size_t i = 0 ; i < inputVoltages.size (); ++i) {
582569 for (size_t opIdx = 0 ; opIdx < get_operating_points ().size (); ++opIdx) {
@@ -593,6 +580,29 @@ namespace OpenMagnetics {
593580 return inputs;
594581 }
595582
583+ DesignRequirements AdvancedFourSwitchBuckBoost::process_design_requirements () {
584+ // Issue M1: build DR directly from desiredInductance. Do NOT chain
585+ // to FourSwitchBuckBoost::process_design_requirements() — the parent
586+ // sizes inductance from current ripple, defeating the "Advanced"
587+ // override semantics.
588+ const double L = get_desired_inductance ();
589+ if (L <= 0.0 ) {
590+ throw std::invalid_argument (
591+ " AdvancedFourSwitchBuckBoost::process_design_requirements: desiredInductance must be > 0" );
592+ }
593+
594+ DesignRequirements dr;
595+ dr.get_mutable_turns_ratios ().clear ();
596+ DimensionWithTolerance Lwt;
597+ Lwt.set_nominal (roundFloat (L, 10 ));
598+ dr.set_magnetizing_inductance (Lwt);
599+ std::vector<IsolationSide> isolationSides;
600+ isolationSides.push_back (get_isolation_side_from_index (0 ));
601+ dr.set_isolation_sides (isolationSides);
602+ dr.set_topology (Topologies::FOUR_SWITCH_BUCK_BOOST_CONVERTER );
603+ return dr;
604+ }
605+
596606 // ============================================================
597607 // get_extra_components_inputs — L (single inductor), Cin, Co
598608 // ============================================================
0 commit comments