def c1_w
import unified-nsga-iii@0.2.2.0/problems.bend as Problemsimport Base
584# Last objective / 0.6, earlier objectives / 0.5. fuel starts at |f|.
585def c1_w(fuel: Nat, fs: List<&2, F32>, +acc: F32) -> F32:
586 match fuel:
587 case 0n:
588 acc
589 case 1n:
590 match fs:
591 case Nil{}:
592 acc
593 case +h <> rest:
594 F32.add(acc, F32.div(h, 0.6))
595 case 1n+f:
596 match fs:
597 case Nil{}:
598 acc
599 case +h <> rest:
600 c1_w(f, rest, F32.add(acc, F32.div(h, 0.5)))