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

📄 engineconfig.java

📁 全球著名IT公司ILog的APS高级排产优化引擎
💻 JAVA
字号:
package com.power.pipeengine;import java.applet.*;import java.util.*;import java.text.*;import com.power.language.*;/** * <p>Title: PIPE Engine</p> * <p>Description: Global Planning Optimization Engine</p> * <p>Copyright: Copyright (c) 2002</p> * <p>Company: Paraster, Inc.</p> * @author Wei Tan * @version 1.0 */public class EngineConfig {    //set default objective type    ResourceBundle res = null;    private String _objType = null;    private int _iterationUpdateFrequency = 1; //default to "high"    private Applet _engineApplet = null;    private boolean _isDataSufficient = true;    public final double PRECISION = 1E-7;    private Locale _locale = null;    private Collator _myCollator = null;    private boolean runPIPE = true;    private boolean atpScheduling = false;    private static final EngineConfig INSTANCE =                              new EngineConfig();   // Private constructor supresses   // default public constructor    private EngineConfig( ) {        //setLocale();        res = ResourceBundle.getBundle("com.power.pipeengine.Res",                                       getLocale() );        _objType = res.getString("MAXIMIZE_ON_TIME");        _myCollator = Collator.getInstance( getLocale() );    }    public static EngineConfig getInstance( ) {        return INSTANCE;    }    public String getObjType() {        return _objType;    }    public void setObjType( String type ) {        _objType = type;    }    public void setEngineApplet( Applet anApplet ) {      _engineApplet = anApplet;    }    public Applet getEngineApplet() {      return _engineApplet;    }    public void setDataSufficiency( boolean status ) {      _isDataSufficient = status;    }    public boolean isDataSufficient() {      return _isDataSufficient;    }    public void setUpdateFrequency( int freq ) {        _iterationUpdateFrequency = freq;    }    public int getUpdateInterval() {        int[] freqs = new int[5];        freqs[0] = 1;        freqs[1] = 10;        freqs[2] = 25;        freqs[3] = 50;        freqs[4] = 100;        return freqs[_iterationUpdateFrequency];    }    public boolean isMaxOnTimeDelivery() {        if( getCollator().compare(              _objType, res.getString("MAXIMIZE_ON_TIME") ) == 0 ) {            return true;        }        return false;    }    public boolean isMaxProfit() {        if( getCollator().compare(              _objType, res.getString("MAXIMIZE_PROFIT") ) == 0 ) {            return true;        }        return false;    }    /**     *set locale from the session     */    private void setLocale(){       Hashtable localHashtable = new Hashtable();       localHashtable.put("CN",Locale.CHINA);       localHashtable.put("EN",Locale.US);       try{            /*String versionFlag = null;            if(localHashtable.get(versionFlag)!=null)                _locale =(Locale)localHashtable.get(versionFlag);            else*/                _locale =Locale.CHINA ;        }catch(Exception e){}    }    public Locale getLocale() {        setLocale();        return _locale;       }    public Collator getCollator() {        return _myCollator;    }    public void setRunFlag( boolean aFlag ) {        runPIPE = aFlag;    }    public boolean getRunFlag() {        return runPIPE;    }    public void setATPScheduling(){        atpScheduling = true;    }    public boolean isATPScheduling() {        return atpScheduling;    }}

⌨️ 快捷键说明

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