Forum Discussion
FICO
6 years agoCommunity Manager
Redirect stream in C# with parallel (independant) mosel instances
I have written a c# method "MyMethod" solving a given mosel model and getting solution. At the beginning of "MyMethod", I have : var mosel = XPRM.Init();
mosel.SetDefaultStream(XPRMStreamType.F_...
FICO
6 years agoCommunity Manager
The error here is generated when XPRMsetdefstream returns nonzero; that usually means a model exists and thus the default streams can't be redirected. The best way to solve this would be to initialize Mosel before entering the parallel code and dispose it once all the threads have finished.