Exemplo n.º 1
0
        void callBack(glp_tree *tree, void *info)
        {
            long   memory   = 0;
            double memoryMB = 0;

            try
            {
                glp_mem_usage(null, null, ref memory, null);
                memoryMB = (double)memory / 1048576.0;
                glp_ios_tree_size(tree, null, ref n_cnt, ref t_cnt);
                if (n_cnt_max < n_cnt)
                {
                    n_cnt_max = n_cnt;
                }
                if (memoryMB > Program.MAXMEMORY_MB)
                {
                    glp_ios_terminate(tree);
                    Console.Out.WriteLine("Memory Limit exceed");
                    mipMemoryOverflow = true;
                }
            }
            catch (Exception e)
            {
                Console.Out.WriteLine(e.ToString());
            }
        }
Exemplo n.º 2
0
 public static extern void glp_ios_terminate(glp_tree *T);
Exemplo n.º 3
0
 public static extern void glp_ios_tree_size(glp_tree *T, int *a_cnt, ref int n_cnt, ref int t_cnt);