Minotaur 0.4.1
Docs for developers
Reader.h
Go to the documentation of this file.
1//
2// Minotaur -- It's only 1/2 bull
3//
4// (C)opyright 2008 - 2025 The Minotaur Team.
5//
6
7
14#ifndef MINOTAURREADER_H
15#define MINOTAURREADER_H
16
17#include <string>
18#include "Types.h"
19#include "Variable.h"
20
21namespace Minotaur {
22
23 class Function;
24 class LinearFunction;
25 struct ProblemSize;
26 class SOS;
27
33 class Reader {
34 public:
36 Reader(EnvPtr env);
37
39 ~Reader();
40
42 ProblemPtr readMps(std::string fname, int &err);
43
45 int readSol(ProblemPtr p, std::string sname);
46
47 private:
49 EnvPtr env_;
50
52 LoggerPtr logger_;
53
55 static const std::string me_;
56
57 enum MpsSec {
58 MpsNone,
59 MpsSense,
60 MpsName,
61 MpsRows,
62 MpsCols,
63 MpsRhs,
64 MpsRang,
65 MpsBoun,
66 MpsQO,
67 MpsQC,
68 MpsEnd
69 };
70
72 std::map<std::string, int> rmap_;
73
75 std::map<std::string, Variable *> vmap_;
76
78 Problem *p_;
79
82 Variable *getMpsVar_(const std::string &s, VariableType vtype);
83
86 int getMpsRow_(const std::string &s);
87 };
88}
89
90#endif
91
Declare important 'types' used in Minotaur.
Define the Variable class.
Definition: Environment.h:28
Definition: Logger.h:37
Definition: Problem.h:74
Read an LP or MILP instance from an MPS file.
Definition: Reader.h:33
int readSol(ProblemPtr p, std::string sname)
Read a solution file and store it in Problem for debugging.
Definition: Reader.cpp:620
~Reader()
Destroy.
Definition: Reader.cpp:38
Reader(EnvPtr env)
Default constructor.
Definition: Reader.cpp:30
ProblemPtr readMps(std::string fname, int &err)
Read a file and return the Problem object.
Definition: Reader.cpp:43
Definition: Variable.h:31
Definition: ActiveNodeStore.h:20
VariableType
Different types of variables.
Definition: Types.h:76

Minotaur source code documented by Doxygen 1.9.4 on Thu Apr 24 2025