Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when running example script (sys.layout()) #2

Open
anotherjon opened this issue Jun 23, 2022 · 0 comments
Open

Error when running example script (sys.layout()) #2

anotherjon opened this issue Jun 23, 2022 · 0 comments

Comments

@anotherjon
Copy link

  • Operating system = Windows 10.0.17763

  • MATLAB version = '9.12.0.1884302 (R2022a)'

  • Script causing the issue:

Example script from documentation leads to error:
Screenshot

import matsim.library.* % Import Matsim package

sys = simulation.load('my_model'); % Create or load a model named 'my_model'
sys.setSolver('Ts',0.01,'DiscreteOnly',true) % Set solver for the model
sys.clear() % Delete all blocks
sys.show() % Show the model
Vx = FromWorkspace('V_x'); % Add FromWorkspace and Constant blocks
Wr = FromWorkspace('W_r');
Rr = Constant(0.32);

slip = 1 - Vx./(Wr.*Rr); % Evaluate complex mathematical expression
sys.log(slip,'name','slip') % Log the output of the "slip" block

s = Scope(slip); % Create and open scope block
s.open()
sys.layout() % Connect and layout the model
V_x = [0:0.1:10;linspace(5,20,101)]'; % Define input variables
W_r = [0:0.1:10;linspace(5,23,101)/0.32]';
simOut = sys.run('StopTime',10).Logs; % Simulate the system

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

No branches or pull requests

1 participant