Make sure you have the newer version of the Solo rules (Version1.5).
Melee can be ordered by the card directly (see page 25). The example card says "Enter Melee or overun if..."
Also see 6.1.3 Executing Victory Objectives, the example on on page 25 "Firing or Melee would work but which one would be the best choice. If for instance the (PU) Weapons Team has a Fired marker on it then maybe a Melee would be the best choice. If it has not completed
an action then Firing by the AEO may be more appropriate as the Weapons Team Opportunity Fire may destroy the AEO."
Section 7.5 tells the AEO to use SWs if ordered to melee.
The Banzai National Ability behavior flow charts can lead to melee.
Move Action Offensive flow chart can lead to melee.
There is a lot of "what is best for the AEO" that can get you there, but it is more of a judgement call relating to the condition, abilities and status of the Target PU and the attacking AEO.
Hope this helps. V/R Kevin