Skip to content
This repository has been archived by the owner on May 16, 2018. It is now read-only.

Handle alternative actions #103

Open
pgambier opened this issue Apr 27, 2017 · 0 comments
Open

Handle alternative actions #103

pgambier opened this issue Apr 27, 2017 · 0 comments

Comments

@pgambier
Copy link

For some use cases, there is a need to test alternative actions. The alternatives should be prioritized and their test should be stopped when some criterias are fullfilled.

Several implementations are possible (to be discussed).

Current implementation (see examples below) : undo manually the actions precedently tested to set the network in the same state than it was before. It implies to use a mechanism to disable the alternatives already tested (life, actionTaken…)

Example :

// Save initial tap of PST
rule('Initial_Tap') {
    when !contingencyOccurred()
      life 1
    apply 'saveInitialTapOfPST'
}

action('saveInitialTapOfPST') {
      tasks {
            script{
                  transformer('PST_ID').phaseTapChanger.tapInit = transformer('PST_ID').phaseTapChanger.tapPosition
            }
      }
}

// Open transformer TR_ID
rule('Open_TR_ID') {
    when !contingencyOccurred() && constraint1
    apply 'openTrId'
}

action('openTrId') {
	tasks {  
		openSwitch 'TR_ID_BREAKER'
	}
}

// Close transformer TR_ID and open line LINE_ID
rule('Open_Line_Breaker') {
    when !contingencyOccurred() && actionTaken('openTrId') && !constraint1
    apply 'openLineBreaker'
}

action('openLineBreaker') {
	tasks {
		openSwitch 'LINE_ID_BREAKER'
                closeSwitch 'TR_ID_BREAKER'
		script {
			transformer('PST_ID').phaseTapChanger.tapPosition = transformer('PST_ID').phaseTapChanger.tapInit
		}
	}
}

Other ideas : keep all the network states for a calculation ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants