亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
麻豆精品一区二区三区| 亚洲女爱视频在线| 91福利在线播放| 麻豆成人久久精品二区三区红 | 欧美一卡二卡三卡| 成人av网站在线观看| 日本三级亚洲精品| 一区二区三区在线视频观看 | 亚洲精品视频在线看| 精品国产91乱码一区二区三区| 色94色欧美sute亚洲线路一久 | www.日韩大片| 经典一区二区三区| 午夜影院久久久| 亚洲三级在线观看| 国产精品免费aⅴ片在线观看| 日韩一区二区三区高清免费看看| 色哟哟一区二区在线观看| 国产成人在线观看| 久久99精品久久久久久国产越南| 亚洲成人在线免费| 亚洲精选视频在线| 亚洲丝袜精品丝袜在线| 欧美激情一区在线观看| 国产视频一区二区三区在线观看| 91精品在线免费| 欧美日韩国产经典色站一区二区三区 | 偷窥少妇高潮呻吟av久久免费| 国产精品久久久久久久第一福利| 国产亚洲一区二区三区四区| 精品国产在天天线2019| 日韩欧美一区二区视频| 777久久久精品| 3751色影院一区二区三区| 欧美日韩视频在线观看一区二区三区| 99国产精品久久久| 99久久er热在这里只有精品15| 国产99久久久精品| 成人性生交大片免费看在线播放| 国产一区二区免费看| 国产精品影音先锋| 国产成a人亚洲| 成人18视频日本| 色一情一伦一子一伦一区| 在线观看日韩国产| 欧美精品色一区二区三区| 亚洲欧美综合色| 国产精品久久久久国产精品日日| 国产精品久久久99| 亚洲男人的天堂网| 亚洲第一搞黄网站| 久久国产乱子精品免费女| 国产自产2019最新不卡| 成人精品在线视频观看| av一区二区三区四区| 在线精品亚洲一区二区不卡| 欧美乱妇一区二区三区不卡视频| 欧美一级二级在线观看| 久久一留热品黄| 亚洲欧洲精品天堂一级| 一区二区三区在线观看国产| 日日摸夜夜添夜夜添国产精品| 久久国产精品色婷婷| 国产69精品久久久久777| 色视频一区二区| 在线电影国产精品| 国产亚洲欧美在线| 亚洲黄一区二区三区| 蜜臀av性久久久久蜜臀aⅴ流畅 | 国产·精品毛片| 在线视频你懂得一区二区三区| 欧美日韩国产乱码电影| 久久久精品免费观看| 亚洲天堂中文字幕| 蜜桃久久av一区| 9色porny自拍视频一区二区| 欧美日韩精品系列| 国产欧美精品日韩区二区麻豆天美| 亚洲欧美另类在线| 精品一区二区在线观看| 99久久er热在这里只有精品66| 欧美日韩和欧美的一区二区| 中文一区在线播放| 日韩精品亚洲一区二区三区免费| 国产精品99久久久久久久vr | 久久精品免视看| 亚洲一线二线三线视频| 国产一区二区美女诱惑| 欧美午夜精品免费| 久久精品人人做人人综合| 亚洲曰韩产成在线| 国产精品一区二区91| 欧美日韩高清在线| 国产精品国产三级国产a| 奇米色一区二区| 91亚洲资源网| 久久久精品日韩欧美| 日本欧美肥老太交大片| 91麻豆精东视频| 久久一夜天堂av一区二区三区| 亚洲一区二区成人在线观看| 国产成人激情av| 日韩一区二区三区四区五区六区| 国产精品国产成人国产三级| 久久99精品视频| 在线播放91灌醉迷j高跟美女| 国产精品青草综合久久久久99| 精品一区二区综合| 欧美精品电影在线播放| 亚洲精品一二三四区| 欧美猛男超大videosgay| 亚洲女同女同女同女同女同69| 国产精品99久久久久| 亚洲精品在线电影| 麻豆91小视频| 欧美男女性生活在线直播观看| 亚洲美女视频在线| 不卡高清视频专区| 久久精品夜色噜噜亚洲a∨ | 色欧美乱欧美15图片| 国产精品国产a| 大桥未久av一区二区三区中文| 精品久久久久久久久久久久久久久久久| 亚洲一二三四区不卡| 一本色道综合亚洲| 中文字幕色av一区二区三区| 成人一级片在线观看| 日本一区二区三区视频视频| 国产在线不卡一卡二卡三卡四卡| 日韩精品中午字幕| 久久国产日韩欧美精品| 日韩欧美一区在线| 狠狠色丁香婷综合久久| 精品免费国产二区三区| 国模大尺度一区二区三区| 精品裸体舞一区二区三区| 久久99国内精品| 久久欧美中文字幕| 国产电影精品久久禁18| 国产日韩成人精品| 91在线观看视频| 亚洲一二三四区| 欧美日韩电影在线| 日本怡春院一区二区| 欧美一区二区三区成人| 麻豆91在线播放免费| 久久久99久久| 97精品久久久久中文字幕| 亚洲欧美日韩成人高清在线一区| 欧美午夜不卡在线观看免费| 丝瓜av网站精品一区二区| 欧美一区二区三区免费在线看| 精品在线播放午夜| 亚洲国产精品精华液ab| 波多野结衣亚洲| 一级日本不卡的影视| 91精品国产色综合久久| 日本伊人色综合网| 久久精品欧美日韩精品 | 91视频免费播放| 亚洲v日本v欧美v久久精品| 日韩午夜在线影院| 国产成人综合视频| 一区二区三区毛片| 日韩欧美国产一区二区三区| 国产很黄免费观看久久| 亚洲美女屁股眼交| 日韩欧美一二三四区| 成人黄色网址在线观看| 亚洲综合免费观看高清在线观看| 欧美一激情一区二区三区| 成人手机电影网| 午夜精品久久久久久久99水蜜桃| 精品福利一二区| 一本大道av伊人久久综合| 蜜桃久久av一区| 亚洲精品视频自拍| 精品国产免费人成电影在线观看四季 | 日韩一区二区三区在线观看| 成人动漫一区二区在线| 日韩和欧美一区二区三区| 欧美国产日产图区| 欧美猛男gaygay网站| 成人黄页毛片网站| 日韩精品三区四区| 椎名由奈av一区二区三区| 日韩一区二区三区高清免费看看| 成人精品一区二区三区中文字幕 | 日韩av一区二区在线影视| 中文字幕在线观看不卡| 欧美一区二区大片| 色婷婷综合久久久久中文| 韩国女主播成人在线观看| 一区二区三区色| 久久久美女艺术照精彩视频福利播放| 欧美亚一区二区| av资源网一区| 国产一区二区三区高清播放| 日本中文字幕一区| 亚洲一区二区欧美日韩|