Beispiel #1
0
	/**
	Parses an LP file segment for bounds.

	\param file istream to read data from.
	\return last line read.
	*/
	std::string* LPModel::ReadBounds(std::istream &file) {

		return ReadVars(file, Bounds, [](const std::string& line, std::vector<Bound>& list) {

			if (line.length() > 0 && line[0] != '\r' && line[0] != '\n') {

				auto b = Bound::Parse(line);

				if (b != nullptr) {
					list.push_back(*b);
				}
			}
		});
	}
Beispiel #2
0
void
ReadConf(TestSuite &suite, const char *varsPath, const char *testsPath)
{
    ReadVars(varsPath);
    ReadTests(testsPath, suite);
}
Beispiel #3
0
	/**
	Parses an LP file segment for SOS variables.

	\param file istream to read data from.
	\return last line read.
	*/
	std::string* LPModel::ReadSosVars(std::istream &file) {

		return ReadVars(file, SosVars, [](const std::string& line, std::vector<std::string>& list) {
			::split(line, ' ', list, [](const std::string& s) { return s.length() > 0 && s[0] != '\r' && s[0] != '\n'; });
		});
	}