Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Lifeware
biocham
Commits
40a15283
Commit
40a15283
authored
Jul 09, 2018
by
SOLIMAN Sylvain
Browse files
better species ignore list for equilibration
parent
b99347a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
tropical.pl
View file @
40a15283
...
...
@@ -215,6 +215,11 @@ subst_deg_and_vars(A ^ N, Vars, Ai, NN * AA) :-
!,
subst_deg_and_vars
(
A
,
Vars
,
Ai
,
AA
).
subst_deg_and_vars
(
N
,
_Vars
,
_Ai
,
D
)
:-
number
(
N
),
!,
get_degree
(
N
,
D
).
subst_deg_and_vars
(
K
,
_Vars
,
_Ai
,
D
)
:-
degree
(
K
,
D
),
!.
...
...
@@ -425,7 +430,7 @@ ignore_unbalanced([H | T], [H | TT]) :-
:-
initial
(
option
(
tropical_epsilon
:
0.1
)).
:-
initial
(
option
(
tropical_max_degree
:
3
)).
:-
initial
(
option
(
tropical_
partial
:
0
)).
:-
initial
(
option
(
tropical_
ignore
:
{}
)).
:-
initial
(
option
(
tropical_denominator
:
0
)).
:-
biocham_silent
(
clear_model
).
...
...
@@ -456,12 +461,11 @@ tropicalize :-
'Max absolute value of the degree in epsilon as a power of 2'
),
option
(
tropical_
partial
,
number
,
tropical_
ignore
,
{
object
}
,
Partial
,
'Number of a variable (as displayed by \\command{list_molecules/0} plus 1)
to ignore for equilibration (0 to ignore none, -1 to ignore all
unbalanced)'
'set of species to ignore for equilibration ({} to ignore none, {-1} to
ignore all unbalanced)'
),
option
(
tropical_denominator
,
...
...
@@ -501,18 +505,26 @@ tropicalize :-
get_equilibrations
(
Vars
,
Ai
,
E
,
_DE
),
debug
(
tropical
,
"equilibrations: ~w"
,
[
E
]),
(
Partial
==
0
Partial
==
[{}]
->
Equils
=
E
;
Partial
==
-
1
Partial
==
[
-
1
]
->
ignore_unbalanced
(
E
,
Equils
),
write
(
E
),
nl
,
write
(
Equils
),
nl
;
format
(
"Ignoring equilibration for ~wth variable\n"
,
[
Partial
]),
nth1
(
Partial
,
E
,
_
,
Equils
)
format
(
"Ignoring equilibration for ~w\n"
,
[
Partial
]),
findall
(
Eq
,
(
nth0
(
N
,
E
,
Eq
),
nth0
(
N
,
Vars
,
V
),
\
+
member
(
V
,
Partial
)
),
Equils
)
),
debug
(
tropical
,
"equilibrations: ~w~n"
,
[
Equils
]),
equilibrate_rec
(
Equils
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment