Creating a New Scenario

This is an example of a script to create a new scenario in an existing Iota project:

''' This scripts starts a new session, loads the project "Backhoe optimization" and creates new scenario called "Initial design"'''

import sys                              
import os
import iota
sys.path.append(os.getenv('IOTA_PATH'))                                         # Add iota directory to Python paths

username = 'stephen'                                                            # Set Iota username
home_path = 'C:/Users/stephen/'                                                 # Set user's home directory

my_session = iota.session(username,home_path + 'ParticleAnalytics/config.ini')  # Start new session

my_new_project = my_session.get_project('Backhoe optimization')                 # Load the project "Backhoe optimization"       

my_new_scenario = my_new_project.add_scenario(name='Initial design', description='This is my new scenario')  # Create a new scenario

Last updated

Was this helpful?