Option supporter

Option for supporting field players

State Machine

This browser can't display the SVG file svg/option_supporter.svg.



The Adobe SVG Viewer 3.0 can be downloaded from http://www.adobe.com/svg/viewer/install/main.html

State defender

If that state is active,
 >  This enumerated output symbol is set:
    strategy.role  = 
strategy.role.defender
 >  The option defender is executed.
 
The decision tree:
  This browser can't display the SVG file svg/option_supporter_state_defender.svg.



The Adobe SVG Viewer 3.0 can be downloaded from http://www.adobe.com/svg/viewer/install/main.html
 
Pseudo code of the decision tree:
 
/** */
if ( strategy.number_of_field_players() >= 4)
{
  
/** */
if (
(strategy.max_supporter_position_on_field.x() < robot_pose.x() )
&& 
(strategy.max_supporter_position_on_field.x() > -100000)
)
{
  
goto offensive_supporter;
}
else
{
  
/** */
if (
(strategy.min_supporter_position_on_field.x() > robot_pose.x() )
&& 
(strategy.min_supporter_position_on_field.x() < 100000)
)
{
  
goto defender;
}
else
{
  
goto defensive_supporter;
}
}
}
else
{
  
/** */
if ( strategy.number_of_field_players() == 3)
{
  
/** */
if (
(strategy.min_supporter_position_on_field.x() > robot_pose.x() )
&& 
(strategy.min_supporter_position_on_field.x() < 100000)
)
{
  
goto defender;
}
else
{
  
/** */
if ( ( ball.time_since_team_confirmed() < (ball.time_since_last_seen() - 1000) ? ball.team_position.field.x() : ball.position.field.x() ) > 0)
{
  
goto offensive_supporter;
}
else
{
  
goto defensive_supporter;
}
}
}
else
{
  
/** */
if ( true)
{
  
/** */
if (
(( ball.time_since_team_confirmed() < (ball.time_since_last_seen() - 1000) ? ball.team_position.field.x() : ball.position.field.x() ) < (field.own_ground_line.x() + 1800))
|| 
(
(ball.time_since_last_seen() > 5000)
&& 
(ball.time_since_team_confirmed() > 5000)
)
)
{
  
goto defender;
}
else
{
  
/** */
if ( ( ball.time_since_team_confirmed() < (ball.time_since_last_seen() - 1000) ? ball.team_position.field.x() : ball.position.field.x() ) > 0)
{
  
goto offensive_supporter;
}
else
{
  
goto defensive_supporter;
}
}
}
else
{
  
stay;
}
}
}

State defensive_supporter

If that state is active,
 >  This enumerated output symbol is set:
    strategy.role  = 
strategy.role.defensive_supporter
 >  The option defensive_supporter is executed.
 
The decision tree:
  This browser can't display the SVG file svg/option_supporter_state_defensive_supporter.svg.



The Adobe SVG Viewer 3.0 can be downloaded from http://www.adobe.com/svg/viewer/install/main.html
 
Pseudo code of the decision tree:
 
/** */
if ( strategy.number_of_field_players() >= 4)
{
  
/** */
if (
(strategy.max_supporter_position_on_field.x() < robot_pose.x() )
&& 
(strategy.max_supporter_position_on_field.x() > -100000)
)
{
  
goto offensive_supporter;
}
else
{
  
/** */
if (
(strategy.min_supporter_position_on_field.x() > robot_pose.x() )
&& 
(strategy.min_supporter_position_on_field.x() < 100000)
)
{
  
goto defender;
}
else
{
  
goto defensive_supporter;
}
}
}
else
{
  
/** */
if ( strategy.number_of_field_players() == 3)
{
  
/** */
if (
(strategy.min_supporter_position_on_field.x() > robot_pose.x() )
&& 
(strategy.min_supporter_position_on_field.x() < 100000)
)
{
  
goto defender;
}
else
{
  
/** */
if ( ( ball.time_since_team_confirmed() < (ball.time_since_last_seen() - 1000) ? ball.team_position.field.x() : ball.position.field.x() ) > 0)
{
  
goto offensive_supporter;
}
else
{
  
goto defensive_supporter;
}
}
}
else
{
  
/** */
if ( true)
{
  
/** */
if (
(( ball.time_since_team_confirmed() < (ball.time_since_last_seen() - 1000) ? ball.team_position.field.x() : ball.position.field.x() ) < (field.own_ground_line.x() + 1800))
|| 
(
(ball.time_since_last_seen() > 5000)
&& 
(ball.time_since_team_confirmed() > 5000)
)
)
{
  
goto defender;
}
else
{
  
/** */
if ( ( ball.time_since_team_confirmed() < (ball.time_since_last_seen() - 1000) ? ball.team_position.field.x() : ball.position.field.x() ) > 0)
{
  
goto offensive_supporter;
}
else
{
  
goto defensive_supporter;
}
}
}
else
{
  
stay;
}
}
}

State offensive_supporter

If that state is active,
 >  This enumerated output symbol is set:
    strategy.role  = 
strategy.role.offensive_supporter
 >  The option offensive_supporter is executed.
 
The decision tree:
  This browser can't display the SVG file svg/option_supporter_state_offensive_supporter.svg.



The Adobe SVG Viewer 3.0 can be downloaded from http://www.adobe.com/svg/viewer/install/main.html
 
Pseudo code of the decision tree:
 
/** */
if ( strategy.number_of_field_players() >= 4)
{
  
/** */
if (
(strategy.max_supporter_position_on_field.x() < robot_pose.x() )
&& 
(strategy.max_supporter_position_on_field.x() > -100000)
)
{
  
goto offensive_supporter;
}
else
{
  
/** */
if (
(strategy.min_supporter_position_on_field.x() > robot_pose.x() )
&& 
(strategy.min_supporter_position_on_field.x() < 100000)
)
{
  
goto defender;
}
else
{
  
goto defensive_supporter;
}
}
}
else
{
  
/** */
if ( strategy.number_of_field_players() == 3)
{
  
/** */
if (
(strategy.min_supporter_position_on_field.x() > robot_pose.x() )
&& 
(strategy.min_supporter_position_on_field.x() < 100000)
)
{
  
goto defender;
}
else
{
  
/** */
if ( ( ball.time_since_team_confirmed() < (ball.time_since_last_seen() - 1000) ? ball.team_position.field.x() : ball.position.field.x() ) > 0)
{
  
goto offensive_supporter;
}
else
{
  
goto defensive_supporter;
}
}
}
else
{
  
/** */
if ( true)
{
  
/** */
if (
(( ball.time_since_team_confirmed() < (ball.time_since_last_seen() - 1000) ? ball.team_position.field.x() : ball.position.field.x() ) < (field.own_ground_line.x() + 1800))
|| 
(
(ball.time_since_last_seen() > 5000)
&& 
(ball.time_since_team_confirmed() > 5000)
)
)
{
  
goto defender;
}
else
{
  
/** */
if ( ( ball.time_since_team_confirmed() < (ball.time_since_last_seen() - 1000) ? ball.team_position.field.x() : ball.position.field.x() ) > 0)
{
  
goto offensive_supporter;
}
else
{
  
goto defensive_supporter;
}
}
}
else
{
  
stay;
}
}
}