コード例 #1
0
 /// <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;
 }
コード例 #2
0
 /// <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);
 }
コード例 #3
0
 /// <summary>
 /// Represents linear programming problem for symplex-method
 /// </summary>
 /// <param name="problem">Initial problem</param>
 public ProblemForGomory(LinearProgrammingProblem problem)
     : base(problem)
 {
     InitializeComponents();
 }
コード例 #4
0
 /// <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)
 {
 }
コード例 #5
0
 /// <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);
 }
コード例 #6
0
 /// <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);
 }