private ISimplexData SetupTwoPharmaciesAndProducers() { ISimplexData data = new SimplexData(); double[] objectiveFunction = new[] { 70.5, 70, 100, 80 }; data.AddObjectiveFunction(objectiveFunction); double[,] constarints1 = { { 1, 0, 0, 0, 800 }, { 0, 1, 0, 0, 600 }, { 0, 0, 1, 0, 900 }, { 0, 0, 0, 1, 600 }, { 1, 1, 0, 0, 900 }, { 0, 0, 1, 1, 1300 }, }; double[,] constraints2 = { { 1, 0, 1, 0, 450 }, { 0, 1, 0, 1, 690 } }; data.AddConstraints(constarints1, ConstraintSign.LessOrEqual); data.AddConstraints(constraints2, ConstraintSign.Equal); return(data); }
private SimplexData SetupDataFromPlatform() { SimplexData data = new SimplexData(); double[] objectiveFunction = new[] { 70.5, 70, 90.99, 100, 80, 70, 80, 90, 100 }; data.AddObjectiveFunction(objectiveFunction); double[,] constraints1 = { { 1, 0, 0, 0, 0, 0, 0, 0, 0, 800 }, { 0, 1, 0, 0, 0, 0, 0, 0, 0, 600 }, { 0, 0, 1, 0, 0, 0, 0, 0, 0, 750 }, { 0, 0, 0, 1, 0, 0, 0, 0, 0, 900 }, { 0, 0, 0, 0, 1, 0, 0, 0, 0, 600 }, { 0, 0, 0, 0, 0, 1, 0, 0, 0, 450 }, { 0, 0, 0, 0, 0, 0, 1, 0, 0, 900 }, { 0, 0, 0, 0, 0, 0, 0, 1, 0, 900 }, { 0, 0, 0, 0, 0, 0, 0, 0, 1, 300 }, { 1, 1, 1, 0, 0, 0, 0, 0, 0, 900 }, { 0, 0, 0, 1, 1, 1, 0, 0, 0, 1300 }, { 0, 0, 0, 0, 0, 0, 1, 1, 1, 1100 }, }; double[,] constraints2 = { { 1, 0, 0, 1, 0, 0, 1, 0, 0, 450 }, { 0, 1, 0, 0, 1, 0, 0, 1, 0, 690 }, { 0, 0, 1, 0, 0, 1, 0, 0, 1, 1200 }, }; data.AddConstraints(constraints1, ConstraintSign.LessOrEqual); data.AddConstraints(constraints2, ConstraintSign.Equal); return(data); }