-
-
Save Groostav/347a283ac7ec6a738191 to your computer and use it in GitHub Desktop.
Powershell script for PDOL - OPTIP problem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "running powershell script! got " $args[0] "as input file and " $args[1] " as output file!" | |
$data = import-csv $args[0] | |
$x1 = (0+$data.x1) | |
$x2 = (0+$data.x2) | |
#program mimmicks what's in the SC function, except I added an x3 to it, | |
#and it has no constraints | |
$output = 4*$x1*$x1 ` | |
- 21/10*[System.math]::pow($x1, 4) ` | |
+ 1/3*[System.math]::pow($x1, 6) ` | |
+ $x1*$x2 ` | |
- 4*[System.math]::pow($x2, 2) ` | |
+ 4*[System.math]::pow($x2, 4) ` | |
"" + "output" + "," + "`n" ` | |
+ $output + "," ` | |
> $args[1] | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment