In my line of work, I have encountered the following variant of discrete knapsack and I was wondering if it has already been studied.E.g. We are given a set of 3 items (A,B,C). The goal is to maximize the value carried for a given weight constraint. The variant has the following additional constraints:Step 1: The first item choice is always A.If the finite set with A's weights is $W_A = \{ 3.4 ,10, 12.5   \}$, we pick e.g the value $w=12.5$ once.The choice $w$ of A's weight affects (deterministically) theweights and values of B and C. I.e. the weigt set $W_B = f(w)$ and the value set $V_B =   g(w) $. Same for $W_C, V_C$.Step 2: We want to maximize the value (for a given total weight) byadding items B and C in the knapsack.Has this been studied before? Is solving it equivalent to performing knapsack once per weight choice in set $W_A$ ? (i.e. 3 times in the example above) UPDATED with more formal definition:Assume $n$ finite sets $A_1,A_2,...,A_n$Assume you are allowed a single choice $a_i$ from each set, i.e. $a_1 \in A_1, ... , a_n \in A_n$Assume the weight $w$ to be a function of all choices i.e. $w=f(a_1,...,a_n)$Assume the value $v$ to be a function of all choices i.e. $v=g(a_1,...,a_n)$ Assume a maximum weight capacity $W_c$Goal:Find choices $(a_1,...,a_n)$ that maximize value $v=g(a_1,...,a_n)$, while $w=f(a_1,...,a_n) \le W_c$  
Knapsack variant
knapsack problems
This is a generic nonlinear optimization problem.  Without further information about $f,g$, there's not much you can say about this.  If you have absolutely no knowledge about $f,g$, the best strategy you can do is just exhaustively try all possible choices.Of course in practice it's likely that $f,g$ will have some structure, and then there might be techniques or heuristics that have the potential to perform better -- but the techniques will depend on the kind of structure they have.