diff --git a/ML/Training/Runner/RunnerIO.cpp b/ML/Training/Runner/RunnerIO.cpp index 2c9477c..f0934be 100644 --- a/ML/Training/Runner/RunnerIO.cpp +++ b/ML/Training/Runner/RunnerIO.cpp @@ -87,7 +87,7 @@ namespace RunnerIO std::cerr << "RunnerIO::readParamsBin: header read failed\n"; return false; } - if (magic != MAGIC || (ver != 1 && ver != 2)) + if (magic != MAGIC || ver != 2) { std::cerr << "RunnerIO::readParamsBin: magic/version mismatch\n"; return false; @@ -98,12 +98,7 @@ namespace RunnerIO if (!readDouble(fs, out.wellboreC)) return false; if (!readDouble(fs, out.phi)) return false; if (!readDouble(fs, out.h)) return false; - out.hasCt = false; - out.Ct = 0.0; - if (ver >= 2) { - if (!readDouble(fs, out.Ct)) return false; - out.hasCt = true; - } + if (!readDouble(fs, out.Ct)) return false; if (!readDouble(fs, out.Cf)) return false; out.sectionIndex = 0; @@ -200,4 +195,4 @@ namespace RunnerIO return fs.good(); } -} \ No newline at end of file +} diff --git a/ML/Training/Runner/RunnerIO.h b/ML/Training/Runner/RunnerIO.h index d6cbab2..5cea698 100644 --- a/ML/Training/Runner/RunnerIO.h +++ b/ML/Training/Runner/RunnerIO.h @@ -13,7 +13,6 @@ struct RunnerParams double h; double Ct; double Cf; - bool hasCt; // optional schedule extension uint32_t sectionIndex; // wellFlowSectionIndex @@ -21,7 +20,7 @@ struct RunnerParams std::vector q; // m^3/d RunnerParams() - : k(0), skin(0), wellboreC(0), phi(0), h(0), Ct(0), Cf(0), hasCt(false), sectionIndex(0) + : k(0), skin(0), wellboreC(0), phi(0), h(0), Ct(0), Cf(0), sectionIndex(0) {} }; diff --git a/ML/Training/Runner/runner_main.cpp b/ML/Training/Runner/runner_main.cpp index d3fd401..6d52b24 100644 --- a/ML/Training/Runner/runner_main.cpp +++ b/ML/Training/Runner/runner_main.cpp @@ -130,7 +130,7 @@ static void applySampledParamsAndMaybeOverrideRate(HX_NWTM_MODEL_INPUT& in, cons std::fill(in.Base.k.begin(), in.Base.k.end(), p.k); std::fill(in.Base.phi.begin(), in.Base.phi.end(), p.phi); std::fill(in.Base.h.begin(), in.Base.h.end(), p.h); - if (p.hasCt) in.Base.Cti = p.Ct; + in.Base.Cti = p.Ct; in.Base.Cf = p.Cf; // 制度覆盖:params.bin 带 schedule 才覆盖 @@ -440,4 +440,4 @@ int main(int argc, char** argv) if (hMod_solver) FreeLibrary(hMod_solver); FreeLibrary(hx); return 0; -} \ No newline at end of file +}