How to use the andes.main function in andes

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_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 / server / __main__.py View on Github external
def load():
    default_path = os.getcwd()
    name = request.args.get('name', '')
    path = os.path.join(default_path, name)

    n_system = len(systems)
    try:
        system_instance = andes.main.run(case=path)
        globals()['systems'][str(n_system + 1)] = system_instance

    except FileNotFoundError:
        flask.abort(404)

    return jsonify(len(systems))
github cuihantao / andes / andes / __main__.py View on Github external
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
Andes main entry point Redirection to main.py
This makes the packacke callable with py -m andes
"""

from andes import main

if __name__ == '__main__':
    main.main()