Solve the model by maximizing the given reaction.

        If reaction is a dictionary object, each entry is interpreted as a
        weight on the objective for that reaction (non-existent reaction will
        have zero weight).

def maximize(self, reaction):
        """Solve the model by maximizing the given reaction.

        If reaction is a dictionary object, each entry is interpreted as a
        weight on the objective for that reaction (non-existent reaction will
        have zero weight).
        """

        self._prob.set_objective(self.flux_expr(reaction))
        self._solve()