## Refinement to Control LawsWhen a desired solution has been found to the discrete equivalent an
actual control law needs to be computed. The function Getting a control law
%s is a prepared simplex with de being a discrete equivalent of s %and findminsqinput is the objective function %Find the control law for exiting through facet 2 with ct=findctrl(s,de,2,@findminsqinput); %extract the control law constants k=ct.k; g=ct.g; ## Objective functionsTwo objective functions are supplied with the toolbox `findminsqinput()`Finds a control law for the discrete equivalent while minimising where is the control input at vertex . This effectivly minimises the input effort at any given point in time. Notice that this does **not**translate to min.
`findbesteffortinput(s,de,outfacet)`Finds the best effort input in the sense that it tries to maximise the flow in the direction of the desired exit facet while minimising the flow in the direction of the uncontrollable facets.
For details on how to create custom objective functions in the [reference.htm |