Skip to content

Response

APIStatus

Bases: AutoName

API Status.

PENDING shows that the request has been sent but not caught by solvers.

RUNNING shows that the request has been sent and caught by solvers.

SUCCESS shows that solver returns the solution successfully.

FAILED shows that solver fails to return solutions with some errors.

UNKNOWNERROR and VALIDATIONERROR shows that solver fails to return solutions with some errors that is not expected. Please contact to Jij development team if you find this error.

BaseResponse

empty_data() classmethod abstractmethod

Abstract method for generating empty data.

empty_response(status, client, solution_id, err_dict={}) classmethod

Generate empty_response.

Parameters:

Name Type Description Default
status APIStatus

status

required
client JijZeptClient

client

required
solution_id str

solution_id

required
err_dict {}

from_json_obj(json_obj) classmethod abstractmethod

Abstract method for initializing object from JSON data.

Parameters:

Name Type Description Default
json_obj

JSON data

required

get_result(solution_id=None)

Get result from cloud.

If solution_id is specified. use this id. Otherwise, use self.solution_id

If status is updated. update self data

Parameters:

Name Type Description Default
solution_id Optional[str]

specified solution id. Defaults to None.

None

Returns:

Name Type Description
_TBaseResponse _TBaseResponse

description

JijModelingResponse

Bases: BaseResponse, jm.SampleSet

Return object from JijZept.

This class inherits from jijmodeling.sampleset.SampleSet.

from_json_obj(json_obj) classmethod

Generate object from JSON object.

Parameters:

Name Type Description Default
json_obj str

JSON object

required

Returns:

Name Type Description
Any Any

object


Last update: 2023年3月17日