Esempio n. 1
0
        public void SimplexModel_Copy_Test()
        {
            SimplexModel simplex  = TestHelper.CreateSimplexModel3();
            SimplexModel simplex2 = simplex.DeepCopy();

            simplex2.GoalType = ObjectiveType.Maximum;
            simplex2.Subjects[0].Terms[0].Vector = "X1 Copy";
            var result = simplex.Subjects[0].Terms[0].Vector == simplex2.Subjects[0].Terms[0].Vector;

            Assert.IsFalse(result, "copy is not verified");
        }
Esempio n. 2
0
        private Solution SolveProblem(SimplexModel model)
        {
            Solution              tmp_solution  = null;
            SimplexModel          standartModel = model.DeepCopy();
            SolutionBuildDirector tmp_Direcor   = new SolutionBuildDirector(m_SolverType, standartModel);

            tmp_Direcor.Construct();
            tmp_solution = tmp_Direcor.SolutionBuilder.getResult();
            PrintResult(tmp_solution, standartModel);
            return(tmp_solution);
        }