numeric :: SequFlowGraph -> Envs MixedRecord Sc
numeric g =  res -- trace ("---------\n" ++ showAssigns ts1o ++ "\n------\n") res
  where envs0 = emptyEnv { recordNumber = SingleRecord rec0,
                           powerMap = power0num,
                           dtimeMap = dtimes0num,
                           xMap = x0num,
                           fetaMap = eta0num }

        envs1 = emptyEnv { recordNumber = SingleRecord rec1,
                           powerMap = power1num,
                           dpowerMap = dpower1num,
                           fetaMap = eta1num,
                           detaMap = deta1num,
                           xMap = x1num,
                           dxMap = dx1num,
                           dtimeMap = dtimes1num }

        (envs0', ts0) = makeAllEquations g [envs0]
        (envs1', ts1) = makeAllEquations g [envs1]

        ts0o = order ts0
        ts1o = order ts1
        difftseq = mkDiffEqTermEquations rec0 ts1o

        envs = envUnion [envs0', envs1']

        ts = toAbsEquations $ ts0o ++ ts1o ++ difftseq
        res = interpretFromScratch (recordNumber envs) 1 (map (eqToInTerm envs) ts)
numeric :: SequFlowGraph -> Envs MixedRecord Sc
numeric g =  res -- trace ("---------\n" ++ showAssigns ts1o ++ "\n------\n") res
  where envs0 = emptyEnv { recordNumber = SingleRecord rec0,
                           powerMap = power0num,
                           dtimeMap = dtimes0num,
                           xMap = x0num,
                           fetaMap = eta0num }

        envs1 = emptyEnv { recordNumber = SingleRecord rec1,
                           powerMap = power1num,
                           dpowerMap = dpower1num,
                           fetaMap = eta1num,
                           detaMap = deta1num,
                           xMap = x1num,
                           dxMap = dx1num,
                           dtimeMap = dtimes1num }

        (envs0', ts0) = makeAllEquations g [envs0]
        (envs1', ts1) = makeAllEquations g [envs1]

        ts0o = order ts0
        ts1o = order ts1
        difftseq = mkDiffEqTermEquations rec0 ts1o

        envs = envUnion [envs0', envs1']

        ts = toAbsEquations $ ts0o ++ ts1o ++ difftseq
        res = interpretFromScratch (recordNumber envs) 1 (map (eqToInTerm envs) ts)
numeric g =  res -- trace ("---------\n" ++ showAssigns ts1o ++ "\n------\n") res
  where envs0 = emptyEnv { recordNumber = SingleRecord rec0,
                           powerMap = power0num,
                           dtimeMap = dtimes0num,
                           xMap = x0num,
                           fetaMap = eta0num }

        envs1 = emptyEnv { recordNumber = SingleRecord rec1,
                           powerMap = power1num,
                           dpowerMap = dpower1num,
                           fetaMap = eta1num,
                           detaMap = deta1num,
                           xMap = x1num,
                           dxMap = dx1num,
                           dtimeMap = dtimes1num }

        (envs0', ts0) = makeAllEquations g [envs0]
        (envs1', ts1) = makeAllEquations g [envs1]

        ts0o = order ts0
        ts1o = order ts1
        difftseq = mkDiffEqTermEquations rec0 ts1o

        envs = envUnion [envs0', envs1']

        ts = toAbsEquations $ ts0o ++ ts1o ++ difftseq
        res = interpretFromScratch (recordNumber envs) 1 (map (eqToInTerm envs) ts)