optStackPerState ::
  (UV.Unbox a,
   Arith.Sum a,
   Sweep.SweepClass sweep UV.Vector a,
   Ord node,
   Show node,
   Arith.Sum (sweep UV.Vector a),
   Arith.Constant a,
   Sweep.SweepClass 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.OptStackPerState sweep UV.Vector a
optStackPerState params balanceForcing =
  Map.map
  $ Map.map
  $ DoubleSweep.objectiveValue (balForcing balanceForcing params)
optStackPerState ::
  (UV.Unbox a,
   Arith.Sum a,
   Sweep.SweepClass sweep UV.Vector a,
   Ord node,
   Show node,
   Arith.Sum (sweep UV.Vector a),
   Arith.Constant a,
   Sweep.SweepClass 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.OptStackPerState sweep UV.Vector a
optStackPerState params balanceForcing =
  Map.map
  $ Map.map
  $ DoubleSweep.objectiveValue (balForcing balanceForcing params)
optStackPerState params balanceForcing =
  Map.map
  $ Map.map
  $ DoubleSweep.objectiveValue (balForcing balanceForcing params)