[Haskell-beginners] haskell scheduling

aditya siram aditya.siram at gmail.com
Tue Sep 21 10:52:59 EDT 2010


Not sure if this is what you're looking for but it sounds like you
need some kind of zip :
zip [0..] [Just (T4 3 1 3 1), Just (T2 5 1), Nothing]
=> [(0,Just (T4 3 1 3 1)),(1,Just (T2 5 1)),(2,Nothing)]

-deech


On Thu, Sep 16, 2010 at 7:08 PM, Nowshad <imnowshad at gmail.com> wrote:
> Hi
> Hope that You are doing fine. I am stuck at this problem if you have any
> idea kindly help me out.
> I want to output the schedule for a given task and method for one hyper
> period....like (o, just (T4 3 1 3 1), (1, Just (T2 5 1 51) etc
>
> Regards
> Nowshad
> data Task = T4 Phase Period Execution Deadline
>   | T2 Period Execution
>     deriving (Show ,Eq)
> type Phase     = TimeUnit
> type Period    = TimeUnit
> type Execution = TimeUnit
> type Deadline  = TimeUnit
> type TimeUnit  = Int
> data Method = RM
>     | DM
>     | EDF
>       deriving (Show , Eq)
>  periodicSchedule :: Method -> [Task] -> [(TimeUnit, Maybe Task)]
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>
>


More information about the Beginners mailing list