Dip-All  0.91.0
SDPUC_Instance.h
Go to the documentation of this file.
1 //===========================================================================//
2 // This file is part of the Decomp Solver Framework. //
3 // //
4 // Decomp is distributed under the Common Public License as part of the //
5 // COIN-OR repository (http://www.coin-or.org). //
6 // //
7 // Author: Matthew Galati, Lehigh University //
8 // //
9 // Copyright (C) 2002-2015, Lehigh University, Matthew Galati, and Ted Ralphs//
10 // All Rights Reserved. //
11 //===========================================================================//
12 
13 #ifndef SDPUC_INSTANCE_INCLUDED
14 #define SDPUC_INSTANCE_INCLUDED
15 
16 //===========================================================================//
17 #include "UtilMacros.h"
18 //===========================================================================//
19 class SDPUC_Param;
20 using namespace std;
21 //===========================================================================//
22 
23 //===========================================================================//
36 //===========================================================================//
38 public:
40  struct arc {
41  int tail;
42  int head;
43  double lb;
44  double ub;
45  double weight; //e.g. reactance
46  double mcost; //marginal cost
47  double fcost1; //arc installation cost
48  double fcost2; //switch installation cost
49  int tscap;
50  int tscost;
51  int acline; // arc is included in kirchoffs constraints (set to 0 for supply and hvdc-arcs)
52  int switchable; // arc is switchable
53  };
54  struct node {
55  int id;
56  double demand;
57  int tsdemand;
58  };
59  struct timeseries {
60  int id;
61  double * values;
62  };
63  string m_problemName;
68  int m_numArcs;
71  int m_numSwitchings; // max. no. of simultaneously employed switches
72 
73 public:
75  int readInstance(string & fileName,
76  bool addDummyArcs = true);
77 
78  inline void initMembers(){
79  m_problemName = "";
80  m_arcs = NULL;
81  m_nodes = NULL;
82  m_numNodes = 0;
83  m_numArcs = 0;
84  m_numTimeseries = 0;
85  m_numTimeperiods = 0;
86  m_numSwitchings = 0;
87  }
88 
89 public:
94  initMembers();
95  };
96 
98  SDPUC_Instance(string & fileName) {
99  initMembers();
100  readInstance(fileName);
101  }
102 
105  UTIL_DELARR(m_arcs);
106  UTIL_DELARR(m_nodes);
107  UTIL_DELARR(m_timeseries);
108  };
109 };
110 
111 #endif
SDPUC_Instance()
Default constructor.
~SDPUC_Instance()
Default destructor.
SDPUC_Instance(string &fileName)
Default constructor.
#define UTIL_DELARR(x)
Definition: UtilMacros.h:29
string m_problemName
SDPUC_Instance problem instance data.
timeseries * m_timeseries