-- |

module Modelling.PetriNet.PetriDeadlock.Config where

import Modelling.PetriNet.Reach.Deadlock (DeadlockConfig(..))
import Modelling.PetriNet.Reach.Filter  (defaultFilterConfig, FilterConfig(..))
import Modelling.PetriNet.Reach.Type    (Capacity(..), TransitionBehaviorConstraints(..), ArrowDensityConstraints(..))
import Data.GraphViz.Commands           (GraphvizCommand(..))
import Data.Ratio                       ((%))

{-|
points: 0.2
-}
task2023_29 :: DeadlockConfig
task2023_29 :: DeadlockConfig
task2023_29 = DeadlockConfig {
  numPlaces :: Int
numPlaces = Int
4,
  numTransitions :: Int
numTransitions = Int
4,
  capacity :: Capacity Place
capacity = Capacity Place
forall s. Capacity s
Unbounded,
  graphLayouts :: [GraphvizCommand]
graphLayouts = [GraphvizCommand
Circo],
  maxTransitionLength :: Int
maxTransitionLength = Int
7,
  minTransitionLength :: Int
minTransitionLength = Int
7,
  transitionBehaviorConstraints :: TransitionBehaviorConstraints
transitionBehaviorConstraints = TransitionBehaviorConstraints { allowedTokenChanges :: Maybe Ordering
allowedTokenChanges = Maybe Ordering
forall a. Maybe a
Nothing, areNonPreserving :: Maybe Int
areNonPreserving = Maybe Int
forall a. Maybe a
Nothing },
  arrowDensityConstraints :: ArrowDensityConstraints
arrowDensityConstraints = ArrowDensityConstraints {
    incomingArrowsPerTransition :: (Int, Maybe Int)
incomingArrowsPerTransition = (Int
1, Int -> Maybe Int
forall a. a -> Maybe a
Just Int
2),
    outgoingArrowsPerTransition :: (Int, Maybe Int)
outgoingArrowsPerTransition = (Int
1, Int -> Maybe Int
forall a. a -> Maybe a
Just Int
2),
    incomingArrowsPerPlace :: (Int, Maybe Int)
incomingArrowsPerPlace = (Int
0, Maybe Int
forall a. Maybe a
Nothing),
    outgoingArrowsPerPlace :: (Int, Maybe Int)
outgoingArrowsPerPlace = (Int
0, Maybe Int
forall a. Maybe a
Nothing),
    totalArrowsFromPlacesToTransitions :: (Int, Maybe Int)
totalArrowsFromPlacesToTransitions = (Int
4, Int -> Maybe Int
forall a. a -> Maybe a
Just Int
8),
    totalArrowsFromTransitionsToPlaces :: (Int, Maybe Int)
totalArrowsFromTransitionsToPlaces = (Int
4, Int -> Maybe Int
forall a. a -> Maybe a
Just Int
8)
    },
  maxPrintedSolutions :: Int
maxPrintedSolutions = Int
10,
  rejectLongerThan :: Maybe Int
rejectLongerThan = Int -> Maybe Int
forall a. a -> Maybe a
Just Int
7,
  showLengthHint :: Bool
showLengthHint = Bool
False,
  showMinLengthHint :: Bool
showMinLengthHint = Bool
True,
  showPlaceNamesInNet :: Bool
showPlaceNamesInNet = Bool
False,
  fusableTransitionsConsumingAreExactly :: Maybe Int
fusableTransitionsConsumingAreExactly = Maybe Int
forall a. Maybe a
Nothing,
  fusableTransitionsProducingAreExactly :: Maybe Int
fusableTransitionsProducingAreExactly = Maybe Int
forall a. Maybe a
Nothing,
  filterConfig :: FilterConfig
filterConfig = FilterConfig
defaultFilterConfig { forbiddenCycleLengths = [], absentTransitionsRequirement = 0, requireCycleLengthsAny = [] }
  }

{-|
points: 0.25
-}
task2023_30 :: DeadlockConfig
task2023_30 :: DeadlockConfig
task2023_30 = DeadlockConfig {
  numPlaces :: Int
numPlaces = Int
6,
  numTransitions :: Int
numTransitions = Int
8,
  capacity :: Capacity Place
capacity = Capacity Place
forall s. Capacity s
Unbounded,
  graphLayouts :: [GraphvizCommand]
graphLayouts = [GraphvizCommand
Circo],
  maxTransitionLength :: Int
maxTransitionLength = Int
14,
  minTransitionLength :: Int
minTransitionLength = Int
14,
  transitionBehaviorConstraints :: TransitionBehaviorConstraints
transitionBehaviorConstraints = TransitionBehaviorConstraints { allowedTokenChanges :: Maybe Ordering
allowedTokenChanges = Maybe Ordering
forall a. Maybe a
Nothing, areNonPreserving :: Maybe Int
areNonPreserving = Maybe Int
forall a. Maybe a
Nothing },
  arrowDensityConstraints :: ArrowDensityConstraints
arrowDensityConstraints = ArrowDensityConstraints {
    incomingArrowsPerTransition :: (Int, Maybe Int)
incomingArrowsPerTransition = (Int
1, Int -> Maybe Int
forall a. a -> Maybe a
Just Int
2),
    outgoingArrowsPerTransition :: (Int, Maybe Int)
outgoingArrowsPerTransition = (Int
1, Int -> Maybe Int
forall a. a -> Maybe a
Just Int
2),
    incomingArrowsPerPlace :: (Int, Maybe Int)
incomingArrowsPerPlace = (Int
0, Maybe Int
forall a. Maybe a
Nothing),
    outgoingArrowsPerPlace :: (Int, Maybe Int)
outgoingArrowsPerPlace = (Int
0, Maybe Int
forall a. Maybe a
Nothing),
    totalArrowsFromPlacesToTransitions :: (Int, Maybe Int)
totalArrowsFromPlacesToTransitions = (Int
8, Int -> Maybe Int
forall a. a -> Maybe a
Just Int
16),
    totalArrowsFromTransitionsToPlaces :: (Int, Maybe Int)
totalArrowsFromTransitionsToPlaces = (Int
8, Int -> Maybe Int
forall a. a -> Maybe a
Just Int
16)
    },
  maxPrintedSolutions :: Int
maxPrintedSolutions = Int
10,
  rejectLongerThan :: Maybe Int
rejectLongerThan = Int -> Maybe Int
forall a. a -> Maybe a
Just Int
14,
  showLengthHint :: Bool
showLengthHint = Bool
False,
  showMinLengthHint :: Bool
showMinLengthHint = Bool
True,
  showPlaceNamesInNet :: Bool
showPlaceNamesInNet = Bool
False,
  fusableTransitionsConsumingAreExactly :: Maybe Int
fusableTransitionsConsumingAreExactly = Maybe Int
forall a. Maybe a
Nothing,
  fusableTransitionsProducingAreExactly :: Maybe Int
fusableTransitionsProducingAreExactly = Maybe Int
forall a. Maybe a
Nothing,
  filterConfig :: FilterConfig
filterConfig = FilterConfig
defaultFilterConfig { forbiddenCycleLengths = [], requireCycleLengthsAny = [] }
  }

{-|
points: 0.2
-}
task2024_27 :: DeadlockConfig
task2024_27 :: DeadlockConfig
task2024_27 = DeadlockConfig
task2023_29

{-|
points: 0.25
average generation time per instance: 1:49min
CPU usage: 99%
-}
task2024_28 :: DeadlockConfig
task2024_28 :: DeadlockConfig
task2024_28 = DeadlockConfig
task2023_30

{-|
points: 0.08
-}
task2024_61 :: DeadlockConfig
task2024_61 :: DeadlockConfig
task2024_61 = DeadlockConfig {
  numPlaces :: Int
numPlaces = Int
4,
  numTransitions :: Int
numTransitions = Int
4,
  capacity :: Capacity Place
capacity = Capacity Place
forall s. Capacity s
Unbounded,
  graphLayouts :: [GraphvizCommand]
graphLayouts = [GraphvizCommand
Circo],
  maxTransitionLength :: Int
maxTransitionLength = Int
8,
  minTransitionLength :: Int
minTransitionLength = Int
8,
  transitionBehaviorConstraints :: TransitionBehaviorConstraints
transitionBehaviorConstraints = TransitionBehaviorConstraints { allowedTokenChanges :: Maybe Ordering
allowedTokenChanges = Maybe Ordering
forall a. Maybe a
Nothing, areNonPreserving :: Maybe Int
areNonPreserving = Maybe Int
forall a. Maybe a
Nothing },
  arrowDensityConstraints :: ArrowDensityConstraints
arrowDensityConstraints = ArrowDensityConstraints {
    incomingArrowsPerTransition :: (Int, Maybe Int)
incomingArrowsPerTransition = (Int
1, Int -> Maybe Int
forall a. a -> Maybe a
Just Int
2),
    outgoingArrowsPerTransition :: (Int, Maybe Int)
outgoingArrowsPerTransition = (Int
1, Int -> Maybe Int
forall a. a -> Maybe a
Just Int
2),
    incomingArrowsPerPlace :: (Int, Maybe Int)
incomingArrowsPerPlace = (Int
0, Maybe Int
forall a. Maybe a
Nothing),
    outgoingArrowsPerPlace :: (Int, Maybe Int)
outgoingArrowsPerPlace = (Int
0, Maybe Int
forall a. Maybe a
Nothing),
    totalArrowsFromPlacesToTransitions :: (Int, Maybe Int)
totalArrowsFromPlacesToTransitions = (Int
4, Int -> Maybe Int
forall a. a -> Maybe a
Just Int
8),
    totalArrowsFromTransitionsToPlaces :: (Int, Maybe Int)
totalArrowsFromTransitionsToPlaces = (Int
4, Int -> Maybe Int
forall a. a -> Maybe a
Just Int
8)
    },
  maxPrintedSolutions :: Int
maxPrintedSolutions = Int
10,
  rejectLongerThan :: Maybe Int
rejectLongerThan = Int -> Maybe Int
forall a. a -> Maybe a
Just Int
8,
  showLengthHint :: Bool
showLengthHint = Bool
False,
  showMinLengthHint :: Bool
showMinLengthHint = Bool
True,
  showPlaceNamesInNet :: Bool
showPlaceNamesInNet = Bool
False,
  fusableTransitionsConsumingAreExactly :: Maybe Int
fusableTransitionsConsumingAreExactly = Maybe Int
forall a. Maybe a
Nothing,
  fusableTransitionsProducingAreExactly :: Maybe Int
fusableTransitionsProducingAreExactly = Maybe Int
forall a. Maybe a
Nothing,
  filterConfig :: FilterConfig
filterConfig = FilterConfig
defaultFilterConfig { absentTransitionsRequirement = 0, forbiddenCycleLengths = [], requireCycleLengthsAny = [] }
  }

{-|
points: 0.2
the amount of generated instances: 100
maximum concurrent amount of tasks: 50
average generation time per instance on the cluster (without considering concurrency): 3.26s
total run time on the cluster (not including queuing time): 1:55min
average CPU usage: 97.54%
average memory usage: 378.04 MB
-}
task2025_29 :: DeadlockConfig
task2025_29 :: DeadlockConfig
task2025_29 = DeadlockConfig {
  numPlaces :: Int
numPlaces = Int
4,
  numTransitions :: Int
numTransitions = Int
4,
  capacity :: Capacity Place
capacity = Capacity Place
forall s. Capacity s
Unbounded,
  graphLayouts :: [GraphvizCommand]
graphLayouts = [GraphvizCommand
Circo],
  maxTransitionLength :: Int
maxTransitionLength = Int
7,
  minTransitionLength :: Int
minTransitionLength = Int
7,
  transitionBehaviorConstraints :: TransitionBehaviorConstraints
transitionBehaviorConstraints = TransitionBehaviorConstraints {
    allowedTokenChanges :: Maybe Ordering
allowedTokenChanges = Maybe Ordering
forall a. Maybe a
Nothing,
    areNonPreserving :: Maybe Int
areNonPreserving = Maybe Int
forall a. Maybe a
Nothing
    },
  arrowDensityConstraints :: ArrowDensityConstraints
arrowDensityConstraints = ArrowDensityConstraints {
    incomingArrowsPerTransition :: (Int, Maybe Int)
incomingArrowsPerTransition = (Int
1, Int -> Maybe Int
forall a. a -> Maybe a
Just Int
2),
    outgoingArrowsPerTransition :: (Int, Maybe Int)
outgoingArrowsPerTransition = (Int
1, Int -> Maybe Int
forall a. a -> Maybe a
Just Int
2),
    incomingArrowsPerPlace :: (Int, Maybe Int)
incomingArrowsPerPlace = (Int
1, Maybe Int
forall a. Maybe a
Nothing),
    outgoingArrowsPerPlace :: (Int, Maybe Int)
outgoingArrowsPerPlace = (Int
1, Maybe Int
forall a. Maybe a
Nothing),
    totalArrowsFromPlacesToTransitions :: (Int, Maybe Int)
totalArrowsFromPlacesToTransitions = (Int
5, Int -> Maybe Int
forall a. a -> Maybe a
Just Int
5),
    totalArrowsFromTransitionsToPlaces :: (Int, Maybe Int)
totalArrowsFromTransitionsToPlaces = (Int
4, Int -> Maybe Int
forall a. a -> Maybe a
Just Int
6)
    },
  maxPrintedSolutions :: Int
maxPrintedSolutions = Int
10,
  rejectLongerThan :: Maybe Int
rejectLongerThan = Int -> Maybe Int
forall a. a -> Maybe a
Just Int
7,
  showLengthHint :: Bool
showLengthHint = Bool
False,
  showMinLengthHint :: Bool
showMinLengthHint = Bool
True,
  showPlaceNamesInNet :: Bool
showPlaceNamesInNet = Bool
False,
  fusableTransitionsConsumingAreExactly :: Maybe Int
fusableTransitionsConsumingAreExactly  = Maybe Int
forall a. Maybe a
Nothing,
  fusableTransitionsProducingAreExactly :: Maybe Int
fusableTransitionsProducingAreExactly  = Int -> Maybe Int
forall a. a -> Maybe a
Just Int
1,
  filterConfig :: FilterConfig
filterConfig = FilterConfig {
    rejectGroupedRepeats :: Bool
rejectGroupedRepeats = Bool
True,
    repetitiveSubsequenceThreshold :: Maybe Int
repetitiveSubsequenceThreshold = Int -> Maybe Int
forall a. a -> Maybe a
Just Int
3,
    spaceballsPrefixThreshold :: Maybe Int
spaceballsPrefixThreshold = Int -> Maybe Int
forall a. a -> Maybe a
Just Int
4,
    forbiddenCycleLengths :: [Int]
forbiddenCycleLengths = [],
    requireCycleLengthsAny :: [Int]
requireCycleLengthsAny = [],
    solutionSetLimit :: Maybe Int
solutionSetLimit = Int -> Maybe Int
forall a. a -> Maybe a
Just Int
15,
    requireSolutionsArePermutations :: Bool
requireSolutionsArePermutations = Bool
False,
    absentTransitionsRequirement :: Int
absentTransitionsRequirement = Int
0,
    transitionCoverageRequirement :: Ratio Int
transitionCoverageRequirement = Int
1 Int -> Int -> Ratio Int
forall a. Integral a => a -> a -> Ratio a
% Int
1
    }
  }

{-|
points: 0.25
the amount of generated instances: 100
maximum concurrent amount of tasks: 50
average generation time per instance on the cluster (without considering concurrency): 2:30:44h
total run time on the cluster (not including queuing time): 11:08:20h
average CPU usage: 98.99%
average memory usage: 372.13 MB
-}
task2025_30 :: DeadlockConfig
task2025_30 :: DeadlockConfig
task2025_30 = DeadlockConfig {
  numPlaces :: Int
numPlaces = Int
6,
  numTransitions :: Int
numTransitions = Int
8,
  capacity :: Capacity Place
capacity = Capacity Place
forall s. Capacity s
Unbounded,
  graphLayouts :: [GraphvizCommand]
graphLayouts = [GraphvizCommand
Circo],
  maxTransitionLength :: Int
maxTransitionLength = Int
14,
  minTransitionLength :: Int
minTransitionLength = Int
14,
  transitionBehaviorConstraints :: TransitionBehaviorConstraints
transitionBehaviorConstraints = TransitionBehaviorConstraints {
    allowedTokenChanges :: Maybe Ordering
allowedTokenChanges = Maybe Ordering
forall a. Maybe a
Nothing,
    areNonPreserving :: Maybe Int
areNonPreserving = Maybe Int
forall a. Maybe a
Nothing
    },
  arrowDensityConstraints :: ArrowDensityConstraints
arrowDensityConstraints = ArrowDensityConstraints {
    incomingArrowsPerTransition :: (Int, Maybe Int)
incomingArrowsPerTransition = (Int
1, Int -> Maybe Int
forall a. a -> Maybe a
Just Int
2),
    outgoingArrowsPerTransition :: (Int, Maybe Int)
outgoingArrowsPerTransition = (Int
1, Int -> Maybe Int
forall a. a -> Maybe a
Just Int
2),
    incomingArrowsPerPlace :: (Int, Maybe Int)
incomingArrowsPerPlace = (Int
1, Int -> Maybe Int
forall a. a -> Maybe a
Just Int
3),
    outgoingArrowsPerPlace :: (Int, Maybe Int)
outgoingArrowsPerPlace = (Int
1, Int -> Maybe Int
forall a. a -> Maybe a
Just Int
2),
    totalArrowsFromPlacesToTransitions :: (Int, Maybe Int)
totalArrowsFromPlacesToTransitions = (Int
9, Int -> Maybe Int
forall a. a -> Maybe a
Just Int
10),
    totalArrowsFromTransitionsToPlaces :: (Int, Maybe Int)
totalArrowsFromTransitionsToPlaces = (Int
10, Int -> Maybe Int
forall a. a -> Maybe a
Just Int
14)
    },
  maxPrintedSolutions :: Int
maxPrintedSolutions = Int
10,
  rejectLongerThan :: Maybe Int
rejectLongerThan = Int -> Maybe Int
forall a. a -> Maybe a
Just Int
14,
  showLengthHint :: Bool
showLengthHint = Bool
False,
  showMinLengthHint :: Bool
showMinLengthHint = Bool
True,
  showPlaceNamesInNet :: Bool
showPlaceNamesInNet = Bool
False,
  fusableTransitionsConsumingAreExactly :: Maybe Int
fusableTransitionsConsumingAreExactly  = Int -> Maybe Int
forall a. a -> Maybe a
Just Int
2,
  fusableTransitionsProducingAreExactly :: Maybe Int
fusableTransitionsProducingAreExactly  = Int -> Maybe Int
forall a. a -> Maybe a
Just Int
2,
  filterConfig :: FilterConfig
filterConfig = FilterConfig {
    rejectGroupedRepeats :: Bool
rejectGroupedRepeats = Bool
True,
    repetitiveSubsequenceThreshold :: Maybe Int
repetitiveSubsequenceThreshold = Int -> Maybe Int
forall a. a -> Maybe a
Just Int
4,
    spaceballsPrefixThreshold :: Maybe Int
spaceballsPrefixThreshold = Int -> Maybe Int
forall a. a -> Maybe a
Just Int
4,
    forbiddenCycleLengths :: [Int]
forbiddenCycleLengths = [],
    requireCycleLengthsAny :: [Int]
requireCycleLengthsAny = [],
    solutionSetLimit :: Maybe Int
solutionSetLimit = Int -> Maybe Int
forall a. a -> Maybe a
Just Int
15,
    requireSolutionsArePermutations :: Bool
requireSolutionsArePermutations = Bool
False,
    absentTransitionsRequirement :: Int
absentTransitionsRequirement = Int
1,
    transitionCoverageRequirement :: Ratio Int
transitionCoverageRequirement = Int
3 Int -> Int -> Ratio Int
forall a. Integral a => a -> a -> Ratio a
% Int
4
    }
  }

{-|
points: 0.1
the amount of generated instances: 100
maximum concurrent amount of tasks: 100
average generation time per instance on the cluster (without considering concurrency): 1:50:11h
total run time on the cluster (not including queuing time): 11:23:03h
average CPU usage: 98.60%
average memory usage: 371.97 MB
-}
task2025_59 :: DeadlockConfig
task2025_59 :: DeadlockConfig
task2025_59 = DeadlockConfig
task2025_30