Is there a way to change directory in Modelica/Dymola automatically? -
i have following problem:
i have on 20 different models want simulate 1 after want change simulation directory each time.
right i'm manually changing directory after each simulation (from ./modelone ./modeltwo) , i'd know if there's way change automatically when initialize or translate new model.
regards nev
the best way write script think:
pathofsave = {"e:\\work\\modelica\\simulationresult\\model1\\","e:\\work\\modelica\\simulationresult\\model2\\"}; nbsim = 2; pathofmod = { "mymodel.", "mymodel.}; modelstosimulate = { ""model1" , "model2"}; //if equdistant=true: ensure same number of data points written in result files //store variables @ events disabled. experimentsetupoutput(equdistant=false, events=false); //keep in plot memory last nbsim results experimentsetupoutput(equdistant=false, events=false); in 1:nbsim loop //delete result file if exists modelica.utilities.files.removefile(pathofsave + modelstosimulate[i]); //translate models translatemodel(pathofmod[i]+modelstosimulate[i]); // simulate simulatemodel( pathofmod[i]+modelstosimulate[i], method="dassl", stoptime=186350, numberofintervals=nbofpoi, resultfile=pathofsave + modelstosimulate[i]); end for;
Comments
Post a Comment