yoghadj / or-tools

Automatically exported from code.google.com/p/or-tools
0 stars 0 forks source link

StackOverflow while adding a dimension in a RoutingModel in .Net #14

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Here's the piece of code that gives me trouble:

    Public Class ContainerDimensiuneTimp
        Inherits NodeEvaluator2

        Dim Timpi()() As Double

        Public Sub New(_timpi()() As Double)
            Timpi = _timpi
        End Sub

        Public Overloads Function Run(nod1 As Integer, nod2 As Integer) As Long
            Return CLng(Timpi(nod1)(nod2) * 60)
        End Function
    End Class

  After Initialising the RouterModel as "rutare" and setting the cost,

        Dim TimesContainer As New ContainerDimensiuneTimp(_timpi)
        rutare.AddDimension(TimesContainer, 100, 24 * 3600, "T")

When calling "rutare.AddDimension(TimesContainer, 100, 24 * 3600, "T")" it 
throws a StackOverflow.

Original issue reported on code.google.com by stefy1...@gmail.com on 10 Sep 2012 at 3:05