diff --git a/src/stv/mod.rs b/src/stv/mod.rs index f2916aa..dc951c8 100644 --- a/src/stv/mod.rs +++ b/src/stv/mod.rs @@ -266,6 +266,10 @@ impl STVOptions { return Err(STVError::InvalidOptions("--subtract-nontransferable requires --transferable-only")); } } + if !self.immediate_elect && self.surplus_order != SurplusOrder::BySize { + // Invalid because there is no other metric to determine which surplus to distribute + return Err(STVError::InvalidOptions("--no-immediate-elect requires --surplus-order by_size")); + } if self.min_threshold != "0" && self.defer_surpluses { // TODO: NYI return Err(STVError::InvalidOptions("--min-threshold is incompatible with --defer-surpluses (not yet implemented)"));