您的变量 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);
}
}
}