docstr: Tests that the local optimisation problem gives
  the same answer as the brute force problem
  (for small values of `k_choices` and `N`)
  with groups for a defined random seed.
  
  Note that local and brute force methods are not guaranteed to produce
  exact answers, even for small problems.
docstr_tok: ["Tests","that","the","local","optimisation","problem","gives","the","same","answer","as","the","brute","force","problem","(","for","small","values","of","`","k_choices","`","and","`","N","`",")","with","groups","for","a","defined","random","seed",".","Note","that","local","and","brute","force","methods","are","not","guaranteed","to","produce","exact","answers",",","even","for","small","problems","."]
code: def test_local_optimised_groups(
      self, setup_param_groups_prime, execution_number
  ):
      """
      Tests that the local optimisation problem gives
      the same answer as the brute force problem
      (for small values of `k_choices` and `N`)
      with groups for a defined random seed.
  
      Note that local and brute force methods are not guaranteed to produce
      exact answers, even for small problems.
      """
      rd.seed(12345)
  
      N = 8
      param_file = setup_param_groups_prime
      problem = read_param_file(param_file)
      num_levels = 4
      k_choices = 4
  
      num_params = problem["num_vars"]
  
      num_groups = len(set(problem["groups"]))
  
      input_sample = _sample_morris(problem, N, num_levels)
  
      local = LocalOptimisation()
  
      # From local optimal trajectories
      actual = local.find_local_maximum(
          input_sample, N, num_params, k_choices, num_groups
      )
  
      brute = BruteForce()
      desired = brute.brute_force_most_distant(
          input_sample, N, num_params, k_choices, num_groups
      )
  
      print("Actual: {}\nDesired: {}\n".format(actual, desired))
      print(input_sample)
      assert_equal(actual, desired)
  
imports: from SALib.sample.morris import SampleMorris, LocalOptimisation, BruteForce
  from SALib.sample.morris.morris import _sample_morris
  from SALib.util import read_param_file
  import numpy
  from numpy.testing import assert_equal, assert_allclose
  import numpy.random
  import pytest
  from pytest import fixture, raises
label_desc: Use image node_id 4 for calling the TestLocallyOptimalStrategy obj's underlying member method code with example usage: obj.test_local_optimised_groups(setup_param_groups_prime, execution_number) without return types