How to use andes - 10 common examples

To help you get started, we’ve selected a few andes examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cuihantao / andes / tests / test_card.py View on Github external
def test_filter_card():
        try:
            andes.main.run('cards/AVR1.andc', no_output=True, exit_now=True)
        except ImportError:
            pass
github cuihantao / andes / tests / test_tds.py View on Github external
def test_5bus_tds():
        andes.main.run('cases/5bus/CL_2machine.dm', routine=['pflow', 'tds'], tf=0.1)
github cuihantao / andes / tests / test_tds.py View on Github external
def test_ieee14_tds():
        andes.main.run('cases/ieee14/ieee14_syn.dm', routine=['pflow', 'tds'], tf=0.1)
github cuihantao / andes / tests / test_tds.py View on Github external
def test_wecc_wind0():
        andes.main.run('cases/curent/WECC_WIND0.dm', routine=['pflow', 'tds'], tf=0.1, no_output=True)
github cuihantao / andes / tests / test_tds.py View on Github external
def test_wecc_wind50():
        andes.main.run('cases/curent/WECC_WIND50.dm', routine=['pflow', 'tds'], tf=0.1, no_output=True)
github cuihantao / andes / tests / test_eig.py View on Github external
def test_ieee14_tds():
        andes.main.run('cases/ieee14/ieee14_syn.dm', routine=['pflow', 'eig'], tf=0.1, no_output=True)
github cuihantao / andes / tests / test_tds.py View on Github external
def setUp(self) -> None:
        andes.main.config_logger(file=False)
github cuihantao / andes / tests / test_card.py View on Github external
def setUp(self) -> None:
        andes.main.config_logger(file=False)
github cuihantao / andes / tests / test_eig.py View on Github external
def setUp(self) -> None:
        andes.main.config_logger(file=False)
github cuihantao / andes / andes / variables / dae.py View on Github external
def resize(self):
        """Resize dae and and extend for init1 variables
        """
        yext = self.m - len(self.y)
        xext = self.n - len(self.x)

        if yext > 0:
            yzeros = zeros(yext, 1)
            yones = ones(yext, 1)
            self.y = matrix([self.y, yzeros], (self.m, 1), 'd')
            self.g = matrix([self.g, yzeros], (self.m, 1), 'd')
            self.uy = matrix([self.uy, yones], (self.m, 1), 'd')
            self.zymin = matrix([self.zymin, yones], (self.m, 1), 'd')
            self.zymax = matrix([self.zymax, yones], (self.m, 1), 'd')
        else:
            logger.debug('Skip extending DAE algeb arrays. Did you call `tds.init()` more than once or '
                         'have no dynamic components?')
        if xext > 0:
            xzeros = zeros(xext, 1)
            xones = ones(xext, 1)
            self.x = matrix([self.x, xzeros], (self.n, 1), 'd')
            self.f = matrix([self.f, xzeros], (self.n, 1), 'd')
            self.ux = matrix([self.ux, xones], (self.n, 1), 'd')
            self.zxmin = matrix([self.zxmin, xones], (self.n, 1), 'd')