Skip to content

Commit

Permalink
refer to the edit macro
Browse files Browse the repository at this point in the history
  • Loading branch information
exaexa committed Sep 20, 2024
1 parent 2bcfa16 commit d9974cd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/src/examples/02d-constraint-modifications.jl
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ fermentation_constraint = C.Constraint(total_fermentation, (10.0, 1000.0))

fermenting_ct = ct * :fermentation^fermentation_constraint

#md # !!! tip "What if I need more complicated changes?"
#md # Almost all analysis functions have an associated constraint-building function that internally builds the constraint system, for example the [`parsimonious_flux_balance_analysis`](@ref) is implemented with [`parsimonious_flux_balance_constraints`](@ref), which can be used just as [`flux_balance_constraints`](@ref) here. Additionally, to reach various custom goals, it is recommended to re-use and modify the source of the functions -- use the macro [`@edit`](https://docs.julialang.org/en/v1/stdlib/InteractiveUtils/#InteractiveUtils.@edit), such as `@edit parsimonious_flux_balance_constraints`, to get a working source code that serves well as a base for implementing new constraint systems.

# Constraint trees can be "solved", simply by choosing the objective and sending
# them to the appropriate function. Here, [`optimized_values`](@ref) rewrites
# the constraints into a JuMP model, which is subsequently solved and the
Expand Down

0 comments on commit d9974cd

Please sign in to comment.