 and the intermediate switching time $t_{int}=1/2$. We use the standard polynomial basis $p_j(t) = t^j$ in \eqref{eqn_sheep_position_unconstrained} and the degree of the polynomials is set to be $n=30$ for $i=1,\cdots,m$. To generate the target paths, we consider a total of $L=5$ random chosen intermediate points. We further set the parameter controlling the switching speed to $\gamma =20$. For this data, we solve \eqref{eq: time_varying_newton} by Euler integration with variable step size of maximum length $0.01s$. 

The resulting trajectories are illustrated in Figure \ref{fig_trajectory_switched_tracking} when we select the gain matrix  in \eqref{eq: time_varying_newton} to be $\mathbf{P}= 10\mathbf{I}_2$. A qualitative examination of this behavior shows that the agent --in red -- succeeds in tracking the first target up to time $t=0.5 s$ and switching to the second agent after $t=0.5 s$. The objective function considered in \eqref{eqn_unconstrained_objective_function} agrees with Assumption \ref{assumption: strong convexity} and therefore, the hypothesis of Lemma \ref{lem: Time_Varying_Newton} is satisfied. Consequently, exponential  convergence to the optimal solution is guaranteed as it can be observed in Figure \ref{fig_double_tracking_error}. Also, this convergence gets faster as the gain matrix $\mathbf{P}$ is increased.
\subsection{Constrained optimization}\label{sec_constrained_optimization}
\begin{figure}\centering
	\includegraphics[width=\linewidth]{double_tracking_gain50_tol0point05} 
	\caption{Trajectory of the agent --in red-- and the targets to track. It can be observed that the agents succeed in following both targets while keeping the distance between them as small as possible. The gain matrix is set to be $\mathbf{P}=50\mathbf{I}_2$.}
	\label{fig_double_tracking_gain50_tol0point05}\end{figure}
\begin{figure}
	\centering
	\begin{subfigure}[b]{\linewidth}
		\includegraphics[width=\textwidth]{double_tracking_gain50constraintnew}
		\caption{Time evolution of constraint functions $\|\textbf{x}_i(t)-\textbf{y}_i(t)\|_2-r_i^2$ for $i=1,2$.} \label{fig_two_agent_constraint}
	\end{subfigure}\par\vfill \bigskip
	\begin{subfigure}[b]{\linewidth}
		\includegraphics[width=\linewidth]{double_tracking_gain50errornew}
		\caption{Time evolution of $\left\| [\textbf{x}_1(t) - \textbf{x}_1^{\star}(x), \textbf{x}_2(t)-\textbf{x}_2^{\star}(t)]\right\|_2$ where $\textbf{x}_1^{\star}(t)$ and $\textbf{x}_2^{\star}(t)$ are the optimal trajectories.} \label{fig_two_agent_error}
	\end{subfigure}\bigskip
	\caption{ Evolution of the constraint functions and the tracking error as a function of time. Both the constraint violation and the tracking error converges asymptotically to zero as per Theorem \ref{thm_main_theorem}.} \label{fig_two_agent_optimization}
\end{figure}

We consider two agents charged with the task of staying withing certain distance of two moving targets, while keeping their Euclidean distance as small as possible. Since the position of both agents are optimization variables, the objective function in this problem is not time varying. However, the constraints are. Denote by $\textbf{x}_i(t)$ the position vector of agent $i$ and denote by $\textbf{y}_j(t)$ as the position vector of target $j$. Then, the agents aim to solve the following problem
\begin{equation}\label{eqn_constrained_problem_tracking}
\begin{aligned}
&\min _{\textbf{x}_1 \in \mathbb{R}^2, \textbf{x}_2 \in \mathbb{R}^2} \| \textbf{x}_1 - \textbf{x}_2\|^2 \\
&\mbox{s.t} \, \| \textbf{x}_i - \textbf{y}_i(t)\|^2 - r_i^2 \leq 0 \quad \mbox{for} \quad i=1,2.
\end{aligned}
\end{equation}
The trajectories for the targets were computed by the same procedure as in Section \ref{sec_unconstrained_minimization}. The maximum allowable distance to the targets is set to be $r_i = 0.05 m$. The barrier parameter is chosen as $c(t) = e^{\gamma t}$ and the slack parameter as $s(t) = e^{-\alpha t}$ with $\gamma =6$ and $\alpha =10$. For this data, we solve the differential equation \eqref{eq: perturbed_time_varying_newton_barrier} by Euler integration scheme with variable step of maximum length $0.01s$.

In Figure \ref{fig_double_tracking_gain50_tol0point05} the resulting trajectories are depicted. Both agents succeed in following the corresponding target, while keeping their distance small. Figure \ref{fig_two_agent_constraint} illustrates the time evolution of the constraint functions. The value of both constraints converges to zero asymptotically as expected according to Theorem \ref{thm_main_theorem}. It is also expected that the solution of the dynamical system \eqref{eq: perturbed_time_varying_newton_barrier} converges to the optimal solution asymptotically. This convergence is depicted in Figure \ref{fig_two_agent_error}. 



\section{Conclusions}\label{se:conclusions}
In this paper, we developed an interior point framework for solving convex optimization problems with time varying objective function and/or time varying constraints. We used barrier penalty functions to relax the constraints and developed a prediction-correction Newton method for solving the corresponding time varying unconstrained problem. Under reasonable assumptions, asymptotic convergence to the optimal solution of the original problem was guaranteed. All time dependences were assumed to be continuous. Numerical examples regarding target tracking applications were considered to illustrate the performance of the developed methods. The numerical results were in accordance with the theoretical findings.
Minister, Monister, Pastor, Pastar, Pesto, Cap'n, Admiral, Popellini; I don't think it actually matters! Choose something that makes you giggle or something that makes you feel important. There is no dogma in Pastafarianism!
I see from the map* that Blasphemous Libel lives near me - but isn't registered here?
We all love you, Bart.
Great big granny hugs to you and your family.Q: iPhone WebApp Question I have this code-
/**
Save the web view as a screenshot.  Currently only supports saving to
the photo library.
/
- (void)saveScreenshot:(NSArray)arguments withDict:(NSDictionary*)options
{
    CGRect screenRect = [[UIScreen mainScreen] bounds];
    CGRect imageRect = CGRectMake(0, 0, CGRectGetWidth(screenRect),
CGRectGetHeight(screenRect));
UIGraphicsBeginImageContext(imageRect.size);
[webView.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
UIImageWriteToSavedPhotosAlbum(viewImage, self, nil, nil);

UIAlertView *alert= [[UIAlertView alloc] initWithTitle:nil

message:@"Image Saved" delegate:self cancelButtonTitle:@"OK"
otherButtonTitles:nil];
    [alert show];
    [alert release];
}
This is for saving whatever you drew in my app. How would I add the button for this in the HTML code. How do i call from it?

A: So you are trying to send an event from html to a UIWebView?
The easiest way is to use a private scheme.  In the html:
<a href="myscheme:save_picture">Take Picture</a>

In the UIWebView delegate:
-(BOOL) webView:(UIWebView *)inWeb shouldStartLoadWithRequest:(NSURLRequest *)inRequest navigationType:(UIWebViewNavigationType)inType {
    NSString    *string = [[[inRequest URL] absoluteString] lowercaseString];
    if ( [string isEqualToString:@"myscheme:save_picture"] ) {
        [self savePicture];
        return NO;
    }
    return YES;
}

You can look at PhoneGap for a more robust usage of this mechanism.
First Guaranty Bancshares, Inc. (NASDAQ:FGBI – Get Rating) – Equities