/// <summary> /// Represents linear programming problem for symplex-method /// </summary> /// <param name="problem">Initial problem</param> public LppForSimplexMethod(LppForSimplexMethod problem) : base(problem.TargetFunction, problem.ConstraintSystem, problem.ZeroConstraints) { InitializeComponents(); InitialProblem = new LinearProgrammingProblem(problem.InitialProblem); VariablesWithMaxCoefficient.AddRange(problem.VariablesWithMaxCoefficient); LessThanConstraintsIndexes.AddRange(problem.LessThanConstraintsIndexes); foreach (var replacement in problem.Replacements) Replacements.Add(replacement.Key, new KeyValuePair<string, string>(replacement.Value.Key, replacement.Value.Value)); IsTargetWasChanged = problem.IsTargetWasChanged; }
/// <summary> /// Represents linear programming problem for symplex-method /// </summary> /// <param name="problem">Initial problem</param> /// <param name="wholeConstraints"> </param> public ProblemForGomory(LinearProgrammingProblem problem, IEnumerable<string> wholeConstraints) : base(problem) { InitializeComponents(); WholeConstraints.AddRange(wholeConstraints); }
/// <summary> /// Represents linear programming problem for symplex-method /// </summary> /// <param name="problem">Initial problem</param> public ProblemForGomory(LinearProgrammingProblem problem) : base(problem) { InitializeComponents(); }
/// <summary> /// Represents copy of linear programming problem /// </summary> /// <exception cref="FormatException"></exception> /// <exception cref="NullReferenceException"></exception> public LinearProgrammingProblem(LinearProgrammingProblem problem) : this(problem.TargetFunction, problem.ConstraintSystem, problem.ZeroConstraints) { }
/// <summary> /// Represents linear programming problem for symplex-method /// </summary> /// <param name="problem">Initial problem</param> public LppForSimplexMethod(LinearProgrammingProblem problem) : base(problem) { InitializeComponents(); InitialProblem = new LinearProgrammingProblem(problem); }
/// <summary> /// Represents discrete programming problem description /// (1. target function, 2. constraint system, 3. zero constraints, 4. whole constraint) /// </summary> public DiscreteProgrammingProblem(LinearProgrammingProblem linearProblem, IEnumerable<string> wholeConstraints) : base(linearProblem) { WholeConstraints = new List<string>(wholeConstraints); }