今天为网友提供的是JAVA源码
源代码在线查看: rscslackvariable.java
package com.power.pipeengine.Variable;
import java.util.*;
import com.power.pipeengine.Entity.*;
public class RscSlackVariable
extends Variable {
private static final RscSlackVariable INSTANCE =
new RscSlackVariable();
// Private constructor supresses
// default public constructor
private RscSlackVariable() {
}
public static RscSlackVariable getInstance() {
return INSTANCE;
}
public String getVariable(Resource rsc, Facility f, Bucket b) {
String varName = new String("R" +
"R" + rsc.getVariableCode() +
"F" + f.getVariableCode() +
"T" + b.getVariableCode());
/*String separator = "";
return new String( "R" + rsc.getResourceID() + separator +
f.getFacilityID() + separator +
b.getBucketID() );*/
//this.setObjElement( varName, (100 - b.getBucketID())/100 );
return varName;
}
}