Skip to content

Conversation

@abhilash-kumar-nair
Copy link
Contributor

@abhilash-kumar-nair abhilash-kumar-nair commented Oct 3, 2024

Story - CAP-909

import os
from modelon.impact.client import Client
from modelon.impact.client.experiment_definition.modifiers import Enumeration
from modelon.impact.client.experiment_definition.operators import Choices

client = Client(url='https://jhmi-staging.modelon.com', interactive=True)
workspace = client.get_workspace("test")
dynamic = workspace.get_custom_function("dynamic")
model = workspace.get_model("FileUri")
library = "Modelica"
resource_path_1 = "Resources/Data/Electrical/Digital/Memory_Matrix.txt"
modelica_resource_uri_1 = workspace.get_modelica_resource_uri(
    library, resource_path_1
)
resource_path_2 = "Resources/Data/Utilities/Test_RealMatrix_v7.mat"
modelica_resource_uri_2 = workspace.get_modelica_resource_uri(
    library, resource_path_2
)
exp_def = model.new_experiment_definition(dynamic).with_modifiers({"fileName":Choices(modelica_resource_uri_1, modelica_resource_uri_2)})
res = workspace.execute(exp_def).wait()

Copy link

@iakovn iakovn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the implementation is sound. I would like to wait a bit with and test with the compiler and backend versions that are due in a couple of weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants