// ----------------------------------------------------------------------
 GroupElement*
 CreateEstimatedEdgesTask::
 group( shawn::SimulationController& sc )
    throw( std::runtime_error )
 {
    std::string n = sc.environment().optional_string_param("group","");
    if( n.empty() ) 
       return NULL;
    ElementHandle eh = 
        visualization_w().element_w( n );
    if( eh.is_null() )
       throw std::runtime_error(std::string("no such group: ")+n);
    GroupElement* ge = dynamic_cast<GroupElement*>(eh.get());
    if( ge == NULL )
       throw std::runtime_error(std::string("element is no group: ")+n);
    return ge;
 }