亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? gepmain.c

?? GESPI 2.0動態系統模擬工具  
?? C
字號:
#include "copyleft.h"

/*
    GEPASI - a simulator of metabolic pathways and other dynamical systems
    Copyright (C) 1989, 1992, 1993  Pedro Mendes
*/

/*************************************/
/*                                   */
/*         main control block        */
/*                                   */
/*        Zortech C/C++ 3.0 r4       */
/*          MICROSOFT C 6.00         */
/*          Visual C/C++ 1.0         */
/*           QuickC/WIN 1.0          */
/*             ULTRIX cc             */
/*              GNU gcc              */
/*                                   */
/*   (include here compilers that    */
/*   compiled GEPASI successfully)   */
/*                                   */
/*************************************/


#ifndef MSDOS
#define COMMON
#endif

#ifdef _WINDOWS
#define COMMON
#endif

#if (_MSC_VER >= 610)                           /* QuickC/WIN or C/C++ 7.0                              */
 #define fcloseall _fcloseall
 #define unlink _unlink
 #define putenv _putenv
#endif
#if ((_MSC_VER == 600)||(_MSC_VER==700))        /* MICROSOFT C 6.00 & 7.00              */
 #pragma comment( exestr, "Compiled on " __DATE__ " at " __TIME__ )
#endif

#include <stdio.h>
#include <string.h>
#include <time.h>
#include <math.h>
#include <float.h>
#include <setjmp.h>
#include <signal.h>
#include <stdlib.h>
/*#include <conio.h>*/

#ifdef _WINDOWS
#include <io.h>
#include <fcntl.h>
#endif

#include "pmu.h"                                    /* several utilities     */
#include "globals.h"                                /* global symbols        */
#include "globvar.h"                                /* global variables      */

#ifndef _WINDOWS
#include "except.c"                                 /* exception error handl.*/
#endif

#include "r250.h"                                                                       /* pseudo-random numbers */
#include "matrix.h"                                 /* matrix algebra        */
#include "kinetics.h"                               /* rate eq. & deriv.     */
#include "rates.h"                                  /* net rates of met.     */
#include "gauss.h"                                  /* structural properties */
#include "newton.h"                                 /* steady state          */
#include "metconan.h"                               /* metabolic control     */
#include "lsoda.h"
#include "dynamic.h"                                    /* transient behaviour   */
#include "datab.h"
#include "getall.h"
#include "gepout.h"                                 /* data output           */
#include "heapchk.h"

#ifdef _ZTC
#define MEM_DEBUG 1
#include "mem.h"
#else
#define mem_malloc malloc
#define mem_free free
#define mem_realloc realloc
#endif

/* tidy up memory and disk                                                      */

void tidy( void )
{
 /* if -d switch delete the file with list of simulations       */
 if( delete ) unlink( listfile );

 /* free up all the dynamic memory blocks                                       */
 FreeMem();
}

/* terminate gepasi due to errors */

void term_gepasi( void )
{
 tidy();
 fprintf(stderr,errormsg[2]);
#ifdef _MSC_VER
 fcloseall();
#endif
#ifdef _ZTC
 mem_term();
#endif
 exit( 1 );                                         /* signal error          */
}

/* resets the state of the internal metabolites         */

void reset_state( double *keep )
{
 int i;

 for( i=0; i<indmet; i++ ) x[i] = x0[i];
 if( &endtime != keep ) endtime = options.endtime;
}

/* sets the values of the linked variables                      */

void set_linked( void )
{
 int i;

 for( i=0; i<nlinks; i++)
  switch( sparam[lindex[i]].operation )
  {
   case 1: *(sparam[lindex[i]].var) = sparam[lindex[i]].factor *
				      *(sparam[lindex[i]].linkedto);
	   break;
  }
}


/* main simulation procedure                                    */

int simulate( int p, int simple )
{
 int i, ccfs, diverge;
 time_t itime, ftime;

#ifndef _WINDOWS
  /* Save stack environment for return in case of error.                */
  /*  First time through, jmpret is 0, so true conditional              */
  /*  is executed. If an error occurs, jmpret will be set               */
  /*  to -1 and false conditional will be executed.                             */
  jmpret = setjmp( mark );
  if( jmpret == 0 )
  {
#endif

  /* reset concentration of external metabolites*/
  for( i=indmet; i<totmet; i++ ) x[i] = x0[i];

  /* set the values of the linked parameters    */
  if( nlinks ) set_linked();

  /* initialize the conserved moiety concentrations                                             */
  init_moiety();
  /* print the first part of the report file    */
  if( options.txt ) report_init( p );

  /* dynamic simulation */
  if( options.dyn )
  {
   time(&itime);
   dynamic();                           /* numeric integration */
   time(&ftime);
   ftime -= itime;

   if ( ! options.debug ) set_cursor(cx, cy);

   if( simple )
    printf( "\n  - integration completed in %ld s, ", ftime );
   else printf( "." );

   /* calculate the fluxes      */
   calcfluxes( x );

   /* print integration results in report file  */
   if( options.txt ) report_dyn();
   if( options.dat  && (!options.datss) ) dat_values();
  }
  else
   for( i=0; i<nmetab; i++) x[i] = 10 * options.hrcz;

  /* steady-state solution      */
  if ( options.ss )
  {
   if( simple )
    if( ! options.debug ) printf( "\n  - ss solution " );
   time( &itime );
   if( (diverge = newton()) )                               /* steady state                 */
   {
    endtime = 1e+10;                                        /* new endtime                  */
    int_to_ss();                                            /* new numeric integr.  		*/
    diverge = newton();										/* try again st. state			*/
   }
   time(&ftime);
   ftime -= itime;

   if ( options.debug ) printf( "\n\n  - ss solution in %ld s\n", ftime );
   else
    if( simple ) printf( "in %ld s", ftime );
    else printf( "." );

   if ( diverge == N_OK )
   {
    calcfluxes( xss );
    calc_tt();                                        /* calc. trans. times  */
    calc_Dxv();                                       /* calc. elasticities  */
    if ( ( ccfs = calc_Gamma() ) != MCA_NOCC )        /* calc. [] cnt.coeff. */
     calc_C();                                        /* calc. J cnt.coeff.  */
   }

   if( options.txt ) report_ss( diverge, ccfs );

   /* scale the control coefficients if necessary       */
   if( (options.dat) && (!options.datmca ) ) scale_coef( );
   /* copy xss to x                                                                     */
   memcpy( (void *) x, (void *) xss, sizeof( x ) );

   /* output data in columnar file      */
   if( options.dat && options.datss && (diverge==N_OK) ) dat_values();
  }

  if( options.txt && options.debug ) report_tech();
  return 0;
#ifndef _WINDOWS
  }
  else
  {
   fpcheck();
   if( options.txt ) report_error();
   if( options.dat ) dat_error();
  }
#endif
}

int hypergrid( int index, int p )
{
 int i;

 *(sparam[scindex[index]].var) = sparam[scindex[index]].low;
 if( options.dyn ) reset_state(sparam[scindex[index]].var);
 for( i=0; i<sparam[scindex[index]].dens+1; i++ )
 {
  if( index != 0 )
  {
   hypergrid( index-1, p );
  }
  else
  {
   printf("\n %lu ", ++iter );
   simulate( p, 0 );
  }
  if( sparam[scindex[index]].log )
   *(sparam[scindex[index]].var) = sparam[scindex[index]].low *
				   pow( 10, sparam[scindex[index]].ampl /
					    sparam[scindex[index]].dens * (i+1)
				      );
  else
   *(sparam[scindex[index]].var) = sparam[scindex[index]].low +
				   (i+1) *
				   sparam[scindex[index]].ampl /
				   sparam[scindex[index]].dens;
  if( options.dyn ) reset_state(sparam[scindex[index]].var);
  if( (totscan > 1) && (index == totscan - 1) ) dat_nl();
 }
 return 0;
}

int randomfill( int p )
{
 unsigned long i;
 int j;

 for( i=0; i< (unsigned long) options.scandens; i++ )
 {
  for( j=0; j<totscan; j++ )
  {
   if( sparam[scindex[j]].log )
    *(sparam[scindex[j]].var) = sparam[scindex[j]].low * pow( 10,
	   sparam[scindex[j]].ampl * dr250() );
   else
    *(sparam[scindex[j]].var) = sparam[scindex[j]].low +
	   sparam[scindex[j]].ampl * dr250();
   if( options.dyn ) reset_state(sparam[scindex[j]].var);
  }
  printf("\n %lu ", i );
  simulate( p, 0 );
 }
 return 0;
}

void process_sim( int p )
{
 int nRc, err;

 get_cursor(&cx, &cy);

 printf("\n\nprocessing %s: ",filename[p]);

 /* read data for this simulation       */
 if ((nRc = ReadSim(filename[p])))
 {
  out_error( nRc );
  term_gepasi();
 }
 if( options.dyn )
 {
  reset_state( NULL );
  strcpy( dyname, filename[p] );                         /* setup .dyn filename    */
  fixext( dyname, '.', ".dyn" );
  unlink( dyname );
 }

 /* set up indexes to effectors and pointers to rate equations  */
 eff_rateq();

 if( options.dat  && (!options.append) ) dat_fileovr();
 if( (options.dat) && (options.dattit == 0) ) dat_titles();

 err = 0;

 switch( options.scan )
 {
  case 0:  if( options.dyn ) reset_state( NULL );
	   simulate( p, 1 );
	   break;
  case 1:  iter=0;
	   hypergrid( totscan-1, p );
	   break;
  case 2:  randomfill( p );
	   break;
  default: if( options.dyn ) reset_state( NULL );
	   simulate( p, 1 );
 }

 if( (options.dat) & (options.dattit == 1) ) dat_titles();
}

/* the main body */

int main(int argc, char *argv[])
{
 int p;

#ifdef _WINDOWS
 struct _wsizeinfo ws;
#if _MSC_VER == 800
 ws._version = _winver;
#else
 ws._version = _WINVER;
#endif
 ws._type = _WINSIZEMAX;
 _wsetsize( fileno( stdout ), &ws );
 _wsetscreenbuf( fileno( stdout ), _WINBUFINF );
 _wabout( "GEPASI 2.0 for MS-Windows\n       (C) P. Mendes 1992/93" );
 _wsetexit( _WINEXITPERSIST );
#endif

#ifdef _ZTC
mem_init();
#endif

 if( getenv( "TZ" ) == NULL )
  if( putenv( "TZ=GMT0BST" ) == -1 )
   printf( "\n  * unable to set GMT, using Pacific time zone (PST)\n" );

 /* randomize the rand seed with the time function      */
 r250_init( (int) time( NULL ) );

 delete=0;

 /* check command line arguments and act accordingly    */
 if ( argc > 1 )
 {
  if ( ! strcmp( "-h", argv[1] ) )
  {
   fprintf( stderr, "\n%s (%s)\n\n", gepasi, version_no );
   fprintf( stderr, "This program is free software; you can redistribute it and/or modify\n");
   fprintf( stderr, "it under the terms of the GNU General Public License as published by\n");
   fprintf( stderr, "the Free Software Foundation; either version 1, or (at your option)\n");
   fprintf( stderr, "any later version.\n\n");
   fprintf( stderr, "This program is distributed in the hope that it will be useful,\n");
   fprintf( stderr, "but WITHOUT ANY WARRANTY; without even the implied warranty of\n");
   fprintf( stderr, "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n");
   fprintf( stderr, "GNU General Public License for more details.\n\n");
   fprintf( stderr, "You should have received a copy of the GNU General Public License\n");
   fprintf( stderr, "along with this program, in the file COPYING; if not, write to the\n");
   fprintf( stderr, "Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n\n");
   return 0;
  }
  else
  {
   strcpy( listfile, argv[1] );
   getlist( listfile );              /* file with list of simulations   */
   if( argc > 2 )
    if( !strcmp( argv[2], "-d" ) )   /* -d switch ?                                             */
     delete = 1;
  }
 }
 else getlist( (char *) NULL );      /* get list of simuls. from console*/

 /* allocate memory for several data structures         */
 if( MemAlloc() == -1 )
 {
  fprintf( stderr, "\nnot enough memory for GEPASI!" );
  term_gepasi();
 }

 /* setup ktype database                                        */
 InitDataBase();

#ifndef _WINDOWS
 /* set up floating point error handler         */
 /* this line generates a warning in Microsoft C compilers, just ignore it! */
 if( signal( SIGFPE, fphandler ) == SIG_ERR )
 {
  printf("  * ERROR - Couldn't set floating point error handler\n" );
  term_gepasi();
 }
#endif

cls();

 /* print screen banner                                     */
 printf("%s\n%s\n",gepasi,version_no);

 /* print no.of simulations*/
 printf("\n\n%d simulation%s",nrunfiles, nrunfiles==1 ? "" : "s ");

 /* execute all simulations     */
 for(p=0;p<nrunfiles;p++)
 {
  process_sim( p );
 }
 /* clean memory and delete file if necessary                           */
 tidy();

#ifdef _ZTC
  mem_term();
#endif

 /* make sure a carriage return is sent to stdout                       */
 printf("\n");

 /* sound signal and screen message of program termination      */
 beep();
 fprintf(stderr,"\nAll done.\n\n");
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲一区二区中文在线| 欧美xxxxx牲另类人与| 中文字幕一区二区三中文字幕| 黑人巨大精品欧美黑白配亚洲| 久久久久久久电影| 国产精品一区免费在线观看| 欧美激情中文字幕一区二区| 粉嫩av亚洲一区二区图片| 国产精品乱码人人做人人爱| va亚洲va日韩不卡在线观看| 一区二区久久久久| 欧美日韩精品电影| 国产资源在线一区| 久久er精品视频| 日韩一区二区高清| 国产成人综合网站| 一区二区三区在线不卡| 欧美日韩美女一区二区| 久久91精品久久久久久秒播| 国产日韩精品视频一区| 色婷婷精品大在线视频| 男人操女人的视频在线观看欧美| 精品国产网站在线观看| av日韩在线网站| 理论电影国产精品| 久久这里只精品最新地址| 风间由美一区二区三区在线观看| 亚洲乱码精品一二三四区日韩在线| 欧美三级乱人伦电影| 精品一区二区三区免费毛片爱 | 91天堂素人约啪| 亚洲国产一二三| 久久久五月婷婷| 欧美乱妇15p| 国产69精品久久99不卡| 视频一区中文字幕| 国产精品久久久久永久免费观看 | 亚洲自拍偷拍九九九| 欧美v日韩v国产v| 色综合久久久久网| 国产黄色成人av| 视频一区视频二区中文| 国产精品乱码一区二区三区软件 | 亚洲欧洲另类国产综合| 日韩一区二区三区在线| 93久久精品日日躁夜夜躁欧美| 青青草91视频| 亚洲综合色在线| 国产精品你懂的| 精品捆绑美女sm三区| 在线亚洲一区二区| 成人精品小蝌蚪| 乱中年女人伦av一区二区| 亚洲欧美电影一区二区| 久久综合色天天久久综合图片| 欧美亚洲动漫精品| jiyouzz国产精品久久| 韩国成人在线视频| 免费高清成人在线| 午夜a成v人精品| 亚洲免费av观看| 中文字幕一区二区三区在线播放| www国产成人免费观看视频 深夜成人网| 欧美日韩一区二区三区高清| 91亚洲国产成人精品一区二区三| 岛国一区二区在线观看| 国内精品不卡在线| 久久se精品一区二区| 天天综合天天做天天综合| 一区二区国产视频| 一区二区三区波多野结衣在线观看| 中文字幕精品—区二区四季| www国产成人| 精品99一区二区| 精品国产露脸精彩对白 | 国产在线精品一区二区| 久久精品噜噜噜成人88aⅴ| 日本成人在线不卡视频| 亚洲午夜在线电影| 午夜国产精品影院在线观看| 亚洲已满18点击进入久久| 亚洲欧美欧美一区二区三区| 国产精品国产三级国产| 中文字幕一区日韩精品欧美| 中文字幕在线一区二区三区| 欧美精彩视频一区二区三区| 中文成人av在线| 亚洲欧洲一区二区在线播放| 国产精品成人一区二区艾草| 中文字幕五月欧美| 一区二区三区四区五区视频在线观看| 亚洲精品欧美专区| 午夜精品aaa| 精品无人码麻豆乱码1区2区| 国产一区二区三区在线看麻豆| 国产精品一级片在线观看| 国产不卡视频在线观看| av资源站一区| 欧美中文字幕一区二区三区亚洲| 欧美日本在线看| 欧美xxxxxxxxx| 国产精品污污网站在线观看| 亚洲免费电影在线| 秋霞影院一区二区| 国产成人综合精品三级| 色婷婷综合久久久| 7777精品伊人久久久大香线蕉完整版| 日韩免费看的电影| 国产精品乱码一区二区三区软件| 一区二区三区四区激情| 日韩专区在线视频| 国产成人av一区二区三区在线| 不卡av电影在线播放| 欧美日韩aaaaaa| 久久精品夜夜夜夜久久| 亚洲美女一区二区三区| 久久国产精品第一页| 一本一道综合狠狠老| 日韩欧美国产三级| 日韩美女久久久| 99精品桃花视频在线观看| 日本久久一区二区三区| 欧美xxxx老人做受| 亚洲黄色小说网站| 国产一区在线看| 欧美日韩国产片| 国产欧美1区2区3区| 亚洲国产裸拍裸体视频在线观看乱了| 国产自产视频一区二区三区| 欧美性猛交一区二区三区精品| 久久亚洲二区三区| 午夜伦理一区二区| 91在线精品一区二区| 久久综合色之久久综合| 婷婷六月综合亚洲| av日韩在线网站| 久久久精品黄色| 日本亚洲三级在线| 色94色欧美sute亚洲线路一ni| 精品久久五月天| 日韩和欧美的一区| 欧美午夜一区二区三区 | 94-欧美-setu| 久久久美女艺术照精彩视频福利播放| 亚洲自拍偷拍av| 99久久精品国产导航| 久久久久久久免费视频了| 亚洲1区2区3区4区| 色呦呦国产精品| 国产精品三级久久久久三级| 久久精品国产一区二区| 欧美日韩成人综合在线一区二区| 18涩涩午夜精品.www| 激情久久五月天| 欧美一区二区日韩一区二区| 伊人色综合久久天天人手人婷| 成人丝袜高跟foot| 久久综合色一综合色88| 麻豆久久久久久久| 宅男噜噜噜66一区二区66| 亚洲精品乱码久久久久久| 成人禁用看黄a在线| 久久先锋影音av鲁色资源网| 青青草97国产精品免费观看| 欧美精品免费视频| 亚洲va欧美va人人爽| 日本道色综合久久| 亚洲欧美精品午睡沙发| 99久久99久久精品免费看蜜桃| 精品国产精品网麻豆系列| 久久国产精品99精品国产| 欧美成人官网二区| 久久99精品国产91久久来源| 26uuu亚洲婷婷狠狠天堂| 国产一本一道久久香蕉| 国产亚洲人成网站| 豆国产96在线|亚洲| 亚洲欧洲av一区二区三区久久| av亚洲精华国产精华精华| 亚洲欧美国产三级| 欧美伊人精品成人久久综合97| 亚洲一区国产视频| 欧美日韩高清影院| 蜜桃精品视频在线| 久久久亚洲高清| 成人av电影在线播放| 亚洲精品老司机| 91精品国产色综合久久ai换脸| 麻豆91免费观看| 26uuu欧美| 99久久99久久免费精品蜜臀| 亚洲综合图片区| 日韩免费成人网| 成人在线综合网| 日韩欧美在线123| 欧美熟乱第一页| 在线亚洲+欧美+日本专区| 欧洲亚洲国产日韩| 成人小视频免费在线观看| 成人app软件下载大全免费|