Exemplo n.º 1
0
        //! Main constructor.

        /*!
         * \param _dimention Number of variables (groups x players x weeks)
         * \param _domain The variables domain
         * \param _cost_strategy An instance of the strategy to compute the cost
         * \param _relative_cost_strategy An instance of the strategy to compute the relative cost
         * \param _show_strategy An instance of the strategy to print the solution
         */
        public Benchmark(int _dimension, Domain _domain,
                         ICostStrategy _cost_strategy,
                         IRelativeCostStrategy _relative_cost_strategy,
                         IShowStrategy _show_strategy)
        {
            problem_dimension      = _dimension;
            domain                 = _domain;
            configuration          = new int[_dimension];
            default_configuration  = new int[_dimension];
            cost_strategy          = _cost_strategy;
            relative_cost_strategy = _relative_cost_strategy;
            show_strategy          = _show_strategy;
        }
Exemplo n.º 2
0
 public void SetStrategy(ICostStrategy costStrategy)
 {
     _costStrategy = costStrategy;
 }