0

sのエラー値を抽出しようとしています。s値は、方程式を等式に当てはめることによって計算できます。方程式には、特定のエラーが関連付けられている既知の変数(a、b、c、e、i)があります。私はこれを試しました:

f[i, a, b, c, e, 
  s] = ((i*b/(e*(a - c))*s*b/(e*c))/(i*b/(e*(a - c)) + s*b/(e*c)) - 
   i*b/(e*a))
Nminimize[
 f[i, a, b, c, e, s] == 0.062 && 1.19 <= a <= 1.21 && 
  1.09 <= b <= 1.11 && 0.8 <= c <= 0.9 && 
  76.7*10^-4 <= e <= 77.7*10^-4 && 0.001265 <= i <= 0.001224, s]

探していた答えが見つかりませんでした...0.0618011Nminimize [False、0.00206]

多分あなたはこれで私を助けることができます。ご清聴ありがとうございました。サンドリナ

4

1 に答える 1

0

変数 i の間隔が間違っている可能性があります (最大値が最小値より小さい)。

Microsofts Solver Foundation を使用して問題を解決しました。

結果:

a: 1,19398028498287
b: 1,09538090507082
c: 0,810937961158584
e: 0,00768194947134329
i: 0,00125448670370341
s: 0,00220457588242784

私のC#コード:

using System;
using Microsoft.SolverFoundation.Services;

namespace akMSFStackOverflow
{
    class Program
    {
        static void Main(string[] args)
        {
            SolverContext context = SolverContext.GetContext();             
            Model model = context.CreateModel();                            

            Decision a = new Decision(Domain.RealNonnegative, "a");
            Decision b = new Decision(Domain.RealNonnegative, "b");
            Decision c = new Decision(Domain.RealNonnegative, "c");
            Decision e = new Decision(Domain.RealNonnegative, "e");
            Decision i = new Decision(Domain.RealNonnegative, "i");
            Decision s = new Decision(Domain.RealNonnegative, "s");
            Term goal;

            model.AddDecisions(a, b, c, e, i, s);

            goal = (i * b / (e * (a - c)) * s * b / (e * c)) /
                   (i * b / (e * (a - c)) + s * b / (e * c)) - i * b / (e * a);

            model.AddConstraints("limits",                              
                                 1.19 <= a <= 1.21,
                                 1.09 <= b <= 1.11,
                                 0.8 <= c <= 0.9,
                                 76.7e-4 <= e <= 77.7e-4,
                                 0.001224 <= i <= 0.001265);   //  min/max swapped for i bound!

            model.AddGoal("goal", GoalKind.Minimize, (goal - 0.062) * (goal - 0.062));

            Solution solution = context.Solve();


            Report report = solution.GetReport();
            Console.WriteLine("a={0} b={1} c={2} e={3} i={4} s={5} ", a, b, c, e, i, s);
            Console.Write("{0}", report);
        }
    }
}
于 2012-12-25T21:45:15.303 に答える