60 lines
1.7 KiB
Protocol Buffer
60 lines
1.7 KiB
Protocol Buffer
// Copyright 2010 Google
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
// Linear solver Stubby services
|
|
|
|
syntax = "proto2";
|
|
|
|
package operations_research;
|
|
|
|
message MPVariableProto {
|
|
required string id = 1; // key
|
|
required double lb = 2;
|
|
required double ub = 3;
|
|
required bool integer = 4;
|
|
}
|
|
|
|
message MPQuadraticTermProto {
|
|
required string variable1_id = 1;
|
|
required string variable2_id = 2;
|
|
required double coefficient = 3;
|
|
}
|
|
|
|
message MPVariableSampleProto {
|
|
required string variable_id = 1;
|
|
repeated double sample_values = 2;
|
|
}
|
|
|
|
message MPTermProto {
|
|
required string variable_id = 1;
|
|
required double coefficient = 2;
|
|
}
|
|
|
|
message MPConstraintProto {
|
|
required double lb = 1;
|
|
required double ub = 2;
|
|
repeated MPTermProto terms = 3;
|
|
optional string id = 4;
|
|
}
|
|
|
|
message MPModelProto {
|
|
repeated MPVariableProto variables = 1;
|
|
required bool maximize = 2;
|
|
repeated MPTermProto objective_terms = 3;
|
|
repeated MPQuadraticTermProto quadratic_objective_terms = 4;
|
|
repeated MPQuadraticTermProto lower_triangular_objective_terms = 5;
|
|
repeated MPVariableSampleProto covariance_objective_samples = 6;
|
|
repeated MPConstraintProto constraints = 7;
|
|
optional string name = 8;
|
|
}
|