Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Case Sensitive (VB.NET)

    Posted 05/06/08 12:23 PM

    Originally posted by: SystemAdmin


    [shadi said:]

    How I can use the opl.CP.Next() method  in VB.NET (because there are two functions with the same name (next() & Next()) and because the VB.Net is not a case sensitive) I get the following error:



    C:\Documents and Settings\Administrator\Desktop\OPL\Optimization\Optimization\Form1.vb(266): Overload resolution failed because no accessible 'Next' is most specific for these arguments:

        'Public Overrides Function next() As Boolean': Not most specific.

        'Public Overrides Function Next() As Boolean': Not most specific.



    Kshieboun Shadi

    #ConstraintProgramming-General
    #DecisionOptimization


  • 2.  Re: Case Sensitive (VB.NET)

    Posted 05/07/08 05:54 PM

    Originally posted by: SystemAdmin


    [Didier Vidal said:]

    Shadi,

    Thanks for reporting this issue. I have registered a bug report about this.

    In the current version, the "next" API can be called from C#, but not for VB for the reason you gave.

    A workaround would be to write the next iterations in OPL script, if this can work for you.


    Didier.


    #ConstraintProgramming-General
    #DecisionOptimization


  • 3.  Re: Case Sensitive (VB.NET)

    Posted 05/07/08 08:41 PM

    Originally posted by: SystemAdmin


    [arnaud.schulz said:]

    Hi,

    A workaround is to use the Reflection API.

        Function CallNext(ByVal cp As ILOG.CP.CP) As Boolean
            Dim cpType As Type = cp.GetType
            Dim meth As Reflection.MethodInfo = cpType.GetMethod("Next")
            Try
                Return meth.Invoke(cp, Nothing)
            Catch ex As System.Exception
                Throw ex.InnerException           
            End Try
        End Function

    Arnaud.
    #ConstraintProgramming-General
    #DecisionOptimization


  • 4.  Re: Case Sensitive (VB.NET)

    Posted 05/07/08 11:31 PM

    Originally posted by: SystemAdmin


    [rdumeur said:]

    Hi,

    Thank you for the workaround!
    This issue will be resolved in the next version of CP Optimizer.

            Cheers,

        Renaud
    #ConstraintProgramming-General
    #DecisionOptimization