Skip to content

Commit e92ccdd

Browse files
committed
change line breaks
1 parent 17bd02d commit e92ccdd

File tree

1 file changed

+34
-20
lines changed

1 file changed

+34
-20
lines changed

src/math/lp/dioph_eq.cpp

+34-20
Original file line numberDiff line numberDiff line change
@@ -1718,26 +1718,40 @@ namespace lp {
17181718
// returns true only on a conflict
17191719
bool tighten_bound_kind(const mpq& g, unsigned j, const mpq& rs, const mpq& rs_g, bool upper) {
17201720
/*
1721-
Variable j corresponds to term t = lra.get_term(j).
1722-
At this point we substituted some variables of t with the equivalent terms in S and the equivalent expressions containing fresh variables: t = sum{a_i * x_i: i in K} + sum{b_i * x_i: i in P }, where P and K are disjoint sets, a_i % g = 0 for each i in K, and x_i is a fixed variable for each i in P.
1723-
In the notations of the program:
1724-
m_espace corresponds to sum{a_i * x_i: i in K},
1725-
m_c is the value of sum{b_i * x_i: i in P},
1726-
open_ml(m_lspace) gives sum{a_i*x_i: i in K} + {b_i * x_i: i in P}.
1727-
We can rewrite t = g*t_ + m_c, where t_ = sum{(a_i/g)*x_i: i in K}.
1728-
Let us suppose that upper is true and rs is an upper bound of variable j, or t = g*t_ + m_c <= rs.
1729-
Parameter rs_g is defined as (rs - m_c) % g. Notice that rs_g does not change when m_c changes by a multiple of g. We also know that rs_g > 0. For some integer k we have rs - m_c = k*g + rs_g.
1730-
Starting with g*t_ + m_c <= rs, we proceed to g*t_ <= rs - m_c = k*g + rs_g. We can discard rs_g on the right: g*t_ <= k*g = rs - m_c - rs_g. Adding m_c to both sides gives us g*t_ + m_c <= rs - rs_g, or t <= rs - rs_g.
1731-
1732-
In case of a lower bound we have
1733-
t = g*t_+ m_c >= rs
1734-
Then g*t_ >= rs - m_c = k*g + rs_g => g*t_ >= k*g + g.
1735-
Adding m_c to both sides gets us
1736-
g*t_ + m_c >= k*g + g + m_c = rs - m_c - rs_g + g + m_c = rs + (g - rs_g).
1737-
1738-
Each fixed variable i in P such that b_i is divisible by g can be moved from P to K.
1739-
Then we apply all arguments above, and get the same result, since m_c changes by a multiple of g.
1740-
*/
1721+
Variable j corresponds to term t = lra.get_term(j).
1722+
At this point we substituted some variables of t with the equivalent terms
1723+
in S and the equivalent expressions containing fresh variables:
1724+
t = sum{a_i * x_i: i in K} + sum{b_i * x_i: i in P }, where P and K are
1725+
disjoint sets, a_i % g = 0 for each i in K, and x_i is a fixed variable
1726+
for each i in P.
1727+
1728+
In the notations of the program:
1729+
m_espace corresponds to sum{a_i * x_i: i in K},
1730+
m_c is the value of sum{b_i * x_i: i in P},
1731+
open_ml(m_lspace) gives sum{a_i*x_i: i in K} + sum{b_i * x_i: i in P}.
1732+
1733+
We can rewrite t = g*t_ + m_c, where t_ = sum{(a_i/g)*x_i: i in K}.
1734+
Let us suppose that upper is true and rs is an upper bound of variable j,
1735+
or t = g*t_ + m_c <= rs.
1736+
1737+
Parameter rs_g is defined as (rs - m_c) % g. Notice that rs_g does not change
1738+
when m_c changes by a multiple of g. We also know that rs_g > 0.
1739+
For some integer k we have rs - m_c = k*g + rs_g.
1740+
1741+
Starting with g*t_ + m_c <= rs, we proceed to g*t_ <= rs - m_c = k*g + rs_g.
1742+
We can discard rs_g on the right: g*t_ <= k*g = rs - m_c - rs_g.
1743+
Adding m_c to both sides gives us g*t_ + m_c <= rs - rs_g, or t <= rs - rs_g.
1744+
1745+
In case of a lower bound we have
1746+
t = g*t_+ m_c >= rs
1747+
Then g*t_ >= rs - m_c = k*g + rs_g => g*t_ >= k*g + g.
1748+
Adding m_c to both sides gets us
1749+
g*t_ + m_c >= k*g + g + m_c = rs - m_c - rs_g + g + m_c = rs + (g - rs_g).
1750+
1751+
Each fixed variable i in P such that b_i is divisible by g can be moved from P to K.
1752+
Then we apply all arguments above, and get the same result, since m_c changes
1753+
by a multiple of g.
1754+
*/
17411755

17421756

17431757
mpq bound = upper ? rs - rs_g : rs + g - rs_g;

0 commit comments

Comments
 (0)