Skip to content

Commit

Permalink
[skip ci] Removed the Random sampling method
Browse files Browse the repository at this point in the history
  • Loading branch information
Enrico Stragiotti committed Dec 13, 2024
1 parent 6e015c4 commit 08a34f6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
3 changes: 0 additions & 3 deletions src/fastoad/cmd/doe.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,6 @@ def _handle_lhs(self, level_count=None):
def _handle_full_factorial(self):
return samp.FullFactorial(xlimits=self.bounds)

def _handle_random(self):
return samp.Random(xlimits=self.bounds, random_state=self.seed_value)

def _print_sampling_info(self):
pass

Expand Down
15 changes: 0 additions & 15 deletions src/fastoad/cmd/tests/test_doe.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,21 +138,6 @@ def test_generate_doe_full_factorial(cleanup_DOEVariable, cleanup, sample_variab
assert all(isinstance(item, VariableList) for item in doe_points)


def test_generate_doe_random(cleanup_DOEVariable, cleanup, sample_variables):
"""Test DOEConfig generate_doe for Random method."""
config = DOEConfig(
sampling_method="Random",
variables=sample_variables,
destination_folder=RESULTS_FOLDER_PATH,
)

doe_points = config.generate_doe(sample_count=5)

# Test that the return type is a list of VariableList instances
assert isinstance(doe_points, list)
assert all(isinstance(item, VariableList) for item in doe_points)


def test_generate_doe_lhs_level_count(cleanup_DOEVariable, cleanup, sample_variables):
"""Test DOEConfig generate_doe for LHS method missing level_count."""
config = DOEConfig(
Expand Down

0 comments on commit 08a34f6

Please sign in to comment.