source: branches/devel-1/include/PresolveFixed.hpp @ 29

Last change on this file since 29 was 29, checked in by forrest, 17 years ago

Presolve (no changes to Makefile)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.7 KB
Line 
1// Copyright (C) 2002, International Business Machines
2// Corporation and others.  All Rights Reserved.
3
4#ifndef PresolveFixed_H
5#define PresolveFixed_H
6#define FIXED_VARIABLE  1
7
8class remove_fixed_action : public PresolveAction {
9 public:
10  struct action {
11    int col;
12    int nincol;
13
14    double sol;
15    int *colrows;
16    double *colels;
17  };
18
19  int nactions_;
20  const action *actions_;
21
22 private:
23  remove_fixed_action(int nactions,
24                      const action *actions,
25                      const PresolveAction *next);
26
27 public:
28  const char *name() const;
29
30  static const remove_fixed_action *presolve(PresolveMatrix *prob,
31                                         int *fcols,
32                                         int nfcols,
33                                         const PresolveAction *next);
34
35  void postsolve(PostsolveMatrix *prob) const;
36
37  ~remove_fixed_action();
38};
39
40
41const PresolveAction *remove_fixed(PresolveMatrix *prob,
42                                    const PresolveAction *next);
43
44
45
46class make_fixed_action : public PresolveAction {
47  struct action {
48    double bound;
49  };
50
51  int nactions_;
52  const action *actions_;
53
54  const bool fix_to_lower_;
55  const remove_fixed_action *faction_;
56
57  make_fixed_action(int nactions,
58                    const action *actions,
59                    bool fix_to_lower,
60                    const remove_fixed_action *faction,
61                    const PresolveAction *next) :
62    PresolveAction(next),
63    nactions_(nactions), actions_(actions),
64    fix_to_lower_(fix_to_lower),
65    faction_(faction)
66{}
67
68 public:
69  const char *name() const;
70
71  static const PresolveAction *presolve(PresolveMatrix *prob,
72                                         int *fcols,
73                                         int hfcols,
74                                         bool fix_to_lower,
75                                         const PresolveAction *next);
76
77  void postsolve(PostsolveMatrix *prob) const;
78
79  ~make_fixed_action() { delete[]actions_; delete faction_;};
80};
81
82
83const PresolveAction *make_fixed(PresolveMatrix *prob,
84                                    const PresolveAction *next);
85#endif
Note: See TracBrowser for help on using the repository browser.