title: Does "scaler" multiply twice?
body: <p>I have always had some trouble  with the scaling options within openmdao. As sometimes the scaling works implicitly during the matrix solvers while some other times explicitly etc.  The problem I have now is the scaling of the constraint and recording it. I have used the <a href="http://openmdao.org/twodocs/versions/latest/examples/beam_optimization/beam_optimization.html" rel="nofollow noreferrer">Cantilever beam example</a></p>
  
  <p>I added the scaler=2</p>
  
  <pre><code>    self.add_constraint('volume_comp.volume', equals=volume,scaler=2)
  </code></pre>
  
  <p>I did not change volume = 0.01 constraint value. If i set scaler=1 the recorded output of  the constraint volume is equal to 0.01 at the end of the optimization. However if i set scaler=2 volume variable is 0.04. And for scaler=10, volume output is equal to 1 etc. Is there an extra multiplication. </p>
  
  <p>The optimized value does not change no matter what, which I assume expected because this scaling is only for normalization (as far as I understand). </p>
  
  <p>Below is one line changed sample code and the recorder, I am using OpenMDAO 2.5.0</p>
  
  <pre><code>from __future__ import division
  import numpy as np
  
  from openmdao.api import Group, IndepVarComp
  
  from openmdao.test_suite.test_examples.beam_optimization.components.moment_comp import MomentOfInertiaComp
  from openmdao.test_suite.test_examples.beam_optimization.components.local_stiffness_matrix_comp import LocalStiffnessMatrixComp
  from openmdao.test_suite.test_examples.beam_optimization.components.states_comp import StatesComp
  from openmdao.test_suite.test_examples.beam_optimization.components.displacements_comp import DisplacementsComp
  from openmdao.test_suite.test_examples.beam_optimization.components.compliance_comp import ComplianceComp
  from openmdao.test_suite.test_examples.beam_optimization.components.volume_comp import VolumeComp
  
  
  class BeamGroup(Group):
  
      def initialize(self):
          self.options.declare('E')
          self.options.declare('L')
          self.options.declare('b')
          self.options.declare('volume')
          self.options.declare('num_elements', int)
  
      def setup(self):
          E = self.options['E']
          L = self.options['L']
          b = self.options['b']
          volume = self.options['volume']
          num_elements = self.options['num_elements']
          num_nodes = num_elements + 1
  
          force_vector = np.zeros(2 * num_nodes)
          force_vector[-2] = -1.
  
          inputs_comp = IndepVarComp()
          inputs_comp.add_output('h', shape=num_elements)
          self.add_subsystem('inputs_comp', inputs_comp)
  
          I_comp = MomentOfInertiaComp(num_elements=num_elements, b=b)
          self.add_subsystem('I_comp', I_comp)
  
          comp = LocalStiffnessMatrixComp(num_elements=num_elements, E=E, L=L)
          self.add_subsystem('local_stiffness_matrix_comp', comp)
  
          comp = StatesComp(num_elements=num_elements, force_vector=force_vector)
          self.add_subsystem('states_comp', comp)
  
          comp = DisplacementsComp(num_elements=num_elements)
          self.add_subsystem('displacements_comp', comp)
  
          comp = ComplianceComp(num_elements=num_elements, force_vector=force_vector)
          self.add_subsystem('compliance_comp', comp)
  
          comp = VolumeComp(num_elements=num_elements, b=b, L=L)
          self.add_subsystem('volume_comp', comp)
  
          self.connect('inputs_comp.h', 'I_comp.h')
          self.connect('I_comp.I', 'local_stiffness_matrix_comp.I')
          self.connect(
              'local_stiffness_matrix_comp.K_local',
              'states_comp.K_local')
          self.connect(
              'states_comp.d',
              'displacements_comp.d')
          self.connect(
              'displacements_comp.displacements',
              'compliance_comp.displacements')
          self.connect(
              'inputs_comp.h',
              'volume_comp.h')
  
          self.add_design_var('inputs_comp.h', lower=1e-2, upper=10.)
          self.add_objective('compliance_comp.compliance')
          self.add_constraint('volume_comp.volume', equals=volume,scaler=10)
  
  import numpy as np
  
  from openmdao.api import Problem, ScipyOptimizeDriver,SqliteRecorder
  
  E = 1.
  L = 1.
  b = 0.1
  volume = 0.01
  
  num_elements = 50
  
  prob = Problem(model=BeamGroup(E=E, L=L, b=b, volume=volume, num_elements=num_elements))
  
  prob.driver = ScipyOptimizeDriver()
  prob.driver.options['optimizer'] = 'SLSQP'
  prob.driver.options['tol'] = 1e-9
  prob.driver.options['disp'] = True
  recorder = SqliteRecorder('abc.sql')
  prob.driver.add_recorder(recorder)
  prob.driver.recording_options['includes'] = []
  prob.driver.recording_options['record_inputs'] = True
  #        prob.driver.recording_options['record_outputs'] = True
  prob.driver.recording_options['record_objectives'] = True
  prob.driver.recording_options['record_constraints'] = True
  prob.driver.recording_options['record_desvars'] = True
  prob.driver.recording_options['record_derivatives'] = True
  prob.setup()
  
  prob.run_driver()
  
  print(prob['inputs_comp.h'])
  prob.cleanup()
  
  
  #%%
  import re
  from openmdao.api import  CaseReader
  import matplotlib.pyplot as plt
  import numpy as np
  import os,json as js    
  import matplotlib
  
  cr = CaseReader('abc.sql')
  case_keys = cr.list_cases()
  obj=[]
  for i, case_key in enumerate(case_keys):
      case = cr.get_case(case_key)   
      derivs = cr.get_case(i).jacobian
  #        for k in derivs:
  #            print(k,derivs[k])
  
      recorded_objectives  = case.get_objectives()
      recorder_constraints = case.get_constraints()        
      recorder_desvars     = case.get_design_vars()        
      recorder_responses   = case.get_responses()        
      for k in recorder_desvars:
          print(k,recorder_desvars[k])
      for k in recorder_constraints:
          print(k,recorder_constraints[k])  
      for k in recorded_objectives:
          print(k,recorded_objectives[k])  
          obj.append(recorded_objectives[k])
  
      print('-----------')
  
  
  
  #    
  #print(obj)
  #obj[2]=obj[1]
  #print(len(obj))
  plt.plot(obj,'*')
  </code></pre>