本文整理汇总了Java中de.uni.freiburg.iig.telematik.sepia.petrinet.cpn.abstr.AbstractCPNPlace类的典型用法代码示例。如果您正苦于以下问题:Java AbstractCPNPlace类的具体用法?Java AbstractCPNPlace怎么用?Java AbstractCPNPlace使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AbstractCPNPlace类属于de.uni.freiburg.iig.telematik.sepia.petrinet.cpn.abstr包,在下文中一共展示了AbstractCPNPlace类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: checkValidity
import de.uni.freiburg.iig.telematik.sepia.petrinet.cpn.abstr.AbstractCPNPlace; //导入依赖的package包/类
/**
* CPNs require relation effectiveness.<br>
* Each relation must move at least one token from a place to a transition or vice versa.
*
* @throws PNValidationException
* @see AbstractCPNFlowRelation#hasConstraints()
*/
public static <P extends AbstractCPNPlace<F>,
T extends AbstractCPNTransition<F>,
F extends AbstractCPNFlowRelation<P,T>,
M extends AbstractCPNMarking>
void checkValidity(AbstractCPN<P,T,F,M> cpn)
throws PNValidationException {
defaultValidity(cpn);
for(AbstractCPNFlowRelation<P,T> relation: cpn.getFlowRelations()){
if(!relation.hasConstraints()){
throw new PNValidationException("Inoperative relation: " + relation.toString());
}
}
}
示例2: initiateCWNPropertyCheck
import de.uni.freiburg.iig.telematik.sepia.petrinet.cpn.abstr.AbstractCPNPlace; //导入依赖的package包/类
public static <P extends AbstractCPNPlace<F>,
T extends AbstractCPNTransition<F>,
F extends AbstractCPNFlowRelation<P,T>,
M extends AbstractCPNMarking>
void initiateCWNPropertyCheck(CWNStructureCheckingCallableGenerator<P,T,F,M> generator, ExecutorListener<CWNProperties> listener)
throws CWNException {
ThreadedCWNStructureChecker<P,T,F,M> calculator = new ThreadedCWNStructureChecker<P,T,F,M>(generator);
calculator.addExecutorListener(listener);
calculator.runCalculation();
}
示例3: checkCWNProperty
import de.uni.freiburg.iig.telematik.sepia.petrinet.cpn.abstr.AbstractCPNPlace; //导入依赖的package包/类
public static <P extends AbstractCPNPlace<F>,
T extends AbstractCPNTransition<F>,
F extends AbstractCPNFlowRelation<P,T>,
M extends AbstractCPNMarking>
CWNProperties checkCWNProperty(CWNStructureCheckingCallableGenerator<P,T,F,M> generator)
throws CWNException {
ThreadedCWNStructureChecker<P,T,F,M> calculator = new ThreadedCWNStructureChecker<P,T,F,M>(generator);
calculator.runCalculation();
return calculator.getResult();
}
示例4: initiateCWNSoundnessCheck
import de.uni.freiburg.iig.telematik.sepia.petrinet.cpn.abstr.AbstractCPNPlace; //导入依赖的package包/类
public static <P extends AbstractCPNPlace<F>,
T extends AbstractCPNTransition<F>,
F extends AbstractCPNFlowRelation<P,T>,
M extends AbstractCPNMarking>
void initiateCWNSoundnessCheck(CWNSoundnessCheckingCallableGenerator<P,T,F,M> generator, ExecutorListener<CWNProperties> listener)
throws CWNException {
ThreadedCWNSoundnessChecker<P,T,F,M> calculator = new ThreadedCWNSoundnessChecker<P,T,F,M>(generator);
calculator.addExecutorListener(listener);
calculator.runCalculation();
}
示例5: checkCWNProperty
import de.uni.freiburg.iig.telematik.sepia.petrinet.cpn.abstr.AbstractCPNPlace; //导入依赖的package包/类
public static <P extends AbstractCPNPlace<F>,
T extends AbstractCPNTransition<F>,
F extends AbstractCPNFlowRelation<P,T>,
M extends AbstractCPNMarking>
CWNProperties checkCWNProperty(CWNSoundnessCheckingCallableGenerator<P,T,F,M> generator)
throws CWNException {
ThreadedCWNSoundnessChecker<P,T,F,M> calculator = new ThreadedCWNSoundnessChecker<P,T,F,M>(generator);
calculator.runCalculation();
return calculator.getResult();
}
示例6: checkSoundness
import de.uni.freiburg.iig.telematik.sepia.petrinet.cpn.abstr.AbstractCPNPlace; //导入依赖的package包/类
public static <P extends AbstractCPNPlace<F>,
T extends AbstractCPNTransition<F>,
F extends AbstractCPNFlowRelation<P,T>,
M extends AbstractCPNMarking>
void checkSoundness(AbstractCPN<P,T,F,M> cpn, boolean checkValidity)
throws PNSoundnessException {
if(checkValidity){
try {
CPNValidity.checkValidity(cpn);
} catch (PNValidationException e) {
throw new PNSoundnessException("Underlying net is not valid.\nReason: " + e.getMessage(), e);
}
}
}
示例7: TokenConfigurerDialog
import de.uni.freiburg.iig.telematik.sepia.petrinet.cpn.abstr.AbstractCPNPlace; //导入依赖的package包/类
public TokenConfigurerDialog(Window window, AbstractCPNPlace place2, PNGraph cpnGraph) {
super(window, place2.getName());
isPlace = true;
graph = cpnGraph;
paName = place2.getName();
setUpGui();
}
示例8: createCellSpecificAddBtnAction
import de.uni.freiburg.iig.telematik.sepia.petrinet.cpn.abstr.AbstractCPNPlace; //导入依赖的package包/类
@Override
protected void createCellSpecificAddBtnAction(String color) {
if (((AbstractCPNPlace) graph.getNetContainer().getPetriNet().getPlace(cellName)).getColorCapacity(color) == 0)
((mxGraphModel) graph.getModel()).execute(new CapacityChange((PNGraph) graph, cellName, color, 1));
getMultiSet().setMultiplicity(color, 1);
((mxGraphModel) graph.getModel()).execute(new TokenChange((PNGraph) graph, cellName, getMultiSet()));
}
示例9: getPlace
import de.uni.freiburg.iig.telematik.sepia.petrinet.cpn.abstr.AbstractCPNPlace; //导入依赖的package包/类
private AbstractCPNPlace getPlace() {
return (AbstractCPNPlace) graph.getNetContainer().getPetriNet().getPlace(cellName);
}
示例10: getSpinnerCapacity
import de.uni.freiburg.iig.telematik.sepia.petrinet.cpn.abstr.AbstractCPNPlace; //导入依赖的package包/类
@Override
protected int getSpinnerCapacity(String tokenName) {
return !(((AbstractCPNPlace) graph.getNetContainer().getPetriNet().getPlace(cellName)).getColorCapacity(tokenName) < 0) ? ((AbstractCPNPlace) graph.getNetContainer().getPetriNet()
.getPlace(cellName)).getColorCapacity(tokenName) : MAX_CAPACITY;
}