This project has moved. For the latest updates, please go here.

Error running VTS_MATLAB_v2.0.0Preview on Matlab R2011a

Sep 26, 2014 at 10:28 PM
When running .\VTS_MATLAB_v2.0.0Preview\vts_solver_demo.m, I get the error listed below. Digging into this a little bit, it looks like none of the .NET assemblies are being loaded during the call vts_solver_demo.m->startup.m->loadAssemblies.m. I have successfully run the same script using the earlier version, .\VTS_MATLAB_v1.0.13Beta\vts_solver_demo.m. Any thoughts anyone? Thank you!

??? Undefined variable "Vts" or class "Vts.Factories.SolverFactory.GetForwardSolver".

Error in ==> VtsSolvers>VtsSolvers.ROfRhoAndFt at 153
        fs = Vts.Factories.SolverFactory.GetForwardSolver(VtsSolvers.Options.SolverType);
Error in ==> vts_solver_demo at 24
test = VtsSolvers.ROfRhoAndFt(op, rho, ft);
Sep 26, 2014 at 10:44 PM
Hi pperea,
Usually when I get that error, it is because my default path does not include the folder vts_libraries. I usually startup matlab within the folder of the extracted files, this way the matlab "userpath" is the startup folder. I just extracted the download, went to the extracted folder, and double-clicked vts_solver_demo.m to bring up matlab. Then when the vts_solver_demo.m window appears, I click the right green arrow on the top toolbar. Give this a try and see if still get the error.
Sep 27, 2014 at 12:03 AM
Thanks for the quick reply!
I started from scratch, downloading the package and running again. It still crashes on Matlab R2011a, but I tried the exact same code on another machine with Matlab R2012a and it works fine. Stepping through the code, I can see the issue is in loadAssemblies, line 44 - in the try/catch block. The exception error is shown below. I tried adding the path for vts_libraries, this did not help. For the successful run on R2012a, vts_libraries is not in the path anyhow. Any thoughts on this? thanks again.

??? Message: Could not load file or assembly 'file:///C:\MATLAB\R2011a\WORK\temp\VTS_MATLAB_v2.0.0Preview\vts_libraries\mc.exe' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
Source: mscorlib
Sep 27, 2014 at 11:35 AM
I see. I've got R2012a on my machine.

vts_solver_demo.m calls startup.m which calls loadAssemblies.
loadAssemblies.m can be found in the folder vts/utilities/. It points to the folder 'vts_libraries' using:
directory = getFullPath('vts_libraries\'); [line 23]

So on line 45 in the try/catch block, the assembly_names listed starting on line 25 (which includes 'mc.exe') get loaded with:
library = assembly_names(i);
VTS_ASSEMBLIES(i) = NET.addAssembly([directory library]);
should be found provided mc.exe exists within vts_libraries.

I'll try to find a machine at work with R2011a on it to try to debug.

I'm sorry you're having problems.
Sep 28, 2014 at 3:48 AM
Hi Again,

I think the problem may be that the VTS software is calling .NET Framework 4.0 assemblies and Matlab 2011a only supports .NET Frameworks 2.0, 3.0, and 3.5
Sep 29, 2014 at 12:47 AM
Thanks for figuring that out! I'll confer with our software architect and open source project manager and see if there is a plan to support prior assemblies.
Thanks for your interest in our software. I'll get back to you soon.