24int main(
int argc,
char* argv[]) {
28 std::unique_ptr<operations_research::GScip> gscip = *std::move(gscip_or);
30 const auto x_or = gscip->AddVariable(
33 SCIP_VAR*
const x = *x_or;
38 QCHECK_OK(gscip->SetLb(x, 0.0));
39 QCHECK_OK(gscip->SetUb(x, 0.0));
40 QCHECK_EQ(gscip->Lb(x), 0.0);
41 QCHECK_EQ(gscip->Ub(x), 0.0);
45 QCHECK_OK(gscip->SetLb(x, 1.0));
46 QCHECK_OK(gscip->SetUb(x, 1.0));
47 QCHECK_EQ(gscip->Lb(x), 1.0);
48 QCHECK_EQ(gscip->Ub(x), 1.0);
52 QCHECK_OK(gscip->SetLb(x, 0.0));
53 QCHECK_OK(gscip->SetUb(x, 1.0));
54 QCHECK_EQ(gscip->Lb(x), 0.0);
55 QCHECK_EQ(gscip->Ub(x), 1.0);
60 QCHECK_OK(gscip->SetLb(x, 0.25));
61 QCHECK_OK(gscip->SetUb(x, 0.75));
62 QCHECK_EQ(gscip->Lb(x), 1.0);
63 QCHECK_EQ(gscip->Ub(x), 0.0);
67 gscip->SetUb(x, 2.0).IgnoreError();
70 gscip->SetLb(x, -1.0).IgnoreError();