Home > matpower7.0 > extras > syngrid > lib > sgvm_set_max_iter.m

sgvm_set_max_iter

PURPOSE ^

SGVM_SET_MAX_ITER set maximum iteration number in MPOPT

SYNOPSIS ^

function mpopt = sgvm_set_max_iter(mpopt, maxit)

DESCRIPTION ^

SGVM_SET_MAX_ITER set maximum iteration number in MPOPT
   MPOPT = SGVM_SET_MAX_ITER(MPOPT, MAXIT)

   Set the maximum iteration in MPOPT to MAXIT depending on the AC solver
   If the solver type is unkonwn, returns a warning.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function mpopt = sgvm_set_max_iter(mpopt, maxit)
0002 %SGVM_SET_MAX_ITER set maximum iteration number in MPOPT
0003 %   MPOPT = SGVM_SET_MAX_ITER(MPOPT, MAXIT)
0004 %
0005 %   Set the maximum iteration in MPOPT to MAXIT depending on the AC solver
0006 %   If the solver type is unkonwn, returns a warning.
0007 
0008 %   SynGrid
0009 %   Copyright (c) 2018, Power Systems Engineering Research Center (PSERC)
0010 %   by Eran Schweitzer, Arizona State University
0011 %
0012 %   This file is part of SynGrid.
0013 %   Covered by the 3-clause BSD License (see LICENSE file for details).
0014 
0015 switch mpopt.opf.ac.solver
0016     case {'DEFAULT', 'MIPS'}
0017         mpopt.mips.max_it = maxit;
0018     case {'IPOPT'}
0019         mpopt.ipopt.opts.max_iter = maxit;
0020     case {'KNITRO'}
0021         mpopt.knitro.maxit = maxit;
0022     case 'FMINCON'
0023         mpopt.fmincon.max_it = maxit;
0024   otherwise
0025       warning('sgvm_IndClass/sgvm_set_max_iter: setting maximum iteration for solver %s unknown.', mpopt.opf.ac.solver)
0026 end

Generated on Mon 24-Jun-2019 15:58:45 by m2html © 2005