本文整理汇总了C++中vle::devs::ExternalEventList::back方法的典型用法代码示例。如果您正苦于以下问题:C++ ExternalEventList::back方法的具体用法?C++ ExternalEventList::back怎么用?C++ ExternalEventList::back使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vle::devs::ExternalEventList
的用法示例。
在下文中一共展示了ExternalEventList::back方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void out2(const vle::devs::Time& /* time */, vle::devs::ExternalEventList& output) const
{
output.emplace_back("g");
value::Map& map = output.back().addMap();
map.addString("name","g");
map.addDouble("value",0);
output.emplace_back("b");
value::Map& map2 = output.back().addMap();
map2.addString("name","b");
map2.addDouble("value",0);
}
示例2: map
void out1(const vle::devs::Time& /*time*/, vle::devs::ExternalEventList& output) const
{
output.emplace_back("g");
value::Map& map = output.back().addMap();
map.addString("name","g");
map.addDouble("value",10);
output.emplace_back("b");
value::Map& map2 = output.back().addMap();//TODO pas compris error qaund ion utilise la meme ref map (sur unique_ptr<Value>)
map2.addString("name","b");
map2.addDouble("value",10);
}
示例3: output
virtual void output(vle::devs::Time /*time*/,
vle::devs::ExternalEventList &output) const override
{
output.emplace_back("out");
output.back().addMap().addDouble("value",
static_cast<double>(m_neighborhood));
}
示例4: treat
void treat(const std::string& /*name*/, const ved::Activity& /*activity*/,
vd::ExternalEventList& output)
{
output.emplace_back("x");
value::Map& m = output.back().addMap();
m.addString("name","x");
m.addDouble("value",
plantlouse_population * (1-treatment_effect_on_plantlouse));
output.emplace_back("y");
value::Map& m2 = output.back().addMap();
m2.addString("name","y");
m2.addDouble("value",
ladybird_population * (1-treatment_effect_on_ladybird));
}
示例5: output
void output(vd::Time time, vd::ExternalEventList& output) const override
{
if (m_has_output_port) {
const double out_val = m_val + m_trend * time;
output.emplace_back(m_output_port_label);
output.back().addMap().addDouble("d_val", out_val);
}
}
示例6: output
virtual void output(vd::Time /*time*/,
vd::ExternalEventList &output) const override
{
if (m_has_output_port) {
output.emplace_back(m_output_port_label);
auto& m = output.back().addMap();
m.addDouble("up", m_upthreshold);
m.addDouble("down", m_downthreshold);
}
}
示例7: outputVar
/**
* @brief Output function that fills the value of state variables
* @param time, time of the output
* @param extEvtList, the list of external event
*/
void outputVar(const vd::Time& /*time*/,
vd::ExternalEventList& extEvtList) const
{
Variables::const_iterator itb = vars().begin();
Variables::const_iterator ite = vars().end();
for (; itb != ite; itb++) {
const Variable& v = *itb->second;
if (getModel().existOutputPort(itb->first)) {
extEvtList.emplace_back(itb->first);
value::Double& val = extEvtList.back().addDouble();
val = v.getVal();
}
}
}
示例8:
void out2(const vle::devs::Time& /*time*/ , vle::devs::ExternalEventList& output) const
{
output.emplace_back("c");
output.back().addDouble(0);
}
示例9: output
void output(vle::devs::Time /*time*/,
vle::devs::ExternalEventList& output) const override
{
output.emplace_back("a");
output.back().addDouble(a+3);
}