⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ex38s2_acc_common.h

📁 其中提到遺傳學的程式碼與應用提供給次淚相向的研究者參考下載
💻 H
字号:
/*
 * ex38s2_acc_common.h
 *
 * Real-Time Workshop code generation for Simulink model "ex38s2_acc.mdl".
 *
 * Model Version                        : 1.58
 * Real-Time Workshop file version      : 4.0 $Date: 2000/09/19 19:45:27 $
 * Real-Time Workshop file generated on : Thu Feb 07 20:20:20 2002
 * TLC version                          : 4.0 (Aug 21 2000)
 * C source code generated on           : Thu Feb 07 20:20:20 2002
 *
 * Relevant TLC Options:
 *   InlineParameters      = 0
 *   RollThreshold         = 5
 *   CodeFormat            = S-Function
 *
 * Simulink model settings:
 *   Solver     : VariableStep
 *   StartTime  : 0.0 s
 *   StopTime   : 140.0 s
 *   Variable step solver used
 */

#ifndef _RTW_COMMON_HEADER_FILE_ex38s2_acc_
#define _RTW_COMMON_HEADER_FILE_ex38s2_acc_

#define S_FUNCTION_NAME                 simulink_only_sfcn
#define S_FUNCTION_LEVEL                2
#define RTW_GENERATED_S_FUNCTION

#ifndef TRUE
# define TRUE (1)
#endif
#ifndef FALSE
# define FALSE (0)
#endif

#define fcn_call_T                      real_T
#define pointer_T                       void*

#define rt_VALIDATE_MEMORY(S, ptr) if(!(ptr)) {\
    ssSetErrorStatus((S), RT_MEMORY_ALLOCATION_ERROR);\
    return;\
  }

#define rt_FREE(ptr) if((ptr) != NULL) {\
    free((ptr));\
    (ptr) = NULL;\
  }

#ifndef RT_SQUARE
#define RT_SQUARE(x) ( x * x )
#endif
#include "simstruc.h"
#include "rtlibsrc.h"
#include <stdlib.h>
#include <math.h>

/*
 * Block I/O Structure 
 *
 * Note: Individual field names are derived from the signal name when
 * present, otherwise, field names are derived from the source block name
 * with an optional port number appened to the block name if the block has
 * multiple output ports. The comment to the right of structure field
 * contains the signal source block name.
 *
 */

typedef struct ex38s2_BlockIO_tag {
  real_T s1_Gain;                       /* <S1>/Gain */
  real_T s3_Internal;                   /* <S3>/Internal */
  real_T root_Sum;                      /* <Root>/Sum */
  real_T root_Gain;                     /* <Root>/Gain */
  real_T root_Unit_Delay_Ts_0_1;        /* <Root>/Unit Delay Ts=0.1 */
  real_T root_Sum2;                     /* <Root>/Sum2 */
  real_T root_Constant;                 /* <Root>/Constant */
  real_T root_Relational_Operator;      /* <Root>/Relational Operator */
  real_T s2_Gain;                       /* <S2>/Gain */
  real_T s2_Saturation;                 /* <S2>/Saturation */
  real_T s2_Gain1;                      /* <S2>/Gain1 */
  real_T s2_Saturation1;                /* <S2>/Saturation1 */
  real_T s4_FIS_S_function;             /* <S4>/FIS S-function */
  real_T root_Unit_Delay_Ts_0_01;       /* <Root>/Unit Delay Ts=0.01 */
  real_T root_Sum1;                     /* <Root>/Sum1 */
  real_T root_Clock;                    /* <Root>/Clock */
  real_T root_Zero_Order_Hold1[2];      /* <Root>/Zero-Order Hold1 */
  real_T root_Zero_Order_Hold7;         /* <Root>/Zero-Order Hold7 */
} ex38s2_BlockIO;

/*
 * Default Parameters Structure 
 *
 * Note: The parameters structure contains all the block parameters
 * in the model.  Individual field names are comprised of the block and
 * parameter name.
 *
 */

typedef struct ex38s2_Parameters_tag {
  real_T s1_White_Noise_Mean;           /* Expression: 0
                                         * External Mode Tunable: yes
                                         * Referenced by block:
                                         * <S1>/White Noise
                                         */
  real_T s1_White_Noise_StdDev;         /* Computed Parameter: StdDev
                                         * External Mode Tunable: yes
                                         * Referenced by block:
                                         * <S1>/White Noise
                                         */
  real_T s1_Gain_Gain;                  /* Expression: [sqrt(Cov)]/[sqrt(Ts)]
                                         * External Mode Tunable: yes
                                         * Referenced by block:
                                         * <S1>/Gain
                                         */
  real_T s3_Internal_A[3];              /* Computed Parameter: A
                                         * External Mode Tunable: yes
                                         * Referenced by block:
                                         * <S3>/Internal
                                         */
  real_T s3_Internal_B;                 /* Computed Parameter: B
                                         * External Mode Tunable: yes
                                         * Referenced by block:
                                         * <S3>/Internal
                                         */
  real_T s3_Internal_C;                 /* Computed Parameter: C
                                         * External Mode Tunable: yes
                                         * Referenced by block:
                                         * <S3>/Internal
                                         */

  real_T s3_Internal_X0;                /* Computed Parameter: X0
                                         * External Mode Tunable: yes
                                         * Referenced by block:
                                         * <S3>/Internal
                                         */
  real_T root_Gain_Gain;                /* Expression: 1
                                         * External Mode Tunable: yes
                                         * Referenced by block:
                                         * <Root>/Gain
                                         */
  real_T root_Unit_Delay_Ts_0_1_X0;     /* Expression: 0
                                         * External Mode Tunable: yes
                                         * Referenced by block:
                                         * <Root>/Unit Delay Ts=0.1
                                         */
  real_T root_Constant_Value;           /* Expression: Emin+1
                                         * External Mode Tunable: yes
                                         * Referenced by block:
                                         * <Root>/Constant
                                         */
  real_T s2_Gain_Gain;                  /* Variable: s2_Gain_Gain
                                         * External Mode Tunable: yes
                                         * Referenced by block:
                                         * <S2>/Gain
                                         */
  real_T s2_Saturation_UpperSat;        /* Expression: 0.95
                                         * External Mode Tunable: yes
                                         * Referenced by block:
                                         * <S2>/Saturation
                                         */
  real_T s2_Saturation_LowerSat;        /* Expression: -0.95
                                         * External Mode Tunable: yes
                                         * Referenced by block:
                                         * <S2>/Saturation
                                         */
  real_T s2_Gain1_Gain;                 /* Expression: -Sde
                                         * External Mode Tunable: yes
                                         * Referenced by block:
                                         * <S2>/Gain1
                                         */
  real_T s2_Saturation1_UpperSat;       /* Expression: 0.95
                                         * External Mode Tunable: yes
                                         * Referenced by block:
                                         * <S2>/Saturation1
                                         */
  real_T s2_Saturation1_LowerSat;       /* Expression: -0.95
                                         * External Mode Tunable: yes
                                         * Referenced by block:
                                         * <S2>/Saturation1
                                         */
  real_T s2_Gain2_Gain;                 /* Variable: s2_Gain2_Gain
                                         * External Mode Tunable: yes
                                         * Referenced by block:
                                         * <S2>/Gain2
                                         */
  real_T root_Unit_Delay_Ts_0_01_X0;    /* Expression: 0
                                         * External Mode Tunable: yes
                                         * Referenced by block:
                                         * <Root>/Unit Delay Ts=0.01
                                         */
} ex38s2_Parameters;

/*
 * Continuous states Structure
 *
 * Note: Individual field names are derived from the block name.
 *
 */

typedef struct ex38s2_ContinuousStates_tag {
  real_T s3_Internal[2];
} ex38s2_ContinuousStates;

/*
 * State Derivatives Structure
 *
 * Note: Individual field names are derived from the block name.
 *
 */
typedef struct ex38s2_StateDerivatives_tag {
  real_T s3_Internal[2];
} ex38s2_StateDerivatives;

/*
 * Data Type Work (DWork) Structure
 *
 * Note: Individual field names are derived from Simulink's DWork record.
 *
 */

typedef struct ex38s2_D_Work_tag {
  real_T root_Unit_Delay_Ts_0_1_DSTATE;
  real_T root_Unit_Delay_Ts_0_01_DSTATE;
  struct {
    real_T NextOutput;
  } s1_White_Noise_RWORK;
  struct {
    real_T TimeStampA;
    real_T LastUAtTimeA;
    real_T TimeStampB;
    real_T LastUAtTimeB;
  } root_Derivative_RWORK;
  struct {
    void *LoggedData;
  } root_Scope_PWORK;
  struct {
    void *LoggedData;
  } root_To_Workspace1_PWORK;
  void *s4_FIS_S_function_PWORK;
  struct {
    void *LoggedData;
  } root_To_Workspace_PWORK;
  struct {
    int_T RandSeed;
  } s1_White_Noise_IWORK;
  int_T root_Abs_MODE;
  int_T root_Relational_Operator_MODE;
  int_T s2_Saturation_MODE;
  int_T s2_Saturation1_MODE;
} ex38s2_D_Work;

/*
 * Nonsampled Zero-Crossings Structure
 *
 * Note: Individual field names are derived from the block name.
 *
 */

typedef struct ex38s2_NonsampledZCs_tag {
  real_T root_Abs;
  real_T root_Relational_Operator;
  real_T s2_Saturation[2];
  real_T s2_Saturation1[2];
} ex38s2_NonsampledZCs;

/* non-finites */
extern real_T rtInf;

#endif                                  /* _RTW_COMMON_HEADER_FILE_ex38s2_acc_ */

/* [EOF] ex38s2_acc_COMMON.h */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -