RailProfileSetup#

Qualified name: loads.rail_profile.api.rail_profile_api.RailProfileSetup

class loads.rail_profile.api.rail_profile_api.RailProfileSetup(item)[source]#

Bases: LoadSetup

The API handler for rail profiles

The following example shows how to create a rail profile using the API, it is assumed that these steps were performed in each of the examples for other methods in this class.

Example

>>> from more.api import ApiGateway
>>> api = ApiGateway(proj=proj)
>>> simulation_setup = api.create_simulation_setup()
>>> lcc_setup = simulation_setup.create_load_case_container_setup().set_name(name='Example LCC')
>>> lc_setup = lcc_setup.create_load_case_setup(lc_type='Mechanical load case').set_name(name='Example LC')
>>> rail_profile_setup = lc_setup.create_load_setup(load_type='Rail profile')

The next example shows how to get an API object for an already existing load.

Example

>>> from more.api import ApiGateway
>>> api = ApiGateway(proj=proj)
>>> simulation_setup = api.create_simulation_setup()
>>> lcc_setup = simulation_setup.create_load_case_container_setup().set_name(name='Example LCC')
>>> lc_setup = lcc_setup.create_load_case_setup(lc_type='Mechanical load case').set_name(name='Example LC')
>>> rail_profile_setup = lc_setup.get_load_setup(index=0) # The load under this index must already exist

Methods

import_data

set_component

Deprecated method

set_component_by_name

Sets the component for the associated rail profile

set_data

set_interpolation_method

set_links

Deprecated method

set_links_by_names

set_profile_car_length_averaging_option

set_profile_data

Deprecated method

set_profile_normal_dir

set_rail_interface

Deprecated method

set_rail_interface_by_name

Sets the rail interface for the associated rail profile

Attributes

available_interpolation_methods

available_links_dict

available_rail_interfaces_dict

Deprecated method

property available_rail_interfaces_dict#

Deprecated method

Deprecated

available_rail_interfaces_dict will be removed in a future MORe release, it is replaced by available_rail_interfaces_names()

set_component(component) RailProfileSetup[source]#

Deprecated method

Deprecated

set_component will be removed in a future MORe release, it is replaced by set_component_by_name()

set_component_by_name(component_name: str) RailProfileSetup[source]#

Sets the component for the associated rail profile

See example at the top for how to create a rail profile setup object

Example

>>> rail_profile_setup = rail_profile_setup.set_component_by_name(component_name='example component') # The component with this name must already exist
Returns:

self

Return type:

RailProfile

Raises:

NameNotFoundError – Raised if the supplied name is not recognized

Deprecated method

Deprecated

set_links will be removed in a future MORe release, it is replaced by set_links_by_names()

set_profile_data(profile_data)[source]#

Deprecated method

Deprecated

set_profile_data will be removed in a future MORe release, it is replaced by set_data()

set_rail_interface(rail_interface) RailProfileSetup[source]#

Deprecated method

Deprecated

set_component will be removed in a future MORe release, it is replaced by set_component_by_name()

set_rail_interface_by_name(rail_interface_name) RailProfileSetup[source]#

Sets the rail interface for the associated rail profile

Returns:

self

Return type:

RailProfile

Raises:

NameNotFoundError – Raised if the supplied name is not recognized