Revision 848b65c9 hbal.hs

b/hbal.hs
70 70
    , oMinScore
71 71
    , oMaxCpu
72 72
    , oMinDisk
73
    , oMinGain
74
    , oMinGainLim
73 75
    , oDiskMoves
74 76
    , oDynuFile
75 77
    , oExTags
......
91 93
             -> [MoveJob]        -- ^ Current command list
92 94
             -> Bool             -- ^ Whether to be silent
93 95
             -> Score            -- ^ Score at which to stop
96
             -> Score            -- ^ Min gain limit
97
             -> Score            -- ^ Min score gain
94 98
             -> Bool             -- ^ Enable evacuation mode
95 99
             -> IO (Cluster.Table, [MoveJob]) -- ^ The resulting table
96 100
                                              -- and commands
97 101
iterateDepth ini_tbl max_rounds disk_moves nmlen imlen
98
             cmd_strs oneline min_score evac_mode =
102
             cmd_strs oneline min_score mg_limit min_gain evac_mode =
99 103
    let Cluster.Table ini_nl ini_il _ _ = ini_tbl
100 104
        allowed_next = Cluster.doNextBalance ini_tbl max_rounds min_score
101 105
        m_fin_tbl = if allowed_next
102 106
                    then Cluster.tryBalance ini_tbl disk_moves evac_mode
107
                         mg_limit min_gain
103 108
                    else Nothing
104 109
    in
105 110
      case m_fin_tbl of
......
118 123
                       hFlush stdout
119 124
              iterateDepth fin_tbl max_rounds disk_moves
120 125
                           nmlen imlen upd_cmd_strs oneline min_score
121
                           evac_mode
126
                           mg_limit min_gain evac_mode
122 127
        Nothing -> return (ini_tbl, cmd_strs)
123 128

  
124 129
-- | Formats the solution for the oneline display
......
273 278

  
274 279
  (fin_tbl, cmd_strs) <- iterateDepth ini_tbl (optMaxLength opts)
275 280
                         (optDiskMoves opts)
276
                         nmlen imlen [] oneline min_cv (optEvacMode opts)
281
                         nmlen imlen [] oneline min_cv
282
                         (optMinGainLim opts) (optMinGain opts)
283
                         (optEvacMode opts)
277 284
  let (Cluster.Table fin_nl fin_il fin_cv fin_plc) = fin_tbl
278 285
      ord_plc = reverse fin_plc
279 286
      sol_msg = if null fin_plc

Also available in: Unified diff