本文整理汇总了C++中Objective::getId方法的典型用法代码示例。如果您正苦于以下问题:C++ Objective::getId方法的具体用法?C++ Objective::getId怎么用?C++ Objective::getId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Objective
的用法示例。
在下文中一共展示了Objective::getId方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: readSBMLFromFile
END_TEST
START_TEST (test_FbcExtension_read_L3V1V1_defaultNS)
{
char *filename = safe_strcat(TestDataDirectory, "fbc_example1_defaultNS.xml");
SBMLDocument *document = readSBMLFromFile(filename);
fail_unless(document->getPackageName() == "core");
Model *model = document->getModel();
fail_unless(model != NULL);
fail_unless(model->getPackageName() == "core");
fail_unless(document->getNumErrors() == 0);
// get the fbc plugin
FbcModelPlugin* mplugin = static_cast<FbcModelPlugin*>(model->getPlugin("fbc"));
fail_unless(mplugin != NULL);
fail_unless(mplugin->getNumObjectives() == 1);
fail_unless(mplugin->getListOfObjectives()->getPackageName() == "fbc");
Objective* objective = mplugin->getObjective(0);
fail_unless(objective->getId() == "obj1");
fail_unless(objective->getType() == "maximize");
fail_unless(objective->getNumFluxObjectives() == 1);
fail_unless(objective->getPackageName() == "fbc");
fail_unless(objective->getListOfFluxObjectives()->getPackageName() == "fbc");
FluxObjective* fluxObjective = objective->getFluxObjective(0);
fail_unless(fluxObjective->getReaction() == "J8");
fail_unless(fluxObjective->getPackageName() == "fbc");
fail_unless(fluxObjective->getCoefficient() == 1);
fail_unless(mplugin->getNumFluxBounds() == 1);
fail_unless(mplugin->getListOfFluxBounds()->getPackageName() == "fbc");
FluxBound* bound = mplugin->getFluxBound(0);
fail_unless(bound->getId() == "bound1");
fail_unless(bound->getPackageName() == "fbc");
fail_unless(bound->getReaction() == "J0");
fail_unless(bound->getOperation() == "equal");
fail_unless(bound->getValue() == 10);
delete document;
}