Originally posted by: SystemAdmin
[Multani said:]
Hello,
I am using CPLEX 11.2 with Concert for C#. I have several independent LPs to solve. I do this in parallel (using the MS Parallel Extensions to the .NET Framework). Sometimes, when I call Cplex.Solve(), I get the following exception:
System.ArgumentOutOfRangeException occurred
Message="Count cannot be less than zero.\r\nParameter name: count"
Source="mscorlib"
ParamName="count"
StackTrace:
at System.String.CopyTo(Int32 sourceIndex, Char[] destination, Int32 destinationIndex, Int32 count)
at System.IO.StreamWriter.Write(String value)
at ILOG.CPLEX.CplexI.OutChannelFunction.CallIt(Object handle, String message)
at ILOG.CPLEX.CplexStubs.CPXPmsgfunction0(IntPtr handle, IntPtr message)
at ILOG.CPLEX.CplexStubs.CPXlpopt(IntPtr env_, IntPtr lp_)
at ILOG.CPLEX.CplexI.Solve()
at ILOG.CPLEX.Cplex.Solve()
at PowerMarket.FundamentalPowerMarketModel.DetermineEmissionAllowancesPrice() in D:\InvestmentModel\PowerMarket\FundamentalPowerMarketModel.cs:line 643
InnerException:
I am not sure whether this exception has something to do with the parallel extensions I am using or not. So far, the problem occurred only when I was running the code in parallel, however, I just started to test it with sequential code.
Any ideas what could be the problem?
#CPLEXOptimizers#DecisionOptimization