Package jmt.gui.exact

Examples of jmt.gui.exact.ExactModel


   * <br>
   * WARNING: This method should be called before solving the system.
   * @return true if sufficient capacity exists for the given workload, false otherwise
   */
  public boolean checkProcessingCapacity() {
    ExactModel exact = new ExactModel();
    XMLUtils xmlUtils = new XMLUtils();
    Document inputDoc;
    try {
      inputDoc = xmlUtils.loadXML(modelDefinition);
      exact.loadDocument(inputDoc);
    } catch (SAXException e1) {
      logger.error("Cannot parse correctly input JMVA model: " + e1.getMessage());
      return false;
    } catch (IOException e1) {
      logger.error("I/O error opening input JMVA model: " + e1.getMessage());
      return false;
    }
    return exact.checkSaturation() == ExactModel.NO_SATURATION;
  }
View Full Code Here


  public static void infoBox(String infoMessage, String location)
    {
        JOptionPane.showMessageDialog(null, infoMessage, "InfoBox: " + location, JOptionPane.INFORMATION_MESSAGE);
    }
  public void sync() {   
    ExactModel data = ew.getData();
    synchronized (data) { 
      classes = data.getClasses();           
      classNames = ArrayUtils.copy(data.getClassNames());      
      stationNames = ArrayUtils.copy(data.getStationNames());
      stationNames = ArrayUtils.resize(stationNames, stationNames.length+1, null);
      stationNames[stationNames.length-1] = "Arrival Process";
      visits = ArrayUtils.copy2(data.getVisits());
      // To set the Gray color for the Arrival Process (just for the UI)
      colors = ArrayUtils.resize(colors, stationNames.length);
      for (int i=0 ; i< stationNames.length; i++)
      {
        if (stationNames[i].equals("Arrival Process"))
        {
          colors[i] = Color.GRAY;
        }
        else
        {
          colors[i] = null;         
        }       
      }           
      ReferenceStation = ArrayUtils.copy(data.getReferenceStation());
     
      classTypes = ArrayUtils.copy(data.getClassTypes());
     
    }
    for(int i=0;i<classes;i++) //if the class is open there is no RefStation
    {
      if (classTypes[i] == 1)
View Full Code Here

  }
  private void commit() {

    stTable.stopEditing();

    ExactModel data = ew.getData();
    synchronized (data) {     
      data.setReferenceStation(ReferenceStation);
    }
  }
View Full Code Here

  public static void infoBox(String infoMessage, String location)
    {
        JOptionPane.showMessageDialog(null, infoMessage, "InfoBox: " + location, JOptionPane.INFORMATION_MESSAGE);
    }
  public void sync() {   
    ExactModel data = ew.getData();
    synchronized (data) { 
      classes = data.getClasses();           
      classNames = ArrayUtils.copy(data.getClassNames());      
      stationNames = ArrayUtils.copy(data.getStationNames());
      stationNames = ArrayUtils.resize(stationNames, stationNames.length+1, null);
      stationNames[stationNames.length-1] = "Arrival Process";
      visits = ArrayUtils.copy2(data.getVisits());
      // To set the Gray color for the Arrival Process (just for the UI)
      colors = ArrayUtils.resize(colors, stationNames.length);
      for (int i=0 ; i< stationNames.length; i++)
      {
        if (stationNames[i].equals("Arrival Process"))
        {
          colors[i] = Color.GRAY;
        }
        else
        {
          colors[i] = null;         
        }       
      }           
      ReferenceStation = ArrayUtils.copy(data.getReferenceStation());
     
      classTypes = ArrayUtils.copy(data.getClassTypes());
     
    }
    for(int i=0;i<classes;i++) //if the class is open there is no RefStation
    {
      if (classTypes[i] == 1)
View Full Code Here

  }
  private void commit() {

    stTable.stopEditing();

    ExactModel data = ew.getData();
    synchronized (data) {     
      data.setReferenceStation(ReferenceStation);
    }
  }
View Full Code Here

   * @param isOpen true if model is open, false if not, null to read from data structure
   * @param isAlgowhatif true if whatif on algorithm was selected, false if not, null to read from data structure
   * @param isLoadDependent if model is load dependent or not. null to read from data structure
   */
  public void update(Boolean isClosed, Boolean isOpen, Boolean isAlgowhatif, Boolean isLoadDependent) {
    ExactModel data = ew.getData();
    SolverAlgorithm algorithm = data.getAlgorithmType();
    tolerance.setText(numFormat.format(data.getTolerance()));
    algorithmList.setSelectedItem(algorithm.toString());
    if (isClosed == null) {
      isClosed = ew.getData().isClosed();
    }
    if (isOpen == null) {
View Full Code Here

TOP

Related Classes of jmt.gui.exact.ExactModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.