Commit abf4420e authored by Marta Różańska's avatar Marta Różańska
Browse files

adding new type of solver: mcts

parent 635547f9
Pipeline #8586 failed with stages
in 25 minutes and 35 seconds
......@@ -27,7 +27,7 @@ types:
type: ApiLib.NotificationResult
designatedSolver:
type: string
enum: [CPSOLVER, LASOLVER, MILPSOLVER, NONE, PTSOLVER, GENETICSOLVER, NCSOLVER]
enum: [CPSOLVER, LASOLVER, MILPSOLVER, NONE, PTSOLVER, GENETICSOLVER, NCSOLVER, MCTSSOLVER]
watermark:
type: ApiLib.Watermark
SolutionEvaluationRequest:
......
......@@ -41,7 +41,7 @@ types:
type: ApiLib.NotificationResult
designatedSolver:
type: string
enum: [CPSOLVER, LASOLVER, MILPSOLVER, NONE, PTSOLVER, GENETICSOLVER, NCSOLVER]
enum: [CPSOLVER, LASOLVER, MILPSOLVER, NONE, PTSOLVER, GENETICSOLVER, NCSOLVER, MCTSSOLVER]
watermark:
type: ApiLib.Watermark
SolutionRequest:
......@@ -58,7 +58,7 @@ types:
description: Path in the CDO where CP and PAM models can be found.
designatedSolver:
type: string
enum: [CPSOLVER, LASOLVER, MILPSOLVER, NONE, PTSOLVER, GENETICSOLVER, NCSOLVER]
enum: [CPSOLVER, LASOLVER, MILPSOLVER, NONE, PTSOLVER, GENETICSOLVER, NCSOLVER, MCTSSOLVER]
notificationSubject:
type: string
description: Notification subject that will be used when reporting the CP notification.
......
......@@ -66,6 +66,9 @@ http://www.mulesoft.org/schema/mule/tls http://www.mulesoft.org/schema/mule/tls/
<http:request-config name="Genetic_Solver_HTTP_Request_Configuration" host="${genetic_solver.http.host}" port="${genetic_solver.http.port}" doc:name="HTTP Request Configuration" responseTimeout="40000">
<tcp:client-socket-properties connectionTimeout="30000"/>
</http:request-config>
<http:request-config name="MCTS_Solver_HTTP_Request_Configuration" host="${mcts_solver.http.host}" port="${mcts_solver.http.port}" doc:name="HTTP Request Configuration" responseTimeout="40000">
<tcp:client-socket-properties connectionTimeout="30000"/>
</http:request-config>
</mule>
......@@ -581,6 +581,18 @@ http://www.mulesoft.org/schema/mule/imap http://www.mulesoft.org/schema/mule/ima
<set-property propertyName="http.status" value="#[message.inboundProperties.'http.status']" doc:name="Set Http status"/>
<flow-ref name="LogPayload" doc:name="LogPayload"/>
</when>
<when expression="#['MCTSSOLVER'.equals(flowVars.designatedSolver)]">
<logger message="Sending request to MCTS Solver: #[message.payloadAs(java.lang.String)]" level="INFO" doc:name="MCTSSolver - Logger"/>
<until-successful maxRetries="${eai.http.failover.nb_of_retries}" millisBetweenRetries="${eai.http.failover.timeout}" synchronous="true" doc:name="Copy_of_Until Successful">
<processor-chain doc:name="Copy_of_Processor Chain">
<http:request config-ref="MCTS_Solver_HTTP_Request_Configuration" path="/constraintProblemSolution" method="POST" doc:name="MCTSSolver">
<http:failure-status-code-validator values="0"/>
</http:request>
</processor-chain>
</until-successful>
<set-property propertyName="http.status" value="#[message.inboundProperties.'http.status']" doc:name="Set Http status"/>
<flow-ref name="LogPayload" doc:name="LogPayload"/>
</when>
<otherwise>
<logger message="Sending request to CP Solver: #[message.payloadAs(java.lang.String)]" level="INFO" doc:name="Logger"/>
<until-successful maxRetries="${eai.http.failover.nb_of_retries}" millisBetweenRetries="${eai.http.failover.timeout}" synchronous="true" doc:name="Until Successful">
......
......@@ -42,6 +42,10 @@ genetic_solver.http.host=mc3
genetic_solver.http.port=8090
genetic_solver.useUtilityGenerator=false
mcts_solver.http.host=mc3
mcts_solver.http.port=8090
mcts_solver.useUtilityGenerator=false
#http retry configuration when requesting external systems
eai.http.failover.nb_of_retries=10
eai.http.failover.timeout=5000
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment