Skip to content

Commit

Permalink
Free initial or final values
Browse files Browse the repository at this point in the history
  • Loading branch information
APMonitor authored Jul 27, 2020
1 parent 8094d53 commit ad8f8a4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gekko/gekko.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,9 +383,7 @@ def free(self,var, pos=None):
var = variable to free (calculate)
pos = position within the horizon or None for all
The var variable must be a Gekko Parameter or Variable. When val==None,
the current default value is retained. When pos==None, the value is fixed
over all horizon nodes.
The var variable must be a Gekko Parameter or Variable.
'''
self.Connection(var,var2='calculated',pos1=pos)

Expand All @@ -399,7 +397,9 @@ def free_initial(self,var):
The var variable must be a Gekko Parameter or Variable.
Variables have fixed initial conditions by default.
Variables have fixed initial conditions by default. The default to free
the initial condition is also available when declaring the variable as
x = m.Var(fixed_initial=False)
'''
self.Connection(var,var2='calculated',pos1=1,node1=1)

Expand Down

0 comments on commit ad8f8a4

Please sign in to comment.