subject to:
![]()
![]()
![]()
![]()
![]()
is solved.
using System;
using Imsl.Math;
public class DenseLPEx1
{
public static void Main(String[] args)
{
double[,] a = {{1.0, 1.0, 1.0, 0.0, 0.0, 0.0},
{1.0, 1.0, 0.0, - 1.0, 0.0, 0.0},
{1.0, 0.0, 0.0, 0.0, 1.0, 0.0},
{0.0, 1.0, 0.0, 0.0, 0.0, 1.0}};
double[] b = new double[]{1.5, 0.5, 1.0, 1.0};
double[] c = new double[]{- 1.0, - 3.0, 0.0, 0.0, 0.0, 0.0};
DenseLP zf = new DenseLP(a, b, c);
zf.Solve();
new PrintMatrix("Solution").Print(zf.GetSolution());
}
}
Solution
0
0 0.5
1 1
2 0
3 1
4 0.5
5 0
Link to C# source.