private void OnModelSelected(ProblemModel obj)
 {
     FunctionInputViewModel.ApplyModel(obj);
     ConstraintsViewModel.ApplyModel(obj);
     InitialVariableViewModel.ApplyModel(obj);
     SolutionViewModel.ApplyModel(obj);
 }
        private void OnSolveClicked()
        {
            var funcModel     = FunctionInputViewModel.GetModel();
            var constraints   = ConstraintsViewModel.GetModel();
            var initial       = InitialVariableViewModel.GetModel();
            var solver        = new PenaltyMethodSolver(funcModel, constraints, initial);
            var solutionModel = solver.Solve();

            SolutionViewModel.ApplyModel(solutionModel);

            var problemModel = CreateProblemModel(funcModel, constraints, initial, solutionModel, ConstraintsViewModel.GreaterThanZero);

            HistoryViewModel.Add(problemModel);
        }