Download
language Essence 1.3

letting items be enum {a,b,c,d,e}
letting capacity be 100

letting values be function
    ( a --> 10
    , b --> 20
    , c --> 40
    , d --> 40
    , e --> 50
    )

letting weights be function
    ( a --> 15
    , b --> 25
    , c --> 45
    , d --> 50
    , e --> 60
    )