Revision 752 branches/threaded2/src/nh99/model8.cpp

model8.cpp (revision 752)
4 4
 * Author: David Fournier
5 5
 * Copyright (c) 2008-2012 Regents of the University of California 
6 6
 */
7
  #include <admodel.h>
7
#include <admodel.h>
8 8

  
9
  objective_function_value * objective_function_value::pobjfun=NULL;
10
  double objective_function_value::gmax=0;
11

  
12
  objective_function_value::objective_function_value() {pobjfun=this;}
13
  objective_function_value& objective_function_value::operator =
14
    (const prevariable& v)
15
  {
16
    prevariable::operator = (v);
17
    return *this;
18
  }
19
  objective_function_value& objective_function_value::operator =
20
    (CGNU_DOUBLE v)
21
  {
22
    prevariable::operator = (v);
23
    return *this;
24
  }
9
__thread objective_function_value* objective_function_value::pobjfun = nullptr;
10
__thread double objective_function_value::gmax = 0;
11
__thread double objective_function_value::fun_without_pen = 0;
12
objective_function_value::objective_function_value() 
13
{ 
14
  pobjfun = this; 
15
}
16
objective_function_value& objective_function_value::operator=(const prevariable& v)
17
{
18
  prevariable::operator=(v);
19
  return *this;
20
}
21
objective_function_value& objective_function_value::operator=(CGNU_DOUBLE v)
22
{
23
  prevariable::operator=(v);
24
  return *this;
25
}

Also available in: Unified diff