MLDO Module DotModule

From EVOCD
Jump to: navigation, search

back


Ports

Port type Java name Port Name packet type Associated Variable Intended connection
Input ports:
inport IN String RouterSlip Loop Module
Output ports:
outport OUT1 String RouterSlip DotModule or End_of_loop
endPort OUT2 String "error" Error_Stop

Synopsis

  1. Process Routing Slip
  2. Write initial.txt file
  3. Write const.txt file
  4. Run Dot
  5. IF (return value==0) Update values of the design variables and update values of the link variable(s)
  6. IF (return value==0) send updated Routing Slip to outport ELSE send "error" to endPort

Details

Process Routing Slip

  1. Split the incoming string by " ". It is expected to have at least two elements; if not set returnValue to -1 (prohibiting the execution of the rest of the module)
  2. The first is the identifier of the Dot instance: system. Convert it to integer; if this fails, set returnValue to -1 (prohibiting the execution of the rest of the module)
  3. Update slip by calling SystemStatus.updateRouterSlip(String[]) which removes the fist element and concatenates the remainding element into a single String.

Write initial.txt

requires improvement

  1. creates three Vectors<String> to store lb, initial value, and ub for each design variable
  2. uses hardwired values for lb=0.0 and ub=10.0
  3. the initial values are taken by invoking Strong iv[] = SystemState.getSubsystemVaraiblesValues(system)
  4. write file using FileUtil.writeInputFile(configuration.systems[system]+"/initial.txt", lb, initvalues,ub), where initvalue is a Vector converted from String[] iv

Write const.txt

requires improvement

  1. write file using FileUtil.Values2File(SystemState.getConstantValues(system),configuration.systems[system]+"/const.txt");
  2. write to stdout values of SystemState.lambda, SystemState.W, and SystemState.link_up which is wrong

Run Dot

  1. Dot myDotRun = new Dot(system)
  2. returnValue = myDotRun.runDot

Update Design Variables and Link Variables

  1. Vector<String> myOutput = FileUtil.getDotResults(configuration.systems[system]+"/result.txt")
  2. convert Vector myOutput to String[] x
  3. SystemState.updateSubsystemVaraibleValues(system,x)
  4. SystemState.updateLinkVariables(system) which requires an improvement
Personal tools
Namespaces

Variants
Actions
home
Materials
Material Models
Design
Resources
Projects
Education
Toolbox