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

Source Code for Module pypower.rundcpf

 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  """Runs a DC power flow. 
18  """ 
19   
20  from os.path import dirname, join 
21   
22  from pypower.ppoption import ppoption 
23  from pypower.runpf import runpf 
24   
25   
26 -def rundcpf(casedata=None, ppopt=None, fname='', solvedcase=''):
27 """Runs a DC power flow. 28 29 @see: L{runpf} 30 31 @author: Ray Zimmerman (PSERC Cornell) 32 @author: Richard Lincoln 33 """ 34 ## default arguments 35 if casedata is None: 36 casedata = join(dirname(__file__), 'case9') 37 ppopt = ppoption(ppopt, PF_DC=True) 38 39 return runpf(casedata, ppopt, fname, solvedcase)
40