GAMSlinks  0.4
Smag2OSiL.hpp
Go to the documentation of this file.
1 // Copyright (C) 2007-2008 GAMS Development and others
2 // All Rights Reserved.
3 // This code is published under the Common Public License.
4 //
5 // $Id: Smag2OSiL.hpp 510 2008-08-16 19:31:27Z stefan $
6 //
7 // Author: Stefan Vigerske
8 
9 #ifndef SMAG2OSIL_HPP_
10 #define SMAG2OSIL_HPP_
11 
12 #include "GAMSlinksConfig.h"
13 
14 #ifdef HAVE_CSTDLIB
15 #include <cstdlib>
16 #else
17 #ifdef HAVE_STDLIB_H
18 #include <stdlib.h>
19 #else
20 #error "don't have header file for stdlib"
21 #endif
22 #endif
23 
24 #ifdef HAVE_CSTDIO
25 #include <cstdio>
26 #else
27 #ifdef HAVE_STDIO_H
28 #include <stdio.h>
29 #else
30 #error "don't have header file for stdio"
31 #endif
32 #endif
33 
34 class OSInstance;
35 class OSnLNode;
36 
37 struct smagRec;
38 
42 class Smag2OSiL
43 {
44 public:
48  Smag2OSiL(struct smagRec* smag_);
49 
52  ~Smag2OSiL();
53 
57  bool createOSInstance();
58 
61  OSInstance *osinstance;
62 
68 
69 private:
70  struct smagRec* smag;
71 
72  OSnLNode* parseGamsInstructions(unsigned int* instr, int num_instr, double* constants);
73 
74  bool setupQuadraticTerms();
75 
76  bool setupTimeDomain();
77 };
78 
79 #endif /*SMAG2OSIL_HPP_*/
Creating a OSInstance from a GAMS model read with the SMAG I/O library.
Definition: Smag2OSiL.hpp:42
bool setupTimeDomain()
bool setupQuadraticTerms()
OSInstance * osinstance
osinstance is a pointer to the OSInstance object that gets created from the instance represented in S...
Definition: Smag2OSiL.hpp:61
bool createOSInstance()
Creates an OSInstance from the GAMS smag instance representation.
OSnLNode * parseGamsInstructions(unsigned int *instr, int num_instr, double *constants)
~Smag2OSiL()
Destructor.
bool keep_original_instr
If you set this flag to true, then the instructions in SMAG are not touched by parseGamsInstructions(...
Definition: Smag2OSiL.hpp:67
struct smagRec * smag
Definition: Smag2OSiL.hpp:70
Smag2OSiL(struct smagRec *smag_)
Constructor.