Package pypower :: Module dcopf
[hide private]
[frames] | no frames]

Source Code for Module pypower.dcopf

 1  # Copyright (C) 1996-2011 Power System Engineering Research Center (PSERC) 
 2  # Copyright (C) 2011 Richard Lincoln 
 3  # 
 4  # PYPOWER is free software: you can redistribute it and/or modify 
 5  # it under the terms of the GNU General Public License as published 
 6  # by the Free Software Foundation, either version 3 of the License, 
 7  # or (at your option) any later version. 
 8  # 
 9  # PYPOWER is distributed in the hope that it will be useful, 
10  # but WITHOUT ANY WARRANTY; without even the implied warranty of 
11  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
12  # GNU General Public License for more details. 
13  # 
14  # You should have received a copy of the GNU General Public License 
15  # along with PYPOWER. If not, see <http://www.gnu.org/licenses/>. 
16   
17  """Solves a DC optimal power flow. 
18  """ 
19   
20  from opf_args import opf_args2 
21  from ppoption import ppoption 
22  from opf import opf 
23   
24   
25 -def dcopf(*args, **kw_args):
26 """Solves a DC optimal power flow. 27 28 This is a simple wrapper function around L{opf} that sets the C{PF_DC} 29 option to C{True} before calling L{opf}. 30 See L{opf} for the details of input and output arguments. 31 32 @see: L{rundcopf} 33 34 @author: Ray Zimmerman (PSERC Cornell) 35 @author: Richard Lincoln 36 """ 37 ppc, ppopt = opf_args2(*args, **kw_args); 38 ppopt = ppoption(ppopt, PF_DC=1) 39 40 return opf(ppc, ppopt)
41