Last active
December 5, 2017 19:10
-
-
Save alexbiehl/1b77ee7483762f5759db108c7097aeeb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Policy = State -> State | |
type Demand = State -> State | |
type Observation = (Demand, State) | |
eval :: State -> Policies -> Demands -> [State] | |
eval = ... | |
observations :: State -> State -> [Observation] | |
observations = ... | |
s0 :: State | |
s0 = ... | |
policies :: Policies | |
policies = ... | |
simulate :: Demands -> [Observation] | |
simulate demands = | |
let | |
run state demandSample = | |
let | |
state_series = eval state policies demandSample | |
in zipWith observations state_series (tail state_series) | |
in concat (map (run s0) demands `using` parList rdeepseq) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment