# Tag Info

Accepted

### A sum with a product-penalty

One way is to replace the product part with its log. So if $z=\prod_i (1-x_i(1-b_i))$, this can be substituted with $\sum_i \log(1-x_i(1-b_i))$ or simply $\sum_i x_i \cdot \log b_i$. This 2nd ...
Accepted

### Optimal to-do list scheduling in Python using Pyomo

In addition to the below code for m in model.Tasks: model.column_constraint.add(sum( model.x[n,m] * 0.25 for n in model.Intervals ) <= durations[m]) If you ...

1 vote

### Need help with integer programming exercise

Given the system you presented $X = \{ x \in \{0, 1\}^4 : 97 x_1 + 32 x_2 + 25 x_3 + 20 x_4 \leqslant 139 \}$ (1) We have that, if $x_1 = 1$, then $x_2 + x_3 + x_4 \leqslant 1$, since any solution ...
1 vote

### Knapsack Problem with Multiple Properties

First, let $x_i=1$ if the $i$th example is picked, where $i \in \{1, 2, …, N\}$, and $x_i=0$ otherwise. If you want to maximize the sum of ALL the elements, simply a knapsack problem with non-varying ...
1 vote
Accepted

### How to Set Up an Optimization Problem Like the 0/1 Knapsack

You can certainly model this as a binary integer program. The constraints are very straightforward, and either filling the maximum number of fields or (equivalently) maximizing the number of words ...

Only top scored, non community-wiki answers of a minimum length are eligible