MLDO System State

From EVOCD
Jump to: navigation, search

back


name type description comments
Nsystems int #number of systems (DOT instances)
DesignVariables String[] values of the design variables for the whole system maybe it should be double[]
ConstantsValues String[] values of the constants sent to DOT mess: not properly synchronized with lambda, W, and link variables, should be double[]?
ConstantsNames String[] names of constants used for anything?
SubsystemVaraibles ArrayList<int[]> mapping between subsystem variables and DesignVariables
link_up String value of a link variable added at hoc
link_down String value of the link variable added at hoc
RouterSlip String Router Slip
f,fold double used in inner loop
c,cold double used in outer loop
tau,beta,gamma double used in outer loop
inner_test,outer_test double used to test convergence
lambda,W double constants redundant wrt to ConstantsValues
x1,x2 double used to evaluate f not general enough
results ArrayList<String> array to collects results from each iteration for the final disply

Systems

  • void setNsystems(int k)

DesignVariables

methods sequence of actions
  • void createDesignVariables(int k)
  • void setDesignVariables(String[] x)
  • void updateSubsystemVeriableValues(int subsystem, String[] x)
  • String[] getDesignVariables()
  • String getSelectedDesignVariable(int i)
  • String[] getSubsystemVaraiblesValues(int subsystem)
  • void setSubsystemVariables()
  • void addSubsystemVariables(int[] v)

configuration

  • configuration::readConfig: SystemState.createDesinVariables(nvariables);
  • configuration::readConfig: SystemState.setNsystems(nsystems);
  • configuration::readConfig: SystemState.setSubsystemVariables();
  • for each subsystem:
    • configuration::readConfig: SystemState.addSubsystemVariables(tmpIA);
    • configuration::setDot: read initial values from definition.txt
    • configuration::setDot: SystemState.updateSubsystmVariableValues(s, x);
    • configuration::setDot: (set configuration variables: Vnames, Vinit, Vlower, Vupper)
  • end of configuration

dotModule

  • write initial.txt (using SystemState.getSubsystemVariablesValues(system); and hardwired lb, ub)
  • run dot
  • read optimized values: myOutput=FileUtil.getDotResults(configuration.systems[system]+"/result.txt");
  • covert Vector myOutput to String[]x
  • SystemState.updateSubsystmVariableValues(system, x);
  • SystemState.updateLinkVariables(system);

EndInnerLoop

  • SystemState.addResult();
  • SystemState.converged("INNER")
    • x1=(new Double(DesignVariables[0])).doubleValue();
    • x2=(new Double(DesignVariables[1])).doubleValue();

EndOuterLoop

  • SystemState.converged("OUTER")
    • x1=(new Double(link_up)).doubleValue();
    • x2=(new Double(link_down)).doubleValue();

Finalizer

  • String[] x = SystemState.getDesignVariables() and prints x
  • SystemState.results.get(i) and prints them

Constants

methods sequence of actions
  • void setConstantsNumber(int k)
  • void setContantNames(String[] x)
  • void setConstantsValues(String[] x) does debug printout
  • void setConstantValues)double x)
  • void setConstantsValuesV(Vector<String> x) does debug printout
  • Vector<String> getConstantsValues(int s) does debug printout
  • double[] getConstantValues()
  • void updateLinkVariables(int subsystem)
  • void setLinkDown(String s)
  • void setLinkUp(String s)

configuration

  • for each subsystem:
    • configuration::setDot: read constant names values from definition.txt and set configuration variables ConstantsNames, ConstantsValues
    • configuration::setDot: SystemState.setConstantsNumber(ConstantValues.size());
    • configuration::setDot: SystemState.setConstantsValuesV(ConstantValues);
  • end of configuration

dotModule

  • write const.txt (using SystemState.getConstantValues(system)
  • run Dot
  • SystemState.updateSubsystmVariableValues(system, x);
  • SystemState.updateLinkVariables(system);

EndInnerLoop

  • SystemState.addResult();
  • SystemState.converged("INNER")
    • uses tau (hardwired in SystemState)

EndOuterLoop

  • SystemState.converged("OUTER")
     double[] cc.SystemState.getConstantValuesD();
     lambda = cc[0]
     W = cc[1]   
     try {
	x1=(new Double(link_up)).doubleValue();
	x2=(new Double(link_down)).doubleValue();
     } catch (Exception e) {System.out.println("conversion error in SystemState.converged 2");}	
		 
     c = x2-x1;
     lambda=lambda+2*W*W*c;
     if(Math.abs(c)>gamma*Math.abs(c)) W = beta*W;
     outer_test=Math.abs(c-cold);
     cold=c;
     if(outer_test<tau) result=true;
     else result=false false; 
     cc[0]=lambda;
     cc[1]=W
     SystemState.setConstantValuesD(cc);

I think that the problem is that the new values of lambda and W are never written to the consts.txt file. How to make this method generic? Finalizer

RouterSlip

  • void setRouterSlip(String s)
  • String getRouterSlip()
  • String updateRouterSlip(String[] s)

Miscellaneous

  • boolean converged(String s) s="INNER" or "OUTER"
  • void addResult()
Personal tools
Namespaces

Variants
Actions
home
Materials
Material Models
Design
Resources
Projects
Education
Toolbox