Beispiel #1
0
void glp_mpl_init_rand(glp_tran *tran, int seed)
{     /* initialize pseudo-random number generator */
      if (tran->phase != 0)
         xerror("glp_mpl_init_rand: invalid call sequence\n");
      rng_init_rand(tran->rand, seed);
      return;
}
Beispiel #2
0
RNG *rng_create_rand(void)
{     RNG *rand;
      int i;
      rand = xmalloc(sizeof(RNG));
      A[0] = -1;
      for (i = 1; i <= 55; i++) A[i] = 0;
      fptr = A;
      rng_init_rand(rand, 1);
      return rand;
}
Beispiel #3
0
/***********************************************************************
*  This code is part of GLPK (GNU Linear Programming Kit).
*
*  Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
*  2009, 2010, 2011, 2013 Andrew Makhorin, Department for Applied
*  Informatics, Moscow Aviation Institute, Moscow, Russia. All rights
*  reserved. E-mail: <*****@*****.**>.
*
*  GLPK is free software: you can redistribute it and/or modify it
*  under the terms of the GNU General Public License as published by
*  the Free Software Foundation, either version 3 of the License, or
*  (at your option) any later version.
*
*  GLPK is distributed in the hope that it will be useful, but WITHOUT
*  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
*  or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
*  License for more details.
*
*  You should have received a copy of the GNU General Public License
*  along with GLPK. If not, see <http://www.gnu.org/licenses/>.
***********************************************************************/

#include "draft.h"
#include "glpmpl.h"
#include "prob.h"

glp_tran *glp_mpl_alloc_wksp(void)
{     /* allocate the MathProg translator workspace */
      glp_tran *tran;
      tran = mpl_initialize();
      return tran;
}

#if 1 /* 08/XII-2009 */
void _glp_mpl_init_rand(glp_tran *tran, int seed)
{     if (tran->phase != 0)
         xerror("glp_mpl_init_rand: invalid call sequence\n");
      rng_init_rand(tran->rand, seed);
      return;
}