optimalObjectivePerState ::
  (Ord a, Arith.Constant a, Arith.Sum a, UV.Unbox a,RealFloat a,
   Show node, Node.C node, Monoid (sweep UV.Vector  Bool),
   Ord (sweep UV.Vector  a),
   Arith.Product (sweep UV.Vector  a),
   Sweep.SweepVector UV.Vector  Bool,
   Sweep.SweepClass sweep UV.Vector  Bool,
   Sweep.SweepMap sweep UV.Vector  a Bool,
   Sweep.SweepVector UV.Vector  a,
   Sweep.SweepClass sweep UV.Vector  a,
   Sweep.SweepMap sweep UV.Vector  a a) =>
  Params.Optimisation node list sweep UV.Vector a ->
  Balance.Forcing node a ->
  Map Idx.State (Map [a] (Type.SweepPerReq node sweep UV.Vector a)) ->
  Type.OptimalSolutionPerState node a
optimalObjectivePerState params balanceForcing =
  Map.map
  $ Map.map
  $ DoubleSweep.optimalSolutionState2 (balForcing balanceForcing params)
optimalObjectivePerState ::
  (Ord a, Arith.Constant a, Arith.Sum a, UV.Unbox a,RealFloat a,
   Show node, Node.C node, Monoid (sweep UV.Vector  Bool),
   Ord (sweep UV.Vector  a),
   Arith.Product (sweep UV.Vector  a),
   Sweep.SweepVector UV.Vector  Bool,
   Sweep.SweepClass sweep UV.Vector  Bool,
   Sweep.SweepMap sweep UV.Vector  a Bool,
   Sweep.SweepVector UV.Vector  a,
   Sweep.SweepClass sweep UV.Vector  a,
   Sweep.SweepMap sweep UV.Vector  a a) =>
  Params.Optimisation node list sweep UV.Vector a ->
  Balance.Forcing node a ->
  Map Idx.State (Map [a] (Type.SweepPerReq node sweep UV.Vector a)) ->
  Type.OptimalSolutionPerState node a
optimalObjectivePerState params balanceForcing =
  Map.map
  $ Map.map
  $ DoubleSweep.optimalSolutionState2 (balForcing balanceForcing params)
optimalObjectivePerState params balanceForcing =
  Map.map
  $ Map.map
  $ DoubleSweep.optimalSolutionState2 (balForcing balanceForcing params)