-- |

module Modelling.PetriNet.PetriReach.Instance where

import qualified Data.Map                         as M (fromList)
import qualified Data.Set                         as S (fromList)

import Modelling.PetriNet.Reach.Reach   (ReachInstance (..), NetGoal(..))
import Modelling.PetriNet.Reach.Type    (Capacity (..), Net (..), State (..))
import Data.GraphViz                    (GraphvizCommand (Circo))

task5 :: ReachInstance String String
task5 :: ReachInstance String String
task5 = ReachInstance {
  netGoal :: NetGoal String String
netGoal = NetGoal {
    drawUsing :: GraphvizCommand
drawUsing = GraphvizCommand
Circo,
    goal :: State String
goal = State {
      unState :: Map String Int
unState = [(String, Int)] -> Map String Int
forall k a. Ord k => [(k, a)] -> Map k a
M.fromList
        [(String
"s1", Int
1), (String
"s2", Int
1), (String
"s3", Int
1), (String
"s4", Int
0), (String
"s5", Int
4), (String
"s6", Int
0)]
      },
    petriNet :: Net String String
petriNet = Net {
      places :: Set String
places = [String] -> Set String
forall a. Ord a => [a] -> Set a
S.fromList [String
"s1", String
"s2", String
"s3", String
"s4", String
"s5", String
"s6"],
      transitions :: Set String
transitions = [String] -> Set String
forall a. Ord a => [a] -> Set a
S.fromList [String
"t1", String
"t2", String
"t3", String
"t4", String
"t5", String
"t6"],
      connections :: [Connection String String]
connections = [
        ([String
"s1", String
"s5"], String
"t1", [String
"s6", String
"s2", String
"s1"]),
        ([String
"s3", String
"s1"], String
"t2", [String
"s5", String
"s6"]),
        ([String
"s4", String
"s5"], String
"t3", [String
"s3", String
"s5"]),
        ([String
"s6", String
"s4"], String
"t4", [String
"s5", String
"s4"]),
        ([String
"s2", String
"s5"], String
"t5", [String
"s4", String
"s2", String
"s1"]),
        ([String
"s2", String
"s3"], String
"t6", [String
"s2", String
"s3"])
       ],
      capacity :: Capacity String
capacity = Capacity String
forall s. Capacity s
Unbounded,
      start :: State String
start = State {
        unState :: Map String Int
unState = [(String, Int)] -> Map String Int
forall k a. Ord k => [(k, a)] -> Map k a
M.fromList [
          (String
"s1", Int
1),
          (String
"s2", Int
1),
          (String
"s3", Int
1),
          (String
"s4", Int
0),
          (String
"s5", Int
1),
          (String
"s6", Int
0)
         ]
        }
      }
    },
  minLength :: Int
minLength = Int
12,
  noLongerThan :: Maybe Int
noLongerThan = Maybe Int
forall a. Maybe a
Nothing,
  showGoalNet :: Bool
showGoalNet = Bool
True,
  showPlaceNames :: Bool
showPlaceNames = Bool
False,
  showSolution :: Bool
showSolution = Bool
True,
  withLengthHint :: Maybe Int
withLengthHint = Int -> Maybe Int
forall a. a -> Maybe a
Just Int
12,
  withMinLengthHint :: Bool
withMinLengthHint = Bool
True
  }