Skip to content

Commit

Permalink
forgotten use of config
Browse files Browse the repository at this point in the history
  • Loading branch information
arcuri82 committed Dec 2, 2024
1 parent 17507ce commit e36bc85
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions core/src/main/kotlin/org/evomaster/core/EMConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2393,6 +2393,10 @@ class EMConfig {
" The choice between ON and OFF depends on probabilityOfOnVsOffInAllOptionals.")
var probabilityAllOptionalsAreOnOrOff = 0.0

@Experimental
@Cfg("If all-optionals is activated with probabilityAllOptionalsAreOnOrOff, specifying probability of using ON" +
" instead of OFF.")
val probabilityOfOnVsOffInAllOptionals = 0.8

@Experimental
@Cfg("Add summary comments on each test")
Expand All @@ -2403,11 +2407,6 @@ class EMConfig {
" on a single line")
var maxLengthForCommentLine = 80

@Experimental
@Cfg("If all-optionals is activated with probabilityAllOptionalsAreOnOrOff, specifying probability of using ON" +
" instead of OFF.")
val probabilityOfOnVsOffInAllOptionals = 0.8

fun getProbabilityUseDataPool() : Double{
return if(blackBox){
bbProbabilityUseDataPool
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ abstract class Sampler<T> : TrackOperator where T : Individual {

val force = randomness.nextBoolean(config.probabilityAllOptionalsAreOnOrOff)
if(force){
val on = randomness.nextBoolean(0.8)
val on = randomness.nextBoolean(config.probabilityOfOnVsOffInAllOptionals)
allOptionals
.filter { it.selectable }
.forEach { it.isActive = on }
Expand Down

0 comments on commit e36bc85

Please sign in to comment.