main :: IO ()
main = do
    args <- getArgs
    qdiscChoice <- case args of
        "unbounded" : _ -> putStrLn "Using unbounded QDisc" >> return Unbounded
        "one_place" : _ -> putStrLn "Using one-place QDisc" >> return OnePlace
        _               -> putStrLn "Using fair QDisc" >> return Fair
    duration :: Int <- case args of
        _ : n : _ -> case reads n of
            [(n', "")] -> return n'
        _ -> return 10
    qdisc <- makeQDisc qdiscChoice
    --let scenario = typicalScenario (1000, 25) [800, 900, 1000, 1100, 1200]
    let scenario = unfairScenario
    results <- simulate $ simpleSimulationParameters qdisc (fromIntegral duration) scenario
    putStrLn ""
    print results
main :: IO ()
main = do
    args <- getArgs
    qdiscChoice <- case args of
        "unbounded" : _ -> putStrLn "Using unbounded QDisc" >> return Unbounded
        "one_place" : _ -> putStrLn "Using one-place QDisc" >> return OnePlace
        _               -> putStrLn "Using fair QDisc" >> return Fair
    duration :: Int <- case args of
        _ : n : _ -> case reads n of
            [(n', "")] -> return n'
        _ -> return 10
    qdisc <- makeQDisc qdiscChoice
    --let scenario = typicalScenario (1000, 25) [800, 900, 1000, 1100, 1200]
    let scenario = unfairScenario
    results <- simulate $ simpleSimulationParameters qdisc (fromIntegral duration) scenario
    putStrLn ""
    print results
main = do
    args <- getArgs
    qdiscChoice <- case args of
        "unbounded" : _ -> putStrLn "Using unbounded QDisc" >> return Unbounded
        "one_place" : _ -> putStrLn "Using one-place QDisc" >> return OnePlace
        _               -> putStrLn "Using fair QDisc" >> return Fair
    duration :: Int <- case args of
        _ : n : _ -> case reads n of
            [(n', "")] -> return n'
        _ -> return 10
    qdisc <- makeQDisc qdiscChoice
    --let scenario = typicalScenario (1000, 25) [800, 900, 1000, 1100, 1200]
    let scenario = unfairScenario
    results <- simulate $ simpleSimulationParameters qdisc (fromIntegral duration) scenario
    putStrLn ""
    print results