summaryrefslogtreecommitdiffstats
path: root/test/optengine-tests/test_optengine_invalid2.json
diff options
context:
space:
mode:
authorvrvarma <vikas.varma@att.com>2020-03-03 22:22:28 -0500
committervrvarma <vikas.varma@att.com>2020-03-04 20:55:57 -0500
commitde5fdaafad9fccba0b9a7f308d72f26816dd1a0f (patch)
treee8e683e21002c20f3d743375d742bf0819d82409 /test/optengine-tests/test_optengine_invalid2.json
parent7d4f37c45d50c56dfe438c04dbecea3ca9f7c9d2 (diff)
Adding the generic solver code
Add docker file for optim engine Run pods as a non-root user Fix docker tag script Change-Id: If25fe66b839a70e83e35292031a2da012e81fe47 Signed-off-by: vrvarma <vikas.varma@att.com> Issue-ID: OPTFRA-712
Diffstat (limited to 'test/optengine-tests/test_optengine_invalid2.json')
-rw-r--r--test/optengine-tests/test_optengine_invalid2.json15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/optengine-tests/test_optengine_invalid2.json b/test/optengine-tests/test_optengine_invalid2.json
new file mode 100644
index 0000000..23c5a8e
--- /dev/null
+++ b/test/optengine-tests/test_optengine_invalid2.json
@@ -0,0 +1,15 @@
+{
+ "requestInfo": {
+ "transactionId": "xxx-xxx-xxxx",
+ "requestID": "yyy-yyy-yyyy",
+ "sourceId": "cmopt",
+ "timeout": 600
+ },
+ "optimInfo": {
+
+ "solverArgs": {
+ "solver": "cbc"
+ },
+ "modelContent": "% Baking cakes for the school fete (with data file)\r\n\r\nint: flour; %no. grams of flour available\r\nint: banana; %no. of bananas available\r\nint: sugar; %no. grams of sugar available\r\nint: butter; %no. grams of butter available\r\nint: cocoa; %no. grams of cocoa available\r\n\r\nconstraint assert(flour >= 0,\"Invalid datafile: \" ++\r\n \"Amount of flour should be non-negative\");\r\nconstraint assert(banana >= 0,\"Invalid datafile: \" ++\r\n \"Amount of banana should be non-negative\");\r\nconstraint assert(sugar >= 0,\"Invalid datafile: \" ++\r\n \"Amount of sugar should be non-negative\");\r\nconstraint assert(butter >= 0,\"Invalid datafile: \" ++\r\n \"Amount of butter should be non-negative\");\r\nconstraint assert(cocoa >= 0,\"Invalid datafile: \" ++\r\n \"Amount of cocoa should be non-negative\");\r\n\r\nvar 0..100: b; % no. of banana cakes\r\nvar 0..100: c; % no. of chocolate cakes\r\n\r\n% flour\r\nconstraint 250*b + 200*c <= flour;\r\n% bananas\r\nconstraint 2*b <= banana;\r\n% sugar\r\nconstraint 75*b + 150*c <= sugar;\r\n% butter\r\nconstraint 100*b + 150*c <= butter;\r\n% cocoa\r\nconstraint 75*c <= cocoa;\r\n\r\n% maximize our profit\r\nsolve maximize 400*b + 450*c;\r\n\r\noutput [\"no. of banana cakes = \\(b)\\n\",\r\n \"no. of chocolate cakes = \\(c)\\n\"];"
+ }
+} \ No newline at end of file