Coverage for robust/margin.py : 96%
![Show keyboard shortcuts](keybd_closed.png)
Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
self._options[option_name] = value
""" MarginModel extends gpkit.Model by adding margins to Model fixed variables with pr. It uses the local sensitivities of the Model solution to determine the direction of perturbation of fixed variables. """
# Solving the nominal model else:
# Determining margins np.sign(mag(self.nominal_solve['sensitivities']['constants'][k.key]))*k.key.pr * v / 100.0 for k, v in model.substitutions.items() if k in model.varkeys and RobustGPTools.is_directly_uncertain(k)} |