Exemple #1
0
void Association::writeXml(QXmlStreamWriter& writer) const {
    writer.writeStartElement("Association");

    writer.writeAttribute("id", uniqueId());
    writer.writeAttribute("source", source()->uniqueId());
    writer.writeAttribute("target", target()->uniqueId());
    writer.writeAttribute("aggregation", toString(aggregation()));

    writer.writeEndElement();
}
Exemple #2
0
void Specie::aggregateIt(std::list<Reaction>& allReactions,Specie specie,
                     float aggRate,float aggPower){
    if (m_hydrophobicity >aggPower){
        Reaction aggregation(m_id,1,specie.m_id,0,aggRate);
        allReactions.push_back(aggregation);
    }
//     if (aggPower==0){
//         if (m_hydrophobicity >=0.8){
//             Reaction aggregation(m_id,1,specie.m_id,0,aggRate);
//             allReactions.push_back(aggregation);
//         }
//     }
//     else{
//         Reaction aggregation(m_id,1,specie.m_id,0,
//                          aggRate*pow(m_hydrophobicity,aggPower)*m_length);
//         allReactions.push_back(aggregation);
//     }
}