summaryrefslogtreecommitdiff
path: root/prolog/problems/clp_r/linear_opt_3/en.py
blob: 645a6c8cf6c3b4e3582264e3a09bbbc92e8607d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
id = 159
name = 'linear_opt/3'
slug = 'linear optimization'

description = '''\
<p>A set of points in the plane is defined by the inequalities</p>
<ul>
  <li>0 ≤ <code>X</code> ≤ 5,</li>
  <li><code>Y</code> ≥ 0,</li>
  <li><code>X</code> + <code>Y</code> ≤ 7,</li>
  <li><code>X</code> + 2*<code>Y</code> ≥ 4 and</li>
  <li><code>Y</code> ≤ <code>X</code> + 5.</li>
</ul>
<p>The predicate <code>linear_opt(X, Y, MaxE)</code> should return the point (<code>X</code>, <code>Y</code>) where the expression <code>E = -0.4*X + 3.2*Y</code> has the largest value.</p>'''

hint = {}