📄 constraint.java
字号:
package com.power.pipeengine.Constraint;
import com.power.util.Message.*;
import com.power.pipeengine.*;
import java.util.ResourceBundle;
import com.power.lpsolver.LPSolve.*;
/**
*
* <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
*/
/**
* Constraint is the super class of all constraint types.
*/
public class Constraint
{
static ResourceBundle res = ResourceBundle.getBundle("com.power.pipeengine.Res",
EngineConfig.getInstance().getLocale() );
private String _constraintType = "";
/**
* Sole class constructor.
*/
public Constraint() {
}
/**
* Sets the constraint type to the type specified in paraster.
* @param aType the type to set for this constraint.
*/
protected void setConstraintType( String aType ) {
_constraintType = aType;
}
/**
* Publishes message right before building the constraints.
*/
public void publishMessage() {
String msg = res.getString("Engine1200") + _constraintType + ".\n";
MessageArea.getInstance().addMessage( msg );
}
public void addMPSElem(com.power.lpsolver.LPSolve.Constraint con, int colIdx, Element elem) {
com.power.lpsolver.LPSolve.Variable var =
Model.getInstance().getModelVariables().getVariable( colIdx );
var.addMPSElem( con, elem );
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -