[R] Binary decision problem

Tolga Uzuner tolga.uzuner at gmail.com
Fri Jun 22 00:41:44 CEST 2007

Dear R Users,

I am trying to use LP_SOLVE and would appreciate any assistance with
the following problem:
- I am trying to choose a fixed number of items out of a batch of
items: say 100 out of 800
- items have certain characteristics, say characteric A, B and C
- I want to maximise the sum of A across all 100 items I choose while
ensuring that the sum of B and C across the items do not exceed
certain constraints

How exactly do I set this up in lp_solve ? If I associate a boolean, 0
or 1, with each item, I can constrain the sum of the boolean to be
equal to 100. But how do I then further specify the other constraints
(on the sum of B and the sum of C) and the objective function (to
maximise the sum of A) ?


More information about the R-help mailing list