Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Louis BECQUEY
/
biorseo
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Network
Create a new issue
Builds
Commits
Authored by
Louis BECQUEY
2019-03-11 09:47:02 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d832791e9ef9644b532e19f643600e39ef06e961
d832791e
1 parent
2c032d9e
Condition to forbid pseudoknots (just to compare to RNAMoIP)
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
34 deletions
cppsrc/MOIP.cpp
cppsrc/MOIP.cpp
View file @
d832791
...
...
@@ -318,40 +318,6 @@ void MOIP::define_problem_constraints(void)
}
// forbid lonely basepairs
if
(
verbose_
)
cout
<<
"
\t
>forbidding lonely basepairs..."
<<
endl
;
// for (u = 0; u < n; u++) {
// IloExpr c2(env_); // for the case where s[u] is paired to s[v], v>u
// count = 0;
// for (v = u; v < n; v++)
// if (allowed_basepair(u - 1, v)) c2 += y(u - 1, v);
// for (v = u + 1; v < n; v++)
// if (allowed_basepair(u, v)) {
// c2 -= y(u, v);
// count++;
// }
// for (v = u + 2; v < n; v++)
// if (allowed_basepair(u + 1, v)) c2 += y(u + 1, v);
// if (count) {
// model_.add(c2 >= 0);
// if (verbose_) cout << "\t\t" << (c2 >= 0) << endl;
// }
// }
// for (v = 2; v < n; v++) {
// IloExpr c2p(env_); // for the case where s[u] is paired to s[v], v<u
// count = 0;
// for (u = 0; u <= v - 2; u++)
// if (allowed_basepair(u, v - 1)) c2p += y(u, v - 1);
// for (u = 0; u <= v - 1; u++)
// if (allowed_basepair(u, v)) {
// c2p -= y(u, v);
// count++;
// }
// for (u = 0; u <= v; u++)
// if (allowed_basepair(u, v + 1)) c2p += y(u, v + 1);
// if (count) {
// model_.add(c2p >= 0);
// if (verbose_) cout << "\t\t" << (c2p >= 0) << endl;
// }
// }
for
(
u
=
0
;
u
<
n
-
5
;
u
++
)
for
(
v
=
u
+
4
;
v
<
n
;
v
++
)
{
if
(
allowed_basepair
(
u
,
v
))
{
...
...
@@ -423,6 +389,20 @@ void MOIP::define_problem_constraints(void)
model_
.
add
(
c5
==
jm1
*
C
(
i
,
0
));
if
(
verbose_
)
cout
<<
"
\t\t
>motif "
<<
i
<<
" : "
<<
(
c5
==
jm1
*
C
(
i
,
0
))
<<
endl
;
}
// Forbid pseudoknots
if
(
verbose_
)
cout
<<
"
\t
>forbidding pseudoknots..."
<<
endl
;
for
(
size_t
u
=
0
;
u
<
n
-
6
;
u
++
)
for
(
size_t
v
=
u
+
4
;
v
<
n
-
1
;
v
++
)
if
(
allowed_basepair
(
u
,
v
))
for
(
size_t
k
=
u
+
1
;
k
<
v
;
++
k
)
for
(
size_t
l
=
v
+
1
;
l
<
n
;
++
l
)
if
(
allowed_basepair
(
k
,
l
))
{
IloExpr
c
(
env_
);
c
+=
y
(
u
,
v
);
c
+=
y
(
k
,
l
);
model_
.
add
(
c
<=
1
);
if
(
verbose_
)
cout
<<
"
\t\t
"
<<
(
c
<=
1
)
<<
endl
;
}
}
void
MOIP
::
search_between
(
double
lambdaMin
,
double
lambdaMax
)
...
...
Please
register
or
login
to post a comment