Research Article

Optimal Control Strategies Depending on Interest Level for the Spread of Rumor

Algorithm 1

(1) Suppose the transversality condition takes and give an initial guess for .
(2) Solve the system forward in time by using Runge-Kutta 4 method
with the initial conditions:
  or ,  ,
where .
(3) Solve the system backward in time by using Runge-Kutta 4 method
with the transverality conditions:
(4) Update by entering the new state and adjoint values into the characterization of the optimal control.
(5) Output the current value as a solution if value of a variable in this iteration and the last iteration
are negligibly close. Otherwise, return to Step .
,
where is the accepted tolerance.
(6) Calculate and check the values. If is negligibly close to 0, i.e. for tolerance ,
output the value of as solution. Otherwise, reassume the value of , not equal to the previous
value and then return to Step . However, after this step is repeated times, if is not
negligibly close to 0, i.e. for , update the new value of by using
the Secant method and return to Step . The Secant method is as follows:
,  where