-
- if (!this_one.satisfies_constraints_b_)
- {
- /*
- If it doesn't satisfy constraints, we make this one
- really unattractive.
-
- add 20000 to the demerits, so that a break penalty
- of -10000 won't change the result */
- demerit = (demerit + 20000) >? 2000;
-
- demerit *= 10;
- }
-
- return demerit;
+
+ if (!this_one.satisfies_constraints_)
+ {
+ /*
+ If it doesn't satisfy constraints, we make this one
+ really unattractive.
+
+ add 20000 to the demerits, so that a break penalty
+ of -10000 won't change the result */
+ demerit = max ((demerit + 20000), 2000.0);
+
+ demerit *= 10;
+ }
+
+ return demerit;