File: TestLPFileFormat.cpp

package info (click to toggle)
scipy 1.16.3-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 236,092 kB
  • sloc: cpp: 503,720; python: 345,302; ansic: 195,677; javascript: 89,566; fortran: 56,210; cs: 3,081; f90: 1,150; sh: 857; makefile: 792; pascal: 284; csh: 135; lisp: 134; xml: 56; perl: 51
file content (22 lines) | stat: -rw-r--r-- 699 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "HCheckConfig.h"
#include "Highs.h"
#include "catch.hpp"
#include "filereaderlp/reader.hpp"

const bool dev_run = false;

TEST_CASE("lp-file-format-quad-no-space", "[LpFileFormat]") {
  std::string filename = std::string(HIGHS_DIR) + "/check/instances/qcqp.lp";

  // HiGHS cannot handle quadratic constraints as there are in qcqp.lp

  // Test that filereaderlp does not throw an exception
  REQUIRE_NOTHROW(readinstance(filename));

  // Test that HiGHS returns an error when passes a QCQP problem
  Highs highs;
  highs.setOptionValue("output_flag", dev_run);
  REQUIRE(highs.readModel(filename) == HighsStatus::kError);

  // todo: read the coefficients/variables off the highs model
}