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

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

?? bistim.java~

?? Java遺傳算法庫
?? JAVA~
?? 第 1 頁 / 共 2 頁
字號:
/*
 * BISTIM.java
 *
 * Created on 19 May 2002, 18:56
 */

package jaga.pj.circuits.control;

import jaga.evolve.Evolver;
import jaga.deploy.Deployment;
import jaga.experiment.*;
import jaga.control.StandardInteractionModel;
import jaga.*;
import jaga.pj.circuits.fpgaft.*;
import jaga.pj.circuits.SimulatorLogicElement;

import java.util.Random;
import java.util.Vector;

import javax.swing.JComponent;

/** An Interaction Model for evolving circuits with Built-In-Self-Test (BIST)
 * functionality.  This functionality can be either evolved at the same time
 * as the circuit or post-evolved.  In both cases an incremental evolution
 * aproach is used.  This can be chosen to be either implicit or explicit by
 * changing the <code>explicit_incremental</code> boolean variable.
 * <p>Implicit
 * incremental evolution is implemented by having a weighten polynomial fitness
 * function in which the main task - the one to be evolved earlier though without
 * totally losing track of the others - is given a heavier weighting and
 * polynomial power.  For eg. for two tasks A,B:  F = f_a^2 * 0.9 + f_b * 0.1
 * clearly will favour a fitness increase in A far more than one in B so 
 * probably completing A faster but without loosing track of B.  Once A is
 * completed our fitness function becomes F = 0.9 + f_b * 0.1, which using
 * Rank Selection is equivalent to F = f_b, hence attention is focused 
 * solely on B.
 * <p>Explicit incremental evolution is implemented by the same fitness function
 * as the implicit one except: When task A has reached 100% fitness any individual
 * who performs below 100% fitness at A will be given a fitness of 0.  Hence 
 * evolution runs in explicit and is not allowed to go backwards.  The constants
 * <code>EVOEXP, EVOPERFAULT, EVOPERINST</code> are used to denote these stages.
 * <p><b>Note</b> that the constant MAX_FITNESS from the Genotype class is used to
 * measure if a circuit is to be
 * considered a solution to a problem.
 * <p> <b>WARNING:</b> For now a single fault model is assumed.
 * <p> <b>Note:</b> Error output should go high when the circuit deviates from 
 * its normal functioning behaviour, which may not be optimal because it hasn't evolved
 * completely yet.
 *
 * @author  Michael Garvie
 * @version 
 */
public class BISTIM extends StandardInteractionModel
{
    // Constants - Config
    static final boolean MATTFF = false;
    
    // Constants
    // Modes of operation for explicitly incremental evolution
    static public final int EVO_EXP = 0;
    static public final int EVO_PER_FAULT = 1;
    static public final int EVO_PER_INST = 2;
    static public final String[] modeNames = { "Evolving Only Experiment", "Evolving Experiment & Per Fault BIST", "Evolving Experiment, Per Fault BIST & Per Instance BIST" };
    
    // Config Vars
    protected boolean explicit_incremental = false;
    protected boolean overdetecting = false;
    protected double threshold = 0.1; // Amount by which fitness must drop to deem a circuit as failing.
    protected JComponent painter = new javax.swing.JPanel();
    // Variables for finding E
    protected double etSetup = 0; //0.1 // Proportion of output data to be ignored from the start of the set.
    protected int eSize = 8; // was 3 // Length of output data in time steps for minimum detectable raising of E.
    // Variable for extracting value of output (kind of inverse of t_setup)
    protected double validChunkProp = 0.2; // Proportion at end of output data used to measure its value.    
    // Weights for fitness calculation
    protected double w_e = 0.9;    protected double w_b = 1 - w_e;
    protected double w_bpf = 0.9;  protected double w_bpi = 1- w_bpf;
    // Fitnesses at which to move on to next stage.
    protected double min_e = .4999;  protected double min_bpf = .9999;
    
    //Working Vars
    protected int mode = EVO_EXP;
    protected boolean flagModeIncrease = false;
    protected SingleFaultModel faultModel;
    protected SingleRandomFaultModel srfm = null; // If its randomness, its randomness will need to be controlled
    protected SimulatorFaultyCircuit circuit;
    
    /** Creates new BISTIM */
    public BISTIM(Evolver evo, Deployment dep, SimulatorFaultyCircuit cir, Experiment exp, SingleFaultModel fm) {
        super( evo, dep, exp );
        circuit = cir;
        faultModel = fm;
        if( faultModel instanceof SingleRandomFaultModel )
        {
            srfm = ( SingleRandomFaultModel ) fm;
        }        
    }

    public BISTIM(Evolver evo, Deployment dep, SimulatorFaultyCircuit cir, Experiment exp, SingleFaultModel fm, boolean overdetecting, boolean explicit_incremental)
    {
        this( evo, dep, cir, exp, fm );
        this.overdetecting = overdetecting;
        this.explicit_incremental = explicit_incremental;
    }
    
    public BISTIM(Evolver evo, Deployment dep, SimulatorFaultyCircuit cir, Experiment exp, SingleFaultModel fm, int es, boolean overdetecting) {
        this( evo, dep, cir, exp, fm );
        eSize = es;
        this.overdetecting = overdetecting;
    }
    
    public BISTIM(Evolver evo, Deployment dep, SimulatorFaultyCircuit cir, Experiment exp, SingleFaultModel fm, double th) {
        this( evo, dep, cir, exp, fm );
        threshold = th;
    }
    
    public BISTIM(Evolver evo, Deployment dep, SimulatorFaultyCircuit cir, Experiment exp, SingleFaultModel fm, double th, double ets, int es ) {
        this( evo, dep, cir, exp, fm, th );
        etSetup = ets;
        eSize = es;
    }
    
    public void evolve()
    {
        super.evolve();
        if( srfm != null )
        {
            srfm.nextRandomSeries(); // Same for all per generation, but != 'tween generations.
        }
        if( flagModeIncrease )
        {
            mode++;
            flagModeIncrease = false;
        }
    }
    
    /** Evaluates these individuals using the deployment and experiments and
     * procedure of this model.
     */
    synchronized public double[] evaluate(Genotype[] inds)
    {
        double fitness;
        Genotype ind = inds[ 0 ];
        
        // 1) Evaluate Ind with no faults.
        deployment.program( ind );
        SampleData[] input = experiment.generateInput( inputSampleSeparation );
        SampleData[] outputWithE = deployment.run( input );
        int nrOuts = outputWithE.length - 1;
        SampleData[] outputNoE = ESLib.getLines( outputWithE, 0, nrOuts );
        double f_e = experiment.getFitness( input, outputNoE );
        ind.setProperty( 0, new Double( f_e ) );
        fitness = w_e * f_e * f_e;
        
        if( explicit_incremental && mode == EVO_EXP )
        {
            if( f_e >= min_e )
            {
                flagModeIncrease = true; // Main experiment good enough to include other paramaters
            }
        }else
        {
            // 2) Compute f_b now.
            boolean E_f_i = getE( outputWithE );
            double f_b = 0;

            if( !E_f_i ) // Check that E low for no faults! If it isn't, then discard.
            {
                // 2.1) Init variables.

                //2a) Check if faults are detected as a whole.  Ie: there exists
                // some input condition for which the fault is detected.  This
                // is per fault detection.

                boolean[] used = getUsed( nrOuts ); // Skipping faults in unused elements.

                // Per Fault stats:
                int nrFaults = 1; // how many faults tested for 
                int diagFaults = 1; // how many correctly diagnosed, including no faults.

                // 2b) Check if faults are detected at the right moment.  Ie: if
                // at the first moment the circuit gives out a wrong output the
                // error line is high.  This is per instance detection.

                // Per Instance stats:
                int nrInstances = 1; // how many instances tested
                int diagInstances = 1; // how many correctly diagnosed, including no faults.

                // Compress No faults output into int array.
                int testLength = input[ 0 ].length();
                int[] noFaultOuts = new int[ testLength ];
                if( !explicit_incremental || mode != EVO_PER_FAULT )
                {
                    for( int ol = 0; ol < testLength; ol++ )
                    {
                        noFaultOuts[ ol ] = getOutAt( outputWithE, ol );
                    }
                }

                // 2.2) Iterate through faults
                faultModel.reset();
                while( faultModel.hasMoreElements() )
                {
                    java.awt.Point fPosVal = ( java.awt.Point ) faultModel.nextElement();

                    if( used[ fPosVal.x ] ) // Skipping faults in unused elements.
                    {
                        // 2.2.1) Set Fault
                        circuit.setFault( fPosVal.x, fPosVal.y );
                        circuit.reset();

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
av在线不卡免费看| 国内精品久久久久影院色| 91在线精品一区二区| 国产精品麻豆视频| 成人视屏免费看| 国产精品久久久久久户外露出| 成人免费看黄yyy456| 久久久精品免费免费| 国产91在线|亚洲| 国产精品国产三级国产普通话蜜臀 | 视频一区二区三区中文字幕| 欧美另类一区二区三区| 麻豆精品一区二区三区| 久久青草国产手机看片福利盒子| 国产成a人亚洲精品| 亚洲天堂中文字幕| 欧美日韩国产中文| 精品中文av资源站在线观看| 欧美国产日本韩| 欧日韩精品视频| 麻豆精品久久精品色综合| 国产亚洲欧美一区在线观看| 91丨九色丨黑人外教| 无码av免费一区二区三区试看| 欧美成人精品3d动漫h| 高清不卡一区二区| 亚洲在线视频一区| 久久欧美中文字幕| 欧美日韩综合不卡| 国产成人亚洲综合a∨猫咪| 亚洲女人小视频在线观看| 911精品产国品一二三产区| 国产精品69毛片高清亚洲| 一区二区国产盗摄色噜噜| 日韩欧美色电影| 97超碰欧美中文字幕| 免费观看在线色综合| 综合久久给合久久狠狠狠97色 | 日本伊人色综合网| 中文字幕精品综合| 欧美精品99久久久**| 国产宾馆实践打屁股91| 亚洲第一久久影院| 中文字幕av资源一区| 在线成人av影院| 国产成人h网站| 日本视频免费一区| 亚洲日本在线观看| 精品理论电影在线| 在线视频中文字幕一区二区| 国产剧情一区在线| 日本不卡一二三| 亚洲午夜一区二区| 日韩久久一区二区| 国产午夜精品在线观看| 欧美一区二区三区精品| 色婷婷久久99综合精品jk白丝| 国产一区二区h| 日韩vs国产vs欧美| 亚洲精品欧美激情| 中文字幕一区二区三区在线不卡| 日韩欧美一级二级| 欧美色视频一区| 95精品视频在线| 成人免费视频网站在线观看| 麻豆精品久久久| 日本不卡视频一二三区| 亚洲一区二区视频| 亚洲精品成a人| 亚洲欧美日韩中文播放| 国产精品二三区| 中文字幕乱码亚洲精品一区| 26uuu精品一区二区三区四区在线| 欧美日本韩国一区| 在线视频综合导航| 欧美性猛交xxxxxxxx| 91在线免费视频观看| aa级大片欧美| 成人午夜精品在线| 顶级嫩模精品视频在线看| 狠狠色综合日日| 韩国毛片一区二区三区| 久久99精品国产麻豆婷婷洗澡| 秋霞av亚洲一区二区三| 蜜桃av一区二区在线观看| 裸体健美xxxx欧美裸体表演| 日韩电影一区二区三区| 毛片av一区二区三区| 精品在线观看免费| 国产剧情av麻豆香蕉精品| 国产盗摄一区二区三区| 成人毛片视频在线观看| 91在线无精精品入口| 色素色在线综合| 欧美日韩和欧美的一区二区| 欧美精品日韩一本| 日韩一区二区三区视频在线| 欧美成va人片在线观看| 久久久精品欧美丰满| 国产精品青草久久| 亚洲乱码中文字幕综合| 亚洲一区免费观看| 美腿丝袜亚洲色图| 国产精品一区免费视频| 岛国精品在线观看| 欧洲av一区二区嗯嗯嗯啊| 欧美一区二区视频免费观看| 久久婷婷国产综合精品青草| 国产精品嫩草久久久久| 亚洲综合久久久| 蜜臀国产一区二区三区在线播放| 国产精品主播直播| 99re热视频精品| 8x8x8国产精品| 国产亚洲综合在线| 亚洲一区二区三区在线| 国产专区欧美精品| 99精品欧美一区二区三区小说 | 亚洲精品视频在线观看免费 | 精品卡一卡二卡三卡四在线| 亚洲精品中文字幕乱码三区| 天天操天天色综合| 日韩国产精品久久久| 国产一区二区三区四区五区美女 | 日韩视频在线永久播放| 国产精品无人区| 美国av一区二区| 日韩欧美资源站| 狂野欧美性猛交blacked| 欧美人伦禁忌dvd放荡欲情| 亚洲一区二区三区四区在线观看| 91麻豆国产精品久久| 一区二区三区精品久久久| 日本精品裸体写真集在线观看| 日韩一区在线免费观看| 色哟哟国产精品| 天堂一区二区在线| 精品欧美乱码久久久久久| 国产成人免费视频一区| 中文字幕的久久| 欧美性一二三区| 国产在线看一区| 亚洲精选视频免费看| 欧美日韩成人一区二区| 粉嫩欧美一区二区三区高清影视 | 精品一区免费av| 亚洲乱码一区二区三区在线观看| 91免费视频网址| 性做久久久久久免费观看| 久久久国产一区二区三区四区小说 | 狠狠色狠狠色综合系列| 亚洲人成电影网站色mp4| 日韩欧美久久一区| 成人av动漫在线| 国产大陆a不卡| 麻豆国产欧美一区二区三区| 国产精品久久三| 国产日韩在线不卡| 26uuu成人网一区二区三区| 欧美三级电影网站| 亚洲二区在线观看| 亚洲欧美一区二区视频| 久久精品亚洲乱码伦伦中文| 欧美一区二区三区四区高清| 99精品国产视频| 国产成人综合亚洲91猫咪| 精品在线你懂的| 精品一区二区在线看| 亚洲va欧美va国产va天堂影院| 亚洲欧美日韩小说| 国产亚洲精品久| 欧美国产欧美综合| 中文字幕第一区综合| 国产拍揄自揄精品视频麻豆| 欧美不卡一区二区三区| 精品久久久久久久人人人人传媒| 欧美伊人久久大香线蕉综合69 | 国产精品夜夜嗨| 高清shemale亚洲人妖| heyzo一本久久综合| 在线一区二区观看| 欧美午夜免费电影| 久久伊人中文字幕| 成人免费一区二区三区在线观看 | 99国产精品一区| 色8久久精品久久久久久蜜| 欧美性色黄大片| 欧美手机在线视频| 国产成人无遮挡在线视频| 波波电影院一区二区三区| 欧美日韩国产精品成人| 久久综合狠狠综合久久综合88| 最新成人av在线| 久久精品国产99国产| 色婷婷久久久综合中文字幕| 欧美一区二区在线免费播放| 亚洲欧美日韩人成在线播放| 韩国三级中文字幕hd久久精品| 国产福利一区二区三区在线视频| 在线这里只有精品|