text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
import warnings warnings.warn("Module is deprecated.", DeprecationWarning) ### Note, these are placeholder solutions # Since this module is meant to offer safety wrappers around some numpy # functions, if we can't import numpy, then gracefully handle the import error # and define stubs. try: from numpy import amin, amax, mean, median, reshape, asarray, isnan, \ compress, isfinite, where, inf def _asarray1d(arr): """ Ensure 1d array for one array. """ m = asarray(arr) if len(m.shape)==0: m = reshape(m,(1,)) return m def nanmin(x,axis=-1): """ Find the minimium over the given axis ignoring nans. """ y = where(isnan(x), inf, x) return amin(y,axis) def nanmax(x,axis=-1): """ Find the maximum over the given axis ignoring nans. """ y = where(isnan(x), -inf, x) return amax(-1,axis) def nanmean(x): """ Find the mean of x ignoring nans. fixme: should be fixed to work along an axis. """ x = _asarray1d(x).copy() y = compress(isfinite(x), x) return mean(y) def nanmedian(x): """ Find the median over the given axis ignoring nans. fixme: should be fixed to work along an axis. """ x = _asarray1d(x).copy() y = compress(isfinite(x), x) return median(y) except ImportError: _asarray1d = nanmin = nanmax = nanmean = nanmedian = None
{"hexsha": "80cd9184af86f6dfdd95b15390c1655462097c14", "size": 1514, "ext": "py", "lang": "Python", "max_stars_repo_path": "enthought/util/nan_ops_for_numpy.py", "max_stars_repo_name": "enthought/etsproxy", "max_stars_repo_head_hexsha": "4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": 3, "max_stars_repo_stars_event_min_datetime": "2016-12-09T06:05:18.000Z", "max_stars_repo_stars_event_max_datetime": "2018-03-01T13:00:29.000Z", "max_issues_repo_path": "enthought/util/nan_ops_for_numpy.py", "max_issues_repo_name": "enthought/etsproxy", "max_issues_repo_head_hexsha": "4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347", "max_issues_repo_licenses": ["BSD-3-Clause"], "max_issues_count": 1, "max_issues_repo_issues_event_min_datetime": "2020-12-02T00:51:32.000Z", "max_issues_repo_issues_event_max_datetime": "2020-12-02T08:48:55.000Z", "max_forks_repo_path": "enthought/util/nan_ops_for_numpy.py", "max_forks_repo_name": "enthought/etsproxy", "max_forks_repo_head_hexsha": "4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347", "max_forks_repo_licenses": ["BSD-3-Clause"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 27.0357142857, "max_line_length": 78, "alphanum_fraction": 0.5799207398, "include": true, "reason": "import numpy,from numpy", "num_tokens": 377}
import torch import os import numpy as np from config.config import Configuration FEATS_PATH_NPY = '/xxx/projects/tmp_extraction_features/log/feats.pth' IMG_PATH_NPY = '/xxx/projects/tmp_extraction_features/log/img_path.npy' def euclidean_distance(qf, gf): m = qf.shape[0] n = gf.shape[0] dist_mat = torch.pow(qf, 2).sum(dim=1, keepdim=True).expand(m, n) + \ torch.pow(gf, 2).sum(dim=1, keepdim=True).expand(n, m).t() dist_mat.addmm_(1, -2, qf, gf.t()) return dist_mat.cpu().numpy() if __name__ == "__main__": Cfg = Configuration() log_dir = Cfg.LOG_DIR os.environ['CUDA_VISIBLE_DEVICES'] = Cfg.DEVICE_ID feats = torch.load(FEATS_PATH_NPY) feats_numpy = feats.cpu().numpy() np.save('./log/feats.npy', feats_numpy) print('feats shape:{}'.format(feats_numpy.shape)) paths = np.load(IMG_PATH_NPY) labels = np.zeros((len(paths), 1)) for idx in range(len(paths)): labels[idx] = int(paths[idx].split('/')[-1][:4]) np.save('./log/labels.npy', labels) dist_mat = euclidean_distance(feats, feats) np.save('./log/dist_mat.npy', dist_mat) indices = np.argsort(dist_mat, axis=1) np.save('./log/knn.npy', indices)
{"hexsha": "f92c023200d113634a32f02264067e0f6f98cf97", "size": 1210, "ext": "py", "lang": "Python", "max_stars_repo_path": "data-purifying-GCN/graph-clustering/convert_npy_for_gcn.py", "max_stars_repo_name": "lulujianjie/efficient-person-generation-for-reid", "max_stars_repo_head_hexsha": "1bb29c7c280e3322a65af36b37deecbce0c1d322", "max_stars_repo_licenses": ["RSA-MD"], "max_stars_count": 24, "max_stars_repo_stars_event_min_datetime": "2020-04-27T01:53:02.000Z", "max_stars_repo_stars_event_max_datetime": "2020-09-09T04:39:31.000Z", "max_issues_repo_path": "data-purifying-GCN/graph-clustering/convert_npy_for_gcn.py", "max_issues_repo_name": "lulujianjie/efficient-person-generation-for-reID", "max_issues_repo_head_hexsha": "1bb29c7c280e3322a65af36b37deecbce0c1d322", "max_issues_repo_licenses": ["RSA-MD"], "max_issues_count": 8, "max_issues_repo_issues_event_min_datetime": "2020-09-27T04:55:10.000Z", "max_issues_repo_issues_event_max_datetime": "2021-11-25T02:31:09.000Z", "max_forks_repo_path": "data-purifying-GCN/graph-clustering/convert_npy_for_gcn.py", "max_forks_repo_name": "lulujianjie/efficient-person-generation-for-reID", "max_forks_repo_head_hexsha": "1bb29c7c280e3322a65af36b37deecbce0c1d322", "max_forks_repo_licenses": ["RSA-MD"], "max_forks_count": 8, "max_forks_repo_forks_event_min_datetime": "2020-04-27T01:54:24.000Z", "max_forks_repo_forks_event_max_datetime": "2022-02-05T06:21:20.000Z", "avg_line_length": 32.7027027027, "max_line_length": 73, "alphanum_fraction": 0.6595041322, "include": true, "reason": "import numpy", "num_tokens": 345}
import os import random import socket from collections import deque from typing import Any, Dict, List, Literal, cast import cv2 import gym import numpy as np from gym import spaces from gym.utils import seeding from py4j.java_gateway import GatewayParameters, JavaGateway from carl.envs.mario.level_image_gen import LevelImageGen from .mario_game import MarioGame from .utils import get_port, load_level class MarioEnv(gym.Env): metadata = {"render.modes": ["rgb_array"]} def __init__( self, levels: List[str], timer=100, visual=False, sticky_action_probability=0.1, frame_skip=2, frame_stack=4, frame_dim=64, hide_points_banner=False, sparse_rewards=False, grayscale=False, seed=0, ): self.seed(seed) self.level_names = levels self.levels = [load_level(name) for name in levels] self.timer = timer self.visual = visual self.frame_skip = frame_skip self.frame_stack = frame_stack self.sticky_action_probability = sticky_action_probability self.hide_points_banner = hide_points_banner self.sparse_rewards = sparse_rewards self.points_banner_height = 4 self.grayscale = grayscale self.last_action = None self.width = self.height = frame_dim self.observation_space = spaces.Box( low=0, high=255, shape=[self.frame_stack if grayscale else 3, self.height, self.width], dtype=np.uint8, ) self.original_obs = deque(maxlen=self.frame_skip) self.actions = [ [False, False, False, False, False], # noop [False, False, True, False, False], # down [False, True, False, False, False], # right [False, True, False, True, False], # right speed [False, True, False, False, True], # right jump [False, True, False, True, True], # right speed jump [True, False, False, False, False], # left [True, False, False, False, True], # left jump [True, False, False, True, True], # left speed jump [False, False, False, False, True], # jump ] self.action_space = spaces.Discrete(n=len(self.actions)) self._obs = np.zeros(shape=self.observation_space.shape, dtype=np.uint8) self.current_level_idx = 0 self.frame_size = -1 self.port = get_port() self.mario_state: Literal[0, 1, 2] = 0 # normal, large, fire self.mario_inertia = 0.89 self._init_game() def reset(self): self._reset_obs() if self.game is None: self.game = self._init_game() self.current_level_idx = (self.current_level_idx + 1) % len(self.levels) level = self.levels[self.current_level_idx] self.game.resetGame(level, self.timer, self.mario_state, self.mario_inertia) self.game.computeObservationRGB() buffer = self._receive() frame = self._read_frame(buffer) self._update_obs(frame) return self._obs.copy() def step(self, action): if self.sticky_action_probability != 0.0: if ( self.last_action is not None and random.random() < self.sticky_action_probability ): a = self.actions[self.last_action] else: a = self.actions[action] self.last_action = action else: a = self.actions[action] assert self.game frame = None for i in range(self.frame_skip): self.game.stepGame(*a) if self.visual or i == self.frame_skip - 1: self.game.computeObservationRGB() buffer = self._receive() frame = self._read_frame(buffer) self._update_obs(frame) reward, done, completionPercentage = ( self.game.computeReward(), self.game.computeDone(), self.game.getCompletionPercentage(), ) info: Dict[str, Any] = {"completed": completionPercentage} if self.visual: info["original_obs"] = self.original_obs return ( self._obs.copy(), reward if not self.sparse_rewards else int(completionPercentage == 1.0), done, info, ) def render(self, *args, **kwargs): return self.original_obs[0] def __getstate__(self): assert self.gateway self.gateway.close() self.gateway = None self.game = None self.socket.shutdown(1) self.socket.close() return self.__dict__ def _reset_obs(self): self._obs[:] = 0 self.original_obs.clear() def _read_frame(self, buffer): frame = ( np.frombuffer(buffer, dtype=np.int32).reshape(256, 256, 3).astype(np.uint8) ) self.original_obs.append(frame) return frame def _update_obs(self, frame): if self.grayscale: frame = cv2.cvtColor(frame, cv2.COLOR_RGB2GRAY) frame = cv2.resize(frame, (self.width, self.height), cv2.INTER_NEAREST) if self.hide_points_banner: frame[: self.points_banner_height, :] = 0 if self.grayscale: self._obs = np.concatenate([self._obs[1:], frame[np.newaxis]]) else: self._obs = np.transpose(frame, axes=(2, 0, 1)) def _init_game(self): self.gateway = JavaGateway( gateway_parameters=GatewayParameters(port=self.port, eager_load=True,) ) self.game = cast(MarioGame, cast(Any, self.gateway.jvm).engine.core.MarioGame()) self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.socket.connect(("localhost", self.game.getPort())) self.game.initGame() self.frame_size = self.game.getFrameSize() return self.game def _receive(self): frameBuffer = b"" while len(frameBuffer) != self.frame_size: frameBuffer += self.socket.recv(self.frame_size) return frameBuffer def get_action_meanings(self): return ACTION_MEANING def render_current_level(self): img_gen = LevelImageGen( sprite_path=os.path.abspath( os.path.join(os.path.dirname(__file__), "sprites") ) ) return img_gen.render(self.levels[self.current_level_idx].split("\n")) def seed(self, seed=None): self.np_random, seed = seeding.np_random(seed) return [seed] ACTION_MEANING = [ "NOOP", "DOWN", "RIGHT", "RIGHTSPEED", "RIGHTJUMP", "RIGHTSPEEDJUMP", "LEFT", "LEFTJUMP", "LEFTSPEEDJUMP", "JUMP", ]
{"hexsha": "d38a792ead94b5a01924542ca744f9a002f5b7b0", "size": 6816, "ext": "py", "lang": "Python", "max_stars_repo_path": "carl/envs/mario/mario_env.py", "max_stars_repo_name": "automl/genRL", "max_stars_repo_head_hexsha": "b7382fec9006d7da768ad7252194c6c5f1b2bbd7", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 27, "max_stars_repo_stars_event_min_datetime": "2021-09-13T21:50:10.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-30T15:35:38.000Z", "max_issues_repo_path": "carl/envs/mario/mario_env.py", "max_issues_repo_name": "automl/genRL", "max_issues_repo_head_hexsha": "b7382fec9006d7da768ad7252194c6c5f1b2bbd7", "max_issues_repo_licenses": ["Apache-2.0"], "max_issues_count": 35, "max_issues_repo_issues_event_min_datetime": "2021-09-15T07:20:29.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-02T15:14:31.000Z", "max_forks_repo_path": "carl/envs/mario/mario_env.py", "max_forks_repo_name": "automl/genRL", "max_forks_repo_head_hexsha": "b7382fec9006d7da768ad7252194c6c5f1b2bbd7", "max_forks_repo_licenses": ["Apache-2.0"], "max_forks_count": 2, "max_forks_repo_forks_event_min_datetime": "2022-01-13T11:13:12.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-14T06:11:13.000Z", "avg_line_length": 32.4571428571, "max_line_length": 88, "alphanum_fraction": 0.5950704225, "include": true, "reason": "import numpy", "num_tokens": 1557}
[STATEMENT] lemma "\<lparr>xc = x, yc = y, zc = z\<rparr> = p\<lparr>zc := z\<rparr>" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lparr>xc = x, yc = y, zc = z\<rparr> = p\<lparr>zc := z\<rparr> [PROOF STEP] nitpick [expect = genuine] [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lparr>xc = x, yc = y, zc = z\<rparr> = p\<lparr>zc := z\<rparr> [PROOF STEP] oops
{"llama_tokens": 199, "file": null, "length": 2}
from data import load_corpus, convert_id_to_text from bert_phrase_sim import BERT_sim from model1e_phrase_sim import BERT1E_sim from model1f_phrase_sim import BERT1F_sim from wordvec_based_phrase_sim import wordvec_sim import numpy as np import codecs, argparse parser = argparse.ArgumentParser() parser.add_argument("--out_dir", default=None, type=str, required=True, help="The output directory where the model predictions and checkpoints will be written.") parser.add_argument("--model_dir", default=None, type=str, required=True, help="Path to a model") parser.add_argument("--model_name", default=None, type=str, required=True, help="Model name") parser.add_argument("--pooling", default=None, type=str, required=True, help="Pooling method: max or mean") parser.add_argument("--null_thresh", default=None, type=float, help="Null-alignment threshold") parser.add_argument("--seed", default=42, type=int, help="Seed for initialization") args = parser.parse_args() def eval_average_performance(): print('Evaluate: ' + args.model_name) print('Seed: ' + str(args.seed)) print('Load a similarity model...') # sim=PhraseSimSample() # For debugging model_parts = args.model_name.split('_') model_type = model_parts[0] if len(model_parts) > 1: loss_func = model_parts[1] if loss_func in ['MarginRankingLoss']: min = 0 max = 1 elif loss_func in ['CosineEmbeddingLoss', 'TripletMarginLoss']: min = -1 max = 1 else: raise NotImplementedError("Undefined loss function!") else: min = -1 max = 1 if model_type == 'FastText': sim = wordvec_sim(args.pooling, args.model_dir) elif model_type == 'BERT1E': sim = BERT1E_sim(args.model_dir, args.model_name, args.pooling, args.seed) elif model_type == 'BERT1F': sim = BERT1F_sim(args.model_dir, args.model_name, args.pooling, args.seed) else: sim = BERT_sim(args.model_dir, args.model_name, args.pooling, args.seed) add_bos_eos = True if 'bert' in model_type.lower() else False print('Load xml files...') # s_trees, t_trees, s_texts, t_texts = load('../data/sample/', True) s_tokens, t_tokens, s_trees, t_trees, annotator1, annotator2, annotator3 = load_corpus('../data/SPADE/', 'test', add_bos_eos, True) annotator12_and = [annotator1[i] & annotator2[i] for i in range(len(annotator1))] annotator12_or = [annotator1[i] | annotator2[i] for i in range(len(annotator1))] annotator23_and = [annotator2[i] & annotator3[i] for i in range(len(annotator2))] annotator23_or = [annotator2[i] | annotator3[i] for i in range(len(annotator2))] annotator31_and = [annotator3[i] & annotator1[i] for i in range(len(annotator3))] annotator31_or = [annotator3[i] | annotator1[i] for i in range(len(annotator3))] if 'bert' in model_type.lower(): print('Encoding sentences by BERT...') sim.encode(s_tokens, t_tokens, s_trees, t_trees) elif 'ELMo' in model_type: print('Encoding sentences by ELMo...') sim.encode(s_tokens, t_tokens) sim.set_null_thresh(args.null_thresh, min, max) print('Start alignment: Threshold ' + format(args.null_thresh, '.2f')) scores, scores_breakdown = eval_alignments(sim, s_trees, t_trees, annotator12_or, annotator12_and, annotator23_or, annotator23_and, annotator31_or, annotator31_and, verbose=True) print('baseline: ' + str(scores)) # Save results with codecs.open( args.out_dir + sim.get_model_name() + '_' + sim.get_pooling() + '_ALIR_ALIP_' + str(args.seed) + '.txt', 'w', encoding='utf-8') as f: f.write('{0:.2f}\t{1:.2f}\t{2:.2f}\n'.format(args.null_thresh, scores[0], scores[1])) for alir, alip in zip(scores_breakdown[0], scores_breakdown[1]): f.write('{0:.2f}\t{1:.2f}\n'.format(alir, alip)) def gridsearch_lambda(): print('Evaluate: ' + args.model_name) print('Load a similarity model...') # sim=PhraseSimSample() # For debugging model_parts = args.model_name.split('_') model_type = model_parts[0] if len(model_parts) > 1: loss_func = model_parts[1] if loss_func in ['MarginRankingLoss']: min = 0 max = 1 elif loss_func in ['CosineEmbeddingLoss', 'TripletMarginLoss']: min = -1 max = 1 else: raise NotImplementedError("Undefined loss function!") else: min = -1 max = 1 if model_type == 'FastText': sim = wordvec_sim(args.pooling, args.model_dir) elif model_type == 'BERT1E': sim = BERT1E_sim(args.model_dir, args.model_name, args.pooling, args.seed) elif model_type == 'BERT1F': sim = BERT1F_sim(args.model_dir, args.model_name, args.pooling, args.seed) else: sim = BERT_sim(args.model_dir, args.model_name, args.pooling, args.seed) add_bos_eos = True if 'bert' in model_type.lower() else False for TASK in ['dev', 'test']: print('Load xml files...') # s_trees, t_trees, s_texts, t_texts = load('../data/sample/', True) s_tokens, t_tokens, s_trees, t_trees, annotator1, annotator2, annotator3 = load_corpus('../data/SPADE/', TASK, add_bos_eos, True) annotator12_and = [annotator1[i] & annotator2[i] for i in range(len(annotator1))] annotator12_or = [annotator1[i] | annotator2[i] for i in range(len(annotator1))] annotator23_and = [annotator2[i] & annotator3[i] for i in range(len(annotator2))] annotator23_or = [annotator2[i] | annotator3[i] for i in range(len(annotator2))] annotator31_and = [annotator3[i] & annotator1[i] for i in range(len(annotator3))] annotator31_or = [annotator3[i] | annotator1[i] for i in range(len(annotator3))] if 'bert' in model_type.lower(): print('Encoding sentences by BERT...') sim.encode(s_tokens, t_tokens, s_trees, t_trees) elif 'ELMo' in model_type: print('Encoding sentences by ELMo...') sim.encode(s_tokens, t_tokens) results = {} for thresh in np.arange(0.05, 0.99, 0.05, dtype='float64'): sim.set_null_thresh(thresh, min, max) print('Start alignment: Threshold ' + format(thresh, '.2f')) results[thresh] = eval_alignments(sim, s_trees, t_trees, annotator12_or, annotator12_and, annotator23_or, annotator23_and, annotator31_or, annotator31_and) print('baseline: ' + str(results[thresh])) # Save results with codecs.open( args.out_dir + TASK + '_' + sim.get_model_name() + '_' + sim.get_pooling() + '_ALIR_ALIP_curve.txt', 'w', encoding='utf-8') as f: for th, val in results.items(): f.write('{0:.2f}\t{1:.2f}\t{2:.2f}\n'.format(th, val[0], val[1])) def eval_alignments(sim, s_trees, t_trees, annotator12_or, annotator12_and, annotator23_or, annotator23_and, annotator31_or, annotator31_and, verbose=False): output = [] for sentence_idx, (s_tree, t_tree) in enumerate(zip(s_trees, t_trees)): s_null, t_null, non_null = [], [], [] scores = {} for snode in s_tree: for tnode in t_tree: scores[(snode.id, tnode.id)] = sim.align_score(snode, tnode, sentence_idx) alignments = [] used_s, used_t = [], [] for k, v in sorted(scores.items(), key=lambda kv: kv[1]): if k[0] not in used_s and k[1] not in used_t: if v <= sim.NULL_SCORE: alignments.append((k[0], k[1])) else: alignments.append((k[0], '-1')) alignments.append(('-1', k[1])) used_s.append(k[0]) used_t.append(k[1]) alignments += [(snode.id, '-1') for snode in s_tree if snode.id not in used_s] alignments += [('-1', tnode.id) for tnode in t_tree if tnode.id not in used_t] output.append(set(alignments)) # Convert to text-based alignment pairs output = convert_id_to_text(output, s_trees, t_trees) alirs, alips = compute_average(output, annotator12_or, annotator12_and, annotator23_or, annotator23_and, annotator31_or, annotator31_and) if verbose: return (np.mean(alirs), np.mean(alips)), (alirs, alips) else: return (np.mean(alirs), np.mean(alips)) def compute_average(output, annotator12_or, annotator12_and, annotator23_or, annotator23_and, annotator31_or, annotator31_and): # Evaluate alirs, alips = [], [] val = alir_alip(output, annotator12_or, annotator12_and) alirs.append(val[0]) alips.append(val[1]) val = alir_alip(output, annotator23_or, annotator23_and) alirs.append(val[0]) alips.append(val[1]) val = alir_alip(output, annotator31_or, annotator31_and) alirs.append(val[0]) alips.append(val[1]) return alirs, alips def alir_alip(output, gold_or, gold_and): alir = float(sum([len(output[i] & gold_and[i]) for i in range(len(gold_and))])) * 100 / float( sum([len(gold_and[i]) for i in range(len(gold_and))])) alip = float(sum([len(output[i] & gold_or[i]) for i in range(len(gold_or))])) * 100 / float( sum([len(output[i]) for i in range(len(output))])) return alir, alip if __name__ == "__main__": # execute only if run as a script if args.null_thresh is None: gridsearch_lambda() else: eval_average_performance()
{"hexsha": "57d03989a30ba7235ceb870b3cf61c59f7648eb2", "size": 10335, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/baseline_wo_ted.py", "max_stars_repo_name": "yukiar/phrase_alignment_cted", "max_stars_repo_head_hexsha": "7706ca1b8be849f2413d813ea1f3c77919b635ee", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 5, "max_stars_repo_stars_event_min_datetime": "2021-04-22T09:19:35.000Z", "max_stars_repo_stars_event_max_datetime": "2021-12-22T06:30:45.000Z", "max_issues_repo_path": "src/baseline_wo_ted.py", "max_issues_repo_name": "yukiar/phrase_alignment_cted", "max_issues_repo_head_hexsha": "7706ca1b8be849f2413d813ea1f3c77919b635ee", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/baseline_wo_ted.py", "max_forks_repo_name": "yukiar/phrase_alignment_cted", "max_forks_repo_head_hexsha": "7706ca1b8be849f2413d813ea1f3c77919b635ee", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 42.012195122, "max_line_length": 118, "alphanum_fraction": 0.5925495888, "include": true, "reason": "import numpy", "num_tokens": 2625}
#https://stackoverflow.com/questions/49429368/how-to-solve-memory-issues-problems-while-multiprocessing-using-pool-map #https://pypi.org/project/memory-profiler/ import cProfile import matplotlib.pyplot as plt import networkx as nx import numpy as np import pandas as pd import random import seaborn as sns import statistics import sys sys.path.append('.') import model ## Population parameters: base_params = { # Node parameter 'A' : 0.5, # Now this will vary case by case. # Edge parameter 'W' : .5, # probability of edge activation; 2/K 'C' : 1.0, ## all edges can be traced. ## Disease parameters 'beta_hat' : .4, # probability of transmission upon contact 'alpha' : .25, # probability of exposed becoming infectious 'gamma' : .1, # probability of infectious becoming recovered 'zeta' : .1, # probability of infectious becoming symptomatic ## Contact tracing parameters 'limit' : 10, # number of time steps the contact tracing system remembers } p_star = 0.256 K = 4 N = 2000 conditions = { 'A-0.10' : {'A' : 0.10}, 'A-0.30' : {'A' : 0.30}, 'A-0.50' : {'A' : 0.50}, 'A-0.70' : {'A' : 0.70} } def watts_strogatz_case_p_star(N, K, p_star, **kwargs): g = nx.watts_strogatz_graph(N, K, p_star) g.graph['N'] = N g.graph['K'] = K g.graph['p'] = p_star return g, kwargs def ws_case_generator(N, K, p_star): def wscg(**kwargs): return watts_strogatz_case_p_star(N, K, p_star, **kwargs) return wscg def test(): runs = 8 results = model.experiment( ws_case_generator(N, K, p_star), base_params, conditions, runs) pd.DataFrame(results).to_csv('data_test.csv') if __name__ == '__main__': test()
{"hexsha": "3b9c318f9408dde84f29042ac8697428c83d6724", "size": 1763, "ext": "py", "lang": "Python", "max_stars_repo_path": "contact-tracing/code/Python/test.py", "max_stars_repo_name": "sbenthall/privacy-abm", "max_stars_repo_head_hexsha": "eb40ff0aedf0d212bdc43c2e019a29599869f7d4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "contact-tracing/code/Python/test.py", "max_issues_repo_name": "sbenthall/privacy-abm", "max_issues_repo_head_hexsha": "eb40ff0aedf0d212bdc43c2e019a29599869f7d4", "max_issues_repo_licenses": ["MIT"], "max_issues_count": 11, "max_issues_repo_issues_event_min_datetime": "2020-07-03T20:34:56.000Z", "max_issues_repo_issues_event_max_datetime": "2021-10-14T17:45:18.000Z", "max_forks_repo_path": "contact-tracing/code/Python/test.py", "max_forks_repo_name": "sbenthall/privacy-abm", "max_forks_repo_head_hexsha": "eb40ff0aedf0d212bdc43c2e019a29599869f7d4", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 20.5, "max_line_length": 118, "alphanum_fraction": 0.6432217811, "include": true, "reason": "import numpy,import networkx", "num_tokens": 522}
import re import numpy as np def parse_gaussian(filename): find_natoms = "NAtoms= " find_energy = "SCF Done: E(" find_force = "Atomic Forces " natoms = 0 f = open(filename, 'r') for line in f: if find_natoms in line: numbers = re.findall(r'\d+', line) natoms = int(numbers[0]) forces = np.zeros((natoms, 3)) if find_energy in line: numbers = re.findall(r'[-]?\d+\.\d*(?:[Ee][-\+]\d+)?', line) energy = float(numbers[0]) if find_force in line: line = next(f) line = next(f) for i in range(natoms): line = next(f) numbers = re.findall(r'[-]?\d+\.\d*(?:[Ee][-\+]\d+)?', line) numbers = [float(x) for x in numbers] numbers = np.array(numbers) forces[i] = numbers return energy, forces def main(): import argparse parser = argparse.ArgumentParser() parser.add_argument('-f', '--filename', type=str, help='', metavar='file') args = parser.parse_args() energy, forces = parse_gaussian(args.filename) print(energy) for force in forces: print(", ".join([str(x) for x in force])) return if __name__ == "__main__": main()
{"hexsha": "6dc83ce65e82f131e1b5508a16baaa6ef4a44df9", "size": 1326, "ext": "py", "lang": "Python", "max_stars_repo_path": "qml_md/read_forces.py", "max_stars_repo_name": "charnley/qml-md", "max_stars_repo_head_hexsha": "54fa7f4c1960e624585904c6517ab4cb21a0c916", "max_stars_repo_licenses": ["Intel"], "max_stars_count": 1, "max_stars_repo_stars_event_min_datetime": "2019-11-21T01:11:10.000Z", "max_stars_repo_stars_event_max_datetime": "2019-11-21T01:11:10.000Z", "max_issues_repo_path": "qml_md/read_forces.py", "max_issues_repo_name": "charnley/qml-md", "max_issues_repo_head_hexsha": "54fa7f4c1960e624585904c6517ab4cb21a0c916", "max_issues_repo_licenses": ["Intel"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "qml_md/read_forces.py", "max_forks_repo_name": "charnley/qml-md", "max_forks_repo_head_hexsha": "54fa7f4c1960e624585904c6517ab4cb21a0c916", "max_forks_repo_licenses": ["Intel"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 21.0476190476, "max_line_length": 78, "alphanum_fraction": 0.5135746606, "include": true, "reason": "import numpy", "num_tokens": 336}
# Copyright (c) 2021, salesforce.com, inc. # All rights reserved. # SPDX-License-Identifier: BSD-3-Clause # For full license text, see the LICENSE file in the repo root # or https://opensource.org/licenses/BSD-3-Clause import unittest import numpy as np from warp_drive.managers.data_manager import CUDADataManager from warp_drive.utils.data_feed import DataFeed class TestDataManager(unittest.TestCase): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.dm = CUDADataManager(num_agents=5, num_envs=1, episode_length=3) def test_add_meta_info(self): self.dm.add_meta_info(meta={"learning_rate": 0.01}) self.assertEqual(self.dm.meta_info("n_agents"), 5) self.assertTrue(isinstance(self.dm.meta_info("n_agents"), np.int32)) self.assertEqual(self.dm.meta_info("episode_length"), 3) self.assertTrue(isinstance(self.dm.meta_info("episode_length"), np.int32)) self.assertEqual(self.dm.meta_info("n_envs"), 1) self.assertTrue(isinstance(self.dm.meta_info("n_envs"), np.int32)) self.assertAlmostEqual(self.dm.meta_info("learning_rate"), 0.01, places=6) self.assertTrue(isinstance(self.dm.meta_info("learning_rate"), np.float32)) def test_add_data_and_push_to_device(self): data = DataFeed() data.add_data( name="X", data=np.array([[1, 2, 3, 4, 5], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]) ) data.add_data( name="Y", data=[ [0.1, 0.2, 0.3, 0.4, 0.5], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], ], ) data.add_data(name="a", data=100) data.add_data(name="b", data=1.0) self.dm.push_data_to_device(data) x = self.dm.pull_data_from_device("X") y = self.dm.pull_data_from_device("Y") a = self.dm.pull_data_from_device("a") b = self.dm.pull_data_from_device("b") self.assertEqual(x[0].mean(), 3) self.assertEqual(x[1].mean(), 0) self.assertEqual(x[2].mean(), 0) self.assertAlmostEqual(y[0].mean(), 0.3, places=6) self.assertAlmostEqual(y[1].mean(), 0.0, places=6) self.assertAlmostEqual(y[2].mean(), 0.0, places=6) self.assertEqual(a, 100) self.assertEqual(b, 1.0) def test_add_tensor_and_push_to_device(self): data = DataFeed() data.add_data( name="Xt", data=np.array([[1, 2, 3, 4, 5], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]), ) data.add_data( name="Yt", data=[ [0.1, 0.2, 0.3, 0.4, 0.5], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], ], ) self.dm.push_data_to_device(data, torch_accessible=True) xt = self.dm.pull_data_from_device("Xt") yt = self.dm.pull_data_from_device("Yt") self.assertEqual(xt[0].mean(), 3) self.assertEqual(xt[1].mean(), 0) self.assertEqual(xt[2].mean(), 0) self.assertAlmostEqual(yt[0].mean(), 0.3, places=6) self.assertAlmostEqual(yt[1].mean(), 0.0, places=6) self.assertAlmostEqual(yt[2].mean(), 0.0, places=6)
{"hexsha": "290306801f53b7bcc03c95691e22e4b3bb80e649", "size": 3247, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/warp_drive/test_data_manager.py", "max_stars_repo_name": "MetaMind/warp-drive", "max_stars_repo_head_hexsha": "ecc17aae6c75a00c46b0e9f3297963f1beb697c0", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "tests/warp_drive/test_data_manager.py", "max_issues_repo_name": "MetaMind/warp-drive", "max_issues_repo_head_hexsha": "ecc17aae6c75a00c46b0e9f3297963f1beb697c0", "max_issues_repo_licenses": ["BSD-3-Clause"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "tests/warp_drive/test_data_manager.py", "max_forks_repo_name": "MetaMind/warp-drive", "max_forks_repo_head_hexsha": "ecc17aae6c75a00c46b0e9f3297963f1beb697c0", "max_forks_repo_licenses": ["BSD-3-Clause"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 38.2, "max_line_length": 88, "alphanum_fraction": 0.5817677856, "include": true, "reason": "import numpy", "num_tokens": 964}
# import the necessary packages from tensorflow.keras.applications.mobilenet_v2 import preprocess_input from tensorflow.keras.preprocessing.image import img_to_array from tensorflow.keras.models import load_model import numpy as np import argparse import cv2 import os class detector: def __init__(self,save_path): prototxtPath = os.path.join("../models","mobilenet", "deploy.prototxt") weightsPath = os.path.join("../models","mobilenet","res10_300x300_ssd_iter_140000.caffemodel") self.net = cv2.dnn.readNet(prototxtPath, weightsPath) self.confidence = 0.9 self.c = 0 self.save_folder = save_path def run(self,image): # dimensions orig = image.copy() (h, w) = image.shape[:2] blob = cv2.dnn.blobFromImage(image, 1.0, (300, 300),(104.0, 177.0, 123.0)) self.net.setInput(blob) detections = self.net.forward() for i in range(0, detections.shape[2]): # extract the confidence (i.e., probability) associated with the detection confidence = detections[0, 0, i, 2] # filter out weak detections by ensuring the confidence is # greater than the minimum confidence if confidence > self.confidence: # compute the (x, y)-coordinates of the bounding box for # the object box = detections[0, 0, i, 3:7] * np.array([w, h, w, h]) (startX, startY, endX, endY) = box.astype("int") # ensure the bounding boxes fall within the dimensions of # the frame (startX, startY) = (max(0, startX), max(0, startY)) (endX, endY) = (min(w - 1, endX), min(h - 1, endY)) # extract the face ROI, convert it from BGR to RGB channel # ordering, resize it to 224x224, and preprocess it face = image[startY:endY, startX:endX] h = endY-startY w = endX-startX if (w > 0 and h > 0): #face = cv2.cvtColor(face, cv2.COLOR_BGR2RGB) #face = cv2.resize(face, (224, 224)) #face = img_to_array(face) #cv2.imwrite(self.save_folder +str(self.c)+".png", face) #self.c=self.c+1 #cv2.waitKey(0) cv2.rectangle(image,(startX,startY),(startX+w,startY+h),(255,0,0),2) #face = preprocess_input(face) #face = np.expand_dims(face, axis=0) return image class cascade: def __init__(self,save_path): self.dt = cv2.CascadeClassifier('../models/haar-cascade-files/haarcascade_frontalface_default.xml') self.c = 0 self.save_folder = save_path def run(self, image): faces = self.dt.detectMultiScale(image, 1.1,5) if (len(faces)!=0): for (x,y,w,h) in faces: roi = image[y:y+h,x:x+w] #cv2.imwrite(self.save_folder+str(self.c)+".png", roi) #self.c=self.c+1 #cv2.waitKey(0) cv2.rectangle(image,(x,y),(x+w,y+h),(255,255,0),2) return image def from_folder(folder_path = "../dataset/mask", folder_save_path="test/"): try: os.mkdir(folder_save_path) except OSError as error: print(error) #folder_path = os.path.join("dataset", "with_mask") #folder_path = os.path.join("dataset", "without_mask") dt1 = detector(folder_save_path) dt2 = cascade(folder_save_path) names = os.listdir(folder_path) for name in names: filename = os.path.join(folder_path, name) print(filename) image = cv2.imread(filename,1) dt1.run(image) def from_camera(): cap = cv2.VideoCapture(0 ) dt1 = detector("") dt2 = cascade("") while ( cap.isOpened() ): ret, frame = cap.read() # BGR if ret: #frame = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) frameDetector = dt1.run(frame) frameCascade = dt2.run(frame) cv2.imshow("Detector", frameDetector) cv2.imshow("Cascade", frameCascade) cv2.waitKey(33) from_camera()
{"hexsha": "655741a08c070e027933c3ca6c9d15d706b27b8c", "size": 3569, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/test_face_detectors.py", "max_stars_repo_name": "visiont3lab/mask-detector-covid", "max_stars_repo_head_hexsha": "48d28fffa1278ae48657938262b17b8bd07e6986", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_stars_repo_stars_event_min_datetime": "2021-11-12T17:54:15.000Z", "max_stars_repo_stars_event_max_datetime": "2021-11-12T17:54:15.000Z", "max_issues_repo_path": "utils/test_face_detectors.py", "max_issues_repo_name": "visiont3lab/mask-detector-covid", "max_issues_repo_head_hexsha": "48d28fffa1278ae48657938262b17b8bd07e6986", "max_issues_repo_licenses": ["MIT"], "max_issues_count": 1, "max_issues_repo_issues_event_min_datetime": "2021-11-18T19:02:35.000Z", "max_issues_repo_issues_event_max_datetime": "2021-11-18T19:02:35.000Z", "max_forks_repo_path": "utils/test_face_detectors.py", "max_forks_repo_name": "visiont3lab/mask-detector-covid", "max_forks_repo_head_hexsha": "48d28fffa1278ae48657938262b17b8bd07e6986", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 28.552, "max_line_length": 101, "alphanum_fraction": 0.6786214626, "include": true, "reason": "import numpy", "num_tokens": 1089}
import tensorflow as tf import numpy as np import librosa import librosa.filters if __name__ == "__main__": try: tf.enable_eager_execution() except ValueError as e: if e.args[0] != 'tf.enable_eager_execution must be called at program startup.': raise e # persistent variables _mel_basis = None _mel_basis_inv = None def _build_mel_basis(num_mels, sample_rate, num_freq, fmax=None): global _mel_basis global _mel_basis_inv n_fft = (num_freq - 1) * 2 M_np = librosa.filters.mel(sample_rate, n_fft, n_mels=num_mels, fmax=fmax) M_inv_np = np.linalg.pinv(M_np) if np.any(np.isnan(M_inv_np)) or np.any(np.isinf(M_inv_np)): raise ValueError('There is a problem with mel inverse') _mel_basis = tf.constant(M_np.T, dtype=tf.float32, name="mel_basis") _mel_basis_inv = tf.constant(M_inv_np.T, dtype=tf.float32, name="mel_basis_inv") def _linear_to_mel(spectrogram, num_mels, sample_rate, num_freq, fmax=None): global _mel_basis if _mel_basis is None: _build_mel_basis(num_mels, sample_rate, num_freq) melspec = tf.matmul(spectrogram, _mel_basis) return melspec def _mel_to_linear(melspec, num_mels, sample_rate, num_freq, fmax=None): """ Reconstruct linear scale spectrogram from mel spectrogram Args: melspec : linear magnitude mel spectrum, shape=(..., num_mels) num_mels : number of mel bins sample_rate : audio sample rate num_freq : number of frequency bins (one sided) fmax : maximum frequency in mel filterbank """ global _mel_basis_inv if _mel_basis_inv is None: _build_mel_basis(num_mels, sample_rate, num_freq) spectrogram = tf.matmul(melspec, _mel_basis_inv) return spectrogram def _amp_to_db(x, use_db=True): if use_db: return 20 * tf.math.log(tf.maximum(1e-5, x)) / tf.math.log(10.0) else: return tf.math.log(tf.maximum(1e-5, x)) / tf.math.log(10.0) def _db_to_amp(x): return tf.pow(tf.ones(tf.shape(x)) * 10.0, x * 0.05) def _normalize(S, min_level_db=-100, clip=False): if clip: return tf.clip_by_value((S - min_level_db) / -min_level_db, 0, 1) else: return (S - min_level_db) / -min_level_db def _denormalize(S, min_level_db=-100, clip=False): if clip: return (tf.clip_by_value(S, 0, 1) * -min_level_db) + min_level_db else: return (S * -min_level_db) + min_level_db def melspectrogram(X, num_mels, sample_rate, num_freq, ref_level_db=20, clip=False, fmax=None): """ Tensorflow mel spectrogram Args: X : stft magnitudes, shape=(..., num_freq) num_mels : number of mel bins sample_rate : audio sample rate num_freq : number of frequency bins (one sided) ref_level_db : used for normalization clip : if true, output mel are clipped between [0,1] fmax : maximum frequency in mel filterbank Returns: log mel spectrogram """ # mel filterbank MS = _linear_to_mel(X, num_mels, sample_rate, num_freq, fmax) # amp to db MS = _amp_to_db(MS) - ref_level_db # normalize (clipping optional) return _normalize(MS, clip=clip) def inv_melspectrogram(MS, num_mels, sample_rate, num_freq, ref_level_db=20, clip=False, fmax=None): """ Tensorflow inverse mel spectrogram Reconstructs a magnitude spectrogram using mel pseudoinverse Args: MS : Mel spectrogram, shape=(..., num_freq) num_mels : number of mel bins sample_rate : audio sample rate num_freq : number of frequency bins (one sided) ref_level_db : used for normalization fmax : maximum frequency in mel filterbank Returns: log mel spectrogram """ MS = _denormalize(MS, clip=clip) + ref_level_db MS = _db_to_amp(MS) S = _mel_to_linear(MS, num_mels, sample_rate, num_freq, fmax) S = tf.maximum(S, 1e-6) # clip values smaller than eps return S
{"hexsha": "b4d5c0290340bc38ddb2ed54f0c236f6fb8a2e46", "size": 3987, "ext": "py", "lang": "Python", "max_stars_repo_path": "melspec.py", "max_stars_repo_name": "ljuvela/GELP", "max_stars_repo_head_hexsha": "6d1084aa7471530224c8f0498efcce696069ec87", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 27, "max_stars_repo_stars_event_min_datetime": "2019-07-02T19:21:32.000Z", "max_stars_repo_stars_event_max_datetime": "2021-04-03T21:09:31.000Z", "max_issues_repo_path": "melspec.py", "max_issues_repo_name": "ljuvela/GELP", "max_issues_repo_head_hexsha": "6d1084aa7471530224c8f0498efcce696069ec87", "max_issues_repo_licenses": ["Apache-2.0"], "max_issues_count": 1, "max_issues_repo_issues_event_min_datetime": "2021-04-20T03:05:17.000Z", "max_issues_repo_issues_event_max_datetime": "2021-04-21T10:21:07.000Z", "max_forks_repo_path": "melspec.py", "max_forks_repo_name": "ljuvela/GELP", "max_forks_repo_head_hexsha": "6d1084aa7471530224c8f0498efcce696069ec87", "max_forks_repo_licenses": ["Apache-2.0"], "max_forks_count": 6, "max_forks_repo_forks_event_min_datetime": "2020-08-10T01:39:41.000Z", "max_forks_repo_forks_event_max_datetime": "2021-07-28T13:45:53.000Z", "avg_line_length": 33.225, "max_line_length": 100, "alphanum_fraction": 0.6731878605, "include": true, "reason": "import numpy", "num_tokens": 1112}
#! /bin/env python import os import argparse import numpy as np import pandas as pd import atat_module import matplotlib as mpl pd.set_option('display.max_rows', None) parser = argparse.ArgumentParser( description="Print the output of a file generated by a program in ATAT.") parser.add_argument('-c', nargs='*', metavar='columns', help="the columns of the dataframe") parser.add_argument('filetype', help="""supports outputs of emc2 and phb. Also can be gs (gs.out), fit (fit.out), predstr (predstr.out), and the mmaps counterparts mgs, mfit, mpredstr""") parser.add_argument('filename', nargs='+', help="the actual file name, can be 1 or more.") parser.add_argument('--sortby', help="the column name to sort") parser.add_argument('--special', help='generated by mmaps? emc2 canonical mode? emc2 innerT?') parser_emc2 = parser.add_argument_group('emc2') # parser_emc2.add_argument('--innerT', action='store_true', # help="switch to make T the inner index to search for transition points (not for canonical mode)") parser_emc2.add_argument('-T', nargs=2, metavar=('from', 'to'), type=float, default=[None, None], help="the starting and ending temperature index of the dataframe") parser_emc2.add_argument('-mu', nargs=2, metavar=('from', 'to'), type=float, default=[None, None], help="the starting and ending mu index of the dataframe (not for canonical mode)") parser_emc2.add_argument('--trans', action='store_true', help="get the transition points") parser_emc2.add_argument('-p', action='store_true', help="display fig of variable vs mu") parser_emc2.add_argument('-s', metavar='savefig_name', help="if specified, save fig to file") parser_emc2.add_argument('--var', default='lro', help="the variable used to detecting abrupt changes") parser_emc2.add_argument('--thres', type=float, default=0.5, help="threshold of detecting peaks of the variable derivative") parser_emc2.add_argument('--min_dist', type=float, default=2, help="minimum distance of detecting peaks of the variable derivative") parser_emc2.add_argument('--thres_abs', type=float, default=0.005, help="absolute threshold of detecting peaks of the variable derivative") parser_emc2.add_argument('--bd_tol', type=float, default=0.3, help="tolerance of peak boundary of the variable derivative") parser_emc2.add_argument('--return_single', action='store_true', help="return single peak, rather than however many it detects") args = parser.parse_args() if args.s and not args.p: mpl.use('Agg') import matplotlib.pyplot as plt plt.style.use('research') plot = True if args.p or args.s else None if args.filetype == 'emc2': df = pd.concat([atat_module.get_df('emc2', filename, special=args.special) for filename in args.filename]) cm = True if args.special == 'cm' else False df = df.sort_index() idxsls = pd.IndexSlice if not cm: if args.special == 'innerT': df = df.loc[idxsls[args.mu[0]:args.mu[1], args.T[0]:args.T[1]], :] else: df = df.loc[idxsls[args.T[0]:args.T[1], args.mu[0]:args.mu[1]], :] else: df = df.loc[idxsls[:, args.T[0]:args.T[1]], :] if args.trans: df_trans = atat_module.get_emc2_transition(df, var=args.var, thres=args.thres, min_dist=args.min_dist, thres_abs=args.thres_abs, bd_tol=args.bd_tol, return_single=args.return_single, cm=cm, plot=plot) print(df_trans) if args.s: plt.savefig(args.s) if args.p: plt.show() exit() if not cm: columns = args.c if args.c else \ ['lro', 'x', 'x_lte', 'x_mf', 'x_hte', 'phi', 'phi_lte', 'phi_mf', 'phi_hte'] print(df[columns]) else: columns = args.c if args.c else \ ['lro', 'E', 'G', 'var(E)'] print(df[columns]) else: df = atat_module.get_df(args.filetype, args.filename[0], special=args.special) if args.sortby: df.sort_values(by=args.sortby, inplace=True) if args.c: columns = args.c print(df[columns]) else: print(df)
{"hexsha": "1d2effe2a5511d803cecbc70ba007660a3ba1321", "size": 4071, "ext": "py", "lang": "Python", "max_stars_repo_path": "print-as-df.py", "max_stars_repo_name": "terencezl/atat-tools", "max_stars_repo_head_hexsha": "f61d772a58f0c768fcbb33474eb3bcbd4f68d926", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "print-as-df.py", "max_issues_repo_name": "terencezl/atat-tools", "max_issues_repo_head_hexsha": "f61d772a58f0c768fcbb33474eb3bcbd4f68d926", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "print-as-df.py", "max_forks_repo_name": "terencezl/atat-tools", "max_forks_repo_head_hexsha": "f61d772a58f0c768fcbb33474eb3bcbd4f68d926", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 44.25, "max_line_length": 133, "alphanum_fraction": 0.6789486613, "include": true, "reason": "import numpy", "num_tokens": 1060}
\documentclass[apjl]{emulateapj} %\documentclass[letterpaper,12pt,preprint]{aastex} % packages \usepackage{amssymb,amsmath,amsbsy} \usepackage{booktabs} \usepackage{multirow} \usepackage{url} % commands \newcommand{\given}{\,|\,} \newcommand{\dd}{\mathrm{d}} \newcommand{\transpose}[1]{{#1}^{\mathsf{T}}} \newcommand{\inverse}[1]{{#1}^{-1}} \newcommand{\Msun}{\ifmmode {{\rm M}_{\odot}}\else M$_{\odot}$\fi} \newcommand{\bs}[1]{\boldsymbol{#1}} \newcommand{\degree}{^{\circ}} \newcommand{\eqn}{Equation~} % Symbols \newcommand{\period}{T} \newcommand{\mf}{m_f} \newcommand{\wdupper}{1.44} \begin{document} \title{The mass distribution of companions to low-mass white dwarfs} \author{Jeff J.~Andrews\altaffilmark{\colum}, Adrian M.~Price-Whelan\altaffilmark{\colum}, Marcel A.~Ag\"ueros\altaffilmark{\colum}} % Affiliations \newcommand{\colum}{1} \altaffiltext{\colum}{Department of Astronomy, Columbia University, 550 W 120th St., New York, NY 10027, USA} \begin{abstract} Measuring the masses of companions to single-line spectroscopic binary stars is (in general) not possible because of the unknown orbital plane inclination. Even when the mass of the visible star can be measured, only a lower limit can be placed on the mass of the unseen companion. However, since these inclination angles should be isotropically distributed, for a large enough, unbiased sample, the companion mass distribution can be deconvolved from the distribution of observables. In this work, we construct a hierarchical probabilistic model to infer properties of unseen companion stars given observations of the orbital period and projected radial velocity of the primary star. We apply this model to three mock samples of low-mass white dwarfs (LMWDs, $M\lesssim0.45~\Msun$) and a sample of post-common-envelope binaries. We use a mixture of two Gaussians to model the WD and neutron star (NS) companion mass distributions. Our model successfully recovers the initial parameters of these test data sets. We then apply our model to 55 WDs in the extremely low-mass (ELM) WD Survey. Our maximum a posteriori model for the WD companion population has a mean mass $\mu_{\rm WD} = 0.74~\Msun$, with a standard deviation $\sigma_{\rm WD} = 0.24~\Msun$. Our model constrains the NS companion fraction $f_{\rm NS}$ to be $<$16\% at 68\% confidence. We make samples from the posterior distribution publicly available so that future observational efforts may compute the NS probability for newly discovered LMWDs. \end{abstract} \keywords{binaries: general --- binaries: spectroscopic --- methods: statistical --- white dwarfs} \section{Introduction} Except in cases of extreme metallicity \citep{kilic07}, the Galaxy is not old enough to produce low-mass white dwarfs (LMWDs) through single-star evolution. Instead, LMWDs are expected to form through interactions with another star \citep{han98,nelemans00,nelemans01,vdSluys06,woods12}. Indeed, with few exceptions, follow-up observations consistently find companions to LMWDs \citep{marsh95,maxted00,nelemans05,rebassa11}. Recently, the ELM WD Survey has identified 61 extremely LMWDs ($M\lesssim0.3~ \Msun$) in the Sloan Digital Sky Survey \citep[SDSS;][]{york00} and elsewhere \citep{ELMI,ELMII, ELMIII, ELMIV, ELMV}. We refer to the 55 WDs found by these authors that have a measured radial velocity (RV) and orbital period ($\period$) as the ELM sample. These RV and $\period$ measurements indicate that the LMWDs companions are most likely WDs. However, since the inclination angle $i$ is unknown, LMWDs could have neutron star (NS) companions. Indeed, LMWDs are known companions to millisecond pulsars, although these WDs are generally too faint for spectroscopy \citep{vKerkwijk96,callanan98,bassa06,antoniadis12}. Finding even one NS companion to a spectroscopically characterized LMWD would be very valuable, since this system could constrain the NS mass. To date, unfortunately, radio and X-ray searches for NS companions to LMWDs have been unsuccessful \citep{vLeeuwen07,agueros09b,agueros09a,kilic13}. For each LMWD in the ELM sample, spectroscopy provides $\period$, the primary WD mass $M_1$, and the projected orbital velocity $K=v \sin i$. Assuming circular orbits, we can write: \begin{equation} \frac{(M_2 \sin i)^3}{\left(M_1+M_2\right)^2} = \frac{\period}{2\pi G} K^3, \label{eq:massfunc} \end{equation} where the right side is the mass function $\mf$. The companion mass, $M_2$, is minimized for an edge-on orbit ($i = 90\degree$). Because of this dependence on $i$, the nature of the companion cannot usually be determined based on $\mf$ alone. Figure~\ref{fig:Porb-M1} shows that the population of LMWDs with pulsar companions occupies the same region in $M_1 - \period$ space as those with WD companions. Therefore, barring rare circumstances such as eclipsing systems, individual LMWDs with NS companions cannot be identified from optical observations alone. The ELM sample is now large enough that the $M_2$ distribution and NS companion fraction can be constrained statistically. %These constraints provide important tests for population synthesis models. We have developed a probabilistic model to infer parameters of an assumed form for the $M_2$ distribution. Our method is similar to that employed by \citet{ozel12} and \citet{kiziltan13} to describe the mass distribution of NSs in binaries using post-Keplerian parameters. We focus on the following questions: Can the companion population be modeled using a simple description of $M_2$? How does the $M_2$ distribution compare to predictions from population synthesis simulations? What is the rate of LMWD-NS binaries implied by our model? What are the resulting distributions of NS probabilities for individual systems in the ELM sample? To answer these questions, we build the mathematical framework (Section 2), then test our resulting model (Section 3). We apply our model to the ELM sample (Section 4) before concluding (Section 5). \begin{figure}[h!] \begin{center} \includegraphics[angle=90,width=0.95\columnwidth]{f1.eps} \caption{The $M_1$ - $\period$ distribution of the ELM sample (circles) and the known WD-NS binaries (triangles). The three eclipsing systems in the ELM sample with known $M_2$ are shown as filled circles, and the masses of the ELM WDs without detected RV variations are shown by the arrows. From $M_1$ and $\period$ alone, the two populations are indistinguishable.} \label{fig:Porb-M1} \end{center} \end{figure} \section{Building our model} We construct a statistical model to constrain a parametric model for the distribution of LMWD companion masses, $p(M_2 \given \bs{\theta})$.\footnote{We represent vectors or sets of parameters or quantities by bold symbols.} For each system, we assume we have $K$, $T$, and $M_1$, and therefore know $\mf$. We wish to derive posterior constraints on the model parameters, $\bs{\theta}$, which describe the distribution of companion masses, $p(M_2\given \bs{\theta})$, given the set of observed mass functions, $\bs{m_f}$, by deconvolving the $\mf$ distribution from the unobserved inclinations. Using Bayes' rule, \begin{equation} p(\bs{\theta} \given \bs{\mf}) = \frac{1}{\mathcal{Z}}~p(\bs{\mf} \given \bs{\theta})~p(\bs{\theta}), \end{equation} where $p(\bs{\mf} \given \bs{\theta})$ is the likelihood, $p(\bs{\theta})$ is the prior on parameters $\bs{\theta}$, and the evidence integral, $\mathcal{Z}$, is a constant that depends only on the data. The likelihood, $p(\bs{\mf} \given \bs{\theta})$, can be split into a product over the likelihoods of individual systems: \begin{equation} p(\bs{\mf} \given \bs{\theta}) = \prod_j p(\mf \given \bs{\theta}), \end{equation} where the product is over each of the $j$ systems. This marginal likelihood involves integrals over the unobserved quantities $i$ and $M_2$, \begin{align} p(\mf \given \bs{\theta}) &= \int_0^\infty dM_2 \int_0^{\pi/2} di \nonumber \\ & \qquad {} \times p(\mf \given M_1, M_2, i)~p(M_2 \given \bs{\theta})~p(i). \end{align} We neglect observational uncertainties in $\mf$ and $M_1$,\footnote{The fractional uncertainties in these quantities are small, $\sigma_x / x \sim 0.05-0.1$ \citep{gianninas14}.} and assume the inclination angles are isotropically distributed: \begin{equation} p(\mf \given M_1, M_2, i) = \delta \left[\mf - f(M_1, M_2, i) \right], \end{equation} where \begin{equation} f(M_1, M_2, i) = \frac{(M_2 \sin i)^3}{(M_1 + M_2)^2} \end{equation} and \begin{equation} p(i) = \sin i. \end{equation} For now, we do not specify a parametric form for the companion mass distribution, $p(M_2 \given \bs{\theta})$. With the above assumptions, the marginal likelihood integral is: \begin{align} p(\mf \given \bs{\theta}) &= \int_{0}^\infty dM_2 ~p(M_2 \given \bs{\theta}) \nonumber \\ & \qquad {} \times \int_0^{\pi/2} di ~\sin i ~ \delta \left[g(M_1,M_2,i) \right]\label{eq:delta}, \end{align} where \begin{equation} g(M_1,M_2,i) = \mf - \frac{M_2^3}{(M_1+M_2)^2}\sin^3 i. \end{equation} The inner integral (over $i$) has the form: \begin{equation} \int dx~F(x)~\delta \left[ G(x) \right] = \sum_j \frac{F(x^*_j)}{|G'(x^*_j)|}, \end{equation} where the sum is over the roots, $x^*_j$, of the function $G(x)$. The root, $i^*$, and derivative of the argument of the delta function in \eqn\ref{eq:delta} are: \begin{align} \sin i^* &= \frac{ \left[\mf(M_1+M_2)^2 \right]^{1/3}}{M_2}, \\ \frac{\partial g}{\partial i}\bigg\rvert_{i^*} &= \frac{3M_2^3}{(M_1+M_2)^2} \sin^2 i^* \sqrt{1 - \sin^2 i^*}. \end{align} We may rewrite the marginal likelihood as: \begin{align} p(\mf \given \bs{\theta}) &= \int_{0}^\infty dM_2~p(M_2 \given \bs{\theta})~\sin i^* \left(\frac{\partial g}{\partial i}\bigg\rvert_{i^*}\right)^{-1}\\ &= \int_{M_{2,{\rm min}}}^\infty dM_2~p(M_2 \given \bs{\theta})~h(M_2, \mf, M_1). \label{eq:fullm2} \end{align} The bottom bound in the integral in \eqn\ref{eq:fullm2} is set by the minimum companion mass for which the integrand is real, $M_{2,{\rm min}}$, determined by setting $i=90\degree$ in \eqn\ref{eq:massfunc} and solving for $M_2$, and \begin{equation} h(M_2, \mf, M_1) = \frac{(M_1+M_2)^{4/3}}{3\ \mf^{1/3}M_2\sqrt{M_2^2 - \left[ \mf(M_1+M_2)^2 \right]^{2/3}}}. \end{equation} \subsection{Our Model} \label{sec:experiments} We must now choose a functional form for the companion mass distribution, $p(M_2\given \bs{\theta})$. We use a two-component Gaussian mixture model. We truncate the distributions using physically motivated bounds: the WD component is restricted to $M_2\in [0.2,\wdupper]~\Msun$ and the NS component is restricted to $M_2\in [1.3,2.0]~\Msun$. We then have: \begin{align} p(M_2 \given \bs{\theta}) &= \left[ (1-f_{\rm NS})~p_{\rm WD} + f_{\rm NS}~p_{\rm NS} \right], \end{align} where $f_{\rm NS}$ is the NS fraction and \begin{align} p_{\rm WD} &= \mathcal{N}(M_2 \given \mu_{\rm WD}, \sigma^2_{\rm WD}); ~0.2 < \frac{M_2}{\Msun} < \wdupper, \\ p_{\rm NS} &= \mathcal{N}(M_2 \given \mu_{\rm NS}, \sigma^2_{\rm NS}); ~1.3 < \frac{M_2}{\Msun} < 2. \end{align} $\mathcal{N}$ is the (truncated, but properly normalized) normal distribution with mean $\mu$, variance $\sigma^2$; the distributions are limited to the ranges specified. To reduce the number of parameters in our model we fix $\mu_{\rm NS}$ and $\sigma_{\rm NS}$ %$\mu_{\rm NS} = 1.4~\Msun$ and $\sigma_{\rm NS} = 0.05~\Msun$, to: \begin{align} \mu_{\rm NS} &= 1.4~\Msun, \\ \sigma_{\rm NS} &= 0.05~\Msun, \end{align} as some NSs in binaries may be somewhat more massive than the canonical NS mass of 1.35 \Msun~\citep{kiziltan13,smedley14}. The probability of any particular WD having a NS companion, $P_{\rm NS}$, can be computed for a given set of parameters for the $M_2$ distribution: \begin{equation} P_{\rm NS} = \frac{\int_{M_{2,{\rm min}}}^{\infty} dM_2~ f_{\rm NS}~ p_{\rm NS}~ h(M_2, \mf, M_1)}{p(\mf \given \bs{\theta})}. \label{eq:P_NS} \end{equation} Our companion mass model parameters are then $\bs{\theta} = (\mu_{\rm WD}, \sigma_{\rm WD}, f_{\rm NS})$. For $\mu_{\rm WD}$, we use a uniform prior from $0.2-1.0~\Msun$; for $\sigma_{\rm WD}$, we use a logarithmic (scale-invariant) prior over the range $0.02-2.0~\Msun$. Finally, we use a uniform prior over the dimensionless $f_{\rm NS}$ from $0-1$. The model parameters are summarized in Table~\ref{tbl:parameters}. \renewcommand{\arraystretch}{1.405} \begin{deluxetable}{ccccc} \tablecaption{Model Results \label{tbl:parameters}} \tablehead{ \multicolumn{2}{c}{} & \colhead{$\mu_{\rm WD}$} & \colhead{$\sigma_{\rm WD}$} & \colhead{$f_{\rm NS}$} \\ \colhead{} & \colhead{} & \colhead{[\Msun]} & \colhead{[\Msun]} & \colhead{} } \startdata \multicolumn{2}{c}{\multirow{2}{*}{Priors}} & $\mathcal{U}(0.2, 1)$ & $\propto \sigma^{-1}$ & $\mathcal{U}(0, 1)$ \\ \multicolumn{2}{c}{} & & $(0.02 < \sigma/\Msun < 2.0)$ & \\ \cutinhead{Test Cases} \multirow{2}{*}{Test 1} & True & 0.7 & 0.2 & 0 \\ & MAP & 0.72 & 0.20 & 0.0 \\ \hline \multirow{2}{*}{Test 2} & True & 0.7 & 0.2 & 0.10 \\ & MAP & 0.74 & 0.19 & 0.11 \\ \hline \multirow{2}{*}{Test 3} & True & \nodata & \nodata & 0.10 \\ & MAP & 0.63 & 0.52 & 0.14 \\ \hline \multirow{2}{*}{PCEB} & True & \nodata & \nodata & 0 \\ & MAP & 0.58 & 0.16 & 0.0 \\ \cutinhead{ELM Sample} & MAP & 0.74 & 0.24 & 0.0 \enddata \tablecomments{Parameter information for the form of the $M_2$ distribution used in the tests described in Section~\ref{sec:tests}. $\mathcal{U}$ is the uniform distribution. We additionally fix the NS mass distribution: $\mu_{\rm NS} = 1.4~\Msun$ and $\sigma_{\rm NS} = 0.05~\Msun.$}\ \end{deluxetable} We use a Markov Chain Monte Carlo algorithm \citep{goodman10} to draw samples from the posterior distribution, $p(\mu_{\rm WD}, \sigma_{\rm WD}, f_{\rm NS} \given \bs{m}_f, \bs{M}_1)$.\footnote{Our model uses {\tt emcee}, implemented in \texttt{Python} \citep{foremanmackey13}.} The algorithm uses an ensemble of individual ``walkers'' to naturally adapt to the geometry of the parameter-space being explored. We run the walkers for a burn-in period of 500 steps starting from randomly drawn initial conditions (sampled from the priors in Table~\ref{tbl:parameters}). We then re-initialize the walkers from their positions at the end of this run and run again for 1000 steps. We remove the burn-in samples to eliminate any effects due to our choice of initial conditions. \section{Testing Our Model} \label{sec:tests} We test the performance of this Gaussian mixture model on four separate data sets: three mock data sets and a sample of SDSS post-common-envelope binaries \citep[PCEBs;][]{nebot11}. Each of the 100 systems in our three mock data sets is generated by computing a $\mf$ from a random $M_1$ (drawn from a uniform distribution, $\mathcal{U}(0.2,0.4)~\Msun$), $M_2$ (from the distributions described below), and $i$ (from an isotropic distribution). %the companion mass from the particular distributions described below, then using a randomly drawn $i$ and $M_1$ to compute $\mf$. We draw $M_1$ from a uniform distribution, $\mathcal{U}(0.2,0.4)~\Msun$. We apply the same Gaussian mixture model to all four tests to infer the parameters of the WD mixture component and $f_{\rm NS}$. \begin{figure*}[h!] \begin{center} \includegraphics[width=0.95\textwidth]{f2.pdf} \caption{Results from testing the first two mock data sets described in Section~\ref{sec:tests}. The left-most panels show the companion masses (gray histogram) randomly drawn from each of our test distributions and our MAP models (black line). Panels in the second and third columns show samples from the posterior distributions of $\mu_{\rm WD}$ and $\sigma_{\rm WD}$ and $f_{\rm NS}$. Contours designate the 68\% and 95\% confidence levels. Dashed lines in these panels show the true values from which the sample systems were drawn. The fourth panel shows individual mock LMWD systems (ordered by increasing $\mf$) and their corresponding $P_{\rm NS}$ distribution. Tick marks along the bottom indicate inputed LMWD-NS systems.} \label{fig:tests_1_2} \end{center} \end{figure*} \subsection{Test 1: Single Gaussian (WD)} \label{sec:exp1} We first generate companion masses by drawing from a single, truncated Gaussian with the parameters given in Table~\ref{tbl:parameters}. This mock sample contains no NSs. In the top row of Figure~\ref{fig:tests_1_2}, the left-most panel shows that our model finds a maximum a posteriori (MAP) $M_2$ distribution (black line) that qualitatively matches the input distribution (gray histogram). The second and third panels show samples from the posterior distributions and contours containing 68\% and 95\% of the samples for our three model parameters. The input values (dashed lines) lie cleanly within the inner contour in both panels, although $f_{\rm NS}$ has a tail up to $\approx$10\%. %The second panel shows samples from the posterior distribution and contours containing 68\% and 95\% of the samples. The input values lie cleanly within the inner contour in both projections of the posterior. %the model preference toward higher masses and smaller standard deviations is due to statistical noise from our randomly generated mock sample. %The third panel shows that, although the posterior $f_{\rm NS}$ distribution is consistent with 0\%, there is a tail up to $\approx$10\%. Equation~\ref{eq:P_NS} gives the probability of an individual system hosting a NS. Using posterior samples, we can determine the distribution of $P_{\rm NS}$ for each system. The right-most panel in Figure~\ref{fig:tests_1_2} includes all the individual systems, ordered by $\mf$, and shows the distributions of $P_{\rm NS}$ for each. For most systems, there is negligible probability above $P_{\rm NS}\sim 5\%$. \subsection{Test 2: Two Gaussians (WD + NS)} \label{sec:exp2} We use the same Gaussian distribution to generate companion masses for the WDs but add a NS component with $f_{\rm NS} = 10\%$. The bottom row of Figure~\ref{fig:tests_1_2} shows that our model again recovers the input values for $\mu_{\rm WD}$ and $\sigma_{\rm WD}$. %As in Test 1, the model preference for higher $\mu_{\rm WD}$ and lower $\sigma_{\rm WD}$ is due to our randomly generated mass distribution. Importantly, the third panel shows that our model also recovers $f_{\rm NS}$, although the posterior shows a substantial tail toward higher $f_{\rm NS}$. Tick marks in the right-most panel of Figure~\ref{fig:tests_1_2} indicate ``true" NSs in our mock data. Our model correctly assigns high $P_{\rm NS}$ to roughly half of these. However, many systems with NS companions have inclinations too low to be statistically differentiated from those with WD companions. \subsection{Test 3: Uniform (WD) + Gaussian (NS)} \label{sec:exp3} We generate companion masses for the WDs by sampling from a uniform distribution over $[0.2,1.2]~\Msun$, again with $f_{\rm NS}=$10\%. The top row of Figure~\ref{fig:tests_3_4} shows the results. The posterior distribution in the second panel indicates that $\mu_{\rm WD}$ and $\sigma_{\rm WD}$ are not well constrained. The preference for larger $\sigma_{\rm WD}$ is expected, as the model flattens the Gaussian model distribution to match it with the input uniform distribution. Interestingly, the third panel shows that despite having a non-Gaussian input distribution for $M_2$, and a poorly constrained $\sigma_{\rm WD}$, our model still recovers $f_{\rm NS}$ approximately as accurately as in Test 2. Furthermore, the fourth panel of Figure~\ref{fig:tests_3_4} demonstrates that our model effectively identifies which LMWDs host NS companions. \subsection{Test 4: PCEBs} \label{sec:PCEB} PCEBs are composed of WDs in close orbits with main-sequence companions. The \citet{nebot11} sample of 54 SDSS PCEBs, which have precisely determined $K$, $\period$, and masses for the main-sequence companions, are an ideal test sample for our model. Our model uses these parameters to try and recover the PCEBs WD mass distribution, which we can then compare to the spectroscopically determined WD masses. %Our model is ignorant of the spectroscopically measured WD masses and attempts to fit the WD mass distribution based on the measured main sequence mass, $K$, and $\period$. We use a sample of 54 SDSS PCEBs with spectroscopically derived $K$, $\period$, and main sequence masses \citep{nebot11}. Our MAP distribution (black line) is shown in the left-most panel in the bottom row of Figure~\ref{fig:tests_3_4}. Our model qualitatively recovers the true $M_{\rm WD}$ distribution (gray histogram). The third panel shows that the posterior $f_{\rm NS}$ distribution is very low, as expected since there are no NS companions in the PCEB sample. This is further illustrated in the right-most panel, where every PCEB in the sample has low $P_{\rm NS}$ values. \begin{figure*}[h!] \begin{center} \includegraphics[width=0.95\textwidth]{f3.pdf} \caption{ The results of our model when applied to our third mock data set and the SDSS PCEB sample. The panels are same as those in Figure~\ref{fig:tests_1_2}.} \label{fig:tests_3_4} \end{center} \end{figure*} \section{Applying our model} \subsection{The ELM Sample} The ELM WD Survey is based on the Hypervelocity Star Survey \citep{brown06}, and includes previously identified SDSS LMWDs \citep{eisenstein06,liebert04}. Objects are chosen for spectroscopic follow-up based on their $ugr$ colors, and this choice is independent of the mass and nature of any putative companions. Therefore, at least with regard to $i$ and $M_2$, the population is unbiased. The ELM WD sample includes 55 systems with RV variations fit to orbital solutions, which provide precise measurements of $\period$ and $K$. WD masses in these systems are derived from fits to spectroscopic templates, which are generally precise to $\approx$10\% \citep{gianninas14}. The masses of cool LMWDs may suffer somewhat from inaccuracies in the one-dimensional WD atmospheric models \citep{tremblay13}. However, since this should only affect the coolest WDs in the ELM sample, we expect any impact on our results to be minor. Three systems are eclipsing binaries, with known companion masses: NLTT 11748 \citep[$M_2=0.72~\Msun$;][]{kaplan14}, SDSS J065133.3$+$284423.3 \citep[$M_2=0.50~\Msun$;][]{brown11b}, and SDSS J075141.2$-$014120.9 \citep[$M_2=0.97~\Msun$;][]{kilic14}. For these systems, the likelihood reduces to: \begin{equation} p(\mf \given \theta) = (1-f_{\rm NS}) \mathcal{N}(M_2^* \given \mu_{\rm WD}, \sigma^2_{\rm WD}), \end{equation} where $M_2^*$ is the mass of the WD companion. The other six ELM systems show no evidence of orbital motion, with RV upper limits of $\approx$20-50 km s$^{-1}$. Some of these systems may be in low $i$ binaries with RVs below the detection limit, or may have $\period\approx24$ hr, which is difficult to measure \citep{ELMV}. These LMWDs could also have companions at systematically longer $\period$, resulting in orbital velocities below the detection limit. We do not include these systems in our analysis. % TO ADD?: They could also not have companions at all - reference goes here \begin{figure*}[h!] \begin{center} \includegraphics[width=0.95\textwidth]{f4.pdf} \caption{Results from applying our model to the ELM WDs. The panels are the same as in Figures~\ref{fig:tests_1_2} and \ref{fig:tests_3_4}. %The leftmost panel of the top row shows that the MAP model $M_{\rm WD}$ distribution matches the histogram of true masses in the PCEB sample. %The second and third panels show the posterior distributions for our model parameters, while the fourth panel shows the $P_{\rm NS}$ values for each of the PCEBs (ordered by increasing $\mf$). The left-most panel shows both the MAP $M_2$ distribution (solid black) and random samples from the posterior (gray lines). %The second panel shows that the MAP Gaussian model has $\mu_{\rm WD}= 0.71~\Msun$ and $\sigma_{\rm WD}= 0.26~\Msun$. The third panel shows posterior samples of $\mu$ and $f_{\rm NS}$. The last panel indicates that several LMWDs in the ELM sample have high $P_{\rm NS}$. The three systems in the right-most panel with all $P_{\rm NS} = 0\%$ are the eclipsing systems with measured $M_2$. } \label{fig:ELM_post} \end{center} \end{figure*} \subsection{Results and Discussion} The results from applying our model to the ELM sample are shown in Figure~\ref{fig:ELM_post}. The MAP model gives $\mu_{\rm WD} = 0.74~\Msun$, $\sigma_{\rm WD} = 0.24~\Msun$, and $f_{\rm NS} = 0\%$. The marginal posterior over $\mu_{\rm WD}$ and $\sigma_{\rm WD}$ has a tail toward larger $\sigma_{\rm WD}$, which could indicate that the true WD distribution may not be exactly Gaussian. It is interesting that the best-fit Gaussian for the companions to the ELM WDs is similar to that of the population of single hydrogen-atmosphere WDs in SDSS, with a mean of 0.6 $\Msun$ \citep{kleinman13}. Our distribution is significantly wider: $\sigma \approx 0.26~\Msun$, compared to $\sigma \approx 0.1~\Msun$, possibly due to past mass transfer phases increasing the masses of the unseen primary WDs. The low combined mass in these systems indicates that, although several of them will merge within a Hubble time \citep{ELMV}, the majority of the ELM systems are unlikely to be type Ia SN progenitors. However, we cannot rule out the possibility that some individual LMWD binaries may be massive enough to produce type Ia SNe \citep{justham09}. %Several of these systems will merge within a Hubble time \citep{ELMV}, but their sub-Chandrasekhar combined mass would suggest that they are more likely to be underluminous type .Ia, rather than Ia, supernova progenitors. %Our results are independent of astrophysical expectations, as they do not include informative priors on $\mu_{\rm WD}$ and $\sigma_{\rm WD}$, apart from limits for $M_2$ of 0.2 \Msun\,(based on observations of LMWDs) and \wdupper~\Msun\,(based on the Chandrasekhar mass). In principle, priors could be added based on Our posterior distributions further suggest that the companions to LMWDs have predominantly CO cores. This is in contrast to population synthesis models, which suggest that LMWDs should predominantly have He-core WD companions \citep{toonen12}. With a larger sample, a more sophisticated LMWD companion model could place quantitative constraints on population synthesis predictions. The third panel in Figure~\ref{fig:ELM_post} shows a $f_{\rm NS}$ strongly peaked toward 0\%. However, there is a significant tail toward higher NS probabilities. Our model indicates $f_{\rm NS} <16\%$ at the 68\% confidence level, in agreement with independent constraints from \citet[][$f_{\rm NS}<18\pm5$\%]{vLeeuwen07} and \citet[][$f_{\rm NS}<10\substack{+4 \\ -2}~\%$]{agueros09b}, both based on radio non-detections of LMWD companions. The right-most panel in Figure~\ref{fig:ELM_post} indicates there are two LMWDs with substantial $P_{\rm NS}$: SDSS J081133.6$+$022556.8 and J174140.5$+$652638.7. However, the X-ray non-detection of SDSS J174140.5$+$652638.7 suggests its companion is unlikely to be a NS \citep{kilic14}. Searches for radio and X-ray emission from SDSS J081133.6$+$022556.8 are on-going. We note that the $P_{\rm NS}$ distributions in each of our samples show a trend such that systems with higher $\mf$ have higher $P_{\rm NS}$ values. These high $\mf$ systems are therefore ideal targets to search for NS companions to LMWDs. \section{Conclusions} We have developed a statistical model to infer the companion mass distribution for a sample of single-line, spectroscopic binaries. This model can be applied to any such sample with measured $M_1$ and $\mf$. When tested on three separate mock data sets with unseen WD and NS companions to LMWDs, our model recovers the input parameters. Even when the companion mass distribution is not drawn from a Gaussian distribution, our model still infers the input NS fraction to within a few percent. We further apply our model to the SDSS PCEBs \citep{nebot11}, and our model qualitatively recovers the independent, spectroscopically measured $M_{\rm WD}$ distribution. We applied our model to the set of LMWDs from the ELM WD survey. The resulting posterior distribution is qualitatively similar to our two-component Gaussian test case, suggesting that the companion mass distribution to the LMWDs in the ELM sample is well-described by our model. Our model returns a MAP $\mu_{\rm WD} = 0.74\pm0.24\ \Msun$, suggesting that a majority of ELM WDs have CO-core WD companions. This is in contrast to predictions from population synthesis models, which find that the dominant companion population should be He-core WDs \citep[e.g.,][]{toonen12}. Our model further indicates that the fraction of ELM WDs with NS companions is consistent with 0\%, but could be as high as $\approx$16\% (within 1-$\sigma$). Finally, our model identifies the LMWD SDSS J081133.6$+$022556.8 as having the highest median probability of hosting a NS companion. To determine the probability of any particular LMWD hosting a NS, we make our model posteriors publicly available on fig{\bf share}.\footnote{\url{http://dx.doi.org/10.6084/m9.figshare.1206621}} We further provide a {\tt Python} script that calculates $P_{\rm NS}$ and the mass distribution for a WD companion for any LMWD with a measured $M_1$ and $\mf$. This script can be applied to newly discovered LMWDs as well as those already in the ELM sample. There are several ways in which our model can be expanded. By modeling photometric variability, \citet{hermes14} recently constrained the inclination of 20 LMWDs in the ELM sample; we could include these constraints. Furthermore, our model can place tighter constraints on $f_{\rm NS}$ by factoring in radio and X-ray non-detections. We plan to develop our method to quantitatively compare our model to the results of population synthesis codes, potentially constraining the formation of LMWDs. \acknowledgements The authors thank David Hogg, DJ D'Orazio, and Josh Peek for useful discussions, and the organizers of the \emph{AstroData Hack Week} (2014). We are grateful to the anonymous referees for comments that helped improve this paper. MAA acknowledges support provided by the NSF through grant AST-1255419. APW is supported by a NSF Graduate Research Fellowship under grant No.\ 11-44155. This research made use of Astropy, a community-developed core \texttt{Python} package for Astronomy \citep{astropy13}. \\ \bibliographystyle{apj} \begin{thebibliography}{43} \expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi \bibitem[{{Ag{\"u}eros} {et~al.}(2009{\natexlab{a}}){Ag{\"u}eros}, {Camilo}, {Silvestri}, {Kleinman}, {Anderson}, \& {Liebert}}]{agueros09b} {Ag{\"u}eros}, M.~A., {Camilo}, F., {Silvestri}, N.~M., {Kleinman}, S.~J., {Anderson}, S.~F., \& {Liebert}, J.~W. 2009{\natexlab{a}}, \apj, 697, 283 \bibitem[{{Ag{\"u}eros} {et~al.}(2009{\natexlab{b}}){Ag{\"u}eros}, {Heinke}, {Camilo}, {Kilic}, {Anderson}, {Freire}, {Kleinman}, {Liebert}, \& {Silvestri}}]{agueros09a} {Ag{\"u}eros}, M.~A. {et~al.} 2009{\natexlab{b}}, \apjl, 700, L123 \bibitem[{{Antoniadis} {et~al.}(2012){Antoniadis}, {van Kerkwijk}, {Koester}, {Freire}, {Wex}, {Tauris}, {Kramer}, \& {Bassa}}]{antoniadis12} {Antoniadis}, J., {van Kerkwijk}, M.~H., {Koester}, D., {Freire}, P.~C.~C., {Wex}, N., {Tauris}, T.~M., {Kramer}, M., \& {Bassa}, C.~G. 2012, \mnras, 423, 3316 \bibitem[{{Astropy Collaboration} {et~al.}(2013){Astropy Collaboration}, {Robitaille}, {Tollerud}, {Greenfield}, {Droettboom}, {Bray}, {Aldcroft}, {Davis}, {Ginsburg}, {Price-Whelan}, {Kerzendorf}, {Conley}, {Crighton}, {Barbary}, {Muna}, {Ferguson}, {Grollier}, {Parikh}, {Nair}, {Unther}, {Deil}, {Woillez}, {Conseil}, {Kramer}, {Turner}, {Singer}, {Fox}, {Weaver}, {Zabalza}, {Edwards}, {Azalee Bostroem}, {Burke}, {Casey}, {Crawford}, {Dencheva}, {Ely}, {Jenness}, {Labrie}, {Lim}, {Pierfederici}, {Pontzen}, {Ptak}, {Refsdal}, {Servillat}, \& {Streicher}}]{astropy13} {Astropy Collaboration} {et~al.} 2013, \aap, 558, A33 \bibitem[{{Bassa} {et~al.}(2006){Bassa}, {van Kerkwijk}, {Koester}, \& {Verbunt}}]{bassa06} {Bassa}, C.~G., {van Kerkwijk}, M.~H., {Koester}, D., \& {Verbunt}, F. 2006, \aap, 456, 295 \bibitem[{{Brown} {et~al.}(2006){Brown}, {Geller}, {Kenyon}, \& {Kurtz}}]{brown06} {Brown}, W.~R., {Geller}, M.~J., {Kenyon}, S.~J., \& {Kurtz}, M.~J. 2006, \apj, 647, 303 \bibitem[{{Brown} {et~al.}(2013){Brown}, {Kilic}, {Allende Prieto}, {Gianninas}, \& {Kenyon}}]{ELMV} {Brown}, W.~R., {Kilic}, M., {Allende Prieto}, C., {Gianninas}, A., \& {Kenyon}, S.~J. 2013, \apj, 769, 66 \bibitem[{{Brown} {et~al.}(2010){Brown}, {Kilic}, {Allende Prieto}, \& {Kenyon}}]{ELMI} {Brown}, W.~R., {Kilic}, M., {Allende Prieto}, C., \& {Kenyon}, S.~J. 2010, \apj, 723, 1072 \bibitem[{{Brown} {et~al.}(2012){Brown}, {Kilic}, {Allende Prieto}, \& {Kenyon}}]{ELMIII} ---. 2012, \apj, 744, 142 \bibitem[{{Brown} {et~al.}(2011){Brown}, {Kilic}, {Hermes}, {Allende Prieto}, {Kenyon}, \& {Winget}}]{brown11b} {Brown}, W.~R., {Kilic}, M., {Hermes}, J.~J., {Allende Prieto}, C., {Kenyon}, S.~J., \& {Winget}, D.~E. 2011, \apjl, 737, L23 \bibitem[{{Callanan} {et~al.}(1998){Callanan}, {Garnavich}, \& {Koester}}]{callanan98} {Callanan}, P.~J., {Garnavich}, P.~M., \& {Koester}, D. 1998, \mnras, 298, 207 \bibitem[{{Eisenstein} {et~al.}(2006){Eisenstein}, {Liebert}, {Harris}, {Kleinman}, {Nitta}, {Silvestri}, {Anderson}, {Barentine}, {Brewington}, {Brinkmann}, {Harvanek}, {Krzesi{\'n}ski}, {Neilsen}, {Long}, {Schneider}, \& {Snedden}}]{eisenstein06} {Eisenstein}, D.~J. {et~al.} 2006, \apjs, 167, 40 \bibitem[{{Foreman-Mackey} {et~al.}(2013){Foreman-Mackey}, {Hogg}, {Lang}, \& {Goodman}}]{foremanmackey13} {Foreman-Mackey}, D., {Hogg}, D.~W., {Lang}, D., \& {Goodman}, J. 2013, \pasp, 125, 306 \bibitem[{{Gianninas} {et~al.}(2014){Gianninas}, {Dufour}, {Kilic}, {Brown}, {Bergeron}, \& {Hermes}}]{gianninas14} {Gianninas}, A., {Dufour}, P., {Kilic}, M., {Brown}, W.~R., {Bergeron}, P., \& {Hermes}, J.~J. 2014, \apj, 794, 35 \bibitem[Goodman~\&\ Weare(2010)]{goodman10} Goodman,~J. \& Weare,\ J. 2010, Comm.\ App.\ Math.\ Comp.\ Sci., 5, 65 \bibitem[{{Han}(1998)}]{han98} {Han}, Z. 1998, \mnras, 296, 1019 \bibitem[{{Hermes} {et~al.}(2014){Hermes}, {Brown}, {Kilic}, {Gianninas}, {Chote}, {Sullivan}, {Winget}, {Bell}, {Falcon}, {Winget}, {Mason}, {Harrold}, \& {Montgomery}}]{hermes14} {Hermes}, J.~J. {et~al.} 2014, \apj, 792, 39 \bibitem[{{Justham} {et~al.}(2009){Justham}, {Wolf}, {Podsiadlowski}, \& {Han}}]{justham09} {Justham}, S., {Wolf}, C., {Podsiadlowski}, P., \& {Han}, Z. 2009, \aap, 493, 1081 \bibitem[{{Kaplan} {et~al.}(2014){Kaplan}, {Marsh}, {Walker}, {Bildsten}, {Bours}, {Breedt}, {Copperwheat}, {Dhillon}, {Howell}, {Littlefair}, {Shporer}, \& {Steinfadt}}]{kaplan14} {Kaplan}, D.~L. {et~al.} 2014, \apj, 780, 167 \bibitem[{{Kilic} {et~al.}(2011){Kilic}, {Brown}, {Allende Prieto}, {Ag{\"u}eros}, {Heinke}, \& {Kenyon}}]{ELMII} {Kilic}, M., {Brown}, W.~R., {Allende Prieto}, C., {Ag{\"u}eros}, M.~A., {Heinke}, C., \& {Kenyon}, S.~J. 2011, \apj, 727, 3 \bibitem[{{Kilic} {et~al.}(2012){Kilic}, {Brown}, {Allende Prieto}, {Kenyon}, {Heinke}, {Ag{\"u}eros}, \& {Kleinman}}]{ELMIV} {Kilic}, M., {Brown}, W.~R., {Allende Prieto}, C., {Kenyon}, S.~J., {Heinke}, C.~O., {Ag{\"u}eros}, M.~A., \& {Kleinman}, S.~J. 2012, \apj, 751, 141 \bibitem[{{Kilic} {et~al.}(2013){Kilic}, {Gianninas}, {Brown}, {Harris}, {Dahn}, {Ag{\"u}eros}, {Heinke}, {Kenyon}, {Panei}, \& {Camilo}}]{kilic13} {Kilic}, M. {et~al.} 2013, \mnras, 434, 3582 \bibitem[{{Kilic} {et~al.}(2014){Kilic}, {Hermes}, {Gianninas}, {Brown}, {Heinke}, {Ag{\"u}eros}, {Chote}, {Sullivan}, {Bell}, \& {Harrold}}]{kilic14} ---. 2014, \mnras, 438, L26 \bibitem[{{Kilic} {et~al.}(2007){Kilic}, {Stanek}, \& {Pinsonneault}}]{kilic07} {Kilic}, M., {Stanek}, K.~Z., \& {Pinsonneault}, M.~H. 2007, \apj, 671, 761 \bibitem[{{Kiziltan} {et~al.}(2013){Kiziltan}, {Kottas}, {De Yoreo}, \& {Thorsett}}]{kiziltan13} {Kiziltan}, B., {Kottas}, A., {De Yoreo}, M., \& {Thorsett}, S.~E. 2013, \apj, 778, 66 \bibitem[{{Kleinman} {et~al.}(2013){Kleinman}, {Kepler}, {Koester}, {Pelisoli}, {Pe{\c c}anha}, {Nitta}, {Costa}, {Krzesinski}, {Dufour}, {Lachapelle}, {Bergeron}, {Yip}, {Harris}, {Eisenstein}, {Althaus}, \& {C{\'o}rsico}}]{kleinman13} {Kleinman}, S.~J. {et~al.} 2013, \apjs, 204, 5 \bibitem[{{Liebert} {et~al.}(2004){Liebert}, {Bergeron}, {Eisenstein}, {Harris}, {Kleinman}, {Nitta}, \& {Krzesinski}}]{liebert04} {Liebert}, J., {Bergeron}, P., {Eisenstein}, D., {Harris}, H.~C., {Kleinman}, S.~J., {Nitta}, A., \& {Krzesinski}, J. 2004, \apjl, 606, L147 \bibitem[{{Marsh} {et~al.}(1995){Marsh}, {Dhillon}, \& {Duck}}]{marsh95} {Marsh}, T.~R., {Dhillon}, V.~S., \& {Duck}, S.~R. 1995, \mnras, 275, 828 \bibitem[{{Maxted} {et~al.}(2000){Maxted}, {Marsh}, \& {Moran}}]{maxted00} {Maxted}, P.~F.~L., {Marsh}, T.~R., \& {Moran}, C.~K.~J. 2000, \mnras, 319, 305 \bibitem[{{Nebot G{\'o}mez-Mor{\'a}n} {et~al.}(2011){Nebot G{\'o}mez-Mor{\'a}n}, {G{\"a}nsicke}, {Schreiber}, {Rebassa-Mansergas}, {Schwope}, {Southworth}, {Aungwerojwit}, {Bothe}, {Davis}, {Kolb}, {M{\"u}ller}, {Papadaki}, {Pyrzas}, {Rabitz}, {Rodr{\'{\i}}guez-Gil}, {Schmidtobreick}, {Schwarz}, {Tappert}, {Toloza}, {Vogel}, \& {Zorotovic}}]{nebot11} {Nebot G{\'o}mez-Mor{\'a}n}, A. {et~al.} 2011, \aap, 536, A43 \bibitem[{{Nelemans} {et~al.}(2005){Nelemans}, {Napiwotzki}, {Karl}, {Marsh}, {Voss}, {Roelofs}, {Izzard}, {Montgomery}, {Reerink}, {Christlieb}, \& {Reimers}}]{nelemans05} {Nelemans}, G. {et~al.} 2005, \aap, 440, 1087 \bibitem[{{Nelemans} {et~al.}(2000){Nelemans}, {Verbunt}, {Yungelson}, \& {Portegies Zwart}}]{nelemans00} {Nelemans}, G., {Verbunt}, F., {Yungelson}, L.~R., \& {Portegies Zwart}, S.~F. 2000, \aap, 360, 1011 \bibitem[{{Nelemans} {et~al.}(2001){Nelemans}, {Yungelson}, {Portegies Zwart}, \& {Verbunt}}]{nelemans01} {Nelemans}, G., {Yungelson}, L.~R., {Portegies Zwart}, S.~F., \& {Verbunt}, F. 2001, \aap, 365, 491 \bibitem[{{{\"O}zel} {et~al.}(2012){{\"O}zel}, {Psaltis}, {Narayan}, \& {Santos Villarreal}}]{ozel12} {{\"O}zel}, F., {Psaltis}, D., {Narayan}, R., \& {Santos Villarreal}, A. 2012, \apj, 757, 55 \bibitem[{{Rebassa-Mansergas} {et~al.}(2011){Rebassa-Mansergas}, {Nebot G{\'o}mez-Mor{\'a}n}, {Schreiber}, {Girven}, \& {G{\"a}nsicke}}]{rebassa11} {Rebassa-Mansergas}, A., {Nebot G{\'o}mez-Mor{\'a}n}, A., {Schreiber}, M.~R., {Girven}, J., \& {G{\"a}nsicke}, B.~T. 2011, \mnras, 413, 1121 \bibitem[{{Smedley} {et~al.}(2014){Smedley}, {Tout}, {Ferrario}, \& {Wickramasinghe}}]{smedley14} {Smedley}, S.~L., {Tout}, C.~A., {Ferrario}, L., \& {Wickramasinghe}, D.~T. 2014, \mnras, 437, 2217 \bibitem[{{Toonen} {et~al.}(2012){Toonen}, {Nelemans}, \& {Portegies Zwart}}]{toonen12} {Toonen}, S., {Nelemans}, G., \& {Portegies Zwart}, S. 2012, \aap, 546, A70 \bibitem[{{Tremblay} {et~al.}(2013){Tremblay}, {Ludwig}, {Steffen}, \& {Freytag}}]{tremblay13} {Tremblay}, P.-E., {Ludwig}, H.-G., {Steffen}, M., \& {Freytag}, B. 2013, \aap, 559, A104 \bibitem[{{van der Sluys} {et~al.}(2006){van der Sluys}, {Verbunt}, \& {Pols}}]{vdSluys06} {van der Sluys}, M.~V., {Verbunt}, F., \& {Pols}, O.~R. 2006, \aap, 460, 209 \bibitem[{{van Kerkwijk} {et~al.}(1996){van Kerkwijk}, {Bergeron}, \& {Kulkarni}}]{vKerkwijk96} {van Kerkwijk}, M.~H., {Bergeron}, P., \& {Kulkarni}, S.~R. 1996, \apjl, 467, L89 \bibitem[{{van Leeuwen} {et~al.}(2007){van Leeuwen}, {Ferdman}, {Meyer}, \& {Stairs}}]{vLeeuwen07} {van Leeuwen}, J., {Ferdman}, R.~D., {Meyer}, S., \& {Stairs}, I. 2007, \mnras, 374, 1437 \bibitem[{{Woods} {et~al.}(2012){Woods}, {Ivanova}, {van der Sluys}, \& {Chaichenets}}]{woods12} {Woods}, T.~E., {Ivanova}, N., {van der Sluys}, M.~V., \& {Chaichenets}, S. 2012, \apj, 744, 12 \bibitem[{{York} {et~al.}(2000){York}, {Adelman}, {Anderson}, {Anderson}, {Annis}, {Bahcall}, {Bakken}, {Barkhouser}, {Bastian}, {Berman}, {Boroski}, {Bracker}, {Briegel}, {Briggs}, {Brinkmann}, {Brunner}, {Burles}, {Carey}, {Carr}, {Castander}, {Chen}, {Colestock}, {Connolly}, {Crocker}, {Csabai}, {Czarapata}, {Davis}, {Doi}, {Dombeck}, {Eisenstein}, {Ellman}, {Elms}, {Evans}, {Fan}, {Federwitz}, {Fiscelli}, {Friedman}, {Frieman}, {Fukugita}, {Gillespie}, {Gunn}, {Gurbani}, {de Haas}, {Haldeman}, {Harris}, {Hayes}, {Heckman}, {Hennessy}, {Hindsley}, {Holm}, {Holmgren}, {Huang}, {Hull}, {Husby}, {Ichikawa}, {Ichikawa}, {Ivezi{\'c}}, {Kent}, {Kim}, {Kinney}, {Klaene}, {Kleinman}, {Kleinman}, {Knapp}, {Korienek}, {Kron}, {Kunszt}, {Lamb}, {Lee}, {Leger}, {Limmongkol}, {Lindenmeyer}, {Long}, {Loomis}, {Loveday}, {Lucinio}, {Lupton}, {MacKinnon}, {Mannery}, {Mantsch}, {Margon}, {McGehee}, {McKay}, {Meiksin}, {Merelli}, {Monet}, {Munn}, {Narayanan}, {Nash}, {Neilsen}, {Neswold}, {Newberg}, {Nichol}, {Nicinski}, {Nonino}, {Okada}, {Okamura}, {Ostriker}, {Owen}, {Pauls}, {Peoples}, {Peterson}, {Petravick}, {Pier}, {Pope}, {Pordes}, {Prosapio}, {Rechenmacher}, {Quinn}, {Richards}, {Richmond}, {Rivetta}, {Rockosi}, {Ruthmansdorfer}, {Sandford}, {Schlegel}, {Schneider}, {Sekiguchi}, {Sergey}, {Shimasaku}, {Siegmund}, {Smee}, {Smith}, {Snedden}, {Stone}, {Stoughton}, {Strauss}, {Stubbs}, {SubbaRao}, {Szalay}, {Szapudi}, {Szokoly}, {Thakar}, {Tremonti}, {Tucker}, {Uomoto}, {Vanden Berk}, {Vogeley}, {Waddell}, {Wang}, {Watanabe}, {Weinberg}, {Yanny}, {Yasuda}, \& {SDSS Collaboration}}]{york00} {York}, D.~G. {et~al.} 2000, \aj, 120, 1579 \end{thebibliography} %\bibliography{refs} %\bibitem[Goodman~\&\ Weare(2010)]{goodman10} %Goodman,~J. \& Weare,\ J. %2010, Comm.\ App.\ Math.\ Comp.\ Sci., 5, 65 \end{document}
{"hexsha": "7a16821f98c668dcbc30168aaeeca02d8a7886e6", "size": 41842, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "documents/letter/ms.tex", "max_stars_repo_name": "adrn/tilt-shift", "max_stars_repo_head_hexsha": "23d1a024bcec4061de09df834ad7cbe97b9f37ba", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "documents/letter/ms.tex", "max_issues_repo_name": "adrn/tilt-shift", "max_issues_repo_head_hexsha": "23d1a024bcec4061de09df834ad7cbe97b9f37ba", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "documents/letter/ms.tex", "max_forks_repo_name": "adrn/tilt-shift", "max_forks_repo_head_hexsha": "23d1a024bcec4061de09df834ad7cbe97b9f37ba", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 77.4851851852, "max_line_length": 1513, "alphanum_fraction": 0.7009464175, "num_tokens": 14249}
% AUTORIGHTS % Copyright (C) 2007 Princeton University % % This file is part of Ferret Toolkit. % % Ferret Toolkit is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. \section{Index} The system allows multiple kinds of indexing schemes to be registered, eg: LSH, cover tree index, etc. Cass\_table and index has one-to-many relationship: one cass\_table can be associated with multiple indexes, while any one index can only be associated with one cass\_table. \begin{verbatim} typedef _cass_idx_t { char *idx_name; cass_table_t *table; char *parameters; // a copy of input paramters. int private_data_size; void *private_data; // private data to store index-specific info. } cass_idx_t; char *cass_idx_estimate_paramters(cass_table_t *table); cass_idx_t *cass_idx_create(cass_env_t *env, cass_table_t *table, char *parameters); int cass_idx_insert(cass_idx_t *idx, cass_table_t *table, cass_vecset_t *vecset); int cass_idx_batch_insert(cass_idx_t *idx, cass_table_t *table, cass_vecset_range_t range); // not useful? int cass_idx_query(cass_idx_t *idx, cass_vecset_t *qry_vecset, cass_qry_param_t *param, cass_qry_result_t *qry); int cass_idx_batch_query(cass_idx_t *idx, uint32_t count, cass_vecset_t **qry_vecset, cass_qry_param_t **params, cass_qry_result_t **qries); int cass_idx_release_mem(cass_idx_t *idx); // destroy in-mem index. int cass_idx_checkpoint(cass_idx_t *idx, char *fname); int cass_idx_from_disk(cass_idx_t *idx, char *fname); // idx was // created by the management env. int cass_idx_destroy(cass_env_t *env, cass_idx_t *idx); // destroy on-disk index as well. typdef struct _cass_idx_operations_t { cass_idx_estimate_parameters, // a set of function pointers. cass_idx_create, cass_idx_insert, cass_idx_query, cass_idx_release_mem, cass_idx_to_disk, cass_idx_from_disk, cass_idx_destroy, ... } cass_idx_operations_t; int cass_idx_register(char *idx_name, cass_idx_operations_t *idx_ops, enum cass_vecset_type_t vecset_type, enum cass_vec_type_t vec_type, enum cass_vecset_dist_measure_t dist_vecset, enum cass_vec_distance_measure_t dist_vec, ); // Register idx_name, tell system what vecset_type, // vec_type, dist_vecset, dist_vec it supports. \end{verbatim}
{"hexsha": "7a37ce5519f78b228661e00b638d2423a02fcd43", "size": 3111, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "pkgs/netapps/netferret/src/server/doc/spec/index.tex", "max_stars_repo_name": "manggoguy/parsec-modified", "max_stars_repo_head_hexsha": "d14edfb62795805c84a4280d67b50cca175b95af", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": 64, "max_stars_repo_stars_event_min_datetime": "2015-03-06T00:30:56.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-24T13:26:53.000Z", "max_issues_repo_path": "pkgs/netapps/netferret/src/server/doc/spec/index.tex", "max_issues_repo_name": "manggoguy/parsec-modified", "max_issues_repo_head_hexsha": "d14edfb62795805c84a4280d67b50cca175b95af", "max_issues_repo_licenses": ["BSD-3-Clause"], "max_issues_count": 12, "max_issues_repo_issues_event_min_datetime": "2020-12-15T08:30:19.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-13T03:54:24.000Z", "max_forks_repo_path": "pkgs/netapps/netferret/src/server/doc/spec/index.tex", "max_forks_repo_name": "manggoguy/parsec-modified", "max_forks_repo_head_hexsha": "d14edfb62795805c84a4280d67b50cca175b95af", "max_forks_repo_licenses": ["BSD-3-Clause"], "max_forks_count": 40, "max_forks_repo_forks_event_min_datetime": "2015-02-26T15:31:16.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-03T23:23:37.000Z", "avg_line_length": 40.4025974026, "max_line_length": 90, "alphanum_fraction": 0.7213114754, "num_tokens": 768}
"""Iterative deconvolution solvers""" import warnings import numpy as np from scipy import optimize, signal from scipy.sparse.linalg import LinearOperator from .utils import (convolution_matrix, convolution_output_size, least_squares_cost, asanyoperator) def least_squares(A, y, gamma_L2=0, gamma_L1=0, method=None, method_kwds=None): """Iterative solution to a least squares problem Returns argmin_x ||A*x - y||^2 + gamma_L2 ||x||^2 + gamma_L1 ||x||_1 Parameters ---------- A : array_like, sparse, or linear operator [N x M] projection matrix or operator y : array_like length-M vector gamma_L2 : float (optional) L2 regularization strength. Default=0 gamma_L1 : float (optional) L1 regularization strength. Default=0 method : string (optional) method to use (passed to ``scipy.optimize.minimize``) method_kwds : dict (optional) additional keywords passed to ``scipy.optimize.minimize`` Returns ------- x : ndarray length-N vector that minimizes the cost function. """ A = asanyoperator(A) y = np.asarray(y) M, N = A.shape cplx = np.issubdtype(A.dtype, complex) or np.issubdtype(y.dtype, complex) if cplx: make_x = lambda x: x[:N] + 1j * x[N:] x0 = np.zeros(2 * N, dtype=float) else: make_x = lambda x: x x0 = np.zeros(N, dtype=float) func = lambda x: least_squares_cost(A, make_x(x), y, gamma_L2=gamma_L2, gamma_L1=gamma_L1) method_kwds = method_kwds or {} res = optimize.minimize(func, x0=x0, method=method, **method_kwds) if not res.success: warnings.warn(res.message) return make_x(res.x) def deconvolution(w, y, gamma_L2=0, gamma_L1=0, Nx=None, conv_method='matrix', mode='full', method=None, method_kwds=None): """Iterative deconvolution using least squares Returns argmin_x ||conv(w, x) - y||^2 + gamma_L2 ||x||^2 Parameters ---------- w : array_like length-N array representing the convolution y : array_like length-M array or [M x K] matrix. Note that M must match the output of of np.convolve(w, x, mode). gamma_L2 : float, optional L2 regularization strength. Default=0 gamma_L1 : float (optional) L1 regularization strength. Default=0 Nx : int, optional The number of elements in the x array. Default = N conv_method : {'fft', 'direct', 'matrix'}, optional Method to use for convolution. Default='fft' mode : {'full', 'valid', 'same'}, optional The convolution mode (see ``np.convolve`` dostring for details) method : string (optional) method to use (passed to ``scipy.optimize.minimize``) method_kwds : dict (optional) additional keywords passed to ``scipy.optimize.minimize`` Returns ------- x : ndarray the length-Nx or [Nx x K] matrix representing the deconvolution """ w = np.asarray(w) Nx = len(w) if Nx is None else Nx Ny = convolution_output_size(len(w), Nx, mode=mode) if len(y) != Ny: raise ValueError("Array sizes do not match convolution mode") if Ny < Nx and gamma_L2 == 0 and gamma_L1 == 0: warnings.warn("Ill-posed deconvolution: len(y)={0}, len(x)={1}. " "Try adding regularization or using a different " "mode of convolution".format(Ny, Nx)) if conv_method == 'matrix': C = convolution_matrix(w, Nx, mode=mode) elif conv_method == 'direct': C = LinearOperator((Ny, Nx), dtype=w.dtype, matvec=lambda x: np.convolve(w, x, mode=mode)) elif conv_method == 'fft': # Note: numpy.convolve does this switch internally # scipy fftconvolve raises an error in some cases # when the first argument is shorter than the second if len(w) < Nx: matvec = lambda x: signal.fftconvolve(x, w, mode=mode) else: matvec = lambda x: signal.fftconvolve(w, x, mode=mode) C = LinearOperator((Ny, Nx), dtype=w.dtype, matvec=matvec) else: raise ValueError("conv_method must be in {'matrix', 'direct', 'fft'}") return least_squares(C, y, gamma_L2=gamma_L2, gamma_L1=gamma_L1, method=method, method_kwds=method_kwds)
{"hexsha": "9c97bd0e2ca9963f0e71090047d1e199c2cbe665", "size": 4485, "ext": "py", "lang": "Python", "max_stars_repo_path": "regper/iterative.py", "max_stars_repo_name": "jakevdp/regper", "max_stars_repo_head_hexsha": "bd2361a7bdf27a61c6b06ea509b3f25f5786d814", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": 1, "max_stars_repo_stars_event_min_datetime": "2021-08-29T05:43:24.000Z", "max_stars_repo_stars_event_max_datetime": "2021-08-29T05:43:24.000Z", "max_issues_repo_path": "regper/iterative.py", "max_issues_repo_name": "afcarl/regper", "max_issues_repo_head_hexsha": "bd2361a7bdf27a61c6b06ea509b3f25f5786d814", "max_issues_repo_licenses": ["BSD-3-Clause"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "regper/iterative.py", "max_forks_repo_name": "afcarl/regper", "max_forks_repo_head_hexsha": "bd2361a7bdf27a61c6b06ea509b3f25f5786d814", "max_forks_repo_licenses": ["BSD-3-Clause"], "max_forks_count": 2, "max_forks_repo_forks_event_min_datetime": "2018-06-02T16:06:03.000Z", "max_forks_repo_forks_event_max_datetime": "2021-08-29T05:43:26.000Z", "avg_line_length": 35.3149606299, "max_line_length": 79, "alphanum_fraction": 0.6091415831, "include": true, "reason": "import numpy,from scipy", "num_tokens": 1148}
import numpy as np import pandas as pd """this actually includes dissimilarity analysis functions, not just distances """ def dissimilarity_nominal(dataset=None, p=None, m=None, weights=None): """computes the dissimilarity b/t two objects (for nominal attributes). Can input either a column dataset or directly input p and m values. :param dataset: pandas dataset to perform dissimiarity analysis :param p: total number of attributes describing the objects :param m: the number of matches :param weights: optional weights array to increase the effect of m or to assign greater weight to the matches in attributes having a larger number of states return: dissimilarity matrix only tested for single column """ if dataset is not None: dis_mat = np.zeros((len(dataset), (len(dataset)))) p = len(dataset.columns) m = 0 for i in range(0, len(dis_mat)): for j in range(0, len(dis_mat)): for col in dataset.columns: if dataset[col].iloc[i] == dataset[col].iloc[j]: m += 1 dis_mat[i, j] = (p-m)/p m = 0 return dis_mat elif p != None and m != None: return round((p-m)/p, 2) def similarity_nominal(dataset=None, p=None, m=None, weights=None): """computes the similarity b/t two objects (for nominal attributes). Can input either a column dataset or directly input p and m values. :param dataset: pandas dataframe to perform similarity analysis :param p: total number of attributes describing the objects :param m: the number of matches :param weights: optional weights array to increase the effect of m or to assign greater weight to the matches in attributes having a larger number of states return: similarity matrix only tested for single column """ if dataset is not None: dis_mat = dissimilarity_nominal(dataset=dataset, p=p, m=m, weights=weights) sim_mat = np.subtract(1, dis_mat) return sim_mat elif p != None and m != None: return round(m/p, 2) def dissimilarity_binary(dataset=None, q=None, r=None, s=None, t=None, symmetric=True): """computes the dissimilarity b/t two objects (for binary attributes). Can input either a column dataset or directly input q, r, s, t values. :param dataset: pandas dataframe to perform dissimilarity analysis :param q: number of attributes that equal 1 for both objects i and j :param r: nuber of attributes that equal 1 for object i but 0 for j :param s: number of attributes that equal 0 for i but 1 for j :param t: number of attributes that equal 0 for both i and j :param symmetric: True=binary attribute are symmetric; each state is equally valuable. False=asymmetric binary attribute; states are not equally important :return: binary dissimilarity """ if dataset is not None: dis_mat = np.zeros((len(dataset), (len(dataset)))) q = 0 r = 0 s = 0 t = 0 for i in range(0, len(dis_mat)): for j in range(0, len(dis_mat)): for col in dataset.columns: a = int(dataset[col].iloc[i]) b = int(dataset[col].iloc[j]) if a == 1 and b == 1: q += 1 elif a == 1 and b == 0: r += 1 elif a == 0 and b == 1: s += 1 elif a == 0 and b == 0: t += 1 if symmetric: dis_mat[i, j] = round((r+s)/(q+r+s+t), 2) elif not symmetric: dis_mat[i, j] = round((r+s)/(q+r+s), 2) q = 0 r = 0 s = 0 t = 0 return dis_mat elif q != None and r != None and s != None and t != None: if symmetric: return round((r+s)/(q+r+s+t), 2) elif not symmetric: return round((r+s)/(q+r+s), 2) def similarity_binary(dataset=None, q=None, r=None, s=None, t=None, symmetric=True): """measure the difference b/t two binary attributes based on similarity; also known as the Jaccard coefficient. :param q: number of attributes that equal 1 for both objects i and j :param r: nuber of attributes that equal 1 for object i but 0 for j :param s: number of attributes that equal 0 for i but 1 for j :param t: number of attributes that equal 0 for both i and j :param symmetric: True=binary attribute are symmetric; each state is equally valuable. False=asymmetric binary attribute; states are not equally important :return: binary similarity matrix """ if dataset is not None: dis_mat = dissimilarity_binary(dataset=dataset, q=q, r=r, s=s, t=t, symmetric=symmetric) sim_mat = np.subtract(1, dis_mat) return sim_mat elif q != None and r != None and s != None and t != None: if symmetric: return round(q/(q+r+s+t), 2) else: return round(q/(q+r+s), 2) def dissimilarity_numeric(dataset=None): """computes the dissimilarity b/t two objects (for numeric attributes). Input a single column dataframe :param dataset: pandas dataframe to perform dissimiarity analysis :return: dissimilarity matrix """ # normalize the dataset dataset = (dataset-dataset.min())/((dataset.max()-dataset.min())*(1-0)+0) dataset['copy'] = dataset.values # use distance measure to find dissimilarity dis_mat = np.zeros((len(dataset), (len(dataset)))) for i in range(0, len(dis_mat)): for j in range(0, len(dis_mat)): dis_mat[i, j] = euclidean_distance(dataset=None, x=[dataset.iloc[i, 0]], y=[dataset.iloc[j, 0]]) return dis_mat def similarity_numeric(dataset=None): """computes the similarity b/t two objects (for numeric attributes). Input a single column dataframe :param dataset: pandas dataframe to perform simiarity analysis :return: similarity matrix """ dis_mat = dissimilarity_numeric(dataset=dataset) sim_mat = np.subtract(1, dis_mat) return sim_mat def dissimilarity_ordinal(dataset=None, order={'fair':1, 'good':2, 'excellent':3}): """computes the dissimilarity b/t two objects (for ordinal attributes). Input a single column dataframe :param dataset: pandas dataframe to perform dissimiarity analysis :param order: dictionary for rank of ordinal values :return: dissimilarity matrix """ # checking for ordinal consistencies states = set() for obj in dataset.iloc[:, 0]: states.add(obj) for state in states: if state in order: continue else: raise KeyError(f'no ordinal value {state}') # step 1: replace each ordinal value with its rank dataset = dataset.iloc[:, 0].replace(order).to_frame() # step 2 & 3: normalize the dataset and use distance measure # to find dissimilarity dis_mat = dissimilarity_numeric(dataset=dataset) return dis_mat def similarity_ordinal(dataset=None, order={'fair':1, 'good':2, 'excellent':3}): """computes the similarity b/t two objects (for ordinal attributes). Input a single column dataframe :param dataset: pandas dataframe to perform simiarity analysis :param order: dictionary for rank of ordinal values :return: similarity matrix """ dis_mat = dissimilarity_ordinal(dataset=dataset, order=order) sim_mat = np.subtract(1, dis_mat) return sim_mat ## numerical dissimilarity/similarity def manhattan_distance(dataset=None, x=None, y=None): """ :param dataset: two object dataset with numeric attributes :param x: list of first object's numeric attributes :param y: list of second object's numeric attributes :return: manhattan distance """ if dataset is not None: x = dataset.iloc[0, :].tolist() y = dataset.iloc[1, :].tolist() return round(sum(np.abs(a-b) for a, b in zip(x, y)), 4) def euclidean_distance(dataset=None, x=None, y=None): """ :param dataset: two object dataset with numeric attributes :param x: list of first object's numeric attributes :param y: list of second object's numeric attributes :return: euclidean distance """ if dataset is not None: x = dataset.iloc[0, :].tolist() y = dataset.iloc[1, :].tolist() return round(np.sqrt(sum((a-b)**2 for a, b in zip(x ,y))), 4) def minkowski_distance(dataset=None, x=None, y=None, p_value=None): """generalization of the euclidean and manhattan distances. :param dataset: two object dataset with numeric attributes :param x: list of first object's numeric attributes :param y: list of second object's numeric attributes :return: minkowski distance """ if dataset is not None: x = dataset.iloc[0, :].tolist() y = dataset.iloc[1, :].tolist() sum_val = sum(np.abs(a-b)**p_value for a, b in zip(x, y)) return np.round(sum_val**(1 / p_value), 4) def dissimilarity_mixed(dataset=None, types=None, order=None, symmetric=None): """used when the dataframe includes mixed attributes :param dataset: dataframe for dissimilarity analysis :param types: dictionary of attribute types based on column names :param order: order for ordinal types (currently only one set) :param symmetric: symmetric/asymmetric for binary types (currently for 1 set) :return: mixed dissimilarity matrix in work; does not account for null values """ # print(types['test1_nom']) dis_mats = [] for col in enumerate(dataset.columns): if types[col[1]] == 'nominal': dis_mats.append(dissimilarity_nominal(dataset=dataset[[col[1]]])) elif types[col[1]] == 'ordinal': dis_mats.append(dissimilarity_ordinal(dataset=dataset[[col[1]]], order=order)) elif types[col[1]] == 'numeric': dis_mats.append(dissimilarity_numeric(dataset=dataset[[col[1]]])) elif types[col[1]] == 'binary': dis_mats.append(dissimilarity_binary(dataset=dataset[[col[1]]], symmetric=symmetric)) dis_mat = np.zeros((len(dataset), len(dataset))) for array in dis_mats: dis_mat += array dis_mat /= len(types) return dis_mat def hamming_distance(s1, s2): """return the Hamming distance b/t equal-length sequences """ if len(s1) != len(s2): raise ValueError("undefined for sequences of unequal length") result = sum(ch1 != ch2 for ch1, ch2 in zip(s1, s2)) return (len(s1) - result) / len(s1) def cosine_similarity(x,y): numerator = sum(a*b for a, b in zip(x,y)) sqrtx = round(np.sqrt(sum([a*a for a in x])), 3) sqrty = round(np.sqrt(sum([a*a for a in y])), 3) denom = sqrtx*sqrty result = round(numerator/denom, 4) return result if __name__ == '__main__': ## nominal dissimilarity/similarity # df_mixed = pd.DataFrame() # df_mixed['test1_nom'] = ['code A', 'code B', 'code C', 'code A'] # df_mixed['test2_ord'] = ['excellent', 'fair', 'good', 'excellent'] # df_mixed['test3_num'] = [45, 22, 64, 28] # df_mixed.to_csv('data/mixed_sample.csv') df_mixed = pd.read_csv('data/mixed_sample.csv', index_col=0) # print(df_mixed) df_nominal = df_mixed[['test1_nom']] # print(df_nominal) dis_mat_nom = dissimilarity_nominal(dataset=df_nominal, p=None, m=None, weights=None) # print(dis_mat) # [[0. 1. 1. 0.] # [1. 0. 1. 1.] # [1. 1. 0. 1.] # [0. 1. 1. 0.]] sim_mat_nom = similarity_nominal(dataset=df_nominal, p=None, m=None, weights=None) # print(sim_mat) # [[1. 0. 0. 1.] # [0. 1. 0. 0.] # [0. 0. 1. 0.] # [1. 0. 0. 1.]] ## binary dissimilarity/similarity # df_binary = pd.DataFrame() # df_binary['name'] = ['Jack', 'Jim', 'Mary'] # df_binary['gender'] = ['M', 'M', 'F'] # df_binary['fever'] = ['Y', 'Y', 'Y'] # df_binary['cough'] = ['N', 'Y', 'N'] # df_binary['test1'] = ['P', 'N', 'P'] # df_binary['test2'] = ['N', 'N', 'N'] # df_binary['test3'] = ['N', 'N', 'P'] # df_binary['test4'] = ['N', 'N', 'N'] # df_binary.to_csv('data/binary_sample.csv') df_binary = pd.read_csv('data/binary_sample.csv', index_col=0) for i in range(0, len(df_binary)): for j in range(0, len(df_binary.columns)): if df_binary.iloc[i, j] in ['Y', 'P']: df_binary.iloc[i, j] = 1 elif df_binary.iloc[i, j] == 'N': df_binary.iloc[i, j] = 0 # print(df_binary) df_binary_asym = df_binary[['fever', 'cough', 'test1', 'test2', 'test3', 'test4']] dis_mat_bin = dissimilarity_binary(dataset=df_binary_asym, q=None, r=None, s=None, t=None, symmetric=False) # print(dis_mat) # [[0. 0.67 0.33] # [0.67 0. 0.75] # [0.33 0.75 0. ]] sim_mat_bin = similarity_binary(dataset=df_binary_asym, q=None, r=None, s=None, t=None, symmetric=False) # print(sim_mat) # [[1. 0.33 0.67] # [0.33 1. 0.25] # [0.67 0.25 1. ]] dis_val_bin = dissimilarity_binary(dataset=None, q=1, r=1, s=1, t=1, symmetric=False) # print(dis_val) # 0.67 dis_val_bin = dissimilarity_binary(dataset=None, q=1, r=1, s=2, t=0, symmetric=False) # print(dis_val) # 0.75 ## numeric data dissimilarity # manhattan distance result_man_list = manhattan_distance(x=[10, 20, 10], y=[10, 20, 20]) # print(result_man) # 10 dataset = pd.DataFrame(data=np.array([[10, 20, 10], [10, 20, 20]]), columns=['a', 'b', 'c']) result_man_df = manhattan_distance(dataset=dataset, x=None, y=None) # print(result_man) # 10 assert np.allclose(result_man_df, result_man_list) # euclidean distance result_eucl_list = euclidean_distance(x=[0, 3, 4, 5], y=[7, 6, 3, -1]) # print(result_eucl) # 9.7468 dataset = pd.DataFrame(data=np.array([[0, 3, 4, 5], [7, 6, 3, -1]])) result_eucl_df = euclidean_distance(dataset=dataset, x=None, y=None) # print(result_eucl) # 9.7468 assert np.allclose(result_eucl_list, result_eucl_df) # minkowski distance result_mink_list = minkowski_distance(x=[0, 3, 4, 5], y=[7, 6, 3, -1], p_value=3) # print(result_mink) # 8.373 dataset = pd.DataFrame(data=np.array([[0, 3, 4, 5], [7, 6, 3, -1]])) result_mink_df = minkowski_distance(dataset=dataset, x=None, y=None, p_value=3) # print(result_mink) # 8.373 assert np.allclose(result_mink_list, result_mink_df) # testing on mixed_sample dataset = pd.read_csv('data/mixed_sample.csv', index_col=0) dataset = dataset[['test3_num']] result_eucl_mixedsample = dissimilarity_numeric(dataset=dataset) # print(result_eucl_mixedsample) # [[0. 0.5476 0.4524 0.4048] # [0.5476 0. 1. 0.1429] # [0.4524 1. 0. 0.8571] # [0.4048 0.1429 0.8571 0. ]] ## ordinal dissimilarity df_mixed = pd.read_csv('data/mixed_sample.csv', index_col=0) df_ordinal = df_mixed[['test2_ord']] dis_mat_ord = dissimilarity_ordinal(dataset=df_ordinal, order={'fair':1, 'good':2, 'excellent':3}) # print(dis_mat_ord) # [[0. 1. 0.5 0. ] # [1. 0. 0.5 1. ] # [0.5 0.5 0. 0.5] # [0. 1. 0.5 0. ]] sim_mat_ord = similarity_ordinal(dataset=df_ordinal, order={'fair':1, 'good':2, 'excellent':3}) # print(sim_mat_ord) # [[1. 0. 0.5 1. ] # [0. 1. 0.5 0. ] # [0.5 0.5 1. 0.5] # [1. 0. 0.5 1. ]] ## mixed dissimilarity dataset = pd.read_csv('data/mixed_sample.csv', index_col=0) types = {'test1_nom':'nominal', 'test2_ord':'ordinal', 'test3_num':'numeric'} order = {'fair':1, 'good':2, 'excellent':3} dis_mixed = dissimilarity_mixed(dataset=dataset, types=types, order=order, symmetric=False) print(dis_mixed) # [[0. 0.8492 0.6508 0.13493333] # [0.8492 0. 0.83333333 0.7143 ] # [0.6508 0.83333333 0. 0.7857 ] # [0.13493333 0.7143 0.7857 0. ]] ## nonmetric cosine similarity result = cosine_similarity([5, 0, 3, 0, 2, 0, 0, 2, 0, 0], [3, 0, 2, 0, 1, 1, 0, 1, 0, 1]) print(result) # 0.9356 ## additional from slides # hamming distance result = hamming_distance('CATCATCATCATCATCATCTTTTT', 'CATCATCTTCATCATCATCTTTTT') # print(result) # hamming distance 2 result = hamming_distance('ATGCATCATCATCATCATCTTTTT', 'CATCATCTTCATCATCATCTTTTT') # print(result)
{"hexsha": "db55a20389559b300afd539ac02acf73de09238d", "size": 17321, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/distances.py", "max_stars_repo_name": "summeryriddles/geopolymeric-tribbles", "max_stars_repo_head_hexsha": "70407e4b754cd6cbafe603755ae1b4d3679115e0", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "scripts/distances.py", "max_issues_repo_name": "summeryriddles/geopolymeric-tribbles", "max_issues_repo_head_hexsha": "70407e4b754cd6cbafe603755ae1b4d3679115e0", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "scripts/distances.py", "max_forks_repo_name": "summeryriddles/geopolymeric-tribbles", "max_forks_repo_head_hexsha": "70407e4b754cd6cbafe603755ae1b4d3679115e0", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 37.9015317287, "max_line_length": 95, "alphanum_fraction": 0.5931528203, "include": true, "reason": "import numpy", "num_tokens": 4876}
let counter = 0 global clearcounter() = counter = 0 global counter!() = (counter += 1; (counter > 100) && throw("Excessive Recursion Error")) end
{"hexsha": "284b6c4c6a89a4a6e822b1d93e9768e224c1436b", "size": 158, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/main/counter.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/AbstractLogic.jl-bd85187e-0531-4a3e-9fea-713204a818a2", "max_stars_repo_head_hexsha": "1b8adac10854471ec7ce83b9039cdeb1e43c0208", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 12, "max_stars_repo_stars_event_min_datetime": "2019-09-24T23:44:22.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-01T18:03:25.000Z", "max_issues_repo_path": "src/main/counter.jl", "max_issues_repo_name": "UnofficialJuliaMirrorSnapshots/AbstractLogic.jl-bd85187e-0531-4a3e-9fea-713204a818a2", "max_issues_repo_head_hexsha": "1b8adac10854471ec7ce83b9039cdeb1e43c0208", "max_issues_repo_licenses": ["MIT"], "max_issues_count": 12, "max_issues_repo_issues_event_min_datetime": "2019-08-08T19:13:18.000Z", "max_issues_repo_issues_event_max_datetime": "2019-08-10T01:13:59.000Z", "max_forks_repo_path": "src/main/counter.jl", "max_forks_repo_name": "UnofficialJuliaMirrorSnapshots/AbstractLogic.jl-bd85187e-0531-4a3e-9fea-713204a818a2", "max_forks_repo_head_hexsha": "1b8adac10854471ec7ce83b9039cdeb1e43c0208", "max_forks_repo_licenses": ["MIT"], "max_forks_count": 1, "max_forks_repo_forks_event_min_datetime": "2021-02-22T01:12:36.000Z", "max_forks_repo_forks_event_max_datetime": "2021-02-22T01:12:36.000Z", "avg_line_length": 26.3333333333, "max_line_length": 93, "alphanum_fraction": 0.6265822785, "num_tokens": 48}
# * Ponderomotive potential @doc raw""" ponderomotive_potential(f) Return the [ponderomotive potential](https://en.wikipedia.org/wiki/Ponderomotive_energy) ``U_p``, which is the cycle-average quiver energy of a free electron in an electromagnetic field `f`. It is given by ```math U_p = \frac{e^2E_0^2}{4m\omega^2}=\frac{2e^2}{c\varepsilon_0m}\times\frac{I}{4\omega^2}, ``` or, in atomic units, ```math U_p = \frac{I}{4\omega^2}. ``` """ ponderomotive_potential(f::Union{LinearField,TransverseField,WrappedField}) = params(f)[:Uₚ] ponderomotive_potential(f::SumField) = ponderomotive_potential(f.a) + ponderomotive_potential(f.b) # * Keldysh parameter @doc raw""" keldysh(f, Iₚ) The [Keldysh parameter](https://en.wikipedia.org/wiki/Tunnel_ionization) relates the strength of a dynamic electric field to that of the binding potential of an atom. It is given by ```math \gamma = \sqrt{\frac{I_p}{2U_p}}, ``` where ``I_p`` is the ionization potential of the atom and ``U_p`` is the ponderomotive potential of the dynamic field. """ keldysh(f::AbstractField, Iₚ::Unitful.Energy) = √(Iₚ/2ponderomotive_potential(f)) |> NoUnits # * Free oscillation amplitude @doc raw""" free_oscillation_amplitude(F) Compute the free oscillation amplitude of an electric field `F`, i.e. the mean excursion length during one cycle of the field, defined as ```math \alpha \defd \frac{F}{\omega^2} ``` where `F` is the peak amplitude, i.e. this is defined for one cycle of a monochrome field. """ free_oscillation_amplitude(F::AbstractField) = amplitude(F)/photon_energy(F)^2 free_oscillation_amplitude(F::Union{WrappedField,NegatedField,DelayedField}) = free_oscillation_amplitude(parent(F)) # This is just a heuristic, i.e. if `F.a` and `F.b` are of the same # frequency, but exactly out of phase, the free oscillation amplitude # is actually zero. free_oscillation_amplitude(F::SumField) = free_oscillation_amplitude(F.a) + free_oscillation_amplitude(F.b) # * Print info function show_strong_field_properties(io::IO, F::Union{LinearField,TransverseField}) Uₚ = austrip(ponderomotive_potential(F)) α = austrip(free_oscillation_amplitude(F)) printfmt(io, "Uₚ = {1:.4f} Ha = {2:s} => α = {3:.4f} Bohr = {4:s}", Uₚ, au2si_round(Uₚ, u"eV"), α, au2si_round(α, u"nm")) end # * Exports export ponderomotive_potential, keldysh, free_oscillation_amplitude
{"hexsha": "8b00fe83ef44e28980dd1573153bf56efdd2cc79", "size": 2424, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/strong_field_properties.jl", "max_stars_repo_name": "jagot/ElectricFields.jl", "max_stars_repo_head_hexsha": "626fcd1beebf472487f11cd588661e2d5303de7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_stars_repo_stars_event_min_datetime": "2021-07-10T17:24:39.000Z", "max_stars_repo_stars_event_max_datetime": "2021-07-10T17:24:39.000Z", "max_issues_repo_path": "src/strong_field_properties.jl", "max_issues_repo_name": "jagot/ElectricFields.jl", "max_issues_repo_head_hexsha": "626fcd1beebf472487f11cd588661e2d5303de7d", "max_issues_repo_licenses": ["MIT"], "max_issues_count": 6, "max_issues_repo_issues_event_min_datetime": "2018-05-14T20:49:03.000Z", "max_issues_repo_issues_event_max_datetime": "2021-10-06T11:48:21.000Z", "max_forks_repo_path": "src/strong_field_properties.jl", "max_forks_repo_name": "jagot/ElectricFields.jl", "max_forks_repo_head_hexsha": "626fcd1beebf472487f11cd588661e2d5303de7d", "max_forks_repo_licenses": ["MIT"], "max_forks_count": 1, "max_forks_repo_forks_event_min_datetime": "2022-03-07T10:02:32.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-07T10:02:32.000Z", "avg_line_length": 27.2359550562, "max_line_length": 84, "alphanum_fraction": 0.7194719472, "num_tokens": 747}
[STATEMENT] lemma update_eqD: "update k v al = update k v' al' \<Longrightarrow> v = v'" [PROOF STATE] proof (prove) goal (1 subgoal): 1. update k v al = update k v' al' \<Longrightarrow> v = v' [PROOF STEP] proof (induct al arbitrary: al') [PROOF STATE] proof (state) goal (2 subgoals): 1. \<And>al'. update k v [] = update k v' al' \<Longrightarrow> v = v' 2. \<And>a al al'. \<lbrakk>\<And>al'. update k v al = update k v' al' \<Longrightarrow> v = v'; update k v (a # al) = update k v' al'\<rbrakk> \<Longrightarrow> v = v' [PROOF STEP] case Nil [PROOF STATE] proof (state) this: update k v [] = update k v' al' goal (2 subgoals): 1. \<And>al'. update k v [] = update k v' al' \<Longrightarrow> v = v' 2. \<And>a al al'. \<lbrakk>\<And>al'. update k v al = update k v' al' \<Longrightarrow> v = v'; update k v (a # al) = update k v' al'\<rbrakk> \<Longrightarrow> v = v' [PROOF STEP] then [PROOF STATE] proof (chain) picking this: update k v [] = update k v' al' [PROOF STEP] show ?case [PROOF STATE] proof (prove) using this: update k v [] = update k v' al' goal (1 subgoal): 1. v = v' [PROOF STEP] by (cases al') (auto split: if_split_asm) [PROOF STATE] proof (state) this: v = v' goal (1 subgoal): 1. \<And>a al al'. \<lbrakk>\<And>al'. update k v al = update k v' al' \<Longrightarrow> v = v'; update k v (a # al) = update k v' al'\<rbrakk> \<Longrightarrow> v = v' [PROOF STEP] next [PROOF STATE] proof (state) goal (1 subgoal): 1. \<And>a al al'. \<lbrakk>\<And>al'. update k v al = update k v' al' \<Longrightarrow> v = v'; update k v (a # al) = update k v' al'\<rbrakk> \<Longrightarrow> v = v' [PROOF STEP] case Cons [PROOF STATE] proof (state) this: update k v al_ = update k v' ?al' \<Longrightarrow> v = v' update k v (a_ # al_) = update k v' al' goal (1 subgoal): 1. \<And>a al al'. \<lbrakk>\<And>al'. update k v al = update k v' al' \<Longrightarrow> v = v'; update k v (a # al) = update k v' al'\<rbrakk> \<Longrightarrow> v = v' [PROOF STEP] then [PROOF STATE] proof (chain) picking this: update k v al_ = update k v' ?al' \<Longrightarrow> v = v' update k v (a_ # al_) = update k v' al' [PROOF STEP] show ?case [PROOF STATE] proof (prove) using this: update k v al_ = update k v' ?al' \<Longrightarrow> v = v' update k v (a_ # al_) = update k v' al' goal (1 subgoal): 1. v = v' [PROOF STEP] by (cases al') (auto split: if_split_asm) [PROOF STATE] proof (state) this: v = v' goal: No subgoals! [PROOF STEP] qed
{"llama_tokens": 998, "file": null, "length": 11}
import numpy as np # quaternion representation: [x, y, z, w] # JPL convention def skew(vec): """ Create a skew-symmetric matrix from a 3-element vector. """ x, y, z = vec return np.array([ [0, -z, y], [z, 0, -x], [-y, x, 0]]) def to_rotation(q): """ Convert a quaternion to the corresponding rotation matrix. Pay attention to the convention used. The function follows the conversion in "Indirect Kalman Filter for 3D Attitude Estimation: A Tutorial for Quaternion Algebra", Equation (78). The input quaternion should be in the form [q1, q2, q3, q4(scalar)] """ q = q / np.linalg.norm(q) vec = q[:3] w = q[3] R = (2*w*w-1)*np.identity(3) - 2*w*skew(vec) + 2*vec[:, None]*vec return R def to_quaternion(R): """ Convert a rotation matrix to a quaternion. Pay attention to the convention used. The function follows the conversion in "Indirect Kalman Filter for 3D Attitude Estimation: A Tutorial for Quaternion Algebra", Equation (78). The input quaternion should be in the form [q1, q2, q3, q4(scalar)] """ if R[2, 2] < 0: if R[0, 0] > R[1, 1]: t = 1 + R[0,0] - R[1,1] - R[2,2] q = [t, R[0, 1]+R[1, 0], R[2, 0]+R[0, 2], R[1, 2]-R[2, 1]] else: t = 1 - R[0,0] + R[1,1] - R[2,2] q = [R[0, 1]+R[1, 0], t, R[2, 1]+R[1, 2], R[2, 0]-R[0, 2]] else: if R[0, 0] < -R[1, 1]: t = 1 - R[0,0] - R[1,1] + R[2,2] q = [R[0, 2]+R[2, 0], R[2, 1]+R[1, 2], t, R[0, 1]-R[1, 0]] else: t = 1 + R[0,0] + R[1,1] + R[2,2] q = [R[1, 2]-R[2, 1], R[2, 0]-R[0, 2], R[0, 1]-R[1, 0], t] q = np.array(q) # * 0.5 / np.sqrt(t) return q / np.linalg.norm(q) def quaternion_normalize(q): """ Normalize the given quaternion to unit quaternion. """ return q / np.linalg.norm(q) def quaternion_conjugate(q): """ Conjugate of a quaternion. """ return np.array([*-q[:3], q[3]]) def quaternion_multiplication(q1, q2): """ Perform q1 * q2 """ q1 = q1 / np.linalg.norm(q1) q2 = q2 / np.linalg.norm(q2) L = np.array([ [ q1[3], q1[2], -q1[1], q1[0]], [-q1[2], q1[3], q1[0], q1[1]], [ q1[1], -q1[0], q1[3], q1[2]], [-q1[0], -q1[1], -q1[2], q1[3]] ]) q = L @ q2 return q / np.linalg.norm(q) def from_two_vectors(v0, v1): """ Rotation quaternion from v0 to v1. """ v0 = v0 / np.linalg.norm(v0) v1 = v1 / np.linalg.norm(v1) d = v0 @ v1 # if dot == -1, vectors are nearly opposite if d < -0.999999: axis = np.cross([1,0,0], v0) if np.linalg.norm(axis) < 0.000001: axis = np.cross([0,1,0], v0) q = np.array([*axis, 0.]) elif d > 0.999999: q = np.array([0., 0., 0., 1.]) else: s = np.sqrt((1+d)*2) axis = np.cross(v0, v1) vec = axis / s w = 0.5 * s q = np.array([*vec, w]) q = q / np.linalg.norm(q) return quaternion_conjugate(q) # hamilton -> JPL class Isometry3d(object): """ 3d rigid transform. """ def __init__(self, R, t): self.R = R self.t = t def matrix(self): m = np.identity(4) m[:3, :3] = self.R m[:3, 3] = self.t return m def inverse(self): return Isometry3d(self.R.T, -self.R.T @ self.t) def __mul__(self, T1): R = self.R @ T1.R t = self.R @ T1.t + self.t return Isometry3d(R, t) # for orcvio def Hl_operator(omega): """ implements Hl operator in eq 20 """ omega_norm = np.linalg.norm(omega) term1 = (1/2)*np.eye(3) if (omega_norm < 1.0e-5): return term1 term2 = np.nan_to_num((omega_norm - np.sin(omega_norm)) / (omega_norm**3)) * skew(omega) term3 = np.nan_to_num((2*(np.cos(omega_norm) - 1) + (omega_norm**2)) / (2*(omega_norm**4))) * (skew(omega) @ skew(omega)) Hl = term1 + term2 + term3 return Hl def Jl_operator(omega): """ implements Jl operator in eq 20 """ omega_norm = np.linalg.norm(omega) term1 = np.eye(3) if (omega_norm < 1.0e-5): return term1 term2 = np.nan_to_num((1 - np.cos(omega_norm)) / (omega_norm**2)) * skew(omega) term3 = np.nan_to_num((omega_norm - np.sin(omega_norm)) / (omega_norm**3)) * (skew(omega) @ skew(omega)) Jl = term1 + term2 + term3 return Jl def get_cam_wrt_imu_se3_jacobian(cRi, iPc, cRw): p_cxi_p_ixi = np.zeros((6, 6)) p_cxi_p_ixi[0:3, 0:3] = -1 * cRi @ skew(iPc) p_cxi_p_ixi[3:6, 0:3] = cRi p_cxi_p_ixi[0:3, 3:6] = cRw return p_cxi_p_ixi def odotOperator(ph): ''' @Input: ph = n x 4 = points in homogeneous coordinates @Output: odot(ph) = n x 4 x 6 ''' zz = np.zeros(ph.shape + (6,)) zz[...,:3,3:6] = -skew(ph[...,:3]) zz[...,0,0],zz[...,1,1],zz[...,2,2] = ph[...,3],ph[...,3],ph[...,3] return zz
{"hexsha": "0013e0baf4e307abb23344d8a3e1f39151f3bd20", "size": 5227, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils.py", "max_stars_repo_name": "shanmo/OrcVIO-Stereo-Python", "max_stars_repo_head_hexsha": "849ddaeb4623e89ef84d0bf954cd76bb0cd30351", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "max_stars_repo_stars_event_min_datetime": "2021-06-25T00:14:36.000Z", "max_stars_repo_stars_event_max_datetime": "2021-10-12T03:24:18.000Z", "max_issues_repo_path": "utils.py", "max_issues_repo_name": "shanmo/OrcVIO-Stereo-Python", "max_issues_repo_head_hexsha": "849ddaeb4623e89ef84d0bf954cd76bb0cd30351", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "utils.py", "max_forks_repo_name": "shanmo/OrcVIO-Stereo-Python", "max_forks_repo_head_hexsha": "849ddaeb4623e89ef84d0bf954cd76bb0cd30351", "max_forks_repo_licenses": ["MIT"], "max_forks_count": 2, "max_forks_repo_forks_event_min_datetime": "2021-10-12T03:24:24.000Z", "max_forks_repo_forks_event_max_datetime": "2021-12-26T04:05:07.000Z", "avg_line_length": 25.8762376238, "max_line_length": 126, "alphanum_fraction": 0.49359097, "include": true, "reason": "import numpy", "num_tokens": 1878}
# from Par_file const ANGULAR_WIDTH_XI_IN_DEGREES_VAL = 60.0 const ANGULAR_WIDTH_ETA_IN_DEGREES_VAL = 60.0 const NEX_XI_VAL = 336 const NEX_ETA_VAL = 336 const REGIONAL_MOHO_MESH = true # some constant values const R_UNIT_SPHERE = one(Float64) const NGLLX = 5 const NGLLY = 5 const NGLLZ = 5 const MIDX = 3 const MIDY = 3 const MIDZ = 3 const HUGEVAL = Float64(typemax(Int64)) const GAUSSALPHA = 0. const GAUSSBETA = 0. const NGNOD = 27 const IFLAG_DUMMY = 100 const IFLAG_CRUST = 1 const IFLAG_670_220 = 4 const R_EARTH = 6371000. const R_EARTH_KM = R_EARTH / 1000.
{"hexsha": "e8506af9f258ec9c7aac6829a691ff34a70dee2d", "size": 568, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "FWI_tools/specfem_helper.jl/src/setting/constants.jl", "max_stars_repo_name": "ziyixi/SeisScripts", "max_stars_repo_head_hexsha": "a484bc1747eae52b2441f0bfd47ac7e093150f1d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max_stars_repo_stars_event_min_datetime": "2021-05-17T13:17:10.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-14T02:51:35.000Z", "max_issues_repo_path": "seisflow/julia/specfem_gll.jl/src/setting/constants.jl", "max_issues_repo_name": "ziyixi/seisflow", "max_issues_repo_head_hexsha": "722c2445f4a5316f42bfbc8b9010d31caad4c76e", "max_issues_repo_licenses": ["BSD-3-Clause"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "seisflow/julia/specfem_gll.jl/src/setting/constants.jl", "max_forks_repo_name": "ziyixi/seisflow", "max_forks_repo_head_hexsha": "722c2445f4a5316f42bfbc8b9010d31caad4c76e", "max_forks_repo_licenses": ["BSD-3-Clause"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 22.72, "max_line_length": 45, "alphanum_fraction": 0.7711267606, "num_tokens": 225}
# Copyright (c) 2020,21 NVIDIA CORPORATION & AFFILIATES.. All rights reserved. # # 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. import torch import numpy as np # render & camera from kaolin.render.camera import perspective_camera from kaolin.ops.mesh import index_vertices_by_faces, face_normals from kaolin.render.mesh.rasterization import dibr_rasterization as dibr_rasterization_kaolin ############################################ # Help functions ############################################ def normalize_meshes_np(points_px3, mean_1x3=0, scale=1): r''' normalize the vertices in numpy ''' p = points_px3 pmax = np.max(p, axis=0, keepdims=True) pmin = np.min(p, axis=0, keepdims=True) pmiddle = (pmax + pmin) / 2 p = p - pmiddle pmax = np.max(p, axis=0, keepdims=True) pmin = np.min(p, axis=0, keepdims=True) print('pmax {} pmin {}'.format(pmax[0], pmin[0])) pointnp_px3 = p * scale + mean_1x3 pmax = np.max(pointnp_px3, axis=0, keepdims=True) pmin = np.min(pointnp_px3, axis=0, keepdims=True) print('pmax {} pmin {}'.format(pmax[0], pmin[0])) return pointnp_px3 def normalize_meshes(mesh_bxpx3): r''' normalize the vertices in pytorch ''' mesh_max = torch.max(mesh_bxpx3, dim=1, keepdim=True)[0] mesh_min = torch.min(mesh_bxpx3, dim=1, keepdim=True)[0] mesh_middle = (mesh_min + mesh_max) / 2 mesh_bxpx3 = mesh_bxpx3 - mesh_middle bs = mesh_bxpx3.shape[0] mesh_biggest = torch.max(mesh_bxpx3.view(bs, -1), dim=1)[0] mesh_bxpx3 = mesh_bxpx3 / mesh_biggest.view(bs, 1, 1) # 0.45 for dibr # 0.5 for NMR return mesh_bxpx3 * 0.5 ############################################ # render functions ############################################ def render_vertex_colors(vertices_camera, faces, vertex_colors, camera_proj, height, width): r''' render the vertices and colors to the images ''' # face_vertex_colors attributes = vertex_colors face_attributes_idx = faces face_attributes = index_vertices_by_faces(attributes, face_attributes_idx) # normals vertices_image = perspective_camera(vertices_camera, camera_proj) face_vertices_camera = index_vertices_by_faces(vertices_camera, faces) face_vertices_z = face_vertices_camera[:, :, :, 2] face_camera_normals = face_normals(face_vertices_camera, unit=True) face_camera_normals_z = face_camera_normals[:, :, 2:3] face_vertices_image = index_vertices_by_faces(vertices_image, faces) imfeat, improb, imfaceidx = dibr_rasterization_kaolin( height, width, face_vertices_z, face_vertices_image, face_attributes, face_camera_normals_z) improb = improb.unsqueeze(3) image = imfeat return image, improb, face_camera_normals ############################################ # loss functions ############################################ def calculate_iou_loss(gt_mask_bx1xhxw, pred_mask_bx1xhxw, lossname='iou', eps=1e-10): r''' calculate mask loss, generally iou is better than l1 ''' if lossname == 'iou': bs = pred_mask_bx1xhxw.shape[0] silhouette_mul = pred_mask_bx1xhxw * gt_mask_bx1xhxw silhouette_add = pred_mask_bx1xhxw + gt_mask_bx1xhxw silhouette_mul = silhouette_mul.view(bs, -1) silhouette_add = silhouette_add.view(bs, -1) iouup = torch.sum(silhouette_mul, dim=1) ioudown = torch.sum(silhouette_add - silhouette_mul, dim=1) iou = iouup / (ioudown + eps) silhouette_loss = 1.0 - torch.mean(iou) elif lossname == 'l1': silhouette_loss = (pred_mask_bx1xhxw - gt_mask_bx1xhxw).abs().mean() return silhouette_loss
{"hexsha": "3ead941ef015c68bb6786daecaafb421a9840f3c", "size": 4273, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/utils_functions.py", "max_stars_repo_name": "nv-tlabs/DIB-R-Single-Image-3D-Reconstruction", "max_stars_repo_head_hexsha": "faa6364cc6ec464f81f960a9fa6b55bbf3443d5f", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 8, "max_stars_repo_stars_event_min_datetime": "2021-09-10T04:54:54.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-26T02:34:54.000Z", "max_issues_repo_path": "utils/utils_functions.py", "max_issues_repo_name": "nv-tlabs/DIB-R-Single-Image-3D-Reconstruction", "max_issues_repo_head_hexsha": "faa6364cc6ec464f81f960a9fa6b55bbf3443d5f", "max_issues_repo_licenses": ["Apache-2.0"], "max_issues_count": 2, "max_issues_repo_issues_event_min_datetime": "2021-11-12T17:10:26.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-24T14:59:01.000Z", "max_forks_repo_path": "utils/utils_functions.py", "max_forks_repo_name": "nv-tlabs/DIB-R-Single-Image-3D-Reconstruction", "max_forks_repo_head_hexsha": "faa6364cc6ec464f81f960a9fa6b55bbf3443d5f", "max_forks_repo_licenses": ["Apache-2.0"], "max_forks_count": 2, "max_forks_repo_forks_event_min_datetime": "2021-09-19T16:25:26.000Z", "max_forks_repo_forks_event_max_datetime": "2021-12-27T16:01:31.000Z", "avg_line_length": 35.0245901639, "max_line_length": 92, "alphanum_fraction": 0.6489585771, "include": true, "reason": "import numpy", "num_tokens": 1128}
/* Test tree Ref : https://www.boost.org/doc/libs/1_75_0/libs/test/doc/html/boost_test/tests_organization/test_tree.html Boost.test,其 Unit Test Framework,會經由 Test tree 結構,逐步執行開發者設計的測試內容,其順序依序如下 MAIN / MODULE └ SUITE └ CASE */ // 定義測試模組名稱 // 在此可選用 BOOST_TEST_MAIN、BOOST_TEST_MODULE #define BOOST_TEST_MODULE Example // 引入 UTF header,注意執行環境差異需選用不同的 header #include <boost/test/included/unit_test.hpp> // 测试套件宣告 BOOST_AUTO_TEST_SUITE( Demo_Test ) // 測試案例 1 BOOST_AUTO_TEST_CASE( Test_Assertion ) { /* test assertion */ BOOST_TEST( true ); } // 測試案例 2 BOOST_AUTO_TEST_CASE( Test_Number ) { int a = 1; BOOST_CHECK_EQUAL(a, 1); } // 測試套件結束 BOOST_AUTO_TEST_SUITE_END()
{"hexsha": "035099dc2a9d1fa18ba4b7f2f8509e02fc34ccc9", "size": 691, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/test/base/main.cpp", "max_stars_repo_name": "eastmoon/tutorial-c-boost", "max_stars_repo_head_hexsha": "06530df17ea1fafce54c820a50f9d092fbd3ec90", "max_stars_repo_licenses": ["BSL-1.0"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/test/base/main.cpp", "max_issues_repo_name": "eastmoon/tutorial-c-boost", "max_issues_repo_head_hexsha": "06530df17ea1fafce54c820a50f9d092fbd3ec90", "max_issues_repo_licenses": ["BSL-1.0"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/test/base/main.cpp", "max_forks_repo_name": "eastmoon/tutorial-c-boost", "max_forks_repo_head_hexsha": "06530df17ea1fafce54c820a50f9d092fbd3ec90", "max_forks_repo_licenses": ["BSL-1.0"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 18.6756756757, "max_line_length": 107, "alphanum_fraction": 0.7395079595, "num_tokens": 284}
# -*- coding: utf-8 -*- __all__ = ["disk_model"] import numpy as np import scipy.constants as sc from astropy.convolution import convolve_fft from astropy.convolution import Gaussian2DKernel def disk_model(inc=30., mstar=1.0, dist=100., Npix=128, r_max=150., vchan=200., Nchan=64, noise=2.0, Tkin0=40., Tkinq=-0.3, mu=28., beam=None): """Build an analytical, geometrically thin disk model. The temperature profile is a power-law function, Tkin(r) = Tkin0 * (r / 100au)^Tkinq, and is used to calculate the linewidth assuming no non-thermal broadening. The rotation profile is purely Keplerian around a point source. Args: inc (float): Inclination of disk in [degrees]. mstar (float): Mass of central star in [Msun]. dist (float): Distance to source in [pc]. Npix (int): Number of pixels for the spatial dimension. vchan (float): Width of a velocity channel in [m/s]. Nchan (int): Number of velocity channels. r_max (float): Outer radius of the disk in [au]. noise (float): Random noise to add the the data in [K]. Note that if the cube is convolved, the resulting noise is much less than requested. Tkin0 (float): Kinetic temperature at 100au. Tkinq (float): Gradient of the temperature power-law profile. mu (float): Molecular weight of the molecule used for calculating the thermal linewidth. beam (float): If specified, the FWHM of a circular Gaussian beam to convolve the data with. Returns: axis (ndarray): Spatial axis in [arcsec]. velax (ndarray): Velocity axis in [m/s]. data (ndarray): Data cube in [K]. vproj (ndarray): True projected rotation profile [m/s]. """ # Create the axes of the observations. (x, y) in [arcsec], (v) in [km/s]. size = 1.5 * r_max / dist xgrid = np.linspace(-size, size, Npix) ygrid = np.linspace(-size, size, Npix) / np.cos(np.radians(inc)) velax = vchan * np.arange(-Nchan / 2., Nchan / 2. + 1) # Calculate disk midplane coordinates in [au]. rpnts = np.hypot(ygrid[:, None], xgrid[None, :]) tpnts = np.arctan2(ygrid[:, None], xgrid[None, :]) # Keplerian profile in [m/s]. vrot = np.sqrt(sc.G * mstar * 1.988e30 / (rpnts * sc.au * dist)**1) vproj = vrot * np.sin(np.radians(inc)) * np.cos(tpnts) # Temperature and linewidth as a powerlaw in [K] and [m/s]. Tkin = Tkin0 * (rpnts * dist / 100.)**Tkinq dV = thermal_width(Tkin, mu=mu) # Build the cube and add noise if requested. # TODO: Better noise for convolution... data = gaussian(velax[:, None, None], vproj[None, :, :], Tkin[None, :, :], dV[None, :, :]) data = np.where(rpnts[None, :, :] > r_max / dist, 0.0, data) if noise is not None: data += noise * np.random.randn(data.size).reshape(data.shape) # Convolve the beam if necessary. if beam is not None: kernel = beam / 2. / np.sqrt(2. * np.log(2.)) kernel /= np.diff(xgrid).mean() kernel = Gaussian2DKernel(kernel) data = np.array([convolve_fft(c, kernel) for c in data]) return xgrid, velax, data, vproj def gaussian(x, x0, dx, A): """Gaussian function.""" return A * np.exp(-np.power((x - x0) / dx, 2)) def thermal_width(Tkin, mu=28.): """Thermal width in [m/s].""" return np.sqrt(2. * sc.k * Tkin / mu / sc.m_p)
{"hexsha": "a8be76b67ec2c1d9c448d87294437058294bfc3e", "size": 3457, "ext": "py", "lang": "Python", "max_stars_repo_path": "notebooks/diskmodel.py", "max_stars_repo_name": "mirca/bettermoments", "max_stars_repo_head_hexsha": "50000f3db738ba11d30504ad00e3a4452ae23f64", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "notebooks/diskmodel.py", "max_issues_repo_name": "mirca/bettermoments", "max_issues_repo_head_hexsha": "50000f3db738ba11d30504ad00e3a4452ae23f64", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "notebooks/diskmodel.py", "max_forks_repo_name": "mirca/bettermoments", "max_forks_repo_head_hexsha": "50000f3db738ba11d30504ad00e3a4452ae23f64", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 39.2840909091, "max_line_length": 79, "alphanum_fraction": 0.6167196992, "include": true, "reason": "import numpy,import scipy,from astropy", "num_tokens": 992}
[STATEMENT] lemma ffb_prop: "fb\<^sub>\<F> f = \<partial> \<circ> bd\<^sub>\<F> (op\<^sub>K f) \<circ> \<partial>" [PROOF STATE] proof (prove) goal (1 subgoal): 1. fb\<^sub>\<F> f = \<partial> \<circ> bd\<^sub>\<F> (op\<^sub>K f) \<circ> \<partial> [PROOF STEP] by (simp add: ffb_def map_dual_def)
{"llama_tokens": 132, "file": "Transformer_Semantics_Kleisli_Transformers", "length": 1}
[STATEMENT] lemma (in \<Z>) dghm_dag_Rel_is_iso_dghm: "\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha> : op_dg (dg_Rel \<alpha>) \<mapsto>\<mapsto>\<^sub>D\<^sub>G\<^sub>.\<^sub>i\<^sub>s\<^sub>o\<^bsub>\<alpha>\<^esub> dg_Rel \<alpha>" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha> : op_dg (dg_Rel \<alpha>) \<mapsto>\<mapsto>\<^sub>D\<^sub>G\<^sub>.\<^sub>i\<^sub>s\<^sub>o\<^bsub>\<alpha>\<^esub> dg_Rel \<alpha> [PROOF STEP] proof(rule is_iso_dghmI) [PROOF STATE] proof (state) goal (5 subgoals): 1. \<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha> : op_dg (dg_Rel \<alpha>) \<mapsto>\<mapsto>\<^sub>D\<^sub>G\<^bsub>\<alpha>\<^esub> dg_Rel \<alpha> 2. v11 (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ObjMap\<rparr>) 3. v11 (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ArrMap\<rparr>) 4. \<R>\<^sub>\<circ> (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ObjMap\<rparr>) = dg_Rel \<alpha>\<lparr>Obj\<rparr> 5. \<R>\<^sub>\<circ> (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ArrMap\<rparr>) = dg_Rel \<alpha>\<lparr>Arr\<rparr> [PROOF STEP] interpret digraph \<alpha> \<open>dg_Rel \<alpha>\<close> [PROOF STATE] proof (prove) goal (1 subgoal): 1. digraph \<alpha> (dg_Rel \<alpha>) [PROOF STEP] by (simp add: digraph_dg_Rel) [PROOF STATE] proof (state) goal (5 subgoals): 1. \<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha> : op_dg (dg_Rel \<alpha>) \<mapsto>\<mapsto>\<^sub>D\<^sub>G\<^bsub>\<alpha>\<^esub> dg_Rel \<alpha> 2. v11 (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ObjMap\<rparr>) 3. v11 (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ArrMap\<rparr>) 4. \<R>\<^sub>\<circ> (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ObjMap\<rparr>) = dg_Rel \<alpha>\<lparr>Obj\<rparr> 5. \<R>\<^sub>\<circ> (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ArrMap\<rparr>) = dg_Rel \<alpha>\<lparr>Arr\<rparr> [PROOF STEP] show "\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha> : op_dg (dg_Rel \<alpha>) \<mapsto>\<mapsto>\<^sub>D\<^sub>G\<^bsub>\<alpha>\<^esub> dg_Rel \<alpha>" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha> : op_dg (dg_Rel \<alpha>) \<mapsto>\<mapsto>\<^sub>D\<^sub>G\<^bsub>\<alpha>\<^esub> dg_Rel \<alpha> [PROOF STEP] proof(rule is_dghmI, unfold dg_op_simps dghm_dag_Rel_components(3,4)) [PROOF STATE] proof (state) goal (13 subgoals): 1. \<Z> \<alpha> 2. vfsequence (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>) 3. digraph \<alpha> (op_dg (dg_Rel \<alpha>)) 4. digraph \<alpha> (dg_Rel \<alpha>) 5. vcard (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>) = 4\<^sub>\<nat> 6. op_dg (dg_Rel \<alpha>) = op_dg (dg_Rel \<alpha>) 7. dg_Rel \<alpha> = dg_Rel \<alpha> 8. vsv (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ObjMap\<rparr>) 9. vsv (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ArrMap\<rparr>) 10. \<D>\<^sub>\<circ> (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ObjMap\<rparr>) = dg_Rel \<alpha>\<lparr>Obj\<rparr> A total of 13 subgoals... [PROOF STEP] show "vfsequence (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. vfsequence (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>) [PROOF STEP] unfolding dghm_dag_Rel_def [PROOF STATE] proof (prove) goal (1 subgoal): 1. vfsequence [vid_on (dg_Rel \<alpha>\<lparr>Obj\<rparr>), VLambda (dg_Rel \<alpha>\<lparr>Arr\<rparr>) converse_Rel, op_dg (dg_Rel \<alpha>), dg_Rel \<alpha>]\<^sub>\<circ> [PROOF STEP] by (simp add: nat_omega_simps) [PROOF STATE] proof (state) this: vfsequence (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>) goal (12 subgoals): 1. \<Z> \<alpha> 2. digraph \<alpha> (op_dg (dg_Rel \<alpha>)) 3. digraph \<alpha> (dg_Rel \<alpha>) 4. vcard (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>) = 4\<^sub>\<nat> 5. op_dg (dg_Rel \<alpha>) = op_dg (dg_Rel \<alpha>) 6. dg_Rel \<alpha> = dg_Rel \<alpha> 7. vsv (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ObjMap\<rparr>) 8. vsv (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ArrMap\<rparr>) 9. \<D>\<^sub>\<circ> (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ObjMap\<rparr>) = dg_Rel \<alpha>\<lparr>Obj\<rparr> 10. \<R>\<^sub>\<circ> (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ObjMap\<rparr>) \<subseteq>\<^sub>\<circ> dg_Rel \<alpha>\<lparr>Obj\<rparr> A total of 12 subgoals... [PROOF STEP] show "vcard (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>) = 4\<^sub>\<nat>" [PROOF STATE] proof (prove) goal (1 subgoal): 1. vcard (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>) = 4\<^sub>\<nat> [PROOF STEP] unfolding dghm_dag_Rel_def [PROOF STATE] proof (prove) goal (1 subgoal): 1. vcard [vid_on (dg_Rel \<alpha>\<lparr>Obj\<rparr>), VLambda (dg_Rel \<alpha>\<lparr>Arr\<rparr>) converse_Rel, op_dg (dg_Rel \<alpha>), dg_Rel \<alpha>]\<^sub>\<circ> = 4\<^sub>\<nat> [PROOF STEP] by (simp add: nat_omega_simps) [PROOF STATE] proof (state) this: vcard (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>) = 4\<^sub>\<nat> goal (11 subgoals): 1. \<Z> \<alpha> 2. digraph \<alpha> (op_dg (dg_Rel \<alpha>)) 3. digraph \<alpha> (dg_Rel \<alpha>) 4. op_dg (dg_Rel \<alpha>) = op_dg (dg_Rel \<alpha>) 5. dg_Rel \<alpha> = dg_Rel \<alpha> 6. vsv (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ObjMap\<rparr>) 7. vsv (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ArrMap\<rparr>) 8. \<D>\<^sub>\<circ> (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ObjMap\<rparr>) = dg_Rel \<alpha>\<lparr>Obj\<rparr> 9. \<R>\<^sub>\<circ> (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ObjMap\<rparr>) \<subseteq>\<^sub>\<circ> dg_Rel \<alpha>\<lparr>Obj\<rparr> 10. \<D>\<^sub>\<circ> (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ArrMap\<rparr>) = dg_Rel \<alpha>\<lparr>Arr\<rparr> A total of 11 subgoals... [PROOF STEP] fix T a b [PROOF STATE] proof (state) goal (11 subgoals): 1. \<Z> \<alpha> 2. digraph \<alpha> (op_dg (dg_Rel \<alpha>)) 3. digraph \<alpha> (dg_Rel \<alpha>) 4. op_dg (dg_Rel \<alpha>) = op_dg (dg_Rel \<alpha>) 5. dg_Rel \<alpha> = dg_Rel \<alpha> 6. vsv (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ObjMap\<rparr>) 7. vsv (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ArrMap\<rparr>) 8. \<D>\<^sub>\<circ> (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ObjMap\<rparr>) = dg_Rel \<alpha>\<lparr>Obj\<rparr> 9. \<R>\<^sub>\<circ> (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ObjMap\<rparr>) \<subseteq>\<^sub>\<circ> dg_Rel \<alpha>\<lparr>Obj\<rparr> 10. \<D>\<^sub>\<circ> (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ArrMap\<rparr>) = dg_Rel \<alpha>\<lparr>Arr\<rparr> A total of 11 subgoals... [PROOF STEP] assume "T : b \<mapsto>\<^bsub>dg_Rel \<alpha>\<^esub> a" [PROOF STATE] proof (state) this: T : b \<mapsto>\<^bsub>dg_Rel \<alpha>\<^esub> a goal (11 subgoals): 1. \<Z> \<alpha> 2. digraph \<alpha> (op_dg (dg_Rel \<alpha>)) 3. digraph \<alpha> (dg_Rel \<alpha>) 4. op_dg (dg_Rel \<alpha>) = op_dg (dg_Rel \<alpha>) 5. dg_Rel \<alpha> = dg_Rel \<alpha> 6. vsv (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ObjMap\<rparr>) 7. vsv (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ArrMap\<rparr>) 8. \<D>\<^sub>\<circ> (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ObjMap\<rparr>) = dg_Rel \<alpha>\<lparr>Obj\<rparr> 9. \<R>\<^sub>\<circ> (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ObjMap\<rparr>) \<subseteq>\<^sub>\<circ> dg_Rel \<alpha>\<lparr>Obj\<rparr> 10. \<D>\<^sub>\<circ> (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ArrMap\<rparr>) = dg_Rel \<alpha>\<lparr>Arr\<rparr> A total of 11 subgoals... [PROOF STEP] then [PROOF STATE] proof (chain) picking this: T : b \<mapsto>\<^bsub>dg_Rel \<alpha>\<^esub> a [PROOF STEP] show "\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ArrMap\<rparr>\<lparr>T\<rparr> : \<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ObjMap\<rparr>\<lparr>a\<rparr> \<mapsto>\<^bsub>dg_Rel \<alpha>\<^esub> \<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ObjMap\<rparr>\<lparr>b\<rparr>" [PROOF STATE] proof (prove) using this: T : b \<mapsto>\<^bsub>dg_Rel \<alpha>\<^esub> a goal (1 subgoal): 1. \<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ArrMap\<rparr>\<lparr>T\<rparr> : \<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ObjMap\<rparr>\<lparr>a\<rparr> \<mapsto>\<^bsub>dg_Rel \<alpha>\<^esub> \<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ObjMap\<rparr>\<lparr>b\<rparr> [PROOF STEP] by (rule dghm_dag_Rel_ArrMap_app_is_arr) [PROOF STATE] proof (state) this: \<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ArrMap\<rparr>\<lparr>T\<rparr> : \<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ObjMap\<rparr>\<lparr>a\<rparr> \<mapsto>\<^bsub>dg_Rel \<alpha>\<^esub> \<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ObjMap\<rparr>\<lparr>b\<rparr> goal (10 subgoals): 1. \<Z> \<alpha> 2. digraph \<alpha> (op_dg (dg_Rel \<alpha>)) 3. digraph \<alpha> (dg_Rel \<alpha>) 4. op_dg (dg_Rel \<alpha>) = op_dg (dg_Rel \<alpha>) 5. dg_Rel \<alpha> = dg_Rel \<alpha> 6. vsv (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ObjMap\<rparr>) 7. vsv (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ArrMap\<rparr>) 8. \<D>\<^sub>\<circ> (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ObjMap\<rparr>) = dg_Rel \<alpha>\<lparr>Obj\<rparr> 9. \<R>\<^sub>\<circ> (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ObjMap\<rparr>) \<subseteq>\<^sub>\<circ> dg_Rel \<alpha>\<lparr>Obj\<rparr> 10. \<D>\<^sub>\<circ> (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ArrMap\<rparr>) = dg_Rel \<alpha>\<lparr>Arr\<rparr> [PROOF STEP] qed (auto simp: dghm_dag_Rel_components intro: dg_cs_intros dg_op_intros) [PROOF STATE] proof (state) this: \<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha> : op_dg (dg_Rel \<alpha>) \<mapsto>\<mapsto>\<^sub>D\<^sub>G\<^bsub>\<alpha>\<^esub> dg_Rel \<alpha> goal (4 subgoals): 1. v11 (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ObjMap\<rparr>) 2. v11 (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ArrMap\<rparr>) 3. \<R>\<^sub>\<circ> (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ObjMap\<rparr>) = dg_Rel \<alpha>\<lparr>Obj\<rparr> 4. \<R>\<^sub>\<circ> (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ArrMap\<rparr>) = dg_Rel \<alpha>\<lparr>Arr\<rparr> [PROOF STEP] show "v11 (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ArrMap\<rparr>)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. v11 (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ArrMap\<rparr>) [PROOF STEP] proof ( intro vsv.vsv_valeq_v11I, unfold dghm_dag_Rel_ArrMap_vdomain dg_Rel_Arr_iff ) [PROOF STATE] proof (state) goal (2 subgoals): 1. vsv (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ArrMap\<rparr>) 2. \<And>x y. \<lbrakk>arr_Rel \<alpha> x; arr_Rel \<alpha> y; \<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ArrMap\<rparr>\<lparr>x\<rparr> = \<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ArrMap\<rparr>\<lparr>y\<rparr>\<rbrakk> \<Longrightarrow> x = y [PROOF STEP] fix S T [PROOF STATE] proof (state) goal (2 subgoals): 1. vsv (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ArrMap\<rparr>) 2. \<And>x y. \<lbrakk>arr_Rel \<alpha> x; arr_Rel \<alpha> y; \<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ArrMap\<rparr>\<lparr>x\<rparr> = \<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ArrMap\<rparr>\<lparr>y\<rparr>\<rbrakk> \<Longrightarrow> x = y [PROOF STEP] assume prems: "arr_Rel \<alpha> S" "arr_Rel \<alpha> T" "\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ArrMap\<rparr>\<lparr>S\<rparr> = \<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ArrMap\<rparr>\<lparr>T\<rparr>" [PROOF STATE] proof (state) this: arr_Rel \<alpha> S arr_Rel \<alpha> T \<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ArrMap\<rparr>\<lparr>S\<rparr> = \<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ArrMap\<rparr>\<lparr>T\<rparr> goal (2 subgoals): 1. vsv (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ArrMap\<rparr>) 2. \<And>x y. \<lbrakk>arr_Rel \<alpha> x; arr_Rel \<alpha> y; \<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ArrMap\<rparr>\<lparr>x\<rparr> = \<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ArrMap\<rparr>\<lparr>y\<rparr>\<rbrakk> \<Longrightarrow> x = y [PROOF STEP] from prems [PROOF STATE] proof (chain) picking this: arr_Rel \<alpha> S arr_Rel \<alpha> T \<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ArrMap\<rparr>\<lparr>S\<rparr> = \<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ArrMap\<rparr>\<lparr>T\<rparr> [PROOF STEP] show "S = T" [PROOF STATE] proof (prove) using this: arr_Rel \<alpha> S arr_Rel \<alpha> T \<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ArrMap\<rparr>\<lparr>S\<rparr> = \<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ArrMap\<rparr>\<lparr>T\<rparr> goal (1 subgoal): 1. S = T [PROOF STEP] by ( auto simp: dg_Rel_components dg_Rel_cs_simps dghm_dag_Rel_ArrMap_app[OF prems(1)] dghm_dag_Rel_ArrMap_app[OF prems(2)] ) [PROOF STATE] proof (state) this: S = T goal (1 subgoal): 1. vsv (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ArrMap\<rparr>) [PROOF STEP] qed (auto intro: dg_Rel_cs_intros) [PROOF STATE] proof (state) this: v11 (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ArrMap\<rparr>) goal (3 subgoals): 1. v11 (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ObjMap\<rparr>) 2. \<R>\<^sub>\<circ> (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ObjMap\<rparr>) = dg_Rel \<alpha>\<lparr>Obj\<rparr> 3. \<R>\<^sub>\<circ> (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ArrMap\<rparr>) = dg_Rel \<alpha>\<lparr>Arr\<rparr> [PROOF STEP] show "\<R>\<^sub>\<circ> (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ArrMap\<rparr>) = dg_Rel \<alpha>\<lparr>Arr\<rparr>" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<R>\<^sub>\<circ> (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ArrMap\<rparr>) = dg_Rel \<alpha>\<lparr>Arr\<rparr> [PROOF STEP] by (simp add: dg_Rel_cs_simps) [PROOF STATE] proof (state) this: \<R>\<^sub>\<circ> (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ArrMap\<rparr>) = dg_Rel \<alpha>\<lparr>Arr\<rparr> goal (2 subgoals): 1. v11 (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ObjMap\<rparr>) 2. \<R>\<^sub>\<circ> (\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha>\<lparr>ObjMap\<rparr>) = dg_Rel \<alpha>\<lparr>Obj\<rparr> [PROOF STEP] qed (simp_all add: dghm_dag_Rel_components)
{"llama_tokens": 7464, "file": "CZH_Foundations_czh_digraphs_CZH_DG_Rel", "length": 28}
import unittest import numpy as np from ensemble_boxes import * class TestWBF(unittest.TestCase): def test_box_and_model_avg(self): boxes_list = [ [ [0.10, 0.10, 0.50, 0.50], # cluster 2 [0.11, 0.11, 0.51, 0.51], # cluster 2 [0.60, 0.60, 0.80, 0.80], # cluster 1 ], [ [0.59, 0.59, 0.79, 0.79], # cluster 1 [0.61, 0.61, 0.81, 0.81], # cluster 1 [0.80, 0.80, 0.90, 0.90], # cluster 3 ], ] scores_list = [[0.9, 0.8, 0.7], [0.85, 0.75, 0.65]] labels_list = [[1, 1, 1], [1, 1, 0]] weights = [2, 1] iou_thr = 0.5 skip_box_thr = 0.0001 boxes, scores, labels = weighted_boxes_fusion( boxes_list, scores_list, labels_list, weights=weights, iou_thr=iou_thr, skip_box_thr=skip_box_thr, conf_type='box_and_model_avg' ) print("box_and_model_avg") print(boxes) print(scores) ## test for bbox # cluster 1 np.testing.assert_allclose(boxes[0][0], (0.60 * 0.7 * 2 + 0.59 * 0.85 * 1 + 0.61 * 0.75 * 1) / (0.7 * 2 + 0.85 * 1 + 0.75 * 1)) np.testing.assert_allclose(boxes[0][1], (0.60 * 0.7 * 2 + 0.59 * 0.85 * 1 + 0.61 * 0.75 * 1) / (0.7 * 2 + 0.85 * 1 + 0.75 * 1)) np.testing.assert_allclose(boxes[0][2], (0.80 * 0.7 * 2 + 0.79 * 0.85 * 1 + 0.81 * 0.75 * 1) / (0.7 * 2 + 0.85 * 1 + 0.75 * 1)) np.testing.assert_allclose(boxes[0][3], (0.80 * 0.7 * 2 + 0.79 * 0.85 * 1 + 0.81 * 0.75 * 1) / (0.7 * 2 + 0.85 * 1 + 0.75 * 1)) # cluster 2 np.testing.assert_allclose(boxes[1][0], (0.1 * 0.9 * 2 + 0.11 * 0.8 * 2) / (0.9 * 2 + 0.8 * 2)) np.testing.assert_allclose(boxes[1][1], (0.1 * 0.9 * 2 + 0.11 * 0.8 * 2) / (0.9 * 2 + 0.8 * 2)) np.testing.assert_allclose(boxes[1][2], (0.5 * 0.9 * 2 + 0.51 * 0.8 * 2) / (0.9 * 2 + 0.8 * 2)) np.testing.assert_allclose(boxes[1][3], (0.5 * 0.9 * 2 + 0.51 * 0.8 * 2) / (0.9 * 2 + 0.8 * 2)) # cluster 3 np.testing.assert_allclose(boxes[2][0], (0.8 * 0.65 * 1) / (0.65 * 1)) np.testing.assert_allclose(boxes[2][1], (0.8 * 0.65 * 1) / (0.65 * 1)) np.testing.assert_allclose(boxes[2][2], (0.9 * 0.65 * 1) / (0.65 * 1)) np.testing.assert_allclose(boxes[2][3], (0.9 * 0.65 * 1) / (0.65 * 1)) ## test for scores # cluster 11c` box_avg = (0.7 * 2 + 0.85 * 1 + 0.75 * 1) / (2 + 1 + 1) model_avg = (2 + 1) / (2 + 1) np.testing.assert_allclose(scores[0], box_avg * model_avg) # cluster 2 box_avg = (0.9 * 2 + 0.8 * 2) / (2 + 2) model_avg = 2 / (2 + 1) np.testing.assert_allclose(scores[1], box_avg * model_avg) # cluster 3 box_avg = 0.65 * 1 / 1 model_avg = 1 / (2 + 1) np.testing.assert_allclose(scores[2], box_avg * model_avg) ## test for labels np.testing.assert_array_equal(labels, [1, 1, 0]) def test_absent_model_aware_avg(self): boxes_list = [ [ [0.10, 0.10, 0.50, 0.50], # cluster 2 [0.11, 0.11, 0.51, 0.51], # cluster 2 [0.60, 0.60, 0.80, 0.80], # cluster 1 ], [ [0.59, 0.59, 0.79, 0.79], # cluster 1 [0.61, 0.61, 0.81, 0.81], # cluster 1 [0.80, 0.80, 0.90, 0.90], # cluster 3 ], ] scores_list = [[0.9, 0.8, 0.7], [0.85, 0.75, 0.65]] labels_list = [[1, 1, 1], [1, 1, 0]] weights = [2, 1] iou_thr = 0.5 skip_box_thr = 0.0001 boxes, scores, labels = weighted_boxes_fusion( boxes_list, scores_list, labels_list, weights=weights, iou_thr=iou_thr, skip_box_thr=skip_box_thr, conf_type='absent_model_aware_avg' ) print("absent_model_aware_avg") print(boxes) print(scores) ## test for bbox # cluster 1 np.testing.assert_allclose(boxes[0][0], (0.60 * 0.7 * 2 + 0.59 * 0.85 * 1 + 0.61 * 0.75 * 1) / (0.7 * 2 + 0.85 * 1 + 0.75 * 1)) np.testing.assert_allclose(boxes[0][1], (0.60 * 0.7 * 2 + 0.59 * 0.85 * 1 + 0.61 * 0.75 * 1) / (0.7 * 2 + 0.85 * 1 + 0.75 * 1)) np.testing.assert_allclose(boxes[0][2], (0.80 * 0.7 * 2 + 0.79 * 0.85 * 1 + 0.81 * 0.75 * 1) / (0.7 * 2 + 0.85 * 1 + 0.75 * 1)) np.testing.assert_allclose(boxes[0][3], (0.80 * 0.7 * 2 + 0.79 * 0.85 * 1 + 0.81 * 0.75 * 1) / (0.7 * 2 + 0.85 * 1 + 0.75 * 1)) # cluster 2 np.testing.assert_allclose(boxes[1][0], (0.1 * 0.9 * 2 + 0.11 * 0.8 * 2) / (0.9 * 2 + 0.8 * 2)) np.testing.assert_allclose(boxes[1][1], (0.1 * 0.9 * 2 + 0.11 * 0.8 * 2) / (0.9 * 2 + 0.8 * 2)) np.testing.assert_allclose(boxes[1][2], (0.5 * 0.9 * 2 + 0.51 * 0.8 * 2) / (0.9 * 2 + 0.8 * 2)) np.testing.assert_allclose(boxes[1][3], (0.5 * 0.9 * 2 + 0.51 * 0.8 * 2) / (0.9 * 2 + 0.8 * 2)) # cluster 3 np.testing.assert_allclose(boxes[2][0], (0.8 * 0.65 * 1) / (0.65 * 1)) np.testing.assert_allclose(boxes[2][1], (0.8 * 0.65 * 1) / (0.65 * 1)) np.testing.assert_allclose(boxes[2][2], (0.9 * 0.65 * 1) / (0.65 * 1)) np.testing.assert_allclose(boxes[2][3], (0.9 * 0.65 * 1) / (0.65 * 1)) ## test for scores # cluster 1 absent_weights = 0 avg = (0.7 * 2 + 0.85 * 1 + 0.75 * 1) / (2 + 1 + 1 + absent_weights) np.testing.assert_allclose(scores[0], avg) # cluster 2 absent_weights = 1 avg = (0.9 * 2 + 0.8 * 2) / (2 + 2 + absent_weights) np.testing.assert_allclose(scores[1], avg) # cluster 3 absent_weights = 2 avg = 0.65 * 1 / (1 + absent_weights) np.testing.assert_allclose(scores[2], avg) ## test for labels np.testing.assert_array_equal(labels, [1, 1, 0]) def test_avg(self): boxes_list = [ [ [0.10, 0.10, 0.50, 0.50], # cluster 2 [0.11, 0.11, 0.51, 0.51], # cluster 2 [0.60, 0.60, 0.80, 0.80], # cluster 1 ], [ [0.59, 0.59, 0.79, 0.79], # cluster 1 [0.61, 0.61, 0.81, 0.81], # cluster 1 [0.80, 0.80, 0.90, 0.90], # cluster 3 ], ] scores_list = [[0.9, 0.8, 0.7], [0.85, 0.75, 0.65]] labels_list = [[1, 1, 1], [1, 1, 0]] weights = [2, 1] iou_thr = 0.5 skip_box_thr = 0.0001 boxes, scores, labels = weighted_boxes_fusion( boxes_list, scores_list, labels_list, weights=weights, iou_thr=iou_thr, skip_box_thr=skip_box_thr, conf_type='avg', allows_overflow=True ) print("avg") print(boxes) print(scores) ## test for bbox # cluster 2 np.testing.assert_allclose(boxes[0][0], (0.1 * 0.9 * 2 + 0.11 * 0.8 * 2) / (0.9 * 2 + 0.8 * 2)) np.testing.assert_allclose(boxes[0][1], (0.1 * 0.9 * 2 + 0.11 * 0.8 * 2) / (0.9 * 2 + 0.8 * 2)) np.testing.assert_allclose(boxes[0][2], (0.5 * 0.9 * 2 + 0.51 * 0.8 * 2) / (0.9 * 2 + 0.8 * 2)) np.testing.assert_allclose(boxes[0][3], (0.5 * 0.9 * 2 + 0.51 * 0.8 * 2) / (0.9 * 2 + 0.8 * 2)) # cluster 1 np.testing.assert_allclose(boxes[1][0], (0.60 * 0.7 * 2 + 0.59 * 0.85 * 1 + 0.61 * 0.75 * 1) / (0.7 * 2 + 0.85 * 1 + 0.75 * 1)) np.testing.assert_allclose(boxes[1][1], (0.60 * 0.7 * 2 + 0.59 * 0.85 * 1 + 0.61 * 0.75 * 1) / (0.7 * 2 + 0.85 * 1 + 0.75 * 1)) np.testing.assert_allclose(boxes[1][2], (0.80 * 0.7 * 2 + 0.79 * 0.85 * 1 + 0.81 * 0.75 * 1) / (0.7 * 2 + 0.85 * 1 + 0.75 * 1)) np.testing.assert_allclose(boxes[1][3], (0.80 * 0.7 * 2 + 0.79 * 0.85 * 1 + 0.81 * 0.75 * 1) / (0.7 * 2 + 0.85 * 1 + 0.75 * 1)) # cluster 3 np.testing.assert_allclose(boxes[2][0], (0.8 * 0.65 * 1) / (0.65 * 1)) np.testing.assert_allclose(boxes[2][1], (0.8 * 0.65 * 1) / (0.65 * 1)) np.testing.assert_allclose(boxes[2][2], (0.9 * 0.65 * 1) / (0.65 * 1)) np.testing.assert_allclose(boxes[2][3], (0.9 * 0.65 * 1) / (0.65 * 1)) ## test for scores # cluster 2 avg = (0.9 * 2 + 0.8 * 2) / (2 + 1) np.testing.assert_allclose(scores[0], avg) # cluster 1 avg = (0.7 * 2 + 0.85 * 1 + 0.75 * 1) / (2 + 1) np.testing.assert_allclose(scores[1], avg) # cluster 3 avg = 0.65 * 1 / (2 + 1) np.testing.assert_allclose(scores[2], avg) ## test for labels np.testing.assert_array_equal(labels, [1, 1, 0]) def test_simple_case_for_all_methods(self): boxes_list = [] scores_list = [] labels_list = [] weigths = [] fixed_score = 0.8 fixed_box = [0., 0., 0.1, 0.1] n_models = 5 # All models have the same result with one box for _ in range(n_models): boxes_list.append([fixed_box]) scores_list.append([fixed_score]) labels_list.append([0]) weigths.append(1 / n_models) for conf_type in ['avg', 'max', 'box_and_model_avg', 'absent_model_aware_avg']: for allows_overflow in [True, False]: boxes, scores, labels = weighted_boxes_fusion( boxes_list, scores_list, labels_list, weights=weigths, iou_thr=0.4, skip_box_thr=0., conf_type=conf_type, allows_overflow=allows_overflow ) np.testing.assert_allclose(scores, [fixed_score]) np.testing.assert_array_equal(labels, [0]) np.testing.assert_allclose(boxes[0], fixed_box) if __name__ == "__main__": unittest.main()
{"hexsha": "e8b88f4c6826437bfe631eb35faefab982061d95", "size": 10535, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_bbox.py", "max_stars_repo_name": "Sergey-Zlobin/Weighted-Boxes-Fusion", "max_stars_repo_head_hexsha": "773ed6f9513ade442c0f89885f3a36d95cf0629d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "tests/test_bbox.py", "max_issues_repo_name": "Sergey-Zlobin/Weighted-Boxes-Fusion", "max_issues_repo_head_hexsha": "773ed6f9513ade442c0f89885f3a36d95cf0629d", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "tests/test_bbox.py", "max_forks_repo_name": "Sergey-Zlobin/Weighted-Boxes-Fusion", "max_forks_repo_head_hexsha": "773ed6f9513ade442c0f89885f3a36d95cf0629d", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 38.3090909091, "max_line_length": 122, "alphanum_fraction": 0.4529663028, "include": true, "reason": "import numpy", "num_tokens": 3984}
[STATEMENT] lemma word_less_nowrapI: "x < z - k \<Longrightarrow> k \<le> z \<Longrightarrow> 0 < k \<Longrightarrow> x < x + k" for x z k :: "'a::len word" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>x < z - k; k \<le> z; 0 < k\<rbrakk> \<Longrightarrow> x < x + k [PROOF STEP] by uint_arith
{"llama_tokens": 128, "file": null, "length": 1}
# MINLP written by GAMS Convert at 04/21/18 13:51:17 # # Equation counts # Total E G L N X C B # 4241 1603 946 1692 0 0 0 0 # # Variable counts # x b i s1s s2s sc si # Total cont binary integer sos1 sos2 scont sint # 1849 1737 112 0 0 0 0 0 # FX 0 0 0 0 0 0 0 0 # # Nonzero counts # Total const NL DLL # 23037 20349 2688 0 # # Reformulation has removed 1 variable and 1 equation from pyomo.environ import * model = m = ConcreteModel() m.b2 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b3 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b4 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b5 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b6 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b7 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b8 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b9 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b10 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b11 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b12 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b13 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b14 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b15 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b16 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b17 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b18 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b19 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b20 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b21 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b22 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b23 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b24 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b25 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b26 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b27 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b28 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b29 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b30 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b31 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b32 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b33 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b34 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b35 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b36 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b37 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b38 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b39 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b40 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b41 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b42 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b43 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b44 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b45 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b46 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b47 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b48 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b49 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b50 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b51 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b52 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b53 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b54 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b55 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b56 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b57 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b58 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b59 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b60 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b61 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b62 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b63 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b64 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b65 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b66 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b67 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b68 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b69 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b70 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b71 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b72 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b73 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b74 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b75 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b76 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b77 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b78 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b79 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b80 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b81 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b82 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b83 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b84 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b85 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b86 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b87 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b88 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b89 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b90 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b91 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b92 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b93 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b94 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b95 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b96 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b97 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b98 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b99 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b100 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b101 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b102 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b103 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b104 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b105 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b106 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b107 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b108 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b109 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b110 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b111 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b112 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.b113 = Var(within=Binary,bounds=(0,1),initialize=0.5) m.x114 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x115 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x116 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x117 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x118 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x119 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x120 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x121 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x122 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x123 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x124 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x125 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x126 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x127 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x128 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x129 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x130 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x131 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x132 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x133 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x134 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x135 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x136 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x137 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x138 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x139 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x140 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x141 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x142 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x143 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x144 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x145 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x146 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x147 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x148 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x149 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x150 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x151 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x152 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x153 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x154 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x155 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x156 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x157 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x158 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x159 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x160 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x161 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x162 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x163 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x164 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x165 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x166 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x167 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x168 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x169 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x170 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x171 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x172 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x173 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x174 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x175 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x176 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x177 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x178 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x179 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x180 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x181 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x182 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x183 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x184 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x185 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x186 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x187 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x188 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x189 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x190 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x191 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x192 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x193 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x194 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x195 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x196 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x197 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x198 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x199 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x200 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x201 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x202 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x203 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x204 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x205 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x206 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x207 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x208 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x209 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x210 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x211 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x212 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x213 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x214 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x215 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x216 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x217 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x218 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x219 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x220 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x221 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x222 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x223 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x224 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x225 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x226 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x227 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x228 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x229 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x230 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x231 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x232 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x233 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x234 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x235 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x236 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x237 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x238 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x239 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x240 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x241 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x242 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x243 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x244 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x245 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x246 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x247 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x248 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x249 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x250 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x251 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x252 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x253 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x254 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x255 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x256 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x257 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x258 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x259 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x260 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x261 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x262 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x263 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x264 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x265 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x266 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x267 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x268 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x269 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x270 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x271 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x272 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x273 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x274 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x275 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x276 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x277 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x278 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x279 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x280 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x281 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x282 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x283 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x284 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x285 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x286 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x287 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x288 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x289 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x290 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x291 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x292 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x293 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x294 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x295 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x296 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x297 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x298 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x299 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x300 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x301 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x302 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x303 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x304 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x305 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x306 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x307 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x308 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x309 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x310 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x311 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x312 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x313 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x314 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x315 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x316 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x317 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x318 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x319 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x320 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x321 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x322 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x323 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x324 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x325 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x326 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x327 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x328 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x329 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x330 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x331 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x332 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x333 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x334 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x335 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x336 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x337 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x338 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x339 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x340 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x341 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x342 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x343 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x344 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x345 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x346 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x347 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x348 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x349 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x350 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x351 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x352 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x353 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x354 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x355 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x356 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x357 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x358 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x359 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x360 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x361 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x362 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x363 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x364 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x365 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x366 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x367 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x368 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x369 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x370 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x371 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x372 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x373 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x374 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x375 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x376 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x377 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x378 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x379 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x380 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x381 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x382 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x383 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x384 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x385 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x386 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x387 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x388 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x389 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x390 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x391 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x392 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x393 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x394 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x395 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x396 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x397 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x398 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x399 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x400 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x401 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x402 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x403 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x404 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x405 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x406 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x407 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x408 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x409 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x410 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x411 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x412 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x413 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x414 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x415 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x416 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x417 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x418 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x419 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x420 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x421 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x422 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x423 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x424 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x425 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x426 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x427 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x428 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x429 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x430 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x431 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x432 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x433 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x434 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x435 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x436 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x437 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x438 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x439 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x440 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x441 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x442 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x443 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x444 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x445 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x446 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x447 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x448 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x449 = Var(within=Reals,bounds=(0,None),initialize=3.33333333333333) m.x450 = Var(within=Reals,bounds=(0,None),initialize=10) m.x451 = Var(within=Reals,bounds=(0,None),initialize=10) m.x452 = Var(within=Reals,bounds=(0,None),initialize=10) m.x453 = Var(within=Reals,bounds=(0,None),initialize=10) m.x454 = Var(within=Reals,bounds=(0,None),initialize=10) m.x455 = Var(within=Reals,bounds=(0,None),initialize=10) m.x456 = Var(within=Reals,bounds=(0,None),initialize=10) m.x457 = Var(within=Reals,bounds=(0,None),initialize=10) m.x458 = Var(within=Reals,bounds=(0,None),initialize=10) m.x459 = Var(within=Reals,bounds=(0,None),initialize=10) m.x460 = Var(within=Reals,bounds=(0,None),initialize=10) m.x461 = Var(within=Reals,bounds=(0,None),initialize=10) m.x462 = Var(within=Reals,bounds=(0,None),initialize=10) m.x463 = Var(within=Reals,bounds=(0,None),initialize=10) m.x464 = Var(within=Reals,bounds=(0,None),initialize=10) m.x465 = Var(within=Reals,bounds=(0,None),initialize=10) m.x466 = Var(within=Reals,bounds=(0,None),initialize=10) m.x467 = Var(within=Reals,bounds=(0,None),initialize=10) m.x468 = Var(within=Reals,bounds=(0,None),initialize=10) m.x469 = Var(within=Reals,bounds=(0,None),initialize=10) m.x470 = Var(within=Reals,bounds=(0,None),initialize=10) m.x471 = Var(within=Reals,bounds=(0,None),initialize=10) m.x472 = Var(within=Reals,bounds=(0,None),initialize=10) m.x473 = Var(within=Reals,bounds=(0,None),initialize=10) m.x474 = Var(within=Reals,bounds=(0,None),initialize=10) m.x475 = Var(within=Reals,bounds=(0,None),initialize=10) m.x476 = Var(within=Reals,bounds=(0,None),initialize=10) m.x477 = Var(within=Reals,bounds=(0,None),initialize=10) m.x478 = Var(within=Reals,bounds=(0,None),initialize=10) m.x479 = Var(within=Reals,bounds=(0,None),initialize=10) m.x480 = Var(within=Reals,bounds=(0,None),initialize=10) m.x481 = Var(within=Reals,bounds=(0,None),initialize=10) m.x482 = Var(within=Reals,bounds=(0,None),initialize=10) m.x483 = Var(within=Reals,bounds=(0,None),initialize=10) m.x484 = Var(within=Reals,bounds=(0,None),initialize=10) m.x485 = Var(within=Reals,bounds=(0,None),initialize=10) m.x486 = Var(within=Reals,bounds=(0,None),initialize=10) m.x487 = Var(within=Reals,bounds=(0,None),initialize=10) m.x488 = Var(within=Reals,bounds=(0,None),initialize=10) m.x489 = Var(within=Reals,bounds=(0,None),initialize=10) m.x490 = Var(within=Reals,bounds=(0,None),initialize=10) m.x491 = Var(within=Reals,bounds=(0,None),initialize=10) m.x492 = Var(within=Reals,bounds=(0,None),initialize=10) m.x493 = Var(within=Reals,bounds=(0,None),initialize=10) m.x494 = Var(within=Reals,bounds=(0,None),initialize=10) m.x495 = Var(within=Reals,bounds=(0,None),initialize=10) m.x496 = Var(within=Reals,bounds=(0,None),initialize=10) m.x497 = Var(within=Reals,bounds=(0,None),initialize=10) m.x498 = Var(within=Reals,bounds=(0,None),initialize=10) m.x499 = Var(within=Reals,bounds=(0,None),initialize=10) m.x500 = Var(within=Reals,bounds=(0,None),initialize=10) m.x501 = Var(within=Reals,bounds=(0,None),initialize=10) m.x502 = Var(within=Reals,bounds=(0,None),initialize=10) m.x503 = Var(within=Reals,bounds=(0,None),initialize=10) m.x504 = Var(within=Reals,bounds=(0,None),initialize=10) m.x505 = Var(within=Reals,bounds=(0,None),initialize=10) m.x506 = Var(within=Reals,bounds=(0,None),initialize=10) m.x507 = Var(within=Reals,bounds=(0,None),initialize=10) m.x508 = Var(within=Reals,bounds=(0,None),initialize=10) m.x509 = Var(within=Reals,bounds=(0,None),initialize=10) m.x510 = Var(within=Reals,bounds=(0,None),initialize=10) m.x511 = Var(within=Reals,bounds=(0,None),initialize=10) m.x512 = Var(within=Reals,bounds=(0,None),initialize=10) m.x513 = Var(within=Reals,bounds=(0,None),initialize=10) m.x514 = Var(within=Reals,bounds=(0,None),initialize=10) m.x515 = Var(within=Reals,bounds=(0,None),initialize=10) m.x516 = Var(within=Reals,bounds=(0,None),initialize=10) m.x517 = Var(within=Reals,bounds=(0,None),initialize=10) m.x518 = Var(within=Reals,bounds=(0,None),initialize=10) m.x519 = Var(within=Reals,bounds=(0,None),initialize=10) m.x520 = Var(within=Reals,bounds=(0,None),initialize=10) m.x521 = Var(within=Reals,bounds=(0,None),initialize=10) m.x522 = Var(within=Reals,bounds=(0,None),initialize=10) m.x523 = Var(within=Reals,bounds=(0,None),initialize=10) m.x524 = Var(within=Reals,bounds=(0,None),initialize=10) m.x525 = Var(within=Reals,bounds=(0,None),initialize=10) m.x526 = Var(within=Reals,bounds=(0,None),initialize=10) m.x527 = Var(within=Reals,bounds=(0,None),initialize=10) m.x528 = Var(within=Reals,bounds=(0,None),initialize=10) m.x529 = Var(within=Reals,bounds=(0,None),initialize=10) m.x530 = Var(within=Reals,bounds=(0,None),initialize=10) m.x531 = Var(within=Reals,bounds=(0,None),initialize=10) m.x532 = Var(within=Reals,bounds=(0,None),initialize=10) m.x533 = Var(within=Reals,bounds=(0,None),initialize=10) m.x534 = Var(within=Reals,bounds=(0,None),initialize=10) m.x535 = Var(within=Reals,bounds=(0,None),initialize=10) m.x536 = Var(within=Reals,bounds=(0,None),initialize=10) m.x537 = Var(within=Reals,bounds=(0,None),initialize=10) m.x538 = Var(within=Reals,bounds=(0,None),initialize=10) m.x539 = Var(within=Reals,bounds=(0,None),initialize=10) m.x540 = Var(within=Reals,bounds=(0,None),initialize=10) m.x541 = Var(within=Reals,bounds=(0,None),initialize=10) m.x542 = Var(within=Reals,bounds=(0,None),initialize=10) m.x543 = Var(within=Reals,bounds=(0,None),initialize=10) m.x544 = Var(within=Reals,bounds=(0,None),initialize=10) m.x545 = Var(within=Reals,bounds=(0,None),initialize=10) m.x546 = Var(within=Reals,bounds=(0,None),initialize=10) m.x547 = Var(within=Reals,bounds=(0,None),initialize=10) m.x548 = Var(within=Reals,bounds=(0,None),initialize=10) m.x549 = Var(within=Reals,bounds=(0,None),initialize=10) m.x550 = Var(within=Reals,bounds=(0,None),initialize=10) m.x551 = Var(within=Reals,bounds=(0,None),initialize=10) m.x552 = Var(within=Reals,bounds=(0,None),initialize=10) m.x553 = Var(within=Reals,bounds=(0,None),initialize=10) m.x554 = Var(within=Reals,bounds=(0,None),initialize=10) m.x555 = Var(within=Reals,bounds=(0,None),initialize=10) m.x556 = Var(within=Reals,bounds=(0,None),initialize=10) m.x557 = Var(within=Reals,bounds=(0,None),initialize=10) m.x558 = Var(within=Reals,bounds=(0,None),initialize=10) m.x559 = Var(within=Reals,bounds=(0,None),initialize=10) m.x560 = Var(within=Reals,bounds=(0,None),initialize=10) m.x561 = Var(within=Reals,bounds=(0,None),initialize=10) m.x562 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x563 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x564 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x565 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x566 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x567 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x568 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x569 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x570 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x571 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x572 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x573 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x574 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x575 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x576 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x577 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x578 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x579 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x580 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x581 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x582 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x583 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x584 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x585 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x586 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x587 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x588 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x589 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x590 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x591 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x592 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x593 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x594 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x595 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x596 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x597 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x598 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x599 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x600 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x601 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x602 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x603 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x604 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x605 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x606 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x607 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x608 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x609 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x610 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x611 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x612 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x613 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x614 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x615 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x616 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x617 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x618 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x619 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x620 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x621 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x622 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x623 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x624 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x625 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x626 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x627 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x628 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x629 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x630 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x631 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x632 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x633 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x634 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x635 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x636 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x637 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x638 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x639 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x640 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x641 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x642 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x643 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x644 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x645 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x646 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x647 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x648 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x649 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x650 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x651 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x652 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x653 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x654 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x655 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x656 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x657 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x658 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x659 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x660 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x661 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x662 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x663 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x664 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x665 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x666 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x667 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x668 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x669 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x670 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x671 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x672 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x673 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x674 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x675 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x676 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x677 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x678 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x679 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x680 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x681 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x682 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x683 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x684 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x685 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x686 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x687 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x688 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x689 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x690 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x691 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x692 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x693 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x694 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x695 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x696 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x697 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x698 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x699 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x700 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x701 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x702 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x703 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x704 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x705 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x706 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x707 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x708 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x709 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x710 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x711 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x712 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x713 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x714 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x715 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x716 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x717 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x718 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x719 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x720 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x721 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x722 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x723 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x724 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x725 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x726 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x727 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x728 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x729 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x730 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x731 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x732 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x733 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x734 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x735 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x736 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x737 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x738 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x739 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x740 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x741 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x742 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x743 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x744 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x745 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x746 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x747 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x748 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x749 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x750 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x751 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x752 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x753 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x754 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x755 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x756 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x757 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x758 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x759 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x760 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x761 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x762 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x763 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x764 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x765 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x766 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x767 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x768 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x769 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x770 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x771 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x772 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x773 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x774 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x775 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x776 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x777 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x778 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x779 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x780 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x781 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x782 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x783 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x784 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x785 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x786 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x787 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x788 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x789 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x790 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x791 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x792 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x793 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x794 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x795 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x796 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x797 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x798 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x799 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x800 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x801 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x802 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x803 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x804 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x805 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x806 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x807 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x808 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x809 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x810 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x811 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x812 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x813 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x814 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x815 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x816 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x817 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x818 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x819 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x820 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x821 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x822 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x823 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x824 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x825 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x826 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x827 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x828 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x829 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x830 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x831 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x832 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x833 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x834 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x835 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x836 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x837 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x838 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x839 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x840 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x841 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x842 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x843 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x844 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x845 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x846 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x847 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x848 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x849 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x850 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x851 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x852 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x853 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x854 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x855 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x856 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x857 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x858 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x859 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x860 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x861 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x862 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x863 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x864 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x865 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x866 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x867 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x868 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x869 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x870 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x871 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x872 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x873 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x874 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x875 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x876 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x877 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x878 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x879 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x880 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x881 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x882 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x883 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x884 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x885 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x886 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x887 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x888 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x889 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x890 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x891 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x892 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x893 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x894 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x895 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x896 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x897 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x898 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x899 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x900 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x901 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x902 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x903 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x904 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x905 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x906 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x907 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x908 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x909 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x910 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x911 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x912 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x913 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x914 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x915 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x916 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x917 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x918 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x919 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x920 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x921 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x922 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x923 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x924 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x925 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x926 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x927 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x928 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x929 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x930 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x931 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x932 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x933 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x934 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x935 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x936 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x937 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x938 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x939 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x940 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x941 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x942 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x943 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x944 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x945 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x946 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x947 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x948 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x949 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x950 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x951 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x952 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x953 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x954 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x955 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x956 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x957 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x958 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x959 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x960 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x961 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x962 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x963 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x964 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x965 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x966 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x967 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x968 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x969 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x970 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x971 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x972 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x973 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x974 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x975 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x976 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x977 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x978 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x979 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x980 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x981 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x982 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x983 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x984 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x985 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x986 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x987 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x988 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x989 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x990 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x991 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x992 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x993 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x994 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x995 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x996 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x997 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x998 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x999 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1000 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1001 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1002 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1003 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1004 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1005 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1006 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1007 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1008 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1009 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1010 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1011 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1012 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1013 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1014 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1015 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1016 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1017 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1018 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1019 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1020 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1021 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1022 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1023 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1024 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1025 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1026 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1027 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1028 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1029 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1030 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1031 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1032 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1033 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1034 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1035 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1036 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1037 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1038 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1039 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1040 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1041 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1042 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1043 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1044 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1045 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1046 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1047 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1048 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1049 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1050 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1051 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1052 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1053 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1054 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1055 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1056 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1057 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1058 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1059 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1060 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1061 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1062 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1063 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1064 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1065 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1066 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1067 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1068 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1069 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1070 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1071 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1072 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1073 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1074 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1075 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1076 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1077 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1078 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1079 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1080 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1081 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1082 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1083 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1084 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1085 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1086 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1087 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1088 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1089 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1090 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1091 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1092 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1093 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1094 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1095 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1096 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1097 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1098 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1099 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1100 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1101 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1102 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1103 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1104 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1105 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1106 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1107 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1108 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1109 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1110 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1111 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1112 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1113 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1114 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1115 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1116 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1117 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1118 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1119 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1120 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1121 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1122 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1123 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1124 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1125 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1126 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1127 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1128 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1129 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1130 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1131 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1132 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1133 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1134 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1135 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1136 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1137 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1138 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1139 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1140 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1141 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1142 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1143 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1144 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1145 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1146 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1147 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1148 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1149 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1150 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1151 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1152 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1153 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1154 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1155 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1156 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1157 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1158 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1159 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1160 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1161 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1162 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1163 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1164 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1165 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1166 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1167 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1168 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1169 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1170 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1171 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1172 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1173 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1174 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1175 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1176 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1177 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1178 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1179 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1180 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1181 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1182 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1183 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1184 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1185 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1186 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1187 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1188 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1189 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1190 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1191 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1192 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1193 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1194 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1195 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1196 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1197 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1198 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1199 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1200 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1201 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1202 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1203 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1204 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1205 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1206 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1207 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1208 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1209 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1210 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1211 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1212 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1213 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1214 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1215 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1216 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1217 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1218 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1219 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1220 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1221 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1222 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1223 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1224 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1225 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1226 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1227 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1228 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1229 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1230 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1231 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1232 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1233 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1234 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1235 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1236 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1237 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1238 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1239 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1240 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1241 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1242 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1243 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1244 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1245 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1246 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1247 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1248 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1249 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1250 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1251 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1252 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1253 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1254 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1255 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1256 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1257 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1258 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1259 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1260 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1261 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1262 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1263 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1264 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1265 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1266 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1267 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1268 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1269 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1270 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1271 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1272 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1273 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1274 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1275 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1276 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1277 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1278 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1279 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1280 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1281 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1282 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1283 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1284 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1285 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1286 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1287 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1288 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1289 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1290 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1291 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1292 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1293 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1294 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1295 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1296 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1297 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1298 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1299 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1300 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1301 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1302 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1303 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1304 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1305 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1306 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1307 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1308 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1309 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1310 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1311 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1312 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1313 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1314 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1315 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1316 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1317 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1318 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1319 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1320 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1321 = Var(within=Reals,bounds=(0,None),initialize=10) m.x1322 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1323 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1324 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1325 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1326 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1327 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1328 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1329 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1330 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1331 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1332 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1333 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1334 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1335 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1336 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1337 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1338 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1339 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1340 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1341 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1342 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1343 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1344 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1345 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1346 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1347 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1348 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1349 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1350 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1351 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1352 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1353 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1354 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1355 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1356 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1357 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1358 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1359 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1360 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1361 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1362 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1363 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1364 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1365 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1366 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1367 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1368 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1369 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1370 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1371 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1372 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1373 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1374 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1375 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1376 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1377 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1378 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1379 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1380 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1381 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1382 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1383 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1384 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1385 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1386 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1387 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1388 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1389 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1390 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1391 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1392 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1393 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1394 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1395 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1396 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1397 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1398 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1399 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1400 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1401 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1402 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1403 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1404 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1405 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1406 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1407 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1408 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1409 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1410 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1411 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1412 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1413 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1414 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1415 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1416 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1417 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1418 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1419 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1420 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1421 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1422 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1423 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1424 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1425 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1426 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1427 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1428 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1429 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1430 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1431 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1432 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1433 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1434 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1435 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1436 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1437 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1438 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1439 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1440 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1441 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1442 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1443 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1444 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1445 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1446 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1447 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1448 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1449 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1450 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1451 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1452 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1453 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1454 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1455 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1456 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1457 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1458 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1459 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1460 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1461 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1462 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1463 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1464 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1465 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1466 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1467 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1468 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1469 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1470 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1471 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1472 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1473 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1474 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1475 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1476 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1477 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1478 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1479 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1480 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1481 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1482 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1483 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1484 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1485 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1486 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1487 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1488 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1489 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1490 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1491 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1492 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1493 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1494 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1495 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1496 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1497 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1498 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1499 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1500 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1501 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1502 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1503 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1504 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1505 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1506 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1507 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1508 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1509 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1510 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1511 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1512 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1513 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1514 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1515 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1516 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1517 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1518 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1519 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1520 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1521 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1522 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1523 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1524 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1525 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1526 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1527 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1528 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1529 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1530 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1531 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1532 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1533 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1534 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1535 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1536 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1537 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1538 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1539 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1540 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1541 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1542 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1543 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1544 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1545 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1546 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1547 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1548 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1549 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1550 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1551 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1552 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1553 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1554 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1555 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1556 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1557 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1558 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1559 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1560 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1561 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1562 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1563 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1564 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1565 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1566 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1567 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1568 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1569 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1570 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1571 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1572 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1573 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1574 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1575 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1576 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1577 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1578 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1579 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1580 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1581 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1582 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1583 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1584 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1585 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1586 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1587 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1588 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1589 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1590 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1591 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1592 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1593 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1594 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1595 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1596 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1597 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1598 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1599 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1600 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1601 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1602 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1603 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1604 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1605 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1606 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1607 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1608 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1609 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1610 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1611 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1612 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1613 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1614 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1615 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1616 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1617 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1618 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1619 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1620 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1621 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1622 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1623 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1624 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1625 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1626 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1627 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1628 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1629 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1630 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1631 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1632 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1633 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1634 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1635 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1636 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1637 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1638 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1639 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1640 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1641 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1642 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1643 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1644 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1645 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1646 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1647 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1648 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1649 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1650 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1651 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1652 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1653 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1654 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1655 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1656 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1657 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1658 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1659 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1660 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1661 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1662 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1663 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1664 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1665 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1666 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1667 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1668 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1669 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1670 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1671 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1672 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1673 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1674 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1675 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1676 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1677 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1678 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1679 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1680 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1681 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1682 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1683 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1684 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1685 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1686 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1687 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1688 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1689 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1690 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1691 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1692 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1693 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1694 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1695 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1696 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1697 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1698 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1699 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1700 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1701 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1702 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1703 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1704 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1705 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1706 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1707 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1708 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1709 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1710 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1711 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1712 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1713 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1714 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1715 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1716 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1717 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1718 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1719 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1720 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1721 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1722 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1723 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1724 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1725 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1726 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1727 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1728 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1729 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1730 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1731 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1732 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1733 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1734 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1735 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1736 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1737 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1738 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1739 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1740 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1741 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1742 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1743 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1744 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1745 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1746 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1747 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1748 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1749 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1750 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1751 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1752 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1753 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1754 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1755 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1756 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1757 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1758 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1759 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1760 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1761 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1762 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1763 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1764 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1765 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1766 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1767 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1768 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1769 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1770 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1771 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1772 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1773 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1774 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1775 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1776 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1777 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1778 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1779 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1780 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1781 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1782 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1783 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1784 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1785 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1786 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1787 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1788 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1789 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1790 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1791 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1792 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1793 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1794 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1795 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1796 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1797 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1798 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1799 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1800 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1801 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1802 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1803 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1804 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1805 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1806 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1807 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1808 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1809 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1810 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1811 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1812 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1813 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1814 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1815 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1816 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1817 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1818 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1819 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1820 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1821 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1822 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1823 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1824 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1825 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1826 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1827 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1828 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1829 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1830 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1831 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1832 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1833 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1834 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1835 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1836 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1837 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1838 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1839 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1840 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1841 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1842 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1843 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1844 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1845 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1846 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1847 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1848 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.x1849 = Var(within=Reals,bounds=(0,None),initialize=1.66666666666667) m.obj = Objective(expr= 0.1*m.x622 + 0.3*m.x623 + 0.5*m.x624 + 0.167*m.x625 + 0.3*m.x626 + 0.433*m.x627 + 0.1*m.x628 + 0.3*m.x629 + 0.5*m.x630 + 0.167*m.x631 + 0.3*m.x632 + 0.433*m.x633 + 0.1*m.x634 + 0.3*m.x635 + 0.5*m.x636 + 0.167*m.x637 + 0.3*m.x638 + 0.433*m.x639 + 0.1*m.x640 + 0.3*m.x641 + 0.5*m.x642 + 0.167*m.x643 + 0.3*m.x644 + 0.433*m.x645 + 0.1*m.x706 + 0.3*m.x707 + 0.5*m.x708 + 0.167*m.x709 + 0.3*m.x710 + 0.433*m.x711 + 0.1*m.x712 + 0.3*m.x713 + 0.5*m.x714 + 0.167*m.x715 + 0.3*m.x716 + 0.433*m.x717 + 0.1*m.x718 + 0.3*m.x719 + 0.5*m.x720 + 0.167*m.x721 + 0.3*m.x722 + 0.433*m.x723 + 0.1*m.x724 + 0.3*m.x725 + 0.5*m.x726 + 0.167*m.x727 + 0.3*m.x728 + 0.433*m.x729 + 0.1*m.x790 + 0.3*m.x791 + 0.5*m.x792 + 0.167*m.x793 + 0.3*m.x794 + 0.433*m.x795 + 0.1*m.x796 + 0.3*m.x797 + 0.5*m.x798 + 0.167*m.x799 + 0.3*m.x800 + 0.433*m.x801 + 0.1*m.x802 + 0.3*m.x803 + 0.5*m.x804 + 0.167*m.x805 + 0.3*m.x806 + 0.433*m.x807 + 0.1*m.x808 + 0.3*m.x809 + 0.5*m.x810 + 0.167*m.x811 + 0.3*m.x812 + 0.433*m.x813 + 0.1*m.x874 + 0.3*m.x875 + 0.5*m.x876 + 0.167*m.x877 + 0.3*m.x878 + 0.433*m.x879 + 0.1*m.x880 + 0.3*m.x881 + 0.5*m.x882 + 0.167*m.x883 + 0.3*m.x884 + 0.433*m.x885 + 0.1*m.x886 + 0.3*m.x887 + 0.5*m.x888 + 0.167*m.x889 + 0.3*m.x890 + 0.433*m.x891 + 0.1*m.x892 + 0.3*m.x893 + 0.5*m.x894 + 0.167*m.x895 + 0.3*m.x896 + 0.433*m.x897 + 0.1*m.x958 + 0.3*m.x959 + 0.5*m.x960 + 0.167*m.x961 + 0.3*m.x962 + 0.433*m.x963 + 0.1*m.x964 + 0.3*m.x965 + 0.5*m.x966 + 0.167*m.x967 + 0.3*m.x968 + 0.433*m.x969 + 0.1*m.x970 + 0.3*m.x971 + 0.5*m.x972 + 0.167*m.x973 + 0.3*m.x974 + 0.433*m.x975 + 0.1*m.x976 + 0.3*m.x977 + 0.5*m.x978 + 0.167*m.x979 + 0.3*m.x980 + 0.433*m.x981 + 0.1*m.x1042 + 0.3*m.x1043 + 0.5*m.x1044 + 0.167*m.x1045 + 0.3*m.x1046 + 0.433*m.x1047 + 0.1*m.x1048 + 0.3*m.x1049 + 0.5*m.x1050 + 0.167*m.x1051 + 0.3*m.x1052 + 0.433*m.x1053 + 0.1*m.x1054 + 0.3*m.x1055 + 0.5*m.x1056 + 0.167*m.x1057 + 0.3*m.x1058 + 0.433*m.x1059 + 0.1*m.x1060 + 0.3*m.x1061 + 0.5*m.x1062 + 0.167*m.x1063 + 0.3*m.x1064 + 0.433*m.x1065 + 0.1*m.x1126 + 0.3*m.x1127 + 0.5*m.x1128 + 0.167*m.x1129 + 0.3*m.x1130 + 0.433*m.x1131 + 0.1*m.x1132 + 0.3*m.x1133 + 0.5*m.x1134 + 0.167*m.x1135 + 0.3*m.x1136 + 0.433*m.x1137 + 0.1*m.x1138 + 0.3*m.x1139 + 0.5*m.x1140 + 0.167*m.x1141 + 0.3*m.x1142 + 0.433*m.x1143 + 0.1*m.x1144 + 0.3*m.x1145 + 0.5*m.x1146 + 0.167*m.x1147 + 0.3*m.x1148 + 0.433*m.x1149 + 0.1*m.x1210 + 0.3*m.x1211 + 0.5*m.x1212 + 0.167*m.x1213 + 0.3*m.x1214 + 0.433*m.x1215 + 0.1*m.x1216 + 0.3*m.x1217 + 0.5*m.x1218 + 0.167*m.x1219 + 0.3*m.x1220 + 0.433*m.x1221 + 0.1*m.x1222 + 0.3*m.x1223 + 0.5*m.x1224 + 0.167*m.x1225 + 0.3*m.x1226 + 0.433*m.x1227 + 0.1*m.x1228 + 0.3*m.x1229 + 0.5*m.x1230 + 0.167*m.x1231 + 0.3*m.x1232 + 0.433*m.x1233, sense=maximize) m.c2 = Constraint(expr= m.b2 + m.b5 <= 1) m.c3 = Constraint(expr= m.b2 + m.b6 <= 1) m.c4 = Constraint(expr= m.b3 + m.b7 <= 1) m.c5 = Constraint(expr= m.b3 + m.b8 <= 1) m.c6 = Constraint(expr= m.b3 + m.b9 <= 1) m.c7 = Constraint(expr= m.b4 + m.b10 <= 1) m.c8 = Constraint(expr= m.b4 + m.b11 <= 1) m.c9 = Constraint(expr= m.b5 + m.b12 <= 1) m.c10 = Constraint(expr= m.b7 + m.b12 <= 1) m.c11 = Constraint(expr= m.b9 + m.b15 <= 1) m.c12 = Constraint(expr= m.b11 + m.b15 <= 1) m.c13 = Constraint(expr= m.b12 + m.b13 <= 1) m.c14 = Constraint(expr= m.b14 + m.b15 <= 1) m.c15 = Constraint(expr= m.b2 + m.b3 + m.b4 <= 1) m.c16 = Constraint(expr= m.b6 + m.b13 + m.b14 <= 1) m.c17 = Constraint(expr= m.b8 + m.b13 + m.b14 <= 1) m.c18 = Constraint(expr= m.b10 + m.b13 + m.b14 <= 1) m.c19 = Constraint(expr= m.b16 + m.b19 <= 1) m.c20 = Constraint(expr= m.b16 + m.b20 <= 1) m.c21 = Constraint(expr= m.b17 + m.b21 <= 1) m.c22 = Constraint(expr= m.b17 + m.b22 <= 1) m.c23 = Constraint(expr= m.b17 + m.b23 <= 1) m.c24 = Constraint(expr= m.b18 + m.b24 <= 1) m.c25 = Constraint(expr= m.b18 + m.b25 <= 1) m.c26 = Constraint(expr= m.b19 + m.b26 <= 1) m.c27 = Constraint(expr= m.b21 + m.b26 <= 1) m.c28 = Constraint(expr= m.b23 + m.b29 <= 1) m.c29 = Constraint(expr= m.b25 + m.b29 <= 1) m.c30 = Constraint(expr= m.b26 + m.b27 <= 1) m.c31 = Constraint(expr= m.b28 + m.b29 <= 1) m.c32 = Constraint(expr= m.b16 + m.b17 + m.b18 <= 1) m.c33 = Constraint(expr= m.b20 + m.b27 + m.b28 <= 1) m.c34 = Constraint(expr= m.b22 + m.b27 + m.b28 <= 1) m.c35 = Constraint(expr= m.b24 + m.b27 + m.b28 <= 1) m.c36 = Constraint(expr= m.b30 + m.b33 <= 1) m.c37 = Constraint(expr= m.b30 + m.b34 <= 1) m.c38 = Constraint(expr= m.b31 + m.b35 <= 1) m.c39 = Constraint(expr= m.b31 + m.b36 <= 1) m.c40 = Constraint(expr= m.b31 + m.b37 <= 1) m.c41 = Constraint(expr= m.b32 + m.b38 <= 1) m.c42 = Constraint(expr= m.b32 + m.b39 <= 1) m.c43 = Constraint(expr= m.b33 + m.b40 <= 1) m.c44 = Constraint(expr= m.b35 + m.b40 <= 1) m.c45 = Constraint(expr= m.b37 + m.b43 <= 1) m.c46 = Constraint(expr= m.b39 + m.b43 <= 1) m.c47 = Constraint(expr= m.b40 + m.b41 <= 1) m.c48 = Constraint(expr= m.b42 + m.b43 <= 1) m.c49 = Constraint(expr= m.b30 + m.b31 + m.b32 <= 1) m.c50 = Constraint(expr= m.b34 + m.b41 + m.b42 <= 1) m.c51 = Constraint(expr= m.b36 + m.b41 + m.b42 <= 1) m.c52 = Constraint(expr= m.b38 + m.b41 + m.b42 <= 1) m.c53 = Constraint(expr= m.b44 + m.b47 <= 1) m.c54 = Constraint(expr= m.b44 + m.b48 <= 1) m.c55 = Constraint(expr= m.b45 + m.b49 <= 1) m.c56 = Constraint(expr= m.b45 + m.b50 <= 1) m.c57 = Constraint(expr= m.b45 + m.b51 <= 1) m.c58 = Constraint(expr= m.b46 + m.b52 <= 1) m.c59 = Constraint(expr= m.b46 + m.b53 <= 1) m.c60 = Constraint(expr= m.b47 + m.b54 <= 1) m.c61 = Constraint(expr= m.b49 + m.b54 <= 1) m.c62 = Constraint(expr= m.b51 + m.b57 <= 1) m.c63 = Constraint(expr= m.b53 + m.b57 <= 1) m.c64 = Constraint(expr= m.b54 + m.b55 <= 1) m.c65 = Constraint(expr= m.b56 + m.b57 <= 1) m.c66 = Constraint(expr= m.b44 + m.b45 + m.b46 <= 1) m.c67 = Constraint(expr= m.b48 + m.b55 + m.b56 <= 1) m.c68 = Constraint(expr= m.b50 + m.b55 + m.b56 <= 1) m.c69 = Constraint(expr= m.b52 + m.b55 + m.b56 <= 1) m.c70 = Constraint(expr= m.b58 + m.b61 <= 1) m.c71 = Constraint(expr= m.b58 + m.b62 <= 1) m.c72 = Constraint(expr= m.b59 + m.b63 <= 1) m.c73 = Constraint(expr= m.b59 + m.b64 <= 1) m.c74 = Constraint(expr= m.b59 + m.b65 <= 1) m.c75 = Constraint(expr= m.b60 + m.b66 <= 1) m.c76 = Constraint(expr= m.b60 + m.b67 <= 1) m.c77 = Constraint(expr= m.b61 + m.b68 <= 1) m.c78 = Constraint(expr= m.b63 + m.b68 <= 1) m.c79 = Constraint(expr= m.b65 + m.b71 <= 1) m.c80 = Constraint(expr= m.b67 + m.b71 <= 1) m.c81 = Constraint(expr= m.b68 + m.b69 <= 1) m.c82 = Constraint(expr= m.b70 + m.b71 <= 1) m.c83 = Constraint(expr= m.b58 + m.b59 + m.b60 <= 1) m.c84 = Constraint(expr= m.b62 + m.b69 + m.b70 <= 1) m.c85 = Constraint(expr= m.b64 + m.b69 + m.b70 <= 1) m.c86 = Constraint(expr= m.b66 + m.b69 + m.b70 <= 1) m.c87 = Constraint(expr= m.b72 + m.b75 <= 1) m.c88 = Constraint(expr= m.b72 + m.b76 <= 1) m.c89 = Constraint(expr= m.b73 + m.b77 <= 1) m.c90 = Constraint(expr= m.b73 + m.b78 <= 1) m.c91 = Constraint(expr= m.b73 + m.b79 <= 1) m.c92 = Constraint(expr= m.b74 + m.b80 <= 1) m.c93 = Constraint(expr= m.b74 + m.b81 <= 1) m.c94 = Constraint(expr= m.b75 + m.b82 <= 1) m.c95 = Constraint(expr= m.b77 + m.b82 <= 1) m.c96 = Constraint(expr= m.b79 + m.b85 <= 1) m.c97 = Constraint(expr= m.b81 + m.b85 <= 1) m.c98 = Constraint(expr= m.b82 + m.b83 <= 1) m.c99 = Constraint(expr= m.b84 + m.b85 <= 1) m.c100 = Constraint(expr= m.b72 + m.b73 + m.b74 <= 1) m.c101 = Constraint(expr= m.b76 + m.b83 + m.b84 <= 1) m.c102 = Constraint(expr= m.b78 + m.b83 + m.b84 <= 1) m.c103 = Constraint(expr= m.b80 + m.b83 + m.b84 <= 1) m.c104 = Constraint(expr= m.b86 + m.b89 <= 1) m.c105 = Constraint(expr= m.b86 + m.b90 <= 1) m.c106 = Constraint(expr= m.b87 + m.b91 <= 1) m.c107 = Constraint(expr= m.b87 + m.b92 <= 1) m.c108 = Constraint(expr= m.b87 + m.b93 <= 1) m.c109 = Constraint(expr= m.b88 + m.b94 <= 1) m.c110 = Constraint(expr= m.b88 + m.b95 <= 1) m.c111 = Constraint(expr= m.b89 + m.b96 <= 1) m.c112 = Constraint(expr= m.b91 + m.b96 <= 1) m.c113 = Constraint(expr= m.b93 + m.b99 <= 1) m.c114 = Constraint(expr= m.b95 + m.b99 <= 1) m.c115 = Constraint(expr= m.b96 + m.b97 <= 1) m.c116 = Constraint(expr= m.b98 + m.b99 <= 1) m.c117 = Constraint(expr= m.b86 + m.b87 + m.b88 <= 1) m.c118 = Constraint(expr= m.b90 + m.b97 + m.b98 <= 1) m.c119 = Constraint(expr= m.b92 + m.b97 + m.b98 <= 1) m.c120 = Constraint(expr= m.b94 + m.b97 + m.b98 <= 1) m.c121 = Constraint(expr= m.b100 + m.b103 <= 1) m.c122 = Constraint(expr= m.b100 + m.b104 <= 1) m.c123 = Constraint(expr= m.b101 + m.b105 <= 1) m.c124 = Constraint(expr= m.b101 + m.b106 <= 1) m.c125 = Constraint(expr= m.b101 + m.b107 <= 1) m.c126 = Constraint(expr= m.b102 + m.b108 <= 1) m.c127 = Constraint(expr= m.b102 + m.b109 <= 1) m.c128 = Constraint(expr= m.b103 + m.b110 <= 1) m.c129 = Constraint(expr= m.b105 + m.b110 <= 1) m.c130 = Constraint(expr= m.b107 + m.b113 <= 1) m.c131 = Constraint(expr= m.b109 + m.b113 <= 1) m.c132 = Constraint(expr= m.b110 + m.b111 <= 1) m.c133 = Constraint(expr= m.b112 + m.b113 <= 1) m.c134 = Constraint(expr= m.b100 + m.b101 + m.b102 <= 1) m.c135 = Constraint(expr= m.b104 + m.b111 + m.b112 <= 1) m.c136 = Constraint(expr= m.b106 + m.b111 + m.b112 <= 1) m.c137 = Constraint(expr= m.b108 + m.b111 + m.b112 <= 1) m.c138 = Constraint(expr= m.b2 + m.b16 + m.b30 + m.b44 + m.b58 + m.b72 + m.b86 + m.b100 >= 1) m.c139 = Constraint(expr= m.b3 + m.b17 + m.b31 + m.b45 + m.b59 + m.b73 + m.b87 + m.b101 >= 1) m.c140 = Constraint(expr= m.b4 + m.b18 + m.b32 + m.b46 + m.b60 + m.b74 + m.b88 + m.b102 >= 1) m.c141 = Constraint(expr= m.b12 + m.b26 + m.b40 + m.b54 + m.b68 + m.b82 + m.b96 + m.b110 >= 1) m.c142 = Constraint(expr= m.b13 + m.b27 + m.b41 + m.b55 + m.b69 + m.b83 + m.b97 + m.b111 >= 1) m.c143 = Constraint(expr= m.b14 + m.b28 + m.b42 + m.b56 + m.b70 + m.b84 + m.b98 + m.b112 >= 1) m.c144 = Constraint(expr= m.b15 + m.b29 + m.b43 + m.b57 + m.b71 + m.b85 + m.b99 + m.b113 >= 1) m.c145 = Constraint(expr= m.b12 + m.b13 + m.b14 + m.b15 + m.b26 + m.b27 + m.b28 + m.b29 + m.b40 + m.b41 + m.b42 + m.b43 + m.b54 + m.b55 + m.b56 + m.b57 + m.b68 + m.b69 + m.b70 + m.b71 + m.b82 + m.b83 + m.b84 + m.b85 + m.b96 + m.b97 + m.b98 + m.b99 + m.b110 + m.b111 + m.b112 + m.b113 >= 5) m.c146 = Constraint(expr= m.b2 + m.b16 + m.b30 + m.b44 + m.b58 + m.b72 + m.b86 + m.b100 <= 1) m.c147 = Constraint(expr= m.b3 + m.b17 + m.b31 + m.b45 + m.b59 + m.b73 + m.b87 + m.b101 <= 1) m.c148 = Constraint(expr= m.b4 + m.b18 + m.b32 + m.b46 + m.b60 + m.b74 + m.b88 + m.b102 <= 1) m.c149 = Constraint(expr= m.b12 + m.b26 + m.b40 + m.b54 + m.b68 + m.b82 + m.b96 + m.b110 <= 2) m.c150 = Constraint(expr= m.b13 + m.b27 + m.b41 + m.b55 + m.b69 + m.b83 + m.b97 + m.b111 <= 1) m.c151 = Constraint(expr= m.b14 + m.b28 + m.b42 + m.b56 + m.b70 + m.b84 + m.b98 + m.b112 <= 1) m.c152 = Constraint(expr= m.b15 + m.b29 + m.b43 + m.b57 + m.b71 + m.b85 + m.b99 + m.b113 <= 2) m.c153 = Constraint(expr= m.b12 + m.b13 + m.b14 + m.b15 + m.b26 + m.b27 + m.b28 + m.b29 + m.b40 + m.b41 + m.b42 + m.b43 + m.b54 + m.b55 + m.b56 + m.b57 + m.b68 + m.b69 + m.b70 + m.b71 + m.b82 + m.b83 + m.b84 + m.b85 + m.b96 + m.b97 + m.b98 + m.b99 + m.b110 + m.b111 + m.b112 + m.b113 <= 5) m.c154 = Constraint(expr= m.b12 + m.b13 >= 1) m.c155 = Constraint(expr= m.b14 + m.b15 >= 1) m.c156 = Constraint(expr= m.b12 + m.b13 <= 1) m.c157 = Constraint(expr= m.b14 + m.b15 <= 1) m.c158 = Constraint(expr= - m.x115 - m.x129 - m.x143 - m.x157 - m.x171 - m.x185 - m.x199 - m.x213 + m.x338 + m.x352 + m.x366 + m.x380 + m.x394 + m.x408 + m.x422 + m.x436 <= 0) m.c159 = Constraint(expr= - m.x116 - m.x130 - m.x144 - m.x158 - m.x172 - m.x186 - m.x200 - m.x214 + m.x339 + m.x353 + m.x367 + m.x381 + m.x395 + m.x409 + m.x423 + m.x437 <= 0) m.c160 = Constraint(expr= - m.b3 >= 0) m.c161 = Constraint(expr= - m.b4 >= 0) m.c162 = Constraint(expr= m.b2 - m.b3 - m.b17 >= 0) m.c163 = Constraint(expr= m.b3 - m.b4 - m.b18 >= 0) m.c164 = Constraint(expr= m.b2 - m.b3 + m.b16 - m.b17 - m.b31 >= 0) m.c165 = Constraint(expr= m.b3 - m.b4 + m.b17 - m.b18 - m.b32 >= 0) m.c166 = Constraint(expr= m.b2 - m.b3 + m.b16 - m.b17 + m.b30 - m.b31 - m.b45 >= 0) m.c167 = Constraint(expr= m.b3 - m.b4 + m.b17 - m.b18 + m.b31 - m.b32 - m.b46 >= 0) m.c168 = Constraint(expr= m.b2 - m.b3 + m.b16 - m.b17 + m.b30 - m.b31 + m.b44 - m.b45 - m.b59 >= 0) m.c169 = Constraint(expr= m.b3 - m.b4 + m.b17 - m.b18 + m.b31 - m.b32 + m.b45 - m.b46 - m.b60 >= 0) m.c170 = Constraint(expr= m.b2 - m.b3 + m.b16 - m.b17 + m.b30 - m.b31 + m.b44 - m.b45 + m.b58 - m.b59 - m.b73 >= 0) m.c171 = Constraint(expr= m.b3 - m.b4 + m.b17 - m.b18 + m.b31 - m.b32 + m.b45 - m.b46 + m.b59 - m.b60 - m.b74 >= 0) m.c172 = Constraint(expr= m.b2 - m.b3 + m.b16 - m.b17 + m.b30 - m.b31 + m.b44 - m.b45 + m.b58 - m.b59 + m.b72 - m.b73 - m.b87 >= 0) m.c173 = Constraint(expr= m.b3 - m.b4 + m.b17 - m.b18 + m.b31 - m.b32 + m.b45 - m.b46 + m.b59 - m.b60 + m.b73 - m.b74 - m.b88 >= 0) m.c174 = Constraint(expr= m.b2 - m.b3 + m.b16 - m.b17 + m.b30 - m.b31 + m.b44 - m.b45 + m.b58 - m.b59 + m.b72 - m.b73 + m.b86 - m.b87 - m.b101 >= 0) m.c175 = Constraint(expr= m.b3 - m.b4 + m.b17 - m.b18 + m.b31 - m.b32 + m.b45 - m.b46 + m.b59 - m.b60 + m.b73 - m.b74 + m.b87 - m.b88 - m.b102 >= 0) m.c176 = Constraint(expr= - m.x114 - m.x226 + m.x338 == 0) m.c177 = Constraint(expr= - m.x115 - m.x227 + m.x339 == 0) m.c178 = Constraint(expr= - m.x116 - m.x228 + m.x340 == 0) m.c179 = Constraint(expr= - m.x117 - m.x229 + m.x341 == 0) m.c180 = Constraint(expr= - m.x118 - m.x230 + m.x342 == 0) m.c181 = Constraint(expr= - m.x119 - m.x231 + m.x343 == 0) m.c182 = Constraint(expr= - m.x120 - m.x232 + m.x344 == 0) m.c183 = Constraint(expr= - m.x121 - m.x233 + m.x345 == 0) m.c184 = Constraint(expr= - m.x122 - m.x234 + m.x346 == 0) m.c185 = Constraint(expr= - m.x123 - m.x235 + m.x347 == 0) m.c186 = Constraint(expr= - m.x124 - m.x236 + m.x348 == 0) m.c187 = Constraint(expr= - m.x125 - m.x237 + m.x349 == 0) m.c188 = Constraint(expr= - m.x126 - m.x238 + m.x350 == 0) m.c189 = Constraint(expr= - m.x127 - m.x239 + m.x351 == 0) m.c190 = Constraint(expr= - m.x128 - m.x240 + m.x352 == 0) m.c191 = Constraint(expr= - m.x129 - m.x241 + m.x353 == 0) m.c192 = Constraint(expr= - m.x130 - m.x242 + m.x354 == 0) m.c193 = Constraint(expr= - m.x131 - m.x243 + m.x355 == 0) m.c194 = Constraint(expr= - m.x132 - m.x244 + m.x356 == 0) m.c195 = Constraint(expr= - m.x133 - m.x245 + m.x357 == 0) m.c196 = Constraint(expr= - m.x134 - m.x246 + m.x358 == 0) m.c197 = Constraint(expr= - m.x135 - m.x247 + m.x359 == 0) m.c198 = Constraint(expr= - m.x136 - m.x248 + m.x360 == 0) m.c199 = Constraint(expr= - m.x137 - m.x249 + m.x361 == 0) m.c200 = Constraint(expr= - m.x138 - m.x250 + m.x362 == 0) m.c201 = Constraint(expr= - m.x139 - m.x251 + m.x363 == 0) m.c202 = Constraint(expr= - m.x140 - m.x252 + m.x364 == 0) m.c203 = Constraint(expr= - m.x141 - m.x253 + m.x365 == 0) m.c204 = Constraint(expr= - m.x142 - m.x254 + m.x366 == 0) m.c205 = Constraint(expr= - m.x143 - m.x255 + m.x367 == 0) m.c206 = Constraint(expr= - m.x144 - m.x256 + m.x368 == 0) m.c207 = Constraint(expr= - m.x145 - m.x257 + m.x369 == 0) m.c208 = Constraint(expr= - m.x146 - m.x258 + m.x370 == 0) m.c209 = Constraint(expr= - m.x147 - m.x259 + m.x371 == 0) m.c210 = Constraint(expr= - m.x148 - m.x260 + m.x372 == 0) m.c211 = Constraint(expr= - m.x149 - m.x261 + m.x373 == 0) m.c212 = Constraint(expr= - m.x150 - m.x262 + m.x374 == 0) m.c213 = Constraint(expr= - m.x151 - m.x263 + m.x375 == 0) m.c214 = Constraint(expr= - m.x152 - m.x264 + m.x376 == 0) m.c215 = Constraint(expr= - m.x153 - m.x265 + m.x377 == 0) m.c216 = Constraint(expr= - m.x154 - m.x266 + m.x378 == 0) m.c217 = Constraint(expr= - m.x155 - m.x267 + m.x379 == 0) m.c218 = Constraint(expr= - m.x156 - m.x268 + m.x380 == 0) m.c219 = Constraint(expr= - m.x157 - m.x269 + m.x381 == 0) m.c220 = Constraint(expr= - m.x158 - m.x270 + m.x382 == 0) m.c221 = Constraint(expr= - m.x159 - m.x271 + m.x383 == 0) m.c222 = Constraint(expr= - m.x160 - m.x272 + m.x384 == 0) m.c223 = Constraint(expr= - m.x161 - m.x273 + m.x385 == 0) m.c224 = Constraint(expr= - m.x162 - m.x274 + m.x386 == 0) m.c225 = Constraint(expr= - m.x163 - m.x275 + m.x387 == 0) m.c226 = Constraint(expr= - m.x164 - m.x276 + m.x388 == 0) m.c227 = Constraint(expr= - m.x165 - m.x277 + m.x389 == 0) m.c228 = Constraint(expr= - m.x166 - m.x278 + m.x390 == 0) m.c229 = Constraint(expr= - m.x167 - m.x279 + m.x391 == 0) m.c230 = Constraint(expr= - m.x168 - m.x280 + m.x392 == 0) m.c231 = Constraint(expr= - m.x169 - m.x281 + m.x393 == 0) m.c232 = Constraint(expr= - m.x170 - m.x282 + m.x394 == 0) m.c233 = Constraint(expr= - m.x171 - m.x283 + m.x395 == 0) m.c234 = Constraint(expr= - m.x172 - m.x284 + m.x396 == 0) m.c235 = Constraint(expr= - m.x173 - m.x285 + m.x397 == 0) m.c236 = Constraint(expr= - m.x174 - m.x286 + m.x398 == 0) m.c237 = Constraint(expr= - m.x175 - m.x287 + m.x399 == 0) m.c238 = Constraint(expr= - m.x176 - m.x288 + m.x400 == 0) m.c239 = Constraint(expr= - m.x177 - m.x289 + m.x401 == 0) m.c240 = Constraint(expr= - m.x178 - m.x290 + m.x402 == 0) m.c241 = Constraint(expr= - m.x179 - m.x291 + m.x403 == 0) m.c242 = Constraint(expr= - m.x180 - m.x292 + m.x404 == 0) m.c243 = Constraint(expr= - m.x181 - m.x293 + m.x405 == 0) m.c244 = Constraint(expr= - m.x182 - m.x294 + m.x406 == 0) m.c245 = Constraint(expr= - m.x183 - m.x295 + m.x407 == 0) m.c246 = Constraint(expr= - m.x184 - m.x296 + m.x408 == 0) m.c247 = Constraint(expr= - m.x185 - m.x297 + m.x409 == 0) m.c248 = Constraint(expr= - m.x186 - m.x298 + m.x410 == 0) m.c249 = Constraint(expr= - m.x187 - m.x299 + m.x411 == 0) m.c250 = Constraint(expr= - m.x188 - m.x300 + m.x412 == 0) m.c251 = Constraint(expr= - m.x189 - m.x301 + m.x413 == 0) m.c252 = Constraint(expr= - m.x190 - m.x302 + m.x414 == 0) m.c253 = Constraint(expr= - m.x191 - m.x303 + m.x415 == 0) m.c254 = Constraint(expr= - m.x192 - m.x304 + m.x416 == 0) m.c255 = Constraint(expr= - m.x193 - m.x305 + m.x417 == 0) m.c256 = Constraint(expr= - m.x194 - m.x306 + m.x418 == 0) m.c257 = Constraint(expr= - m.x195 - m.x307 + m.x419 == 0) m.c258 = Constraint(expr= - m.x196 - m.x308 + m.x420 == 0) m.c259 = Constraint(expr= - m.x197 - m.x309 + m.x421 == 0) m.c260 = Constraint(expr= - m.x198 - m.x310 + m.x422 == 0) m.c261 = Constraint(expr= - m.x199 - m.x311 + m.x423 == 0) m.c262 = Constraint(expr= - m.x200 - m.x312 + m.x424 == 0) m.c263 = Constraint(expr= - m.x201 - m.x313 + m.x425 == 0) m.c264 = Constraint(expr= - m.x202 - m.x314 + m.x426 == 0) m.c265 = Constraint(expr= - m.x203 - m.x315 + m.x427 == 0) m.c266 = Constraint(expr= - m.x204 - m.x316 + m.x428 == 0) m.c267 = Constraint(expr= - m.x205 - m.x317 + m.x429 == 0) m.c268 = Constraint(expr= - m.x206 - m.x318 + m.x430 == 0) m.c269 = Constraint(expr= - m.x207 - m.x319 + m.x431 == 0) m.c270 = Constraint(expr= - m.x208 - m.x320 + m.x432 == 0) m.c271 = Constraint(expr= - m.x209 - m.x321 + m.x433 == 0) m.c272 = Constraint(expr= - m.x210 - m.x322 + m.x434 == 0) m.c273 = Constraint(expr= - m.x211 - m.x323 + m.x435 == 0) m.c274 = Constraint(expr= - m.x212 - m.x324 + m.x436 == 0) m.c275 = Constraint(expr= - m.x213 - m.x325 + m.x437 == 0) m.c276 = Constraint(expr= - m.x214 - m.x326 + m.x438 == 0) m.c277 = Constraint(expr= - m.x215 - m.x327 + m.x439 == 0) m.c278 = Constraint(expr= - m.x216 - m.x328 + m.x440 == 0) m.c279 = Constraint(expr= - m.x217 - m.x329 + m.x441 == 0) m.c280 = Constraint(expr= - m.x218 - m.x330 + m.x442 == 0) m.c281 = Constraint(expr= - m.x219 - m.x331 + m.x443 == 0) m.c282 = Constraint(expr= - m.x220 - m.x332 + m.x444 == 0) m.c283 = Constraint(expr= - m.x221 - m.x333 + m.x445 == 0) m.c284 = Constraint(expr= - m.x222 - m.x334 + m.x446 == 0) m.c285 = Constraint(expr= - m.x223 - m.x335 + m.x447 == 0) m.c286 = Constraint(expr= - m.x224 - m.x336 + m.x448 == 0) m.c287 = Constraint(expr= - m.x225 - m.x337 + m.x449 == 0) m.c288 = Constraint(expr= m.x114 >= 0) m.c289 = Constraint(expr= - 3*m.b3 + m.x115 >= 0) m.c290 = Constraint(expr= - 6*m.b4 + m.x116 >= 0) m.c291 = Constraint(expr= m.x117 >= 0) m.c292 = Constraint(expr= m.x118 >= 0) m.c293 = Constraint(expr= m.x119 >= 0) m.c294 = Constraint(expr= m.x120 >= 0) m.c295 = Constraint(expr= m.x121 >= 0) m.c296 = Constraint(expr= m.x122 >= 0) m.c297 = Constraint(expr= m.x123 >= 0) m.c298 = Constraint(expr= m.x124 >= 0) m.c299 = Constraint(expr= m.x125 >= 0) m.c300 = Constraint(expr= m.x126 >= 0) m.c301 = Constraint(expr= m.x127 >= 0) m.c302 = Constraint(expr= m.x128 >= 0) m.c303 = Constraint(expr= - 3*m.b17 + m.x129 >= 0) m.c304 = Constraint(expr= - 6*m.b18 + m.x130 >= 0) m.c305 = Constraint(expr= m.x131 >= 0) m.c306 = Constraint(expr= m.x132 >= 0) m.c307 = Constraint(expr= m.x133 >= 0) m.c308 = Constraint(expr= m.x134 >= 0) m.c309 = Constraint(expr= m.x135 >= 0) m.c310 = Constraint(expr= m.x136 >= 0) m.c311 = Constraint(expr= m.x137 >= 0) m.c312 = Constraint(expr= m.x138 >= 0) m.c313 = Constraint(expr= m.x139 >= 0) m.c314 = Constraint(expr= m.x140 >= 0) m.c315 = Constraint(expr= m.x141 >= 0) m.c316 = Constraint(expr= m.x142 >= 0) m.c317 = Constraint(expr= - 3*m.b31 + m.x143 >= 0) m.c318 = Constraint(expr= - 6*m.b32 + m.x144 >= 0) m.c319 = Constraint(expr= m.x145 >= 0) m.c320 = Constraint(expr= m.x146 >= 0) m.c321 = Constraint(expr= m.x147 >= 0) m.c322 = Constraint(expr= m.x148 >= 0) m.c323 = Constraint(expr= m.x149 >= 0) m.c324 = Constraint(expr= m.x150 >= 0) m.c325 = Constraint(expr= m.x151 >= 0) m.c326 = Constraint(expr= m.x152 >= 0) m.c327 = Constraint(expr= m.x153 >= 0) m.c328 = Constraint(expr= m.x154 >= 0) m.c329 = Constraint(expr= m.x155 >= 0) m.c330 = Constraint(expr= m.x156 >= 0) m.c331 = Constraint(expr= - 3*m.b45 + m.x157 >= 0) m.c332 = Constraint(expr= - 6*m.b46 + m.x158 >= 0) m.c333 = Constraint(expr= m.x159 >= 0) m.c334 = Constraint(expr= m.x160 >= 0) m.c335 = Constraint(expr= m.x161 >= 0) m.c336 = Constraint(expr= m.x162 >= 0) m.c337 = Constraint(expr= m.x163 >= 0) m.c338 = Constraint(expr= m.x164 >= 0) m.c339 = Constraint(expr= m.x165 >= 0) m.c340 = Constraint(expr= m.x166 >= 0) m.c341 = Constraint(expr= m.x167 >= 0) m.c342 = Constraint(expr= m.x168 >= 0) m.c343 = Constraint(expr= m.x169 >= 0) m.c344 = Constraint(expr= m.x170 >= 0) m.c345 = Constraint(expr= - 3*m.b59 + m.x171 >= 0) m.c346 = Constraint(expr= - 6*m.b60 + m.x172 >= 0) m.c347 = Constraint(expr= m.x173 >= 0) m.c348 = Constraint(expr= m.x174 >= 0) m.c349 = Constraint(expr= m.x175 >= 0) m.c350 = Constraint(expr= m.x176 >= 0) m.c351 = Constraint(expr= m.x177 >= 0) m.c352 = Constraint(expr= m.x178 >= 0) m.c353 = Constraint(expr= m.x179 >= 0) m.c354 = Constraint(expr= m.x180 >= 0) m.c355 = Constraint(expr= m.x181 >= 0) m.c356 = Constraint(expr= m.x182 >= 0) m.c357 = Constraint(expr= m.x183 >= 0) m.c358 = Constraint(expr= m.x184 >= 0) m.c359 = Constraint(expr= - 3*m.b73 + m.x185 >= 0) m.c360 = Constraint(expr= - 6*m.b74 + m.x186 >= 0) m.c361 = Constraint(expr= m.x187 >= 0) m.c362 = Constraint(expr= m.x188 >= 0) m.c363 = Constraint(expr= m.x189 >= 0) m.c364 = Constraint(expr= m.x190 >= 0) m.c365 = Constraint(expr= m.x191 >= 0) m.c366 = Constraint(expr= m.x192 >= 0) m.c367 = Constraint(expr= m.x193 >= 0) m.c368 = Constraint(expr= m.x194 >= 0) m.c369 = Constraint(expr= m.x195 >= 0) m.c370 = Constraint(expr= m.x196 >= 0) m.c371 = Constraint(expr= m.x197 >= 0) m.c372 = Constraint(expr= m.x198 >= 0) m.c373 = Constraint(expr= - 3*m.b87 + m.x199 >= 0) m.c374 = Constraint(expr= - 6*m.b88 + m.x200 >= 0) m.c375 = Constraint(expr= m.x201 >= 0) m.c376 = Constraint(expr= m.x202 >= 0) m.c377 = Constraint(expr= m.x203 >= 0) m.c378 = Constraint(expr= m.x204 >= 0) m.c379 = Constraint(expr= m.x205 >= 0) m.c380 = Constraint(expr= m.x206 >= 0) m.c381 = Constraint(expr= m.x207 >= 0) m.c382 = Constraint(expr= m.x208 >= 0) m.c383 = Constraint(expr= m.x209 >= 0) m.c384 = Constraint(expr= m.x210 >= 0) m.c385 = Constraint(expr= m.x211 >= 0) m.c386 = Constraint(expr= m.x212 >= 0) m.c387 = Constraint(expr= - 3*m.b101 + m.x213 >= 0) m.c388 = Constraint(expr= - 6*m.b102 + m.x214 >= 0) m.c389 = Constraint(expr= m.x215 >= 0) m.c390 = Constraint(expr= m.x216 >= 0) m.c391 = Constraint(expr= m.x217 >= 0) m.c392 = Constraint(expr= m.x218 >= 0) m.c393 = Constraint(expr= m.x219 >= 0) m.c394 = Constraint(expr= m.x220 >= 0) m.c395 = Constraint(expr= m.x221 >= 0) m.c396 = Constraint(expr= m.x222 >= 0) m.c397 = Constraint(expr= m.x223 >= 0) m.c398 = Constraint(expr= m.x224 >= 0) m.c399 = Constraint(expr= m.x225 >= 0) m.c400 = Constraint(expr= - 10*m.b2 + m.x338 <= 0) m.c401 = Constraint(expr= - 10*m.b3 + m.x339 <= 0) m.c402 = Constraint(expr= - 10*m.b4 + m.x340 <= 0) m.c403 = Constraint(expr= - 10*m.b5 + m.x341 <= 0) m.c404 = Constraint(expr= - 10*m.b6 + m.x342 <= 0) m.c405 = Constraint(expr= - 10*m.b7 + m.x343 <= 0) m.c406 = Constraint(expr= - 10*m.b8 + m.x344 <= 0) m.c407 = Constraint(expr= - 10*m.b9 + m.x345 <= 0) m.c408 = Constraint(expr= - 10*m.b10 + m.x346 <= 0) m.c409 = Constraint(expr= - 10*m.b11 + m.x347 <= 0) m.c410 = Constraint(expr= - 10*m.b12 + m.x348 <= 0) m.c411 = Constraint(expr= - 10*m.b13 + m.x349 <= 0) m.c412 = Constraint(expr= - 10*m.b14 + m.x350 <= 0) m.c413 = Constraint(expr= - 10*m.b15 + m.x351 <= 0) m.c414 = Constraint(expr= - 10*m.b16 + m.x352 <= 0) m.c415 = Constraint(expr= - 10*m.b17 + m.x353 <= 0) m.c416 = Constraint(expr= - 10*m.b18 + m.x354 <= 0) m.c417 = Constraint(expr= - 10*m.b19 + m.x355 <= 0) m.c418 = Constraint(expr= - 10*m.b20 + m.x356 <= 0) m.c419 = Constraint(expr= - 10*m.b21 + m.x357 <= 0) m.c420 = Constraint(expr= - 10*m.b22 + m.x358 <= 0) m.c421 = Constraint(expr= - 10*m.b23 + m.x359 <= 0) m.c422 = Constraint(expr= - 10*m.b24 + m.x360 <= 0) m.c423 = Constraint(expr= - 10*m.b25 + m.x361 <= 0) m.c424 = Constraint(expr= - 10*m.b26 + m.x362 <= 0) m.c425 = Constraint(expr= - 10*m.b27 + m.x363 <= 0) m.c426 = Constraint(expr= - 10*m.b28 + m.x364 <= 0) m.c427 = Constraint(expr= - 10*m.b29 + m.x365 <= 0) m.c428 = Constraint(expr= - 10*m.b30 + m.x366 <= 0) m.c429 = Constraint(expr= - 10*m.b31 + m.x367 <= 0) m.c430 = Constraint(expr= - 10*m.b32 + m.x368 <= 0) m.c431 = Constraint(expr= - 10*m.b33 + m.x369 <= 0) m.c432 = Constraint(expr= - 10*m.b34 + m.x370 <= 0) m.c433 = Constraint(expr= - 10*m.b35 + m.x371 <= 0) m.c434 = Constraint(expr= - 10*m.b36 + m.x372 <= 0) m.c435 = Constraint(expr= - 10*m.b37 + m.x373 <= 0) m.c436 = Constraint(expr= - 10*m.b38 + m.x374 <= 0) m.c437 = Constraint(expr= - 10*m.b39 + m.x375 <= 0) m.c438 = Constraint(expr= - 10*m.b40 + m.x376 <= 0) m.c439 = Constraint(expr= - 10*m.b41 + m.x377 <= 0) m.c440 = Constraint(expr= - 10*m.b42 + m.x378 <= 0) m.c441 = Constraint(expr= - 10*m.b43 + m.x379 <= 0) m.c442 = Constraint(expr= - 10*m.b44 + m.x380 <= 0) m.c443 = Constraint(expr= - 10*m.b45 + m.x381 <= 0) m.c444 = Constraint(expr= - 10*m.b46 + m.x382 <= 0) m.c445 = Constraint(expr= - 10*m.b47 + m.x383 <= 0) m.c446 = Constraint(expr= - 10*m.b48 + m.x384 <= 0) m.c447 = Constraint(expr= - 10*m.b49 + m.x385 <= 0) m.c448 = Constraint(expr= - 10*m.b50 + m.x386 <= 0) m.c449 = Constraint(expr= - 10*m.b51 + m.x387 <= 0) m.c450 = Constraint(expr= - 10*m.b52 + m.x388 <= 0) m.c451 = Constraint(expr= - 10*m.b53 + m.x389 <= 0) m.c452 = Constraint(expr= - 10*m.b54 + m.x390 <= 0) m.c453 = Constraint(expr= - 10*m.b55 + m.x391 <= 0) m.c454 = Constraint(expr= - 10*m.b56 + m.x392 <= 0) m.c455 = Constraint(expr= - 10*m.b57 + m.x393 <= 0) m.c456 = Constraint(expr= - 10*m.b58 + m.x394 <= 0) m.c457 = Constraint(expr= - 10*m.b59 + m.x395 <= 0) m.c458 = Constraint(expr= - 10*m.b60 + m.x396 <= 0) m.c459 = Constraint(expr= - 10*m.b61 + m.x397 <= 0) m.c460 = Constraint(expr= - 10*m.b62 + m.x398 <= 0) m.c461 = Constraint(expr= - 10*m.b63 + m.x399 <= 0) m.c462 = Constraint(expr= - 10*m.b64 + m.x400 <= 0) m.c463 = Constraint(expr= - 10*m.b65 + m.x401 <= 0) m.c464 = Constraint(expr= - 10*m.b66 + m.x402 <= 0) m.c465 = Constraint(expr= - 10*m.b67 + m.x403 <= 0) m.c466 = Constraint(expr= - 10*m.b68 + m.x404 <= 0) m.c467 = Constraint(expr= - 10*m.b69 + m.x405 <= 0) m.c468 = Constraint(expr= - 10*m.b70 + m.x406 <= 0) m.c469 = Constraint(expr= - 10*m.b71 + m.x407 <= 0) m.c470 = Constraint(expr= - 10*m.b72 + m.x408 <= 0) m.c471 = Constraint(expr= - 10*m.b73 + m.x409 <= 0) m.c472 = Constraint(expr= - 10*m.b74 + m.x410 <= 0) m.c473 = Constraint(expr= - 10*m.b75 + m.x411 <= 0) m.c474 = Constraint(expr= - 10*m.b76 + m.x412 <= 0) m.c475 = Constraint(expr= - 10*m.b77 + m.x413 <= 0) m.c476 = Constraint(expr= - 10*m.b78 + m.x414 <= 0) m.c477 = Constraint(expr= - 10*m.b79 + m.x415 <= 0) m.c478 = Constraint(expr= - 10*m.b80 + m.x416 <= 0) m.c479 = Constraint(expr= - 10*m.b81 + m.x417 <= 0) m.c480 = Constraint(expr= - 10*m.b82 + m.x418 <= 0) m.c481 = Constraint(expr= - 10*m.b83 + m.x419 <= 0) m.c482 = Constraint(expr= - 10*m.b84 + m.x420 <= 0) m.c483 = Constraint(expr= - 10*m.b85 + m.x421 <= 0) m.c484 = Constraint(expr= - 10*m.b86 + m.x422 <= 0) m.c485 = Constraint(expr= - 10*m.b87 + m.x423 <= 0) m.c486 = Constraint(expr= - 10*m.b88 + m.x424 <= 0) m.c487 = Constraint(expr= - 10*m.b89 + m.x425 <= 0) m.c488 = Constraint(expr= - 10*m.b90 + m.x426 <= 0) m.c489 = Constraint(expr= - 10*m.b91 + m.x427 <= 0) m.c490 = Constraint(expr= - 10*m.b92 + m.x428 <= 0) m.c491 = Constraint(expr= - 10*m.b93 + m.x429 <= 0) m.c492 = Constraint(expr= - 10*m.b94 + m.x430 <= 0) m.c493 = Constraint(expr= - 10*m.b95 + m.x431 <= 0) m.c494 = Constraint(expr= - 10*m.b96 + m.x432 <= 0) m.c495 = Constraint(expr= - 10*m.b97 + m.x433 <= 0) m.c496 = Constraint(expr= - 10*m.b98 + m.x434 <= 0) m.c497 = Constraint(expr= - 10*m.b99 + m.x435 <= 0) m.c498 = Constraint(expr= - 10*m.b100 + m.x436 <= 0) m.c499 = Constraint(expr= - 10*m.b101 + m.x437 <= 0) m.c500 = Constraint(expr= - 10*m.b102 + m.x438 <= 0) m.c501 = Constraint(expr= - 10*m.b103 + m.x439 <= 0) m.c502 = Constraint(expr= - 10*m.b104 + m.x440 <= 0) m.c503 = Constraint(expr= - 10*m.b105 + m.x441 <= 0) m.c504 = Constraint(expr= - 10*m.b106 + m.x442 <= 0) m.c505 = Constraint(expr= - 10*m.b107 + m.x443 <= 0) m.c506 = Constraint(expr= - 10*m.b108 + m.x444 <= 0) m.c507 = Constraint(expr= - 10*m.b109 + m.x445 <= 0) m.c508 = Constraint(expr= - 10*m.b110 + m.x446 <= 0) m.c509 = Constraint(expr= - 10*m.b111 + m.x447 <= 0) m.c510 = Constraint(expr= - 10*m.b112 + m.x448 <= 0) m.c511 = Constraint(expr= - 10*m.b113 + m.x449 <= 0) m.c512 = Constraint(expr= - 100*m.b2 + m.x450 >= 0) m.c513 = Constraint(expr= - 100*m.b3 + m.x451 >= 0) m.c514 = Constraint(expr= - 100*m.b4 + m.x452 >= 0) m.c515 = Constraint(expr= - 100*m.b16 + m.x464 >= 0) m.c516 = Constraint(expr= - 100*m.b17 + m.x465 >= 0) m.c517 = Constraint(expr= - 100*m.b18 + m.x466 >= 0) m.c518 = Constraint(expr= - 100*m.b30 + m.x478 >= 0) m.c519 = Constraint(expr= - 100*m.b31 + m.x479 >= 0) m.c520 = Constraint(expr= - 100*m.b32 + m.x480 >= 0) m.c521 = Constraint(expr= - 100*m.b44 + m.x492 >= 0) m.c522 = Constraint(expr= - 100*m.b45 + m.x493 >= 0) m.c523 = Constraint(expr= - 100*m.b46 + m.x494 >= 0) m.c524 = Constraint(expr= - 100*m.b58 + m.x506 >= 0) m.c525 = Constraint(expr= - 100*m.b59 + m.x507 >= 0) m.c526 = Constraint(expr= - 100*m.b60 + m.x508 >= 0) m.c527 = Constraint(expr= - 100*m.b72 + m.x520 >= 0) m.c528 = Constraint(expr= - 100*m.b73 + m.x521 >= 0) m.c529 = Constraint(expr= - 100*m.b74 + m.x522 >= 0) m.c530 = Constraint(expr= - 100*m.b86 + m.x534 >= 0) m.c531 = Constraint(expr= - 100*m.b87 + m.x535 >= 0) m.c532 = Constraint(expr= - 100*m.b88 + m.x536 >= 0) m.c533 = Constraint(expr= - 100*m.b100 + m.x548 >= 0) m.c534 = Constraint(expr= - 100*m.b101 + m.x549 >= 0) m.c535 = Constraint(expr= - 100*m.b102 + m.x550 >= 0) m.c536 = Constraint(expr= - 100*m.b2 + m.x450 <= 0) m.c537 = Constraint(expr= - 100*m.b3 + m.x451 <= 0) m.c538 = Constraint(expr= - 100*m.b4 + m.x452 <= 0) m.c539 = Constraint(expr= - 100*m.b5 + m.x453 <= 0) m.c540 = Constraint(expr= - 100*m.b6 + m.x454 <= 0) m.c541 = Constraint(expr= - 100*m.b7 + m.x455 <= 0) m.c542 = Constraint(expr= - 100*m.b8 + m.x456 <= 0) m.c543 = Constraint(expr= - 100*m.b9 + m.x457 <= 0) m.c544 = Constraint(expr= - 100*m.b10 + m.x458 <= 0) m.c545 = Constraint(expr= - 100*m.b11 + m.x459 <= 0) m.c546 = Constraint(expr= - 100*m.b12 + m.x460 <= 0) m.c547 = Constraint(expr= - 100*m.b13 + m.x461 <= 0) m.c548 = Constraint(expr= - 100*m.b14 + m.x462 <= 0) m.c549 = Constraint(expr= - 100*m.b15 + m.x463 <= 0) m.c550 = Constraint(expr= - 100*m.b16 + m.x464 <= 0) m.c551 = Constraint(expr= - 100*m.b17 + m.x465 <= 0) m.c552 = Constraint(expr= - 100*m.b18 + m.x466 <= 0) m.c553 = Constraint(expr= - 100*m.b19 + m.x467 <= 0) m.c554 = Constraint(expr= - 100*m.b20 + m.x468 <= 0) m.c555 = Constraint(expr= - 100*m.b21 + m.x469 <= 0) m.c556 = Constraint(expr= - 100*m.b22 + m.x470 <= 0) m.c557 = Constraint(expr= - 100*m.b23 + m.x471 <= 0) m.c558 = Constraint(expr= - 100*m.b24 + m.x472 <= 0) m.c559 = Constraint(expr= - 100*m.b25 + m.x473 <= 0) m.c560 = Constraint(expr= - 100*m.b26 + m.x474 <= 0) m.c561 = Constraint(expr= - 100*m.b27 + m.x475 <= 0) m.c562 = Constraint(expr= - 100*m.b28 + m.x476 <= 0) m.c563 = Constraint(expr= - 100*m.b29 + m.x477 <= 0) m.c564 = Constraint(expr= - 100*m.b30 + m.x478 <= 0) m.c565 = Constraint(expr= - 100*m.b31 + m.x479 <= 0) m.c566 = Constraint(expr= - 100*m.b32 + m.x480 <= 0) m.c567 = Constraint(expr= - 100*m.b33 + m.x481 <= 0) m.c568 = Constraint(expr= - 100*m.b34 + m.x482 <= 0) m.c569 = Constraint(expr= - 100*m.b35 + m.x483 <= 0) m.c570 = Constraint(expr= - 100*m.b36 + m.x484 <= 0) m.c571 = Constraint(expr= - 100*m.b37 + m.x485 <= 0) m.c572 = Constraint(expr= - 100*m.b38 + m.x486 <= 0) m.c573 = Constraint(expr= - 100*m.b39 + m.x487 <= 0) m.c574 = Constraint(expr= - 100*m.b40 + m.x488 <= 0) m.c575 = Constraint(expr= - 100*m.b41 + m.x489 <= 0) m.c576 = Constraint(expr= - 100*m.b42 + m.x490 <= 0) m.c577 = Constraint(expr= - 100*m.b43 + m.x491 <= 0) m.c578 = Constraint(expr= - 100*m.b44 + m.x492 <= 0) m.c579 = Constraint(expr= - 100*m.b45 + m.x493 <= 0) m.c580 = Constraint(expr= - 100*m.b46 + m.x494 <= 0) m.c581 = Constraint(expr= - 100*m.b47 + m.x495 <= 0) m.c582 = Constraint(expr= - 100*m.b48 + m.x496 <= 0) m.c583 = Constraint(expr= - 100*m.b49 + m.x497 <= 0) m.c584 = Constraint(expr= - 100*m.b50 + m.x498 <= 0) m.c585 = Constraint(expr= - 100*m.b51 + m.x499 <= 0) m.c586 = Constraint(expr= - 100*m.b52 + m.x500 <= 0) m.c587 = Constraint(expr= - 100*m.b53 + m.x501 <= 0) m.c588 = Constraint(expr= - 100*m.b54 + m.x502 <= 0) m.c589 = Constraint(expr= - 100*m.b55 + m.x503 <= 0) m.c590 = Constraint(expr= - 100*m.b56 + m.x504 <= 0) m.c591 = Constraint(expr= - 100*m.b57 + m.x505 <= 0) m.c592 = Constraint(expr= - 100*m.b58 + m.x506 <= 0) m.c593 = Constraint(expr= - 100*m.b59 + m.x507 <= 0) m.c594 = Constraint(expr= - 100*m.b60 + m.x508 <= 0) m.c595 = Constraint(expr= - 100*m.b61 + m.x509 <= 0) m.c596 = Constraint(expr= - 100*m.b62 + m.x510 <= 0) m.c597 = Constraint(expr= - 100*m.b63 + m.x511 <= 0) m.c598 = Constraint(expr= - 100*m.b64 + m.x512 <= 0) m.c599 = Constraint(expr= - 100*m.b65 + m.x513 <= 0) m.c600 = Constraint(expr= - 100*m.b66 + m.x514 <= 0) m.c601 = Constraint(expr= - 100*m.b67 + m.x515 <= 0) m.c602 = Constraint(expr= - 100*m.b68 + m.x516 <= 0) m.c603 = Constraint(expr= - 100*m.b69 + m.x517 <= 0) m.c604 = Constraint(expr= - 100*m.b70 + m.x518 <= 0) m.c605 = Constraint(expr= - 100*m.b71 + m.x519 <= 0) m.c606 = Constraint(expr= - 100*m.b72 + m.x520 <= 0) m.c607 = Constraint(expr= - 100*m.b73 + m.x521 <= 0) m.c608 = Constraint(expr= - 100*m.b74 + m.x522 <= 0) m.c609 = Constraint(expr= - 100*m.b75 + m.x523 <= 0) m.c610 = Constraint(expr= - 100*m.b76 + m.x524 <= 0) m.c611 = Constraint(expr= - 100*m.b77 + m.x525 <= 0) m.c612 = Constraint(expr= - 100*m.b78 + m.x526 <= 0) m.c613 = Constraint(expr= - 100*m.b79 + m.x527 <= 0) m.c614 = Constraint(expr= - 100*m.b80 + m.x528 <= 0) m.c615 = Constraint(expr= - 100*m.b81 + m.x529 <= 0) m.c616 = Constraint(expr= - 100*m.b82 + m.x530 <= 0) m.c617 = Constraint(expr= - 100*m.b83 + m.x531 <= 0) m.c618 = Constraint(expr= - 100*m.b84 + m.x532 <= 0) m.c619 = Constraint(expr= - 100*m.b85 + m.x533 <= 0) m.c620 = Constraint(expr= - 100*m.b86 + m.x534 <= 0) m.c621 = Constraint(expr= - 100*m.b87 + m.x535 <= 0) m.c622 = Constraint(expr= - 100*m.b88 + m.x536 <= 0) m.c623 = Constraint(expr= - 100*m.b89 + m.x537 <= 0) m.c624 = Constraint(expr= - 100*m.b90 + m.x538 <= 0) m.c625 = Constraint(expr= - 100*m.b91 + m.x539 <= 0) m.c626 = Constraint(expr= - 100*m.b92 + m.x540 <= 0) m.c627 = Constraint(expr= - 100*m.b93 + m.x541 <= 0) m.c628 = Constraint(expr= - 100*m.b94 + m.x542 <= 0) m.c629 = Constraint(expr= - 100*m.b95 + m.x543 <= 0) m.c630 = Constraint(expr= - 100*m.b96 + m.x544 <= 0) m.c631 = Constraint(expr= - 100*m.b97 + m.x545 <= 0) m.c632 = Constraint(expr= - 100*m.b98 + m.x546 <= 0) m.c633 = Constraint(expr= - 100*m.b99 + m.x547 <= 0) m.c634 = Constraint(expr= - 100*m.b100 + m.x548 <= 0) m.c635 = Constraint(expr= - 100*m.b101 + m.x549 <= 0) m.c636 = Constraint(expr= - 100*m.b102 + m.x550 <= 0) m.c637 = Constraint(expr= - 100*m.b103 + m.x551 <= 0) m.c638 = Constraint(expr= - 100*m.b104 + m.x552 <= 0) m.c639 = Constraint(expr= - 100*m.b105 + m.x553 <= 0) m.c640 = Constraint(expr= - 100*m.b106 + m.x554 <= 0) m.c641 = Constraint(expr= - 100*m.b107 + m.x555 <= 0) m.c642 = Constraint(expr= - 100*m.b108 + m.x556 <= 0) m.c643 = Constraint(expr= - 100*m.b109 + m.x557 <= 0) m.c644 = Constraint(expr= - 100*m.b110 + m.x558 <= 0) m.c645 = Constraint(expr= - 100*m.b111 + m.x559 <= 0) m.c646 = Constraint(expr= - 100*m.b112 + m.x560 <= 0) m.c647 = Constraint(expr= - 100*m.b113 + m.x561 <= 0) m.c648 = Constraint(expr= m.x450 - m.x562 - m.x563 - m.x564 - m.x565 - m.x566 - m.x567 == 0) m.c649 = Constraint(expr= m.x451 - m.x568 - m.x569 - m.x570 - m.x571 - m.x572 - m.x573 == 0) m.c650 = Constraint(expr= m.x452 - m.x574 - m.x575 - m.x576 - m.x577 - m.x578 - m.x579 == 0) m.c651 = Constraint(expr= m.x453 - m.x580 - m.x581 - m.x582 - m.x583 - m.x584 - m.x585 == 0) m.c652 = Constraint(expr= m.x454 - m.x586 - m.x587 - m.x588 - m.x589 - m.x590 - m.x591 == 0) m.c653 = Constraint(expr= m.x455 - m.x592 - m.x593 - m.x594 - m.x595 - m.x596 - m.x597 == 0) m.c654 = Constraint(expr= m.x456 - m.x598 - m.x599 - m.x600 - m.x601 - m.x602 - m.x603 == 0) m.c655 = Constraint(expr= m.x457 - m.x604 - m.x605 - m.x606 - m.x607 - m.x608 - m.x609 == 0) m.c656 = Constraint(expr= m.x458 - m.x610 - m.x611 - m.x612 - m.x613 - m.x614 - m.x615 == 0) m.c657 = Constraint(expr= m.x459 - m.x616 - m.x617 - m.x618 - m.x619 - m.x620 - m.x621 == 0) m.c658 = Constraint(expr= m.x460 - m.x622 - m.x623 - m.x624 - m.x625 - m.x626 - m.x627 == 0) m.c659 = Constraint(expr= m.x461 - m.x628 - m.x629 - m.x630 - m.x631 - m.x632 - m.x633 == 0) m.c660 = Constraint(expr= m.x462 - m.x634 - m.x635 - m.x636 - m.x637 - m.x638 - m.x639 == 0) m.c661 = Constraint(expr= m.x463 - m.x640 - m.x641 - m.x642 - m.x643 - m.x644 - m.x645 == 0) m.c662 = Constraint(expr= m.x464 - m.x646 - m.x647 - m.x648 - m.x649 - m.x650 - m.x651 == 0) m.c663 = Constraint(expr= m.x465 - m.x652 - m.x653 - m.x654 - m.x655 - m.x656 - m.x657 == 0) m.c664 = Constraint(expr= m.x466 - m.x658 - m.x659 - m.x660 - m.x661 - m.x662 - m.x663 == 0) m.c665 = Constraint(expr= m.x467 - m.x664 - m.x665 - m.x666 - m.x667 - m.x668 - m.x669 == 0) m.c666 = Constraint(expr= m.x468 - m.x670 - m.x671 - m.x672 - m.x673 - m.x674 - m.x675 == 0) m.c667 = Constraint(expr= m.x469 - m.x676 - m.x677 - m.x678 - m.x679 - m.x680 - m.x681 == 0) m.c668 = Constraint(expr= m.x470 - m.x682 - m.x683 - m.x684 - m.x685 - m.x686 - m.x687 == 0) m.c669 = Constraint(expr= m.x471 - m.x688 - m.x689 - m.x690 - m.x691 - m.x692 - m.x693 == 0) m.c670 = Constraint(expr= m.x472 - m.x694 - m.x695 - m.x696 - m.x697 - m.x698 - m.x699 == 0) m.c671 = Constraint(expr= m.x473 - m.x700 - m.x701 - m.x702 - m.x703 - m.x704 - m.x705 == 0) m.c672 = Constraint(expr= m.x474 - m.x706 - m.x707 - m.x708 - m.x709 - m.x710 - m.x711 == 0) m.c673 = Constraint(expr= m.x475 - m.x712 - m.x713 - m.x714 - m.x715 - m.x716 - m.x717 == 0) m.c674 = Constraint(expr= m.x476 - m.x718 - m.x719 - m.x720 - m.x721 - m.x722 - m.x723 == 0) m.c675 = Constraint(expr= m.x477 - m.x724 - m.x725 - m.x726 - m.x727 - m.x728 - m.x729 == 0) m.c676 = Constraint(expr= m.x478 - m.x730 - m.x731 - m.x732 - m.x733 - m.x734 - m.x735 == 0) m.c677 = Constraint(expr= m.x479 - m.x736 - m.x737 - m.x738 - m.x739 - m.x740 - m.x741 == 0) m.c678 = Constraint(expr= m.x480 - m.x742 - m.x743 - m.x744 - m.x745 - m.x746 - m.x747 == 0) m.c679 = Constraint(expr= m.x481 - m.x748 - m.x749 - m.x750 - m.x751 - m.x752 - m.x753 == 0) m.c680 = Constraint(expr= m.x482 - m.x754 - m.x755 - m.x756 - m.x757 - m.x758 - m.x759 == 0) m.c681 = Constraint(expr= m.x483 - m.x760 - m.x761 - m.x762 - m.x763 - m.x764 - m.x765 == 0) m.c682 = Constraint(expr= m.x484 - m.x766 - m.x767 - m.x768 - m.x769 - m.x770 - m.x771 == 0) m.c683 = Constraint(expr= m.x485 - m.x772 - m.x773 - m.x774 - m.x775 - m.x776 - m.x777 == 0) m.c684 = Constraint(expr= m.x486 - m.x778 - m.x779 - m.x780 - m.x781 - m.x782 - m.x783 == 0) m.c685 = Constraint(expr= m.x487 - m.x784 - m.x785 - m.x786 - m.x787 - m.x788 - m.x789 == 0) m.c686 = Constraint(expr= m.x488 - m.x790 - m.x791 - m.x792 - m.x793 - m.x794 - m.x795 == 0) m.c687 = Constraint(expr= m.x489 - m.x796 - m.x797 - m.x798 - m.x799 - m.x800 - m.x801 == 0) m.c688 = Constraint(expr= m.x490 - m.x802 - m.x803 - m.x804 - m.x805 - m.x806 - m.x807 == 0) m.c689 = Constraint(expr= m.x491 - m.x808 - m.x809 - m.x810 - m.x811 - m.x812 - m.x813 == 0) m.c690 = Constraint(expr= m.x492 - m.x814 - m.x815 - m.x816 - m.x817 - m.x818 - m.x819 == 0) m.c691 = Constraint(expr= m.x493 - m.x820 - m.x821 - m.x822 - m.x823 - m.x824 - m.x825 == 0) m.c692 = Constraint(expr= m.x494 - m.x826 - m.x827 - m.x828 - m.x829 - m.x830 - m.x831 == 0) m.c693 = Constraint(expr= m.x495 - m.x832 - m.x833 - m.x834 - m.x835 - m.x836 - m.x837 == 0) m.c694 = Constraint(expr= m.x496 - m.x838 - m.x839 - m.x840 - m.x841 - m.x842 - m.x843 == 0) m.c695 = Constraint(expr= m.x497 - m.x844 - m.x845 - m.x846 - m.x847 - m.x848 - m.x849 == 0) m.c696 = Constraint(expr= m.x498 - m.x850 - m.x851 - m.x852 - m.x853 - m.x854 - m.x855 == 0) m.c697 = Constraint(expr= m.x499 - m.x856 - m.x857 - m.x858 - m.x859 - m.x860 - m.x861 == 0) m.c698 = Constraint(expr= m.x500 - m.x862 - m.x863 - m.x864 - m.x865 - m.x866 - m.x867 == 0) m.c699 = Constraint(expr= m.x501 - m.x868 - m.x869 - m.x870 - m.x871 - m.x872 - m.x873 == 0) m.c700 = Constraint(expr= m.x502 - m.x874 - m.x875 - m.x876 - m.x877 - m.x878 - m.x879 == 0) m.c701 = Constraint(expr= m.x503 - m.x880 - m.x881 - m.x882 - m.x883 - m.x884 - m.x885 == 0) m.c702 = Constraint(expr= m.x504 - m.x886 - m.x887 - m.x888 - m.x889 - m.x890 - m.x891 == 0) m.c703 = Constraint(expr= m.x505 - m.x892 - m.x893 - m.x894 - m.x895 - m.x896 - m.x897 == 0) m.c704 = Constraint(expr= m.x506 - m.x898 - m.x899 - m.x900 - m.x901 - m.x902 - m.x903 == 0) m.c705 = Constraint(expr= m.x507 - m.x904 - m.x905 - m.x906 - m.x907 - m.x908 - m.x909 == 0) m.c706 = Constraint(expr= m.x508 - m.x910 - m.x911 - m.x912 - m.x913 - m.x914 - m.x915 == 0) m.c707 = Constraint(expr= m.x509 - m.x916 - m.x917 - m.x918 - m.x919 - m.x920 - m.x921 == 0) m.c708 = Constraint(expr= m.x510 - m.x922 - m.x923 - m.x924 - m.x925 - m.x926 - m.x927 == 0) m.c709 = Constraint(expr= m.x511 - m.x928 - m.x929 - m.x930 - m.x931 - m.x932 - m.x933 == 0) m.c710 = Constraint(expr= m.x512 - m.x934 - m.x935 - m.x936 - m.x937 - m.x938 - m.x939 == 0) m.c711 = Constraint(expr= m.x513 - m.x940 - m.x941 - m.x942 - m.x943 - m.x944 - m.x945 == 0) m.c712 = Constraint(expr= m.x514 - m.x946 - m.x947 - m.x948 - m.x949 - m.x950 - m.x951 == 0) m.c713 = Constraint(expr= m.x515 - m.x952 - m.x953 - m.x954 - m.x955 - m.x956 - m.x957 == 0) m.c714 = Constraint(expr= m.x516 - m.x958 - m.x959 - m.x960 - m.x961 - m.x962 - m.x963 == 0) m.c715 = Constraint(expr= m.x517 - m.x964 - m.x965 - m.x966 - m.x967 - m.x968 - m.x969 == 0) m.c716 = Constraint(expr= m.x518 - m.x970 - m.x971 - m.x972 - m.x973 - m.x974 - m.x975 == 0) m.c717 = Constraint(expr= m.x519 - m.x976 - m.x977 - m.x978 - m.x979 - m.x980 - m.x981 == 0) m.c718 = Constraint(expr= m.x520 - m.x982 - m.x983 - m.x984 - m.x985 - m.x986 - m.x987 == 0) m.c719 = Constraint(expr= m.x521 - m.x988 - m.x989 - m.x990 - m.x991 - m.x992 - m.x993 == 0) m.c720 = Constraint(expr= m.x522 - m.x994 - m.x995 - m.x996 - m.x997 - m.x998 - m.x999 == 0) m.c721 = Constraint(expr= m.x523 - m.x1000 - m.x1001 - m.x1002 - m.x1003 - m.x1004 - m.x1005 == 0) m.c722 = Constraint(expr= m.x524 - m.x1006 - m.x1007 - m.x1008 - m.x1009 - m.x1010 - m.x1011 == 0) m.c723 = Constraint(expr= m.x525 - m.x1012 - m.x1013 - m.x1014 - m.x1015 - m.x1016 - m.x1017 == 0) m.c724 = Constraint(expr= m.x526 - m.x1018 - m.x1019 - m.x1020 - m.x1021 - m.x1022 - m.x1023 == 0) m.c725 = Constraint(expr= m.x527 - m.x1024 - m.x1025 - m.x1026 - m.x1027 - m.x1028 - m.x1029 == 0) m.c726 = Constraint(expr= m.x528 - m.x1030 - m.x1031 - m.x1032 - m.x1033 - m.x1034 - m.x1035 == 0) m.c727 = Constraint(expr= m.x529 - m.x1036 - m.x1037 - m.x1038 - m.x1039 - m.x1040 - m.x1041 == 0) m.c728 = Constraint(expr= m.x530 - m.x1042 - m.x1043 - m.x1044 - m.x1045 - m.x1046 - m.x1047 == 0) m.c729 = Constraint(expr= m.x531 - m.x1048 - m.x1049 - m.x1050 - m.x1051 - m.x1052 - m.x1053 == 0) m.c730 = Constraint(expr= m.x532 - m.x1054 - m.x1055 - m.x1056 - m.x1057 - m.x1058 - m.x1059 == 0) m.c731 = Constraint(expr= m.x533 - m.x1060 - m.x1061 - m.x1062 - m.x1063 - m.x1064 - m.x1065 == 0) m.c732 = Constraint(expr= m.x534 - m.x1066 - m.x1067 - m.x1068 - m.x1069 - m.x1070 - m.x1071 == 0) m.c733 = Constraint(expr= m.x535 - m.x1072 - m.x1073 - m.x1074 - m.x1075 - m.x1076 - m.x1077 == 0) m.c734 = Constraint(expr= m.x536 - m.x1078 - m.x1079 - m.x1080 - m.x1081 - m.x1082 - m.x1083 == 0) m.c735 = Constraint(expr= m.x537 - m.x1084 - m.x1085 - m.x1086 - m.x1087 - m.x1088 - m.x1089 == 0) m.c736 = Constraint(expr= m.x538 - m.x1090 - m.x1091 - m.x1092 - m.x1093 - m.x1094 - m.x1095 == 0) m.c737 = Constraint(expr= m.x539 - m.x1096 - m.x1097 - m.x1098 - m.x1099 - m.x1100 - m.x1101 == 0) m.c738 = Constraint(expr= m.x540 - m.x1102 - m.x1103 - m.x1104 - m.x1105 - m.x1106 - m.x1107 == 0) m.c739 = Constraint(expr= m.x541 - m.x1108 - m.x1109 - m.x1110 - m.x1111 - m.x1112 - m.x1113 == 0) m.c740 = Constraint(expr= m.x542 - m.x1114 - m.x1115 - m.x1116 - m.x1117 - m.x1118 - m.x1119 == 0) m.c741 = Constraint(expr= m.x543 - m.x1120 - m.x1121 - m.x1122 - m.x1123 - m.x1124 - m.x1125 == 0) m.c742 = Constraint(expr= m.x544 - m.x1126 - m.x1127 - m.x1128 - m.x1129 - m.x1130 - m.x1131 == 0) m.c743 = Constraint(expr= m.x545 - m.x1132 - m.x1133 - m.x1134 - m.x1135 - m.x1136 - m.x1137 == 0) m.c744 = Constraint(expr= m.x546 - m.x1138 - m.x1139 - m.x1140 - m.x1141 - m.x1142 - m.x1143 == 0) m.c745 = Constraint(expr= m.x547 - m.x1144 - m.x1145 - m.x1146 - m.x1147 - m.x1148 - m.x1149 == 0) m.c746 = Constraint(expr= m.x548 - m.x1150 - m.x1151 - m.x1152 - m.x1153 - m.x1154 - m.x1155 == 0) m.c747 = Constraint(expr= m.x549 - m.x1156 - m.x1157 - m.x1158 - m.x1159 - m.x1160 - m.x1161 == 0) m.c748 = Constraint(expr= m.x550 - m.x1162 - m.x1163 - m.x1164 - m.x1165 - m.x1166 - m.x1167 == 0) m.c749 = Constraint(expr= m.x551 - m.x1168 - m.x1169 - m.x1170 - m.x1171 - m.x1172 - m.x1173 == 0) m.c750 = Constraint(expr= m.x552 - m.x1174 - m.x1175 - m.x1176 - m.x1177 - m.x1178 - m.x1179 == 0) m.c751 = Constraint(expr= m.x553 - m.x1180 - m.x1181 - m.x1182 - m.x1183 - m.x1184 - m.x1185 == 0) m.c752 = Constraint(expr= m.x554 - m.x1186 - m.x1187 - m.x1188 - m.x1189 - m.x1190 - m.x1191 == 0) m.c753 = Constraint(expr= m.x555 - m.x1192 - m.x1193 - m.x1194 - m.x1195 - m.x1196 - m.x1197 == 0) m.c754 = Constraint(expr= m.x556 - m.x1198 - m.x1199 - m.x1200 - m.x1201 - m.x1202 - m.x1203 == 0) m.c755 = Constraint(expr= m.x557 - m.x1204 - m.x1205 - m.x1206 - m.x1207 - m.x1208 - m.x1209 == 0) m.c756 = Constraint(expr= m.x558 - m.x1210 - m.x1211 - m.x1212 - m.x1213 - m.x1214 - m.x1215 == 0) m.c757 = Constraint(expr= m.x559 - m.x1216 - m.x1217 - m.x1218 - m.x1219 - m.x1220 - m.x1221 == 0) m.c758 = Constraint(expr= m.x560 - m.x1222 - m.x1223 - m.x1224 - m.x1225 - m.x1226 - m.x1227 == 0) m.c759 = Constraint(expr= m.x561 - m.x1228 - m.x1229 - m.x1230 - m.x1231 - m.x1232 - m.x1233 == 0) m.c760 = Constraint(expr= m.x1234 <= 100) m.c761 = Constraint(expr= m.x1235 <= 100) m.c762 = Constraint(expr= m.x1236 <= 100) m.c763 = Constraint(expr= m.x1237 <= 100) m.c764 = Constraint(expr= m.x1238 <= 100) m.c765 = Constraint(expr= m.x1239 <= 100) m.c766 = Constraint(expr= m.x1240 <= 100) m.c767 = Constraint(expr= m.x1241 <= 100) m.c768 = Constraint(expr= m.x1242 <= 100) m.c769 = Constraint(expr= m.x1245 <= 100) m.c770 = Constraint(expr= m.x1246 <= 100) m.c771 = Constraint(expr= m.x1247 <= 100) m.c772 = Constraint(expr= m.x1248 <= 100) m.c773 = Constraint(expr= m.x1249 <= 100) m.c774 = Constraint(expr= m.x1250 <= 100) m.c775 = Constraint(expr= m.x1251 <= 100) m.c776 = Constraint(expr= m.x1252 <= 100) m.c777 = Constraint(expr= m.x1253 <= 100) m.c778 = Constraint(expr= m.x1256 <= 100) m.c779 = Constraint(expr= m.x1257 <= 100) m.c780 = Constraint(expr= m.x1258 <= 100) m.c781 = Constraint(expr= m.x1259 <= 100) m.c782 = Constraint(expr= m.x1260 <= 100) m.c783 = Constraint(expr= m.x1261 <= 100) m.c784 = Constraint(expr= m.x1262 <= 100) m.c785 = Constraint(expr= m.x1263 <= 100) m.c786 = Constraint(expr= m.x1264 <= 100) m.c787 = Constraint(expr= m.x1267 <= 100) m.c788 = Constraint(expr= m.x1268 <= 100) m.c789 = Constraint(expr= m.x1269 <= 100) m.c790 = Constraint(expr= m.x1270 <= 100) m.c791 = Constraint(expr= m.x1271 <= 100) m.c792 = Constraint(expr= m.x1272 <= 100) m.c793 = Constraint(expr= m.x1273 <= 100) m.c794 = Constraint(expr= m.x1274 <= 100) m.c795 = Constraint(expr= m.x1275 <= 100) m.c796 = Constraint(expr= m.x1278 <= 100) m.c797 = Constraint(expr= m.x1279 <= 100) m.c798 = Constraint(expr= m.x1280 <= 100) m.c799 = Constraint(expr= m.x1281 <= 100) m.c800 = Constraint(expr= m.x1282 <= 100) m.c801 = Constraint(expr= m.x1283 <= 100) m.c802 = Constraint(expr= m.x1284 <= 100) m.c803 = Constraint(expr= m.x1285 <= 100) m.c804 = Constraint(expr= m.x1286 <= 100) m.c805 = Constraint(expr= m.x1289 <= 100) m.c806 = Constraint(expr= m.x1290 <= 100) m.c807 = Constraint(expr= m.x1291 <= 100) m.c808 = Constraint(expr= m.x1292 <= 100) m.c809 = Constraint(expr= m.x1293 <= 100) m.c810 = Constraint(expr= m.x1294 <= 100) m.c811 = Constraint(expr= m.x1295 <= 100) m.c812 = Constraint(expr= m.x1296 <= 100) m.c813 = Constraint(expr= m.x1297 <= 100) m.c814 = Constraint(expr= m.x1300 <= 100) m.c815 = Constraint(expr= m.x1301 <= 100) m.c816 = Constraint(expr= m.x1302 <= 100) m.c817 = Constraint(expr= m.x1303 <= 100) m.c818 = Constraint(expr= m.x1304 <= 100) m.c819 = Constraint(expr= m.x1305 <= 100) m.c820 = Constraint(expr= m.x1306 <= 100) m.c821 = Constraint(expr= m.x1307 <= 100) m.c822 = Constraint(expr= m.x1308 <= 100) m.c823 = Constraint(expr= m.x1311 <= 100) m.c824 = Constraint(expr= m.x1312 <= 100) m.c825 = Constraint(expr= m.x1313 <= 100) m.c826 = Constraint(expr= m.x1314 <= 100) m.c827 = Constraint(expr= m.x1315 <= 100) m.c828 = Constraint(expr= m.x1316 <= 100) m.c829 = Constraint(expr= m.x1317 <= 100) m.c830 = Constraint(expr= m.x1318 <= 100) m.c831 = Constraint(expr= m.x1319 <= 100) m.c832 = Constraint(expr= m.x1322 >= 0) m.c833 = Constraint(expr= m.x1323 >= 0) m.c834 = Constraint(expr= m.x1324 >= 0) m.c835 = Constraint(expr= m.x1325 >= 0) m.c836 = Constraint(expr= m.x1326 >= 0) m.c837 = Constraint(expr= m.x1327 >= 0) m.c838 = Constraint(expr= m.x1328 >= 0) m.c839 = Constraint(expr= m.x1329 >= 0) m.c840 = Constraint(expr= m.x1330 >= 0) m.c841 = Constraint(expr= m.x1331 >= 0) m.c842 = Constraint(expr= m.x1332 >= 0) m.c843 = Constraint(expr= m.x1333 >= 0) m.c844 = Constraint(expr= m.x1334 >= 0) m.c845 = Constraint(expr= m.x1335 >= 0) m.c846 = Constraint(expr= m.x1336 >= 0) m.c847 = Constraint(expr= m.x1337 >= 0) m.c848 = Constraint(expr= m.x1338 >= 0) m.c849 = Constraint(expr= m.x1339 >= 0) m.c850 = Constraint(expr= m.x1340 >= 0) m.c851 = Constraint(expr= m.x1341 >= 0) m.c852 = Constraint(expr= m.x1342 >= 0) m.c853 = Constraint(expr= m.x1343 >= 0) m.c854 = Constraint(expr= m.x1344 >= 0) m.c855 = Constraint(expr= m.x1345 >= 0) m.c856 = Constraint(expr= m.x1346 >= 0) m.c857 = Constraint(expr= m.x1347 >= 0) m.c858 = Constraint(expr= m.x1348 >= 0) m.c859 = Constraint(expr= m.x1349 >= 0) m.c860 = Constraint(expr= m.x1350 >= 0) m.c861 = Constraint(expr= m.x1351 >= 0) m.c862 = Constraint(expr= m.x1352 >= 0) m.c863 = Constraint(expr= m.x1353 >= 0) m.c864 = Constraint(expr= m.x1354 >= 0) m.c865 = Constraint(expr= m.x1355 >= 0) m.c866 = Constraint(expr= m.x1356 >= 0) m.c867 = Constraint(expr= m.x1357 >= 0) m.c868 = Constraint(expr= m.x1358 >= 0) m.c869 = Constraint(expr= m.x1359 >= 0) m.c870 = Constraint(expr= m.x1360 >= 0) m.c871 = Constraint(expr= m.x1361 >= 0) m.c872 = Constraint(expr= m.x1362 >= 0) m.c873 = Constraint(expr= m.x1363 >= 0) m.c874 = Constraint(expr= m.x1364 >= 0) m.c875 = Constraint(expr= m.x1365 >= 0) m.c876 = Constraint(expr= m.x1366 >= 0) m.c877 = Constraint(expr= m.x1367 >= 0) m.c878 = Constraint(expr= m.x1368 >= 0) m.c879 = Constraint(expr= m.x1369 >= 0) m.c880 = Constraint(expr= m.x1370 >= 0) m.c881 = Constraint(expr= m.x1371 >= 0) m.c882 = Constraint(expr= m.x1372 >= 0) m.c883 = Constraint(expr= m.x1373 >= 0) m.c884 = Constraint(expr= m.x1374 >= 0) m.c885 = Constraint(expr= m.x1375 >= 0) m.c886 = Constraint(expr= m.x1376 >= 0) m.c887 = Constraint(expr= m.x1377 >= 0) m.c888 = Constraint(expr= m.x1378 >= 0) m.c889 = Constraint(expr= m.x1379 >= 0) m.c890 = Constraint(expr= m.x1380 >= 0) m.c891 = Constraint(expr= m.x1381 >= 0) m.c892 = Constraint(expr= m.x1382 >= 0) m.c893 = Constraint(expr= m.x1383 >= 0) m.c894 = Constraint(expr= m.x1384 >= 0) m.c895 = Constraint(expr= m.x1385 >= 0) m.c896 = Constraint(expr= m.x1386 >= 0) m.c897 = Constraint(expr= m.x1387 >= 0) m.c898 = Constraint(expr= m.x1388 >= 0) m.c899 = Constraint(expr= m.x1389 >= 0) m.c900 = Constraint(expr= m.x1390 >= 0) m.c901 = Constraint(expr= m.x1391 >= 0) m.c902 = Constraint(expr= m.x1392 >= 0) m.c903 = Constraint(expr= m.x1393 >= 0) m.c904 = Constraint(expr= m.x1394 >= 0) m.c905 = Constraint(expr= m.x1395 >= 0) m.c906 = Constraint(expr= m.x1396 >= 0) m.c907 = Constraint(expr= m.x1397 >= 0) m.c908 = Constraint(expr= m.x1398 >= 0) m.c909 = Constraint(expr= m.x1399 >= 0) m.c910 = Constraint(expr= m.x1400 >= 0) m.c911 = Constraint(expr= m.x1401 >= 0) m.c912 = Constraint(expr= m.x1402 >= 0) m.c913 = Constraint(expr= m.x1403 >= 0) m.c914 = Constraint(expr= m.x1404 >= 0) m.c915 = Constraint(expr= m.x1405 >= 0) m.c916 = Constraint(expr= m.x1406 >= 0) m.c917 = Constraint(expr= m.x1407 >= 0) m.c918 = Constraint(expr= m.x1408 >= 0) m.c919 = Constraint(expr= m.x1409 >= 0) m.c920 = Constraint(expr= m.x1410 >= 0) m.c921 = Constraint(expr= m.x1411 >= 0) m.c922 = Constraint(expr= m.x1412 >= 0) m.c923 = Constraint(expr= m.x1413 >= 0) m.c924 = Constraint(expr= m.x1414 >= 0) m.c925 = Constraint(expr= m.x1415 >= 0) m.c926 = Constraint(expr= m.x1416 >= 0) m.c927 = Constraint(expr= m.x1417 >= 0) m.c928 = Constraint(expr= m.x1418 >= 0) m.c929 = Constraint(expr= m.x1419 >= 0) m.c930 = Constraint(expr= m.x1420 >= 0) m.c931 = Constraint(expr= m.x1421 >= 0) m.c932 = Constraint(expr= m.x1422 >= 0) m.c933 = Constraint(expr= m.x1423 >= 0) m.c934 = Constraint(expr= m.x1424 >= 0) m.c935 = Constraint(expr= m.x1425 >= 0) m.c936 = Constraint(expr= m.x1426 >= 0) m.c937 = Constraint(expr= m.x1427 >= 0) m.c938 = Constraint(expr= m.x1428 >= 0) m.c939 = Constraint(expr= m.x1429 >= 0) m.c940 = Constraint(expr= m.x1430 >= 0) m.c941 = Constraint(expr= m.x1431 >= 0) m.c942 = Constraint(expr= m.x1432 >= 0) m.c943 = Constraint(expr= m.x1433 >= 0) m.c944 = Constraint(expr= m.x1434 >= 0) m.c945 = Constraint(expr= m.x1435 >= 0) m.c946 = Constraint(expr= m.x1436 >= 0) m.c947 = Constraint(expr= m.x1437 >= 0) m.c948 = Constraint(expr= m.x1438 >= 0) m.c949 = Constraint(expr= m.x1439 >= 0) m.c950 = Constraint(expr= m.x1440 >= 0) m.c951 = Constraint(expr= m.x1441 >= 0) m.c952 = Constraint(expr= m.x1442 >= 0) m.c953 = Constraint(expr= m.x1443 >= 0) m.c954 = Constraint(expr= m.x1444 >= 0) m.c955 = Constraint(expr= m.x1445 >= 0) m.c956 = Constraint(expr= m.x1446 >= 0) m.c957 = Constraint(expr= m.x1447 >= 0) m.c958 = Constraint(expr= m.x1448 >= 0) m.c959 = Constraint(expr= m.x1449 >= 0) m.c960 = Constraint(expr= m.x1450 >= 0) m.c961 = Constraint(expr= m.x1451 >= 0) m.c962 = Constraint(expr= m.x1452 >= 0) m.c963 = Constraint(expr= m.x1453 >= 0) m.c964 = Constraint(expr= m.x1454 >= 0) m.c965 = Constraint(expr= m.x1455 >= 0) m.c966 = Constraint(expr= m.x1456 >= 0) m.c967 = Constraint(expr= m.x1457 >= 0) m.c968 = Constraint(expr= m.x1458 >= 0) m.c969 = Constraint(expr= m.x1459 >= 0) m.c970 = Constraint(expr= m.x1460 >= 0) m.c971 = Constraint(expr= m.x1461 >= 0) m.c972 = Constraint(expr= m.x1462 >= 0) m.c973 = Constraint(expr= m.x1463 >= 0) m.c974 = Constraint(expr= m.x1464 >= 0) m.c975 = Constraint(expr= m.x1465 >= 0) m.c976 = Constraint(expr= m.x1466 >= 0) m.c977 = Constraint(expr= m.x1467 >= 0) m.c978 = Constraint(expr= m.x1468 >= 0) m.c979 = Constraint(expr= m.x1469 >= 0) m.c980 = Constraint(expr= m.x1470 >= 0) m.c981 = Constraint(expr= m.x1471 >= 0) m.c982 = Constraint(expr= m.x1472 >= 0) m.c983 = Constraint(expr= m.x1473 >= 0) m.c984 = Constraint(expr= m.x1474 >= 0) m.c985 = Constraint(expr= m.x1475 >= 0) m.c986 = Constraint(expr= m.x1476 >= 0) m.c987 = Constraint(expr= m.x1477 >= 0) m.c988 = Constraint(expr= m.x1478 >= 0) m.c989 = Constraint(expr= m.x1479 >= 0) m.c990 = Constraint(expr= m.x1480 >= 0) m.c991 = Constraint(expr= m.x1481 >= 0) m.c992 = Constraint(expr= m.x1482 >= 0) m.c993 = Constraint(expr= m.x1483 >= 0) m.c994 = Constraint(expr= m.x1484 >= 0) m.c995 = Constraint(expr= m.x1485 >= 0) m.c996 = Constraint(expr= m.x1486 >= 0) m.c997 = Constraint(expr= m.x1487 >= 0) m.c998 = Constraint(expr= m.x1488 >= 0) m.c999 = Constraint(expr= m.x1489 >= 0) m.c1000 = Constraint(expr= m.x1490 >= 0) m.c1001 = Constraint(expr= m.x1491 >= 0) m.c1002 = Constraint(expr= m.x1492 >= 0) m.c1003 = Constraint(expr= m.x1493 >= 0) m.c1004 = Constraint(expr= m.x1494 >= 0) m.c1005 = Constraint(expr= m.x1495 >= 0) m.c1006 = Constraint(expr= m.x1496 >= 0) m.c1007 = Constraint(expr= m.x1497 >= 0) m.c1008 = Constraint(expr= m.x1498 >= 0) m.c1009 = Constraint(expr= m.x1499 >= 0) m.c1010 = Constraint(expr= m.x1500 >= 0) m.c1011 = Constraint(expr= m.x1501 >= 0) m.c1012 = Constraint(expr= m.x1502 >= 0) m.c1013 = Constraint(expr= m.x1503 >= 0) m.c1014 = Constraint(expr= m.x1504 >= 0) m.c1015 = Constraint(expr= m.x1505 >= 0) m.c1016 = Constraint(expr= m.x1506 >= 0) m.c1017 = Constraint(expr= m.x1507 >= 0) m.c1018 = Constraint(expr= m.x1508 >= 0) m.c1019 = Constraint(expr= m.x1509 >= 0) m.c1020 = Constraint(expr= m.x1510 >= 0) m.c1021 = Constraint(expr= m.x1511 >= 0) m.c1022 = Constraint(expr= m.x1512 >= 0) m.c1023 = Constraint(expr= m.x1513 >= 0) m.c1024 = Constraint(expr= m.x1514 >= 0) m.c1025 = Constraint(expr= m.x1515 >= 0) m.c1026 = Constraint(expr= m.x1516 >= 0) m.c1027 = Constraint(expr= m.x1517 >= 0) m.c1028 = Constraint(expr= m.x1518 >= 0) m.c1029 = Constraint(expr= m.x1519 >= 0) m.c1030 = Constraint(expr= m.x1520 >= 0) m.c1031 = Constraint(expr= m.x1521 >= 0) m.c1032 = Constraint(expr= m.x1522 >= 0) m.c1033 = Constraint(expr= m.x1523 >= 0) m.c1034 = Constraint(expr= m.x1524 >= 0) m.c1035 = Constraint(expr= m.x1525 >= 0) m.c1036 = Constraint(expr= m.x1526 >= 0) m.c1037 = Constraint(expr= m.x1527 >= 0) m.c1038 = Constraint(expr= m.x1528 >= 0) m.c1039 = Constraint(expr= m.x1529 >= 0) m.c1040 = Constraint(expr= m.x1530 >= 0) m.c1041 = Constraint(expr= m.x1531 >= 0) m.c1042 = Constraint(expr= m.x1532 >= 0) m.c1043 = Constraint(expr= m.x1533 >= 0) m.c1044 = Constraint(expr= m.x1534 >= 0) m.c1045 = Constraint(expr= m.x1535 >= 0) m.c1046 = Constraint(expr= m.x1536 >= 0) m.c1047 = Constraint(expr= m.x1537 >= 0) m.c1048 = Constraint(expr= m.x1538 >= 0) m.c1049 = Constraint(expr= m.x1539 >= 0) m.c1050 = Constraint(expr= m.x1540 >= 0) m.c1051 = Constraint(expr= m.x1541 >= 0) m.c1052 = Constraint(expr= m.x1542 >= 0) m.c1053 = Constraint(expr= m.x1543 >= 0) m.c1054 = Constraint(expr= m.x1544 >= 0) m.c1055 = Constraint(expr= m.x1545 >= 0) m.c1056 = Constraint(expr= m.x1546 >= 0) m.c1057 = Constraint(expr= m.x1547 >= 0) m.c1058 = Constraint(expr= m.x1548 >= 0) m.c1059 = Constraint(expr= m.x1549 >= 0) m.c1060 = Constraint(expr= m.x1550 >= 0) m.c1061 = Constraint(expr= m.x1551 >= 0) m.c1062 = Constraint(expr= m.x1552 >= 0) m.c1063 = Constraint(expr= m.x1553 >= 0) m.c1064 = Constraint(expr= m.x1554 >= 0) m.c1065 = Constraint(expr= m.x1555 >= 0) m.c1066 = Constraint(expr= m.x1556 >= 0) m.c1067 = Constraint(expr= m.x1557 >= 0) m.c1068 = Constraint(expr= m.x1558 >= 0) m.c1069 = Constraint(expr= m.x1559 >= 0) m.c1070 = Constraint(expr= m.x1560 >= 0) m.c1071 = Constraint(expr= m.x1561 >= 0) m.c1072 = Constraint(expr= m.x1562 >= 0) m.c1073 = Constraint(expr= m.x1563 >= 0) m.c1074 = Constraint(expr= m.x1564 >= 0) m.c1075 = Constraint(expr= m.x1565 >= 0) m.c1076 = Constraint(expr= m.x1566 >= 0) m.c1077 = Constraint(expr= m.x1567 >= 0) m.c1078 = Constraint(expr= m.x1568 >= 0) m.c1079 = Constraint(expr= m.x1569 >= 0) m.c1080 = Constraint(expr= m.x1570 >= 0) m.c1081 = Constraint(expr= m.x1571 >= 0) m.c1082 = Constraint(expr= m.x1572 >= 0) m.c1083 = Constraint(expr= m.x1573 >= 0) m.c1084 = Constraint(expr= m.x1574 >= 0) m.c1085 = Constraint(expr= m.x1575 >= 0) m.c1086 = Constraint(expr= m.x1576 >= 0) m.c1087 = Constraint(expr= m.x1577 >= 0) m.c1088 = Constraint(expr= m.x1578 >= 0) m.c1089 = Constraint(expr= m.x1579 >= 0) m.c1090 = Constraint(expr= m.x1580 >= 0) m.c1091 = Constraint(expr= m.x1581 >= 0) m.c1092 = Constraint(expr= m.x1582 >= 0) m.c1093 = Constraint(expr= m.x1583 >= 0) m.c1094 = Constraint(expr= m.x1584 >= 0) m.c1095 = Constraint(expr= m.x1585 >= 0) m.c1096 = Constraint(expr= m.x1586 >= 0) m.c1097 = Constraint(expr= m.x1587 >= 0) m.c1098 = Constraint(expr= m.x1588 >= 0) m.c1099 = Constraint(expr= m.x1589 >= 0) m.c1100 = Constraint(expr= m.x1590 >= 0) m.c1101 = Constraint(expr= m.x1591 >= 0) m.c1102 = Constraint(expr= m.x1592 >= 0) m.c1103 = Constraint(expr= m.x1593 >= 0) m.c1104 = Constraint(expr= m.x1594 >= 0) m.c1105 = Constraint(expr= m.x1595 >= 0) m.c1106 = Constraint(expr= m.x1596 >= 0) m.c1107 = Constraint(expr= m.x1597 >= 0) m.c1108 = Constraint(expr= m.x1598 >= 0) m.c1109 = Constraint(expr= m.x1599 >= 0) m.c1110 = Constraint(expr= m.x1600 >= 0) m.c1111 = Constraint(expr= m.x1601 >= 0) m.c1112 = Constraint(expr= m.x1602 >= 0) m.c1113 = Constraint(expr= m.x1603 >= 0) m.c1114 = Constraint(expr= m.x1604 >= 0) m.c1115 = Constraint(expr= m.x1605 >= 0) m.c1116 = Constraint(expr= m.x1606 >= 0) m.c1117 = Constraint(expr= m.x1607 >= 0) m.c1118 = Constraint(expr= m.x1608 >= 0) m.c1119 = Constraint(expr= m.x1609 >= 0) m.c1120 = Constraint(expr= m.x1610 >= 0) m.c1121 = Constraint(expr= m.x1611 >= 0) m.c1122 = Constraint(expr= m.x1612 >= 0) m.c1123 = Constraint(expr= m.x1613 >= 0) m.c1124 = Constraint(expr= m.x1614 >= 0) m.c1125 = Constraint(expr= m.x1615 >= 0) m.c1126 = Constraint(expr= m.x1616 >= 0) m.c1127 = Constraint(expr= m.x1617 >= 0) m.c1128 = Constraint(expr= m.x1618 >= 0) m.c1129 = Constraint(expr= m.x1619 >= 0) m.c1130 = Constraint(expr= m.x1620 >= 0) m.c1131 = Constraint(expr= m.x1621 >= 0) m.c1132 = Constraint(expr= m.x1622 >= 0) m.c1133 = Constraint(expr= m.x1623 >= 0) m.c1134 = Constraint(expr= m.x1624 >= 0) m.c1135 = Constraint(expr= m.x1625 >= 0) m.c1136 = Constraint(expr= m.x1626 >= 0) m.c1137 = Constraint(expr= m.x1627 >= 0) m.c1138 = Constraint(expr= m.x1628 >= 0) m.c1139 = Constraint(expr= m.x1629 >= 0) m.c1140 = Constraint(expr= m.x1630 >= 0) m.c1141 = Constraint(expr= m.x1631 >= 0) m.c1142 = Constraint(expr= m.x1632 >= 0) m.c1143 = Constraint(expr= m.x1633 >= 0) m.c1144 = Constraint(expr= m.x1634 >= 0) m.c1145 = Constraint(expr= m.x1635 >= 0) m.c1146 = Constraint(expr= m.x1636 >= 0) m.c1147 = Constraint(expr= m.x1637 >= 0) m.c1148 = Constraint(expr= m.x1638 >= 0) m.c1149 = Constraint(expr= m.x1639 >= 0) m.c1150 = Constraint(expr= m.x1640 >= 0) m.c1151 = Constraint(expr= m.x1641 >= 0) m.c1152 = Constraint(expr= m.x1642 >= 0) m.c1153 = Constraint(expr= m.x1643 >= 0) m.c1154 = Constraint(expr= m.x1644 >= 0) m.c1155 = Constraint(expr= m.x1645 >= 0) m.c1156 = Constraint(expr= m.x1646 >= 0) m.c1157 = Constraint(expr= m.x1647 >= 0) m.c1158 = Constraint(expr= m.x1648 >= 0) m.c1159 = Constraint(expr= m.x1649 >= 0) m.c1160 = Constraint(expr= m.x1650 >= 0) m.c1161 = Constraint(expr= m.x1651 >= 0) m.c1162 = Constraint(expr= m.x1652 >= 0) m.c1163 = Constraint(expr= m.x1653 >= 0) m.c1164 = Constraint(expr= m.x1654 >= 0) m.c1165 = Constraint(expr= m.x1655 >= 0) m.c1166 = Constraint(expr= m.x1656 >= 0) m.c1167 = Constraint(expr= m.x1657 >= 0) m.c1168 = Constraint(expr= m.x1658 >= 0) m.c1169 = Constraint(expr= m.x1659 >= 0) m.c1170 = Constraint(expr= m.x1660 >= 0) m.c1171 = Constraint(expr= m.x1661 >= 0) m.c1172 = Constraint(expr= m.x1662 >= 0) m.c1173 = Constraint(expr= m.x1663 >= 0) m.c1174 = Constraint(expr= m.x1664 >= 0) m.c1175 = Constraint(expr= m.x1665 >= 0) m.c1176 = Constraint(expr= m.x1666 >= 0) m.c1177 = Constraint(expr= m.x1667 >= 0) m.c1178 = Constraint(expr= m.x1668 >= 0) m.c1179 = Constraint(expr= m.x1669 >= 0) m.c1180 = Constraint(expr= m.x1670 >= 0) m.c1181 = Constraint(expr= m.x1671 >= 0) m.c1182 = Constraint(expr= m.x1672 >= 0) m.c1183 = Constraint(expr= m.x1673 >= 0) m.c1184 = Constraint(expr= m.x1674 >= 0) m.c1185 = Constraint(expr= m.x1675 >= 0) m.c1186 = Constraint(expr= m.x1676 >= 0) m.c1187 = Constraint(expr= m.x1677 >= 0) m.c1188 = Constraint(expr= m.x1678 >= 0) m.c1189 = Constraint(expr= m.x1679 >= 0) m.c1190 = Constraint(expr= m.x1680 >= 0) m.c1191 = Constraint(expr= m.x1681 >= 0) m.c1192 = Constraint(expr= m.x1682 >= 0) m.c1193 = Constraint(expr= m.x1683 >= 0) m.c1194 = Constraint(expr= m.x1684 >= 0) m.c1195 = Constraint(expr= m.x1685 >= 0) m.c1196 = Constraint(expr= m.x1686 >= 0) m.c1197 = Constraint(expr= m.x1687 >= 0) m.c1198 = Constraint(expr= m.x1688 >= 0) m.c1199 = Constraint(expr= m.x1689 >= 0) m.c1200 = Constraint(expr= m.x1690 >= 0) m.c1201 = Constraint(expr= m.x1691 >= 0) m.c1202 = Constraint(expr= m.x1692 >= 0) m.c1203 = Constraint(expr= m.x1693 >= 0) m.c1204 = Constraint(expr= m.x1694 >= 0) m.c1205 = Constraint(expr= m.x1695 >= 0) m.c1206 = Constraint(expr= m.x1696 >= 0) m.c1207 = Constraint(expr= m.x1697 >= 0) m.c1208 = Constraint(expr= m.x1698 >= 0) m.c1209 = Constraint(expr= m.x1699 >= 0) m.c1210 = Constraint(expr= m.x1700 >= 0) m.c1211 = Constraint(expr= m.x1701 >= 0) m.c1212 = Constraint(expr= m.x1702 >= 0) m.c1213 = Constraint(expr= m.x1703 >= 0) m.c1214 = Constraint(expr= m.x1704 >= 0) m.c1215 = Constraint(expr= m.x1705 >= 0) m.c1216 = Constraint(expr= m.x1706 >= 0) m.c1217 = Constraint(expr= m.x1707 >= 0) m.c1218 = Constraint(expr= m.x1708 >= 0) m.c1219 = Constraint(expr= m.x1709 >= 0) m.c1220 = Constraint(expr= m.x1710 >= 0) m.c1221 = Constraint(expr= m.x1711 >= 0) m.c1222 = Constraint(expr= m.x1712 >= 0) m.c1223 = Constraint(expr= m.x1713 >= 0) m.c1224 = Constraint(expr= m.x1714 >= 0) m.c1225 = Constraint(expr= m.x1715 >= 0) m.c1226 = Constraint(expr= m.x1716 >= 0) m.c1227 = Constraint(expr= m.x1717 >= 0) m.c1228 = Constraint(expr= m.x1718 >= 0) m.c1229 = Constraint(expr= m.x1719 >= 0) m.c1230 = Constraint(expr= m.x1720 >= 0) m.c1231 = Constraint(expr= m.x1721 >= 0) m.c1232 = Constraint(expr= m.x1722 >= 0) m.c1233 = Constraint(expr= m.x1723 >= 0) m.c1234 = Constraint(expr= m.x1724 >= 0) m.c1235 = Constraint(expr= m.x1725 >= 0) m.c1236 = Constraint(expr= m.x1726 >= 0) m.c1237 = Constraint(expr= m.x1727 >= 0) m.c1238 = Constraint(expr= m.x1728 >= 0) m.c1239 = Constraint(expr= m.x1729 >= 0) m.c1240 = Constraint(expr= m.x1730 >= 0) m.c1241 = Constraint(expr= m.x1731 >= 0) m.c1242 = Constraint(expr= m.x1732 >= 0) m.c1243 = Constraint(expr= m.x1733 >= 0) m.c1244 = Constraint(expr= m.x1734 >= 0) m.c1245 = Constraint(expr= m.x1735 >= 0) m.c1246 = Constraint(expr= m.x1736 >= 0) m.c1247 = Constraint(expr= m.x1737 >= 0) m.c1248 = Constraint(expr= m.x1738 >= 0) m.c1249 = Constraint(expr= m.x1739 >= 0) m.c1250 = Constraint(expr= m.x1740 >= 0) m.c1251 = Constraint(expr= m.x1741 >= 0) m.c1252 = Constraint(expr= m.x1742 >= 0) m.c1253 = Constraint(expr= m.x1743 >= 0) m.c1254 = Constraint(expr= m.x1744 >= 0) m.c1255 = Constraint(expr= m.x1745 >= 0) m.c1256 = Constraint(expr= m.x1746 >= 0) m.c1257 = Constraint(expr= m.x1747 >= 0) m.c1258 = Constraint(expr= m.x1748 >= 0) m.c1259 = Constraint(expr= m.x1749 >= 0) m.c1260 = Constraint(expr= m.x1750 >= 0) m.c1261 = Constraint(expr= m.x1751 >= 0) m.c1262 = Constraint(expr= m.x1752 >= 0) m.c1263 = Constraint(expr= m.x1753 >= 0) m.c1264 = Constraint(expr= m.x1754 >= 0) m.c1265 = Constraint(expr= m.x1755 >= 0) m.c1266 = Constraint(expr= m.x1756 >= 0) m.c1267 = Constraint(expr= m.x1757 >= 0) m.c1268 = Constraint(expr= m.x1758 >= 0) m.c1269 = Constraint(expr= m.x1759 >= 0) m.c1270 = Constraint(expr= m.x1760 >= 0) m.c1271 = Constraint(expr= m.x1761 >= 0) m.c1272 = Constraint(expr= m.x1762 >= 0) m.c1273 = Constraint(expr= m.x1763 >= 0) m.c1274 = Constraint(expr= m.x1764 >= 0) m.c1275 = Constraint(expr= m.x1765 >= 0) m.c1276 = Constraint(expr= m.x1766 >= 0) m.c1277 = Constraint(expr= m.x1767 >= 0) m.c1278 = Constraint(expr= m.x1768 >= 0) m.c1279 = Constraint(expr= m.x1769 >= 0) m.c1280 = Constraint(expr= m.x1770 >= 0) m.c1281 = Constraint(expr= m.x1771 >= 0) m.c1282 = Constraint(expr= m.x1772 >= 0) m.c1283 = Constraint(expr= m.x1773 >= 0) m.c1284 = Constraint(expr= m.x1774 >= 0) m.c1285 = Constraint(expr= m.x1775 >= 0) m.c1286 = Constraint(expr= m.x1776 >= 0) m.c1287 = Constraint(expr= m.x1777 >= 0) m.c1288 = Constraint(expr= m.x1778 >= 0) m.c1289 = Constraint(expr= m.x1779 >= 0) m.c1290 = Constraint(expr= m.x1780 >= 0) m.c1291 = Constraint(expr= m.x1781 >= 0) m.c1292 = Constraint(expr= m.x1782 >= 0) m.c1293 = Constraint(expr= m.x1783 >= 0) m.c1294 = Constraint(expr= m.x1784 >= 0) m.c1295 = Constraint(expr= m.x1785 >= 0) m.c1296 = Constraint(expr= m.x1786 >= 0) m.c1297 = Constraint(expr= m.x1787 >= 0) m.c1298 = Constraint(expr= m.x1788 >= 0) m.c1299 = Constraint(expr= m.x1789 >= 0) m.c1300 = Constraint(expr= m.x1790 >= 0) m.c1301 = Constraint(expr= m.x1791 >= 0) m.c1302 = Constraint(expr= m.x1792 >= 0) m.c1303 = Constraint(expr= m.x1793 >= 0) m.c1304 = Constraint(expr= m.x1794 >= 0) m.c1305 = Constraint(expr= m.x1795 >= 0) m.c1306 = Constraint(expr= m.x1796 >= 0) m.c1307 = Constraint(expr= m.x1797 >= 0) m.c1308 = Constraint(expr= m.x1798 >= 0) m.c1309 = Constraint(expr= m.x1799 >= 0) m.c1310 = Constraint(expr= m.x1800 >= 0) m.c1311 = Constraint(expr= m.x1801 >= 0) m.c1312 = Constraint(expr= m.x1802 >= 0) m.c1313 = Constraint(expr= m.x1803 >= 0) m.c1314 = Constraint(expr= m.x1804 >= 0) m.c1315 = Constraint(expr= m.x1805 >= 0) m.c1316 = Constraint(expr= m.x1806 >= 0) m.c1317 = Constraint(expr= m.x1807 >= 0) m.c1318 = Constraint(expr= m.x1808 >= 0) m.c1319 = Constraint(expr= m.x1809 >= 0) m.c1320 = Constraint(expr= m.x1810 >= 0) m.c1321 = Constraint(expr= m.x1811 >= 0) m.c1322 = Constraint(expr= m.x1812 >= 0) m.c1323 = Constraint(expr= m.x1813 >= 0) m.c1324 = Constraint(expr= m.x1814 >= 0) m.c1325 = Constraint(expr= m.x1815 >= 0) m.c1326 = Constraint(expr= m.x1816 >= 0) m.c1327 = Constraint(expr= m.x1817 >= 0) m.c1328 = Constraint(expr= m.x1818 >= 0) m.c1329 = Constraint(expr= m.x1819 >= 0) m.c1330 = Constraint(expr= m.x1820 >= 0) m.c1331 = Constraint(expr= m.x1821 >= 0) m.c1332 = Constraint(expr= m.x1822 >= 0) m.c1333 = Constraint(expr= m.x1823 >= 0) m.c1334 = Constraint(expr= m.x1824 >= 0) m.c1335 = Constraint(expr= m.x1825 >= 0) m.c1336 = Constraint(expr= m.x1826 >= 0) m.c1337 = Constraint(expr= m.x1827 >= 0) m.c1338 = Constraint(expr= m.x1828 >= 0) m.c1339 = Constraint(expr= m.x1829 >= 0) m.c1340 = Constraint(expr= m.x1830 >= 0) m.c1341 = Constraint(expr= m.x1831 >= 0) m.c1342 = Constraint(expr= m.x1832 >= 0) m.c1343 = Constraint(expr= m.x1833 >= 0) m.c1344 = Constraint(expr= m.x1834 >= 0) m.c1345 = Constraint(expr= m.x1835 >= 0) m.c1346 = Constraint(expr= m.x1836 >= 0) m.c1347 = Constraint(expr= m.x1837 >= 0) m.c1348 = Constraint(expr= m.x1838 >= 0) m.c1349 = Constraint(expr= m.x1839 >= 0) m.c1350 = Constraint(expr= m.x1840 >= 0) m.c1351 = Constraint(expr= m.x1841 >= 0) m.c1352 = Constraint(expr= m.x1842 >= 0) m.c1353 = Constraint(expr= m.x1843 >= 0) m.c1354 = Constraint(expr= m.x1844 >= 0) m.c1355 = Constraint(expr= m.x1845 >= 0) m.c1356 = Constraint(expr= m.x1846 >= 0) m.c1357 = Constraint(expr= m.x1847 >= 0) m.c1358 = Constraint(expr= m.x1848 >= 0) m.c1359 = Constraint(expr= m.x1849 >= 0) m.c1360 = Constraint(expr= m.x1322 <= 100) m.c1361 = Constraint(expr= m.x1323 <= 100) m.c1362 = Constraint(expr= m.x1324 <= 100) m.c1363 = Constraint(expr= m.x1325 <= 100) m.c1364 = Constraint(expr= m.x1326 <= 100) m.c1365 = Constraint(expr= m.x1327 <= 100) m.c1366 = Constraint(expr= m.x1328 <= 100) m.c1367 = Constraint(expr= m.x1329 <= 100) m.c1368 = Constraint(expr= m.x1330 <= 100) m.c1369 = Constraint(expr= m.x1331 <= 100) m.c1370 = Constraint(expr= m.x1332 <= 100) m.c1371 = Constraint(expr= m.x1333 <= 100) m.c1372 = Constraint(expr= m.x1334 <= 100) m.c1373 = Constraint(expr= m.x1335 <= 100) m.c1374 = Constraint(expr= m.x1336 <= 100) m.c1375 = Constraint(expr= m.x1337 <= 100) m.c1376 = Constraint(expr= m.x1338 <= 100) m.c1377 = Constraint(expr= m.x1339 <= 100) m.c1378 = Constraint(expr= m.x1340 <= 100) m.c1379 = Constraint(expr= m.x1341 <= 100) m.c1380 = Constraint(expr= m.x1342 <= 100) m.c1381 = Constraint(expr= m.x1343 <= 100) m.c1382 = Constraint(expr= m.x1344 <= 100) m.c1383 = Constraint(expr= m.x1345 <= 100) m.c1384 = Constraint(expr= m.x1346 <= 100) m.c1385 = Constraint(expr= m.x1347 <= 100) m.c1386 = Constraint(expr= m.x1348 <= 100) m.c1387 = Constraint(expr= m.x1349 <= 100) m.c1388 = Constraint(expr= m.x1350 <= 100) m.c1389 = Constraint(expr= m.x1351 <= 100) m.c1390 = Constraint(expr= m.x1352 <= 100) m.c1391 = Constraint(expr= m.x1353 <= 100) m.c1392 = Constraint(expr= m.x1354 <= 100) m.c1393 = Constraint(expr= m.x1355 <= 100) m.c1394 = Constraint(expr= m.x1356 <= 100) m.c1395 = Constraint(expr= m.x1357 <= 100) m.c1396 = Constraint(expr= m.x1358 <= 100) m.c1397 = Constraint(expr= m.x1359 <= 100) m.c1398 = Constraint(expr= m.x1360 <= 100) m.c1399 = Constraint(expr= m.x1361 <= 100) m.c1400 = Constraint(expr= m.x1362 <= 100) m.c1401 = Constraint(expr= m.x1363 <= 100) m.c1402 = Constraint(expr= m.x1364 <= 100) m.c1403 = Constraint(expr= m.x1365 <= 100) m.c1404 = Constraint(expr= m.x1366 <= 100) m.c1405 = Constraint(expr= m.x1367 <= 100) m.c1406 = Constraint(expr= m.x1368 <= 100) m.c1407 = Constraint(expr= m.x1369 <= 100) m.c1408 = Constraint(expr= m.x1370 <= 100) m.c1409 = Constraint(expr= m.x1371 <= 100) m.c1410 = Constraint(expr= m.x1372 <= 100) m.c1411 = Constraint(expr= m.x1373 <= 100) m.c1412 = Constraint(expr= m.x1374 <= 100) m.c1413 = Constraint(expr= m.x1375 <= 100) m.c1414 = Constraint(expr= m.x1388 <= 100) m.c1415 = Constraint(expr= m.x1389 <= 100) m.c1416 = Constraint(expr= m.x1390 <= 100) m.c1417 = Constraint(expr= m.x1391 <= 100) m.c1418 = Constraint(expr= m.x1392 <= 100) m.c1419 = Constraint(expr= m.x1393 <= 100) m.c1420 = Constraint(expr= m.x1394 <= 100) m.c1421 = Constraint(expr= m.x1395 <= 100) m.c1422 = Constraint(expr= m.x1396 <= 100) m.c1423 = Constraint(expr= m.x1397 <= 100) m.c1424 = Constraint(expr= m.x1398 <= 100) m.c1425 = Constraint(expr= m.x1399 <= 100) m.c1426 = Constraint(expr= m.x1400 <= 100) m.c1427 = Constraint(expr= m.x1401 <= 100) m.c1428 = Constraint(expr= m.x1402 <= 100) m.c1429 = Constraint(expr= m.x1403 <= 100) m.c1430 = Constraint(expr= m.x1404 <= 100) m.c1431 = Constraint(expr= m.x1405 <= 100) m.c1432 = Constraint(expr= m.x1406 <= 100) m.c1433 = Constraint(expr= m.x1407 <= 100) m.c1434 = Constraint(expr= m.x1408 <= 100) m.c1435 = Constraint(expr= m.x1409 <= 100) m.c1436 = Constraint(expr= m.x1410 <= 100) m.c1437 = Constraint(expr= m.x1411 <= 100) m.c1438 = Constraint(expr= m.x1412 <= 100) m.c1439 = Constraint(expr= m.x1413 <= 100) m.c1440 = Constraint(expr= m.x1414 <= 100) m.c1441 = Constraint(expr= m.x1415 <= 100) m.c1442 = Constraint(expr= m.x1416 <= 100) m.c1443 = Constraint(expr= m.x1417 <= 100) m.c1444 = Constraint(expr= m.x1418 <= 100) m.c1445 = Constraint(expr= m.x1419 <= 100) m.c1446 = Constraint(expr= m.x1420 <= 100) m.c1447 = Constraint(expr= m.x1421 <= 100) m.c1448 = Constraint(expr= m.x1422 <= 100) m.c1449 = Constraint(expr= m.x1423 <= 100) m.c1450 = Constraint(expr= m.x1424 <= 100) m.c1451 = Constraint(expr= m.x1425 <= 100) m.c1452 = Constraint(expr= m.x1426 <= 100) m.c1453 = Constraint(expr= m.x1427 <= 100) m.c1454 = Constraint(expr= m.x1428 <= 100) m.c1455 = Constraint(expr= m.x1429 <= 100) m.c1456 = Constraint(expr= m.x1430 <= 100) m.c1457 = Constraint(expr= m.x1431 <= 100) m.c1458 = Constraint(expr= m.x1432 <= 100) m.c1459 = Constraint(expr= m.x1433 <= 100) m.c1460 = Constraint(expr= m.x1434 <= 100) m.c1461 = Constraint(expr= m.x1435 <= 100) m.c1462 = Constraint(expr= m.x1436 <= 100) m.c1463 = Constraint(expr= m.x1437 <= 100) m.c1464 = Constraint(expr= m.x1438 <= 100) m.c1465 = Constraint(expr= m.x1439 <= 100) m.c1466 = Constraint(expr= m.x1440 <= 100) m.c1467 = Constraint(expr= m.x1441 <= 100) m.c1468 = Constraint(expr= m.x1454 <= 100) m.c1469 = Constraint(expr= m.x1455 <= 100) m.c1470 = Constraint(expr= m.x1456 <= 100) m.c1471 = Constraint(expr= m.x1457 <= 100) m.c1472 = Constraint(expr= m.x1458 <= 100) m.c1473 = Constraint(expr= m.x1459 <= 100) m.c1474 = Constraint(expr= m.x1460 <= 100) m.c1475 = Constraint(expr= m.x1461 <= 100) m.c1476 = Constraint(expr= m.x1462 <= 100) m.c1477 = Constraint(expr= m.x1463 <= 100) m.c1478 = Constraint(expr= m.x1464 <= 100) m.c1479 = Constraint(expr= m.x1465 <= 100) m.c1480 = Constraint(expr= m.x1466 <= 100) m.c1481 = Constraint(expr= m.x1467 <= 100) m.c1482 = Constraint(expr= m.x1468 <= 100) m.c1483 = Constraint(expr= m.x1469 <= 100) m.c1484 = Constraint(expr= m.x1470 <= 100) m.c1485 = Constraint(expr= m.x1471 <= 100) m.c1486 = Constraint(expr= m.x1472 <= 100) m.c1487 = Constraint(expr= m.x1473 <= 100) m.c1488 = Constraint(expr= m.x1474 <= 100) m.c1489 = Constraint(expr= m.x1475 <= 100) m.c1490 = Constraint(expr= m.x1476 <= 100) m.c1491 = Constraint(expr= m.x1477 <= 100) m.c1492 = Constraint(expr= m.x1478 <= 100) m.c1493 = Constraint(expr= m.x1479 <= 100) m.c1494 = Constraint(expr= m.x1480 <= 100) m.c1495 = Constraint(expr= m.x1481 <= 100) m.c1496 = Constraint(expr= m.x1482 <= 100) m.c1497 = Constraint(expr= m.x1483 <= 100) m.c1498 = Constraint(expr= m.x1484 <= 100) m.c1499 = Constraint(expr= m.x1485 <= 100) m.c1500 = Constraint(expr= m.x1486 <= 100) m.c1501 = Constraint(expr= m.x1487 <= 100) m.c1502 = Constraint(expr= m.x1488 <= 100) m.c1503 = Constraint(expr= m.x1489 <= 100) m.c1504 = Constraint(expr= m.x1490 <= 100) m.c1505 = Constraint(expr= m.x1491 <= 100) m.c1506 = Constraint(expr= m.x1492 <= 100) m.c1507 = Constraint(expr= m.x1493 <= 100) m.c1508 = Constraint(expr= m.x1494 <= 100) m.c1509 = Constraint(expr= m.x1495 <= 100) m.c1510 = Constraint(expr= m.x1496 <= 100) m.c1511 = Constraint(expr= m.x1497 <= 100) m.c1512 = Constraint(expr= m.x1498 <= 100) m.c1513 = Constraint(expr= m.x1499 <= 100) m.c1514 = Constraint(expr= m.x1500 <= 100) m.c1515 = Constraint(expr= m.x1501 <= 100) m.c1516 = Constraint(expr= m.x1502 <= 100) m.c1517 = Constraint(expr= m.x1503 <= 100) m.c1518 = Constraint(expr= m.x1504 <= 100) m.c1519 = Constraint(expr= m.x1505 <= 100) m.c1520 = Constraint(expr= m.x1506 <= 100) m.c1521 = Constraint(expr= m.x1507 <= 100) m.c1522 = Constraint(expr= m.x1520 <= 100) m.c1523 = Constraint(expr= m.x1521 <= 100) m.c1524 = Constraint(expr= m.x1522 <= 100) m.c1525 = Constraint(expr= m.x1523 <= 100) m.c1526 = Constraint(expr= m.x1524 <= 100) m.c1527 = Constraint(expr= m.x1525 <= 100) m.c1528 = Constraint(expr= m.x1526 <= 100) m.c1529 = Constraint(expr= m.x1527 <= 100) m.c1530 = Constraint(expr= m.x1528 <= 100) m.c1531 = Constraint(expr= m.x1529 <= 100) m.c1532 = Constraint(expr= m.x1530 <= 100) m.c1533 = Constraint(expr= m.x1531 <= 100) m.c1534 = Constraint(expr= m.x1532 <= 100) m.c1535 = Constraint(expr= m.x1533 <= 100) m.c1536 = Constraint(expr= m.x1534 <= 100) m.c1537 = Constraint(expr= m.x1535 <= 100) m.c1538 = Constraint(expr= m.x1536 <= 100) m.c1539 = Constraint(expr= m.x1537 <= 100) m.c1540 = Constraint(expr= m.x1538 <= 100) m.c1541 = Constraint(expr= m.x1539 <= 100) m.c1542 = Constraint(expr= m.x1540 <= 100) m.c1543 = Constraint(expr= m.x1541 <= 100) m.c1544 = Constraint(expr= m.x1542 <= 100) m.c1545 = Constraint(expr= m.x1543 <= 100) m.c1546 = Constraint(expr= m.x1544 <= 100) m.c1547 = Constraint(expr= m.x1545 <= 100) m.c1548 = Constraint(expr= m.x1546 <= 100) m.c1549 = Constraint(expr= m.x1547 <= 100) m.c1550 = Constraint(expr= m.x1548 <= 100) m.c1551 = Constraint(expr= m.x1549 <= 100) m.c1552 = Constraint(expr= m.x1550 <= 100) m.c1553 = Constraint(expr= m.x1551 <= 100) m.c1554 = Constraint(expr= m.x1552 <= 100) m.c1555 = Constraint(expr= m.x1553 <= 100) m.c1556 = Constraint(expr= m.x1554 <= 100) m.c1557 = Constraint(expr= m.x1555 <= 100) m.c1558 = Constraint(expr= m.x1556 <= 100) m.c1559 = Constraint(expr= m.x1557 <= 100) m.c1560 = Constraint(expr= m.x1558 <= 100) m.c1561 = Constraint(expr= m.x1559 <= 100) m.c1562 = Constraint(expr= m.x1560 <= 100) m.c1563 = Constraint(expr= m.x1561 <= 100) m.c1564 = Constraint(expr= m.x1562 <= 100) m.c1565 = Constraint(expr= m.x1563 <= 100) m.c1566 = Constraint(expr= m.x1564 <= 100) m.c1567 = Constraint(expr= m.x1565 <= 100) m.c1568 = Constraint(expr= m.x1566 <= 100) m.c1569 = Constraint(expr= m.x1567 <= 100) m.c1570 = Constraint(expr= m.x1568 <= 100) m.c1571 = Constraint(expr= m.x1569 <= 100) m.c1572 = Constraint(expr= m.x1570 <= 100) m.c1573 = Constraint(expr= m.x1571 <= 100) m.c1574 = Constraint(expr= m.x1572 <= 100) m.c1575 = Constraint(expr= m.x1573 <= 100) m.c1576 = Constraint(expr= m.x1586 <= 100) m.c1577 = Constraint(expr= m.x1587 <= 100) m.c1578 = Constraint(expr= m.x1588 <= 100) m.c1579 = Constraint(expr= m.x1589 <= 100) m.c1580 = Constraint(expr= m.x1590 <= 100) m.c1581 = Constraint(expr= m.x1591 <= 100) m.c1582 = Constraint(expr= m.x1592 <= 100) m.c1583 = Constraint(expr= m.x1593 <= 100) m.c1584 = Constraint(expr= m.x1594 <= 100) m.c1585 = Constraint(expr= m.x1595 <= 100) m.c1586 = Constraint(expr= m.x1596 <= 100) m.c1587 = Constraint(expr= m.x1597 <= 100) m.c1588 = Constraint(expr= m.x1598 <= 100) m.c1589 = Constraint(expr= m.x1599 <= 100) m.c1590 = Constraint(expr= m.x1600 <= 100) m.c1591 = Constraint(expr= m.x1601 <= 100) m.c1592 = Constraint(expr= m.x1602 <= 100) m.c1593 = Constraint(expr= m.x1603 <= 100) m.c1594 = Constraint(expr= m.x1604 <= 100) m.c1595 = Constraint(expr= m.x1605 <= 100) m.c1596 = Constraint(expr= m.x1606 <= 100) m.c1597 = Constraint(expr= m.x1607 <= 100) m.c1598 = Constraint(expr= m.x1608 <= 100) m.c1599 = Constraint(expr= m.x1609 <= 100) m.c1600 = Constraint(expr= m.x1610 <= 100) m.c1601 = Constraint(expr= m.x1611 <= 100) m.c1602 = Constraint(expr= m.x1612 <= 100) m.c1603 = Constraint(expr= m.x1613 <= 100) m.c1604 = Constraint(expr= m.x1614 <= 100) m.c1605 = Constraint(expr= m.x1615 <= 100) m.c1606 = Constraint(expr= m.x1616 <= 100) m.c1607 = Constraint(expr= m.x1617 <= 100) m.c1608 = Constraint(expr= m.x1618 <= 100) m.c1609 = Constraint(expr= m.x1619 <= 100) m.c1610 = Constraint(expr= m.x1620 <= 100) m.c1611 = Constraint(expr= m.x1621 <= 100) m.c1612 = Constraint(expr= m.x1622 <= 100) m.c1613 = Constraint(expr= m.x1623 <= 100) m.c1614 = Constraint(expr= m.x1624 <= 100) m.c1615 = Constraint(expr= m.x1625 <= 100) m.c1616 = Constraint(expr= m.x1626 <= 100) m.c1617 = Constraint(expr= m.x1627 <= 100) m.c1618 = Constraint(expr= m.x1628 <= 100) m.c1619 = Constraint(expr= m.x1629 <= 100) m.c1620 = Constraint(expr= m.x1630 <= 100) m.c1621 = Constraint(expr= m.x1631 <= 100) m.c1622 = Constraint(expr= m.x1632 <= 100) m.c1623 = Constraint(expr= m.x1633 <= 100) m.c1624 = Constraint(expr= m.x1634 <= 100) m.c1625 = Constraint(expr= m.x1635 <= 100) m.c1626 = Constraint(expr= m.x1636 <= 100) m.c1627 = Constraint(expr= m.x1637 <= 100) m.c1628 = Constraint(expr= m.x1638 <= 100) m.c1629 = Constraint(expr= m.x1639 <= 100) m.c1630 = Constraint(expr= m.x1652 <= 100) m.c1631 = Constraint(expr= m.x1653 <= 100) m.c1632 = Constraint(expr= m.x1654 <= 100) m.c1633 = Constraint(expr= m.x1655 <= 100) m.c1634 = Constraint(expr= m.x1656 <= 100) m.c1635 = Constraint(expr= m.x1657 <= 100) m.c1636 = Constraint(expr= m.x1658 <= 100) m.c1637 = Constraint(expr= m.x1659 <= 100) m.c1638 = Constraint(expr= m.x1660 <= 100) m.c1639 = Constraint(expr= m.x1661 <= 100) m.c1640 = Constraint(expr= m.x1662 <= 100) m.c1641 = Constraint(expr= m.x1663 <= 100) m.c1642 = Constraint(expr= m.x1664 <= 100) m.c1643 = Constraint(expr= m.x1665 <= 100) m.c1644 = Constraint(expr= m.x1666 <= 100) m.c1645 = Constraint(expr= m.x1667 <= 100) m.c1646 = Constraint(expr= m.x1668 <= 100) m.c1647 = Constraint(expr= m.x1669 <= 100) m.c1648 = Constraint(expr= m.x1670 <= 100) m.c1649 = Constraint(expr= m.x1671 <= 100) m.c1650 = Constraint(expr= m.x1672 <= 100) m.c1651 = Constraint(expr= m.x1673 <= 100) m.c1652 = Constraint(expr= m.x1674 <= 100) m.c1653 = Constraint(expr= m.x1675 <= 100) m.c1654 = Constraint(expr= m.x1676 <= 100) m.c1655 = Constraint(expr= m.x1677 <= 100) m.c1656 = Constraint(expr= m.x1678 <= 100) m.c1657 = Constraint(expr= m.x1679 <= 100) m.c1658 = Constraint(expr= m.x1680 <= 100) m.c1659 = Constraint(expr= m.x1681 <= 100) m.c1660 = Constraint(expr= m.x1682 <= 100) m.c1661 = Constraint(expr= m.x1683 <= 100) m.c1662 = Constraint(expr= m.x1684 <= 100) m.c1663 = Constraint(expr= m.x1685 <= 100) m.c1664 = Constraint(expr= m.x1686 <= 100) m.c1665 = Constraint(expr= m.x1687 <= 100) m.c1666 = Constraint(expr= m.x1688 <= 100) m.c1667 = Constraint(expr= m.x1689 <= 100) m.c1668 = Constraint(expr= m.x1690 <= 100) m.c1669 = Constraint(expr= m.x1691 <= 100) m.c1670 = Constraint(expr= m.x1692 <= 100) m.c1671 = Constraint(expr= m.x1693 <= 100) m.c1672 = Constraint(expr= m.x1694 <= 100) m.c1673 = Constraint(expr= m.x1695 <= 100) m.c1674 = Constraint(expr= m.x1696 <= 100) m.c1675 = Constraint(expr= m.x1697 <= 100) m.c1676 = Constraint(expr= m.x1698 <= 100) m.c1677 = Constraint(expr= m.x1699 <= 100) m.c1678 = Constraint(expr= m.x1700 <= 100) m.c1679 = Constraint(expr= m.x1701 <= 100) m.c1680 = Constraint(expr= m.x1702 <= 100) m.c1681 = Constraint(expr= m.x1703 <= 100) m.c1682 = Constraint(expr= m.x1704 <= 100) m.c1683 = Constraint(expr= m.x1705 <= 100) m.c1684 = Constraint(expr= m.x1718 <= 100) m.c1685 = Constraint(expr= m.x1719 <= 100) m.c1686 = Constraint(expr= m.x1720 <= 100) m.c1687 = Constraint(expr= m.x1721 <= 100) m.c1688 = Constraint(expr= m.x1722 <= 100) m.c1689 = Constraint(expr= m.x1723 <= 100) m.c1690 = Constraint(expr= m.x1724 <= 100) m.c1691 = Constraint(expr= m.x1725 <= 100) m.c1692 = Constraint(expr= m.x1726 <= 100) m.c1693 = Constraint(expr= m.x1727 <= 100) m.c1694 = Constraint(expr= m.x1728 <= 100) m.c1695 = Constraint(expr= m.x1729 <= 100) m.c1696 = Constraint(expr= m.x1730 <= 100) m.c1697 = Constraint(expr= m.x1731 <= 100) m.c1698 = Constraint(expr= m.x1732 <= 100) m.c1699 = Constraint(expr= m.x1733 <= 100) m.c1700 = Constraint(expr= m.x1734 <= 100) m.c1701 = Constraint(expr= m.x1735 <= 100) m.c1702 = Constraint(expr= m.x1736 <= 100) m.c1703 = Constraint(expr= m.x1737 <= 100) m.c1704 = Constraint(expr= m.x1738 <= 100) m.c1705 = Constraint(expr= m.x1739 <= 100) m.c1706 = Constraint(expr= m.x1740 <= 100) m.c1707 = Constraint(expr= m.x1741 <= 100) m.c1708 = Constraint(expr= m.x1742 <= 100) m.c1709 = Constraint(expr= m.x1743 <= 100) m.c1710 = Constraint(expr= m.x1744 <= 100) m.c1711 = Constraint(expr= m.x1745 <= 100) m.c1712 = Constraint(expr= m.x1746 <= 100) m.c1713 = Constraint(expr= m.x1747 <= 100) m.c1714 = Constraint(expr= m.x1748 <= 100) m.c1715 = Constraint(expr= m.x1749 <= 100) m.c1716 = Constraint(expr= m.x1750 <= 100) m.c1717 = Constraint(expr= m.x1751 <= 100) m.c1718 = Constraint(expr= m.x1752 <= 100) m.c1719 = Constraint(expr= m.x1753 <= 100) m.c1720 = Constraint(expr= m.x1754 <= 100) m.c1721 = Constraint(expr= m.x1755 <= 100) m.c1722 = Constraint(expr= m.x1756 <= 100) m.c1723 = Constraint(expr= m.x1757 <= 100) m.c1724 = Constraint(expr= m.x1758 <= 100) m.c1725 = Constraint(expr= m.x1759 <= 100) m.c1726 = Constraint(expr= m.x1760 <= 100) m.c1727 = Constraint(expr= m.x1761 <= 100) m.c1728 = Constraint(expr= m.x1762 <= 100) m.c1729 = Constraint(expr= m.x1763 <= 100) m.c1730 = Constraint(expr= m.x1764 <= 100) m.c1731 = Constraint(expr= m.x1765 <= 100) m.c1732 = Constraint(expr= m.x1766 <= 100) m.c1733 = Constraint(expr= m.x1767 <= 100) m.c1734 = Constraint(expr= m.x1768 <= 100) m.c1735 = Constraint(expr= m.x1769 <= 100) m.c1736 = Constraint(expr= m.x1770 <= 100) m.c1737 = Constraint(expr= m.x1771 <= 100) m.c1738 = Constraint(expr= m.x1784 <= 100) m.c1739 = Constraint(expr= m.x1785 <= 100) m.c1740 = Constraint(expr= m.x1786 <= 100) m.c1741 = Constraint(expr= m.x1787 <= 100) m.c1742 = Constraint(expr= m.x1788 <= 100) m.c1743 = Constraint(expr= m.x1789 <= 100) m.c1744 = Constraint(expr= m.x1790 <= 100) m.c1745 = Constraint(expr= m.x1791 <= 100) m.c1746 = Constraint(expr= m.x1792 <= 100) m.c1747 = Constraint(expr= m.x1793 <= 100) m.c1748 = Constraint(expr= m.x1794 <= 100) m.c1749 = Constraint(expr= m.x1795 <= 100) m.c1750 = Constraint(expr= m.x1796 <= 100) m.c1751 = Constraint(expr= m.x1797 <= 100) m.c1752 = Constraint(expr= m.x1798 <= 100) m.c1753 = Constraint(expr= m.x1799 <= 100) m.c1754 = Constraint(expr= m.x1800 <= 100) m.c1755 = Constraint(expr= m.x1801 <= 100) m.c1756 = Constraint(expr= m.x1802 <= 100) m.c1757 = Constraint(expr= m.x1803 <= 100) m.c1758 = Constraint(expr= m.x1804 <= 100) m.c1759 = Constraint(expr= m.x1805 <= 100) m.c1760 = Constraint(expr= m.x1806 <= 100) m.c1761 = Constraint(expr= m.x1807 <= 100) m.c1762 = Constraint(expr= m.x1808 <= 100) m.c1763 = Constraint(expr= m.x1809 <= 100) m.c1764 = Constraint(expr= m.x1810 <= 100) m.c1765 = Constraint(expr= m.x1811 <= 100) m.c1766 = Constraint(expr= m.x1812 <= 100) m.c1767 = Constraint(expr= m.x1813 <= 100) m.c1768 = Constraint(expr= m.x1814 <= 100) m.c1769 = Constraint(expr= m.x1815 <= 100) m.c1770 = Constraint(expr= m.x1816 <= 100) m.c1771 = Constraint(expr= m.x1817 <= 100) m.c1772 = Constraint(expr= m.x1818 <= 100) m.c1773 = Constraint(expr= m.x1819 <= 100) m.c1774 = Constraint(expr= m.x1820 <= 100) m.c1775 = Constraint(expr= m.x1821 <= 100) m.c1776 = Constraint(expr= m.x1822 <= 100) m.c1777 = Constraint(expr= m.x1823 <= 100) m.c1778 = Constraint(expr= m.x1824 <= 100) m.c1779 = Constraint(expr= m.x1825 <= 100) m.c1780 = Constraint(expr= m.x1826 <= 100) m.c1781 = Constraint(expr= m.x1827 <= 100) m.c1782 = Constraint(expr= m.x1828 <= 100) m.c1783 = Constraint(expr= m.x1829 <= 100) m.c1784 = Constraint(expr= m.x1830 <= 100) m.c1785 = Constraint(expr= m.x1831 <= 100) m.c1786 = Constraint(expr= m.x1832 <= 100) m.c1787 = Constraint(expr= m.x1833 <= 100) m.c1788 = Constraint(expr= m.x1834 <= 100) m.c1789 = Constraint(expr= m.x1835 <= 100) m.c1790 = Constraint(expr= m.x1836 <= 100) m.c1791 = Constraint(expr= m.x1837 <= 100) m.c1792 = Constraint(expr= m.x1234 - m.x1322 - m.x1323 - m.x1324 - m.x1325 - m.x1326 - m.x1327 == 0) m.c1793 = Constraint(expr= m.x1235 - m.x1328 - m.x1329 - m.x1330 - m.x1331 - m.x1332 - m.x1333 == 0) m.c1794 = Constraint(expr= m.x1236 - m.x1334 - m.x1335 - m.x1336 - m.x1337 - m.x1338 - m.x1339 == 0) m.c1795 = Constraint(expr= m.x1237 - m.x1340 - m.x1341 - m.x1342 - m.x1343 - m.x1344 - m.x1345 == 0) m.c1796 = Constraint(expr= m.x1238 - m.x1346 - m.x1347 - m.x1348 - m.x1349 - m.x1350 - m.x1351 == 0) m.c1797 = Constraint(expr= m.x1239 - m.x1352 - m.x1353 - m.x1354 - m.x1355 - m.x1356 - m.x1357 == 0) m.c1798 = Constraint(expr= m.x1240 - m.x1358 - m.x1359 - m.x1360 - m.x1361 - m.x1362 - m.x1363 == 0) m.c1799 = Constraint(expr= m.x1241 - m.x1364 - m.x1365 - m.x1366 - m.x1367 - m.x1368 - m.x1369 == 0) m.c1800 = Constraint(expr= m.x1242 - m.x1370 - m.x1371 - m.x1372 - m.x1373 - m.x1374 - m.x1375 == 0) m.c1801 = Constraint(expr= m.x1243 - m.x1376 - m.x1377 - m.x1378 - m.x1379 - m.x1380 - m.x1381 == 0) m.c1802 = Constraint(expr= m.x1244 - m.x1382 - m.x1383 - m.x1384 - m.x1385 - m.x1386 - m.x1387 == 0) m.c1803 = Constraint(expr= m.x1245 - m.x1388 - m.x1389 - m.x1390 - m.x1391 - m.x1392 - m.x1393 == 0) m.c1804 = Constraint(expr= m.x1246 - m.x1394 - m.x1395 - m.x1396 - m.x1397 - m.x1398 - m.x1399 == 0) m.c1805 = Constraint(expr= m.x1247 - m.x1400 - m.x1401 - m.x1402 - m.x1403 - m.x1404 - m.x1405 == 0) m.c1806 = Constraint(expr= m.x1248 - m.x1406 - m.x1407 - m.x1408 - m.x1409 - m.x1410 - m.x1411 == 0) m.c1807 = Constraint(expr= m.x1249 - m.x1412 - m.x1413 - m.x1414 - m.x1415 - m.x1416 - m.x1417 == 0) m.c1808 = Constraint(expr= m.x1250 - m.x1418 - m.x1419 - m.x1420 - m.x1421 - m.x1422 - m.x1423 == 0) m.c1809 = Constraint(expr= m.x1251 - m.x1424 - m.x1425 - m.x1426 - m.x1427 - m.x1428 - m.x1429 == 0) m.c1810 = Constraint(expr= m.x1252 - m.x1430 - m.x1431 - m.x1432 - m.x1433 - m.x1434 - m.x1435 == 0) m.c1811 = Constraint(expr= m.x1253 - m.x1436 - m.x1437 - m.x1438 - m.x1439 - m.x1440 - m.x1441 == 0) m.c1812 = Constraint(expr= m.x1254 - m.x1442 - m.x1443 - m.x1444 - m.x1445 - m.x1446 - m.x1447 == 0) m.c1813 = Constraint(expr= m.x1255 - m.x1448 - m.x1449 - m.x1450 - m.x1451 - m.x1452 - m.x1453 == 0) m.c1814 = Constraint(expr= m.x1256 - m.x1454 - m.x1455 - m.x1456 - m.x1457 - m.x1458 - m.x1459 == 0) m.c1815 = Constraint(expr= m.x1257 - m.x1460 - m.x1461 - m.x1462 - m.x1463 - m.x1464 - m.x1465 == 0) m.c1816 = Constraint(expr= m.x1258 - m.x1466 - m.x1467 - m.x1468 - m.x1469 - m.x1470 - m.x1471 == 0) m.c1817 = Constraint(expr= m.x1259 - m.x1472 - m.x1473 - m.x1474 - m.x1475 - m.x1476 - m.x1477 == 0) m.c1818 = Constraint(expr= m.x1260 - m.x1478 - m.x1479 - m.x1480 - m.x1481 - m.x1482 - m.x1483 == 0) m.c1819 = Constraint(expr= m.x1261 - m.x1484 - m.x1485 - m.x1486 - m.x1487 - m.x1488 - m.x1489 == 0) m.c1820 = Constraint(expr= m.x1262 - m.x1490 - m.x1491 - m.x1492 - m.x1493 - m.x1494 - m.x1495 == 0) m.c1821 = Constraint(expr= m.x1263 - m.x1496 - m.x1497 - m.x1498 - m.x1499 - m.x1500 - m.x1501 == 0) m.c1822 = Constraint(expr= m.x1264 - m.x1502 - m.x1503 - m.x1504 - m.x1505 - m.x1506 - m.x1507 == 0) m.c1823 = Constraint(expr= m.x1265 - m.x1508 - m.x1509 - m.x1510 - m.x1511 - m.x1512 - m.x1513 == 0) m.c1824 = Constraint(expr= m.x1266 - m.x1514 - m.x1515 - m.x1516 - m.x1517 - m.x1518 - m.x1519 == 0) m.c1825 = Constraint(expr= m.x1267 - m.x1520 - m.x1521 - m.x1522 - m.x1523 - m.x1524 - m.x1525 == 0) m.c1826 = Constraint(expr= m.x1268 - m.x1526 - m.x1527 - m.x1528 - m.x1529 - m.x1530 - m.x1531 == 0) m.c1827 = Constraint(expr= m.x1269 - m.x1532 - m.x1533 - m.x1534 - m.x1535 - m.x1536 - m.x1537 == 0) m.c1828 = Constraint(expr= m.x1270 - m.x1538 - m.x1539 - m.x1540 - m.x1541 - m.x1542 - m.x1543 == 0) m.c1829 = Constraint(expr= m.x1271 - m.x1544 - m.x1545 - m.x1546 - m.x1547 - m.x1548 - m.x1549 == 0) m.c1830 = Constraint(expr= m.x1272 - m.x1550 - m.x1551 - m.x1552 - m.x1553 - m.x1554 - m.x1555 == 0) m.c1831 = Constraint(expr= m.x1273 - m.x1556 - m.x1557 - m.x1558 - m.x1559 - m.x1560 - m.x1561 == 0) m.c1832 = Constraint(expr= m.x1274 - m.x1562 - m.x1563 - m.x1564 - m.x1565 - m.x1566 - m.x1567 == 0) m.c1833 = Constraint(expr= m.x1275 - m.x1568 - m.x1569 - m.x1570 - m.x1571 - m.x1572 - m.x1573 == 0) m.c1834 = Constraint(expr= m.x1276 - m.x1574 - m.x1575 - m.x1576 - m.x1577 - m.x1578 - m.x1579 == 0) m.c1835 = Constraint(expr= m.x1277 - m.x1580 - m.x1581 - m.x1582 - m.x1583 - m.x1584 - m.x1585 == 0) m.c1836 = Constraint(expr= m.x1278 - m.x1586 - m.x1587 - m.x1588 - m.x1589 - m.x1590 - m.x1591 == 0) m.c1837 = Constraint(expr= m.x1279 - m.x1592 - m.x1593 - m.x1594 - m.x1595 - m.x1596 - m.x1597 == 0) m.c1838 = Constraint(expr= m.x1280 - m.x1598 - m.x1599 - m.x1600 - m.x1601 - m.x1602 - m.x1603 == 0) m.c1839 = Constraint(expr= m.x1281 - m.x1604 - m.x1605 - m.x1606 - m.x1607 - m.x1608 - m.x1609 == 0) m.c1840 = Constraint(expr= m.x1282 - m.x1610 - m.x1611 - m.x1612 - m.x1613 - m.x1614 - m.x1615 == 0) m.c1841 = Constraint(expr= m.x1283 - m.x1616 - m.x1617 - m.x1618 - m.x1619 - m.x1620 - m.x1621 == 0) m.c1842 = Constraint(expr= m.x1284 - m.x1622 - m.x1623 - m.x1624 - m.x1625 - m.x1626 - m.x1627 == 0) m.c1843 = Constraint(expr= m.x1285 - m.x1628 - m.x1629 - m.x1630 - m.x1631 - m.x1632 - m.x1633 == 0) m.c1844 = Constraint(expr= m.x1286 - m.x1634 - m.x1635 - m.x1636 - m.x1637 - m.x1638 - m.x1639 == 0) m.c1845 = Constraint(expr= m.x1287 - m.x1640 - m.x1641 - m.x1642 - m.x1643 - m.x1644 - m.x1645 == 0) m.c1846 = Constraint(expr= m.x1288 - m.x1646 - m.x1647 - m.x1648 - m.x1649 - m.x1650 - m.x1651 == 0) m.c1847 = Constraint(expr= m.x1289 - m.x1652 - m.x1653 - m.x1654 - m.x1655 - m.x1656 - m.x1657 == 0) m.c1848 = Constraint(expr= m.x1290 - m.x1658 - m.x1659 - m.x1660 - m.x1661 - m.x1662 - m.x1663 == 0) m.c1849 = Constraint(expr= m.x1291 - m.x1664 - m.x1665 - m.x1666 - m.x1667 - m.x1668 - m.x1669 == 0) m.c1850 = Constraint(expr= m.x1292 - m.x1670 - m.x1671 - m.x1672 - m.x1673 - m.x1674 - m.x1675 == 0) m.c1851 = Constraint(expr= m.x1293 - m.x1676 - m.x1677 - m.x1678 - m.x1679 - m.x1680 - m.x1681 == 0) m.c1852 = Constraint(expr= m.x1294 - m.x1682 - m.x1683 - m.x1684 - m.x1685 - m.x1686 - m.x1687 == 0) m.c1853 = Constraint(expr= m.x1295 - m.x1688 - m.x1689 - m.x1690 - m.x1691 - m.x1692 - m.x1693 == 0) m.c1854 = Constraint(expr= m.x1296 - m.x1694 - m.x1695 - m.x1696 - m.x1697 - m.x1698 - m.x1699 == 0) m.c1855 = Constraint(expr= m.x1297 - m.x1700 - m.x1701 - m.x1702 - m.x1703 - m.x1704 - m.x1705 == 0) m.c1856 = Constraint(expr= m.x1298 - m.x1706 - m.x1707 - m.x1708 - m.x1709 - m.x1710 - m.x1711 == 0) m.c1857 = Constraint(expr= m.x1299 - m.x1712 - m.x1713 - m.x1714 - m.x1715 - m.x1716 - m.x1717 == 0) m.c1858 = Constraint(expr= m.x1300 - m.x1718 - m.x1719 - m.x1720 - m.x1721 - m.x1722 - m.x1723 == 0) m.c1859 = Constraint(expr= m.x1301 - m.x1724 - m.x1725 - m.x1726 - m.x1727 - m.x1728 - m.x1729 == 0) m.c1860 = Constraint(expr= m.x1302 - m.x1730 - m.x1731 - m.x1732 - m.x1733 - m.x1734 - m.x1735 == 0) m.c1861 = Constraint(expr= m.x1303 - m.x1736 - m.x1737 - m.x1738 - m.x1739 - m.x1740 - m.x1741 == 0) m.c1862 = Constraint(expr= m.x1304 - m.x1742 - m.x1743 - m.x1744 - m.x1745 - m.x1746 - m.x1747 == 0) m.c1863 = Constraint(expr= m.x1305 - m.x1748 - m.x1749 - m.x1750 - m.x1751 - m.x1752 - m.x1753 == 0) m.c1864 = Constraint(expr= m.x1306 - m.x1754 - m.x1755 - m.x1756 - m.x1757 - m.x1758 - m.x1759 == 0) m.c1865 = Constraint(expr= m.x1307 - m.x1760 - m.x1761 - m.x1762 - m.x1763 - m.x1764 - m.x1765 == 0) m.c1866 = Constraint(expr= m.x1308 - m.x1766 - m.x1767 - m.x1768 - m.x1769 - m.x1770 - m.x1771 == 0) m.c1867 = Constraint(expr= m.x1309 - m.x1772 - m.x1773 - m.x1774 - m.x1775 - m.x1776 - m.x1777 == 0) m.c1868 = Constraint(expr= m.x1310 - m.x1778 - m.x1779 - m.x1780 - m.x1781 - m.x1782 - m.x1783 == 0) m.c1869 = Constraint(expr= m.x1311 - m.x1784 - m.x1785 - m.x1786 - m.x1787 - m.x1788 - m.x1789 == 0) m.c1870 = Constraint(expr= m.x1312 - m.x1790 - m.x1791 - m.x1792 - m.x1793 - m.x1794 - m.x1795 == 0) m.c1871 = Constraint(expr= m.x1313 - m.x1796 - m.x1797 - m.x1798 - m.x1799 - m.x1800 - m.x1801 == 0) m.c1872 = Constraint(expr= m.x1314 - m.x1802 - m.x1803 - m.x1804 - m.x1805 - m.x1806 - m.x1807 == 0) m.c1873 = Constraint(expr= m.x1315 - m.x1808 - m.x1809 - m.x1810 - m.x1811 - m.x1812 - m.x1813 == 0) m.c1874 = Constraint(expr= m.x1316 - m.x1814 - m.x1815 - m.x1816 - m.x1817 - m.x1818 - m.x1819 == 0) m.c1875 = Constraint(expr= m.x1317 - m.x1820 - m.x1821 - m.x1822 - m.x1823 - m.x1824 - m.x1825 == 0) m.c1876 = Constraint(expr= m.x1318 - m.x1826 - m.x1827 - m.x1828 - m.x1829 - m.x1830 - m.x1831 == 0) m.c1877 = Constraint(expr= m.x1319 - m.x1832 - m.x1833 - m.x1834 - m.x1835 - m.x1836 - m.x1837 == 0) m.c1878 = Constraint(expr= m.x1320 - m.x1838 - m.x1839 - m.x1840 - m.x1841 - m.x1842 - m.x1843 == 0) m.c1879 = Constraint(expr= m.x1321 - m.x1844 - m.x1845 - m.x1846 - m.x1847 - m.x1848 - m.x1849 == 0) m.c1880 = Constraint(expr= m.x1234 == 100) m.c1881 = Constraint(expr= m.x1235 == 100) m.c1882 = Constraint(expr= m.x1236 == 100) m.c1883 = Constraint(expr= m.x1237 == 20) m.c1884 = Constraint(expr= m.x1238 == 50) m.c1885 = Constraint(expr= m.x1239 == 70) m.c1886 = Constraint(expr= m.x1240 == 30) m.c1887 = Constraint(expr= m.x1241 == 50) m.c1888 = Constraint(expr= m.x1242 == 30) m.c1889 = Constraint(expr= m.x1243 == 0) m.c1890 = Constraint(expr= m.x1244 == 0) m.c1891 = Constraint(expr= m.x450 + m.x1245 == 100) m.c1892 = Constraint(expr= m.x451 + m.x1246 == 100) m.c1893 = Constraint(expr= m.x452 + m.x1247 == 100) m.c1894 = Constraint(expr= - m.x450 + m.x453 + m.x454 + m.x1248 == 20) m.c1895 = Constraint(expr= - m.x451 + m.x455 + m.x456 + m.x457 + m.x1249 == 50) m.c1896 = Constraint(expr= - m.x452 + m.x458 + m.x459 + m.x1250 == 70) m.c1897 = Constraint(expr= - m.x453 - m.x455 + m.x460 + m.x1251 == 30) m.c1898 = Constraint(expr= - m.x454 - m.x456 - m.x458 + m.x461 + m.x462 + m.x1252 == 50) m.c1899 = Constraint(expr= - m.x457 - m.x459 + m.x463 + m.x1253 == 30) m.c1900 = Constraint(expr= - m.x460 - m.x461 + m.x1254 == 0) m.c1901 = Constraint(expr= - m.x462 - m.x463 + m.x1255 == 0) m.c1902 = Constraint(expr= m.x450 + m.x464 + m.x1256 == 100) m.c1903 = Constraint(expr= m.x451 + m.x465 + m.x1257 == 100) m.c1904 = Constraint(expr= m.x452 + m.x466 + m.x1258 == 100) m.c1905 = Constraint(expr= - m.x450 + m.x453 + m.x454 - m.x464 + m.x467 + m.x468 + m.x1259 == 20) m.c1906 = Constraint(expr= - m.x451 + m.x455 + m.x456 + m.x457 - m.x465 + m.x469 + m.x470 + m.x471 + m.x1260 == 50) m.c1907 = Constraint(expr= - m.x452 + m.x458 + m.x459 - m.x466 + m.x472 + m.x473 + m.x1261 == 70) m.c1908 = Constraint(expr= - m.x453 - m.x455 + m.x460 - m.x467 - m.x469 + m.x474 + m.x1262 == 30) m.c1909 = Constraint(expr= - m.x454 - m.x456 - m.x458 + m.x461 + m.x462 - m.x468 - m.x470 - m.x472 + m.x475 + m.x476 + m.x1263 == 50) m.c1910 = Constraint(expr= - m.x457 - m.x459 + m.x463 - m.x471 - m.x473 + m.x477 + m.x1264 == 30) m.c1911 = Constraint(expr= - m.x460 - m.x461 - m.x474 - m.x475 + m.x1265 == 0) m.c1912 = Constraint(expr= - m.x462 - m.x463 - m.x476 - m.x477 + m.x1266 == 0) m.c1913 = Constraint(expr= m.x450 + m.x464 + m.x478 + m.x1267 == 100) m.c1914 = Constraint(expr= m.x451 + m.x465 + m.x479 + m.x1268 == 100) m.c1915 = Constraint(expr= m.x452 + m.x466 + m.x480 + m.x1269 == 100) m.c1916 = Constraint(expr= - m.x450 + m.x453 + m.x454 - m.x464 + m.x467 + m.x468 - m.x478 + m.x481 + m.x482 + m.x1270 == 20) m.c1917 = Constraint(expr= - m.x451 + m.x455 + m.x456 + m.x457 - m.x465 + m.x469 + m.x470 + m.x471 - m.x479 + m.x483 + m.x484 + m.x485 + m.x1271 == 50) m.c1918 = Constraint(expr= - m.x452 + m.x458 + m.x459 - m.x466 + m.x472 + m.x473 - m.x480 + m.x486 + m.x487 + m.x1272 == 70) m.c1919 = Constraint(expr= - m.x453 - m.x455 + m.x460 - m.x467 - m.x469 + m.x474 - m.x481 - m.x483 + m.x488 + m.x1273 == 30) m.c1920 = Constraint(expr= - m.x454 - m.x456 - m.x458 + m.x461 + m.x462 - m.x468 - m.x470 - m.x472 + m.x475 + m.x476 - m.x482 - m.x484 - m.x486 + m.x489 + m.x490 + m.x1274 == 50) m.c1921 = Constraint(expr= - m.x457 - m.x459 + m.x463 - m.x471 - m.x473 + m.x477 - m.x485 - m.x487 + m.x491 + m.x1275 == 30) m.c1922 = Constraint(expr= - m.x460 - m.x461 - m.x474 - m.x475 - m.x488 - m.x489 + m.x1276 == 0) m.c1923 = Constraint(expr= - m.x462 - m.x463 - m.x476 - m.x477 - m.x490 - m.x491 + m.x1277 == 0) m.c1924 = Constraint(expr= m.x450 + m.x464 + m.x478 + m.x492 + m.x1278 == 100) m.c1925 = Constraint(expr= m.x451 + m.x465 + m.x479 + m.x493 + m.x1279 == 100) m.c1926 = Constraint(expr= m.x452 + m.x466 + m.x480 + m.x494 + m.x1280 == 100) m.c1927 = Constraint(expr= - m.x450 + m.x453 + m.x454 - m.x464 + m.x467 + m.x468 - m.x478 + m.x481 + m.x482 - m.x492 + m.x495 + m.x496 + m.x1281 == 20) m.c1928 = Constraint(expr= - m.x451 + m.x455 + m.x456 + m.x457 - m.x465 + m.x469 + m.x470 + m.x471 - m.x479 + m.x483 + m.x484 + m.x485 - m.x493 + m.x497 + m.x498 + m.x499 + m.x1282 == 50) m.c1929 = Constraint(expr= - m.x452 + m.x458 + m.x459 - m.x466 + m.x472 + m.x473 - m.x480 + m.x486 + m.x487 - m.x494 + m.x500 + m.x501 + m.x1283 == 70) m.c1930 = Constraint(expr= - m.x453 - m.x455 + m.x460 - m.x467 - m.x469 + m.x474 - m.x481 - m.x483 + m.x488 - m.x495 - m.x497 + m.x502 + m.x1284 == 30) m.c1931 = Constraint(expr= - m.x454 - m.x456 - m.x458 + m.x461 + m.x462 - m.x468 - m.x470 - m.x472 + m.x475 + m.x476 - m.x482 - m.x484 - m.x486 + m.x489 + m.x490 - m.x496 - m.x498 - m.x500 + m.x503 + m.x504 + m.x1285 == 50) m.c1932 = Constraint(expr= - m.x457 - m.x459 + m.x463 - m.x471 - m.x473 + m.x477 - m.x485 - m.x487 + m.x491 - m.x499 - m.x501 + m.x505 + m.x1286 == 30) m.c1933 = Constraint(expr= - m.x460 - m.x461 - m.x474 - m.x475 - m.x488 - m.x489 - m.x502 - m.x503 + m.x1287 == 0) m.c1934 = Constraint(expr= - m.x462 - m.x463 - m.x476 - m.x477 - m.x490 - m.x491 - m.x504 - m.x505 + m.x1288 == 0) m.c1935 = Constraint(expr= m.x450 + m.x464 + m.x478 + m.x492 + m.x506 + m.x1289 == 100) m.c1936 = Constraint(expr= m.x451 + m.x465 + m.x479 + m.x493 + m.x507 + m.x1290 == 100) m.c1937 = Constraint(expr= m.x452 + m.x466 + m.x480 + m.x494 + m.x508 + m.x1291 == 100) m.c1938 = Constraint(expr= - m.x450 + m.x453 + m.x454 - m.x464 + m.x467 + m.x468 - m.x478 + m.x481 + m.x482 - m.x492 + m.x495 + m.x496 - m.x506 + m.x509 + m.x510 + m.x1292 == 20) m.c1939 = Constraint(expr= - m.x451 + m.x455 + m.x456 + m.x457 - m.x465 + m.x469 + m.x470 + m.x471 - m.x479 + m.x483 + m.x484 + m.x485 - m.x493 + m.x497 + m.x498 + m.x499 - m.x507 + m.x511 + m.x512 + m.x513 + m.x1293 == 50) m.c1940 = Constraint(expr= - m.x452 + m.x458 + m.x459 - m.x466 + m.x472 + m.x473 - m.x480 + m.x486 + m.x487 - m.x494 + m.x500 + m.x501 - m.x508 + m.x514 + m.x515 + m.x1294 == 70) m.c1941 = Constraint(expr= - m.x453 - m.x455 + m.x460 - m.x467 - m.x469 + m.x474 - m.x481 - m.x483 + m.x488 - m.x495 - m.x497 + m.x502 - m.x509 - m.x511 + m.x516 + m.x1295 == 30) m.c1942 = Constraint(expr= - m.x454 - m.x456 - m.x458 + m.x461 + m.x462 - m.x468 - m.x470 - m.x472 + m.x475 + m.x476 - m.x482 - m.x484 - m.x486 + m.x489 + m.x490 - m.x496 - m.x498 - m.x500 + m.x503 + m.x504 - m.x510 - m.x512 - m.x514 + m.x517 + m.x518 + m.x1296 == 50) m.c1943 = Constraint(expr= - m.x457 - m.x459 + m.x463 - m.x471 - m.x473 + m.x477 - m.x485 - m.x487 + m.x491 - m.x499 - m.x501 + m.x505 - m.x513 - m.x515 + m.x519 + m.x1297 == 30) m.c1944 = Constraint(expr= - m.x460 - m.x461 - m.x474 - m.x475 - m.x488 - m.x489 - m.x502 - m.x503 - m.x516 - m.x517 + m.x1298 == 0) m.c1945 = Constraint(expr= - m.x462 - m.x463 - m.x476 - m.x477 - m.x490 - m.x491 - m.x504 - m.x505 - m.x518 - m.x519 + m.x1299 == 0) m.c1946 = Constraint(expr= m.x450 + m.x464 + m.x478 + m.x492 + m.x506 + m.x520 + m.x1300 == 100) m.c1947 = Constraint(expr= m.x451 + m.x465 + m.x479 + m.x493 + m.x507 + m.x521 + m.x1301 == 100) m.c1948 = Constraint(expr= m.x452 + m.x466 + m.x480 + m.x494 + m.x508 + m.x522 + m.x1302 == 100) m.c1949 = Constraint(expr= - m.x450 + m.x453 + m.x454 - m.x464 + m.x467 + m.x468 - m.x478 + m.x481 + m.x482 - m.x492 + m.x495 + m.x496 - m.x506 + m.x509 + m.x510 - m.x520 + m.x523 + m.x524 + m.x1303 == 20) m.c1950 = Constraint(expr= - m.x451 + m.x455 + m.x456 + m.x457 - m.x465 + m.x469 + m.x470 + m.x471 - m.x479 + m.x483 + m.x484 + m.x485 - m.x493 + m.x497 + m.x498 + m.x499 - m.x507 + m.x511 + m.x512 + m.x513 - m.x521 + m.x525 + m.x526 + m.x527 + m.x1304 == 50) m.c1951 = Constraint(expr= - m.x452 + m.x458 + m.x459 - m.x466 + m.x472 + m.x473 - m.x480 + m.x486 + m.x487 - m.x494 + m.x500 + m.x501 - m.x508 + m.x514 + m.x515 - m.x522 + m.x528 + m.x529 + m.x1305 == 70) m.c1952 = Constraint(expr= - m.x453 - m.x455 + m.x460 - m.x467 - m.x469 + m.x474 - m.x481 - m.x483 + m.x488 - m.x495 - m.x497 + m.x502 - m.x509 - m.x511 + m.x516 - m.x523 - m.x525 + m.x530 + m.x1306 == 30) m.c1953 = Constraint(expr= - m.x454 - m.x456 - m.x458 + m.x461 + m.x462 - m.x468 - m.x470 - m.x472 + m.x475 + m.x476 - m.x482 - m.x484 - m.x486 + m.x489 + m.x490 - m.x496 - m.x498 - m.x500 + m.x503 + m.x504 - m.x510 - m.x512 - m.x514 + m.x517 + m.x518 - m.x524 - m.x526 - m.x528 + m.x531 + m.x532 + m.x1307 == 50) m.c1954 = Constraint(expr= - m.x457 - m.x459 + m.x463 - m.x471 - m.x473 + m.x477 - m.x485 - m.x487 + m.x491 - m.x499 - m.x501 + m.x505 - m.x513 - m.x515 + m.x519 - m.x527 - m.x529 + m.x533 + m.x1308 == 30) m.c1955 = Constraint(expr= - m.x460 - m.x461 - m.x474 - m.x475 - m.x488 - m.x489 - m.x502 - m.x503 - m.x516 - m.x517 - m.x530 - m.x531 + m.x1309 == 0) m.c1956 = Constraint(expr= - m.x462 - m.x463 - m.x476 - m.x477 - m.x490 - m.x491 - m.x504 - m.x505 - m.x518 - m.x519 - m.x532 - m.x533 + m.x1310 == 0) m.c1957 = Constraint(expr= m.x450 + m.x464 + m.x478 + m.x492 + m.x506 + m.x520 + m.x534 + m.x1311 == 100) m.c1958 = Constraint(expr= m.x451 + m.x465 + m.x479 + m.x493 + m.x507 + m.x521 + m.x535 + m.x1312 == 100) m.c1959 = Constraint(expr= m.x452 + m.x466 + m.x480 + m.x494 + m.x508 + m.x522 + m.x536 + m.x1313 == 100) m.c1960 = Constraint(expr= - m.x450 + m.x453 + m.x454 - m.x464 + m.x467 + m.x468 - m.x478 + m.x481 + m.x482 - m.x492 + m.x495 + m.x496 - m.x506 + m.x509 + m.x510 - m.x520 + m.x523 + m.x524 - m.x534 + m.x537 + m.x538 + m.x1314 == 20) m.c1961 = Constraint(expr= - m.x451 + m.x455 + m.x456 + m.x457 - m.x465 + m.x469 + m.x470 + m.x471 - m.x479 + m.x483 + m.x484 + m.x485 - m.x493 + m.x497 + m.x498 + m.x499 - m.x507 + m.x511 + m.x512 + m.x513 - m.x521 + m.x525 + m.x526 + m.x527 - m.x535 + m.x539 + m.x540 + m.x541 + m.x1315 == 50) m.c1962 = Constraint(expr= - m.x452 + m.x458 + m.x459 - m.x466 + m.x472 + m.x473 - m.x480 + m.x486 + m.x487 - m.x494 + m.x500 + m.x501 - m.x508 + m.x514 + m.x515 - m.x522 + m.x528 + m.x529 - m.x536 + m.x542 + m.x543 + m.x1316 == 70) m.c1963 = Constraint(expr= - m.x453 - m.x455 + m.x460 - m.x467 - m.x469 + m.x474 - m.x481 - m.x483 + m.x488 - m.x495 - m.x497 + m.x502 - m.x509 - m.x511 + m.x516 - m.x523 - m.x525 + m.x530 - m.x537 - m.x539 + m.x544 + m.x1317 == 30) m.c1964 = Constraint(expr= - m.x454 - m.x456 - m.x458 + m.x461 + m.x462 - m.x468 - m.x470 - m.x472 + m.x475 + m.x476 - m.x482 - m.x484 - m.x486 + m.x489 + m.x490 - m.x496 - m.x498 - m.x500 + m.x503 + m.x504 - m.x510 - m.x512 - m.x514 + m.x517 + m.x518 - m.x524 - m.x526 - m.x528 + m.x531 + m.x532 - m.x538 - m.x540 - m.x542 + m.x545 + m.x546 + m.x1318 == 50) m.c1965 = Constraint(expr= - m.x457 - m.x459 + m.x463 - m.x471 - m.x473 + m.x477 - m.x485 - m.x487 + m.x491 - m.x499 - m.x501 + m.x505 - m.x513 - m.x515 + m.x519 - m.x527 - m.x529 + m.x533 - m.x541 - m.x543 + m.x547 + m.x1319 == 30) m.c1966 = Constraint(expr= - m.x460 - m.x461 - m.x474 - m.x475 - m.x488 - m.x489 - m.x502 - m.x503 - m.x516 - m.x517 - m.x530 - m.x531 - m.x544 - m.x545 + m.x1320 == 0) m.c1967 = Constraint(expr= - m.x462 - m.x463 - m.x476 - m.x477 - m.x490 - m.x491 - m.x504 - m.x505 - m.x518 - m.x519 - m.x532 - m.x533 - m.x546 - m.x547 + m.x1321 == 0) m.c1968 = Constraint(expr= m.x1322 == 100) m.c1969 = Constraint(expr= m.x1323 == 0) m.c1970 = Constraint(expr= m.x1324 == 0) m.c1971 = Constraint(expr= m.x1325 == 0) m.c1972 = Constraint(expr= m.x1326 == 0) m.c1973 = Constraint(expr= m.x1327 == 0) m.c1974 = Constraint(expr= m.x1328 == 0) m.c1975 = Constraint(expr= m.x1329 == 100) m.c1976 = Constraint(expr= m.x1330 == 0) m.c1977 = Constraint(expr= m.x1331 == 0) m.c1978 = Constraint(expr= m.x1332 == 0) m.c1979 = Constraint(expr= m.x1333 == 0) m.c1980 = Constraint(expr= m.x1334 == 0) m.c1981 = Constraint(expr= m.x1335 == 0) m.c1982 = Constraint(expr= m.x1336 == 100) m.c1983 = Constraint(expr= m.x1337 == 0) m.c1984 = Constraint(expr= m.x1338 == 0) m.c1985 = Constraint(expr= m.x1339 == 0) m.c1986 = Constraint(expr= m.x1340 == 20) m.c1987 = Constraint(expr= m.x1341 == 0) m.c1988 = Constraint(expr= m.x1342 == 0) m.c1989 = Constraint(expr= m.x1343 == 0) m.c1990 = Constraint(expr= m.x1344 == 0) m.c1991 = Constraint(expr= m.x1345 == 0) m.c1992 = Constraint(expr= m.x1346 == 0) m.c1993 = Constraint(expr= m.x1347 == 50) m.c1994 = Constraint(expr= m.x1348 == 0) m.c1995 = Constraint(expr= m.x1349 == 0) m.c1996 = Constraint(expr= m.x1350 == 0) m.c1997 = Constraint(expr= m.x1351 == 0) m.c1998 = Constraint(expr= m.x1352 == 0) m.c1999 = Constraint(expr= m.x1353 == 0) m.c2000 = Constraint(expr= m.x1354 == 70) m.c2001 = Constraint(expr= m.x1355 == 0) m.c2002 = Constraint(expr= m.x1356 == 0) m.c2003 = Constraint(expr= m.x1357 == 0) m.c2004 = Constraint(expr= m.x1358 == 0) m.c2005 = Constraint(expr= m.x1359 == 0) m.c2006 = Constraint(expr= m.x1360 == 0) m.c2007 = Constraint(expr= m.x1361 == 30) m.c2008 = Constraint(expr= m.x1362 == 0) m.c2009 = Constraint(expr= m.x1363 == 0) m.c2010 = Constraint(expr= m.x1364 == 0) m.c2011 = Constraint(expr= m.x1365 == 0) m.c2012 = Constraint(expr= m.x1366 == 0) m.c2013 = Constraint(expr= m.x1367 == 0) m.c2014 = Constraint(expr= m.x1368 == 50) m.c2015 = Constraint(expr= m.x1369 == 0) m.c2016 = Constraint(expr= m.x1370 == 0) m.c2017 = Constraint(expr= m.x1371 == 0) m.c2018 = Constraint(expr= m.x1372 == 0) m.c2019 = Constraint(expr= m.x1373 == 0) m.c2020 = Constraint(expr= m.x1374 == 0) m.c2021 = Constraint(expr= m.x1375 == 30) m.c2022 = Constraint(expr= m.x1376 == 0) m.c2023 = Constraint(expr= m.x1377 == 0) m.c2024 = Constraint(expr= m.x1378 == 0) m.c2025 = Constraint(expr= m.x1379 == 0) m.c2026 = Constraint(expr= m.x1380 == 0) m.c2027 = Constraint(expr= m.x1381 == 0) m.c2028 = Constraint(expr= m.x1382 == 0) m.c2029 = Constraint(expr= m.x1383 == 0) m.c2030 = Constraint(expr= m.x1384 == 0) m.c2031 = Constraint(expr= m.x1385 == 0) m.c2032 = Constraint(expr= m.x1386 == 0) m.c2033 = Constraint(expr= m.x1387 == 0) m.c2034 = Constraint(expr= m.x562 + m.x1388 == 100) m.c2035 = Constraint(expr= m.x563 + m.x1389 == 0) m.c2036 = Constraint(expr= m.x564 + m.x1390 == 0) m.c2037 = Constraint(expr= m.x565 + m.x1391 == 0) m.c2038 = Constraint(expr= m.x566 + m.x1392 == 0) m.c2039 = Constraint(expr= m.x567 + m.x1393 == 0) m.c2040 = Constraint(expr= m.x568 + m.x1394 == 0) m.c2041 = Constraint(expr= m.x569 + m.x1395 == 100) m.c2042 = Constraint(expr= m.x570 + m.x1396 == 0) m.c2043 = Constraint(expr= m.x571 + m.x1397 == 0) m.c2044 = Constraint(expr= m.x572 + m.x1398 == 0) m.c2045 = Constraint(expr= m.x573 + m.x1399 == 0) m.c2046 = Constraint(expr= m.x574 + m.x1400 == 0) m.c2047 = Constraint(expr= m.x575 + m.x1401 == 0) m.c2048 = Constraint(expr= m.x576 + m.x1402 == 100) m.c2049 = Constraint(expr= m.x577 + m.x1403 == 0) m.c2050 = Constraint(expr= m.x578 + m.x1404 == 0) m.c2051 = Constraint(expr= m.x579 + m.x1405 == 0) m.c2052 = Constraint(expr= - m.x562 + m.x580 + m.x586 + m.x1406 == 20) m.c2053 = Constraint(expr= - m.x563 + m.x581 + m.x587 + m.x1407 == 0) m.c2054 = Constraint(expr= - m.x564 + m.x582 + m.x588 + m.x1408 == 0) m.c2055 = Constraint(expr= - m.x565 + m.x583 + m.x589 + m.x1409 == 0) m.c2056 = Constraint(expr= - m.x566 + m.x584 + m.x590 + m.x1410 == 0) m.c2057 = Constraint(expr= - m.x567 + m.x585 + m.x591 + m.x1411 == 0) m.c2058 = Constraint(expr= - m.x568 + m.x592 + m.x598 + m.x604 + m.x1412 == 0) m.c2059 = Constraint(expr= - m.x569 + m.x593 + m.x599 + m.x605 + m.x1413 == 50) m.c2060 = Constraint(expr= - m.x570 + m.x594 + m.x600 + m.x606 + m.x1414 == 0) m.c2061 = Constraint(expr= - m.x571 + m.x595 + m.x601 + m.x607 + m.x1415 == 0) m.c2062 = Constraint(expr= - m.x572 + m.x596 + m.x602 + m.x608 + m.x1416 == 0) m.c2063 = Constraint(expr= - m.x573 + m.x597 + m.x603 + m.x609 + m.x1417 == 0) m.c2064 = Constraint(expr= - m.x574 + m.x610 + m.x616 + m.x1418 == 0) m.c2065 = Constraint(expr= - m.x575 + m.x611 + m.x617 + m.x1419 == 0) m.c2066 = Constraint(expr= - m.x576 + m.x612 + m.x618 + m.x1420 == 70) m.c2067 = Constraint(expr= - m.x577 + m.x613 + m.x619 + m.x1421 == 0) m.c2068 = Constraint(expr= - m.x578 + m.x614 + m.x620 + m.x1422 == 0) m.c2069 = Constraint(expr= - m.x579 + m.x615 + m.x621 + m.x1423 == 0) m.c2070 = Constraint(expr= - m.x580 - m.x592 + m.x622 + m.x1424 == 0) m.c2071 = Constraint(expr= - m.x581 - m.x593 + m.x623 + m.x1425 == 0) m.c2072 = Constraint(expr= - m.x582 - m.x594 + m.x624 + m.x1426 == 0) m.c2073 = Constraint(expr= - m.x583 - m.x595 + m.x625 + m.x1427 == 30) m.c2074 = Constraint(expr= - m.x584 - m.x596 + m.x626 + m.x1428 == 0) m.c2075 = Constraint(expr= - m.x585 - m.x597 + m.x627 + m.x1429 == 0) m.c2076 = Constraint(expr= - m.x586 - m.x598 - m.x610 + m.x628 + m.x634 + m.x1430 == 0) m.c2077 = Constraint(expr= - m.x587 - m.x599 - m.x611 + m.x629 + m.x635 + m.x1431 == 0) m.c2078 = Constraint(expr= - m.x588 - m.x600 - m.x612 + m.x630 + m.x636 + m.x1432 == 0) m.c2079 = Constraint(expr= - m.x589 - m.x601 - m.x613 + m.x631 + m.x637 + m.x1433 == 0) m.c2080 = Constraint(expr= - m.x590 - m.x602 - m.x614 + m.x632 + m.x638 + m.x1434 == 50) m.c2081 = Constraint(expr= - m.x591 - m.x603 - m.x615 + m.x633 + m.x639 + m.x1435 == 0) m.c2082 = Constraint(expr= - m.x604 - m.x616 + m.x640 + m.x1436 == 0) m.c2083 = Constraint(expr= - m.x605 - m.x617 + m.x641 + m.x1437 == 0) m.c2084 = Constraint(expr= - m.x606 - m.x618 + m.x642 + m.x1438 == 0) m.c2085 = Constraint(expr= - m.x607 - m.x619 + m.x643 + m.x1439 == 0) m.c2086 = Constraint(expr= - m.x608 - m.x620 + m.x644 + m.x1440 == 0) m.c2087 = Constraint(expr= - m.x609 - m.x621 + m.x645 + m.x1441 == 30) m.c2088 = Constraint(expr= - m.x622 - m.x628 + m.x1442 == 0) m.c2089 = Constraint(expr= - m.x623 - m.x629 + m.x1443 == 0) m.c2090 = Constraint(expr= - m.x624 - m.x630 + m.x1444 == 0) m.c2091 = Constraint(expr= - m.x625 - m.x631 + m.x1445 == 0) m.c2092 = Constraint(expr= - m.x626 - m.x632 + m.x1446 == 0) m.c2093 = Constraint(expr= - m.x627 - m.x633 + m.x1447 == 0) m.c2094 = Constraint(expr= - m.x634 - m.x640 + m.x1448 == 0) m.c2095 = Constraint(expr= - m.x635 - m.x641 + m.x1449 == 0) m.c2096 = Constraint(expr= - m.x636 - m.x642 + m.x1450 == 0) m.c2097 = Constraint(expr= - m.x637 - m.x643 + m.x1451 == 0) m.c2098 = Constraint(expr= - m.x638 - m.x644 + m.x1452 == 0) m.c2099 = Constraint(expr= - m.x639 - m.x645 + m.x1453 == 0) m.c2100 = Constraint(expr= m.x562 + m.x646 + m.x1454 == 100) m.c2101 = Constraint(expr= m.x563 + m.x647 + m.x1455 == 0) m.c2102 = Constraint(expr= m.x564 + m.x648 + m.x1456 == 0) m.c2103 = Constraint(expr= m.x565 + m.x649 + m.x1457 == 0) m.c2104 = Constraint(expr= m.x566 + m.x650 + m.x1458 == 0) m.c2105 = Constraint(expr= m.x567 + m.x651 + m.x1459 == 0) m.c2106 = Constraint(expr= m.x568 + m.x652 + m.x1460 == 0) m.c2107 = Constraint(expr= m.x569 + m.x653 + m.x1461 == 100) m.c2108 = Constraint(expr= m.x570 + m.x654 + m.x1462 == 0) m.c2109 = Constraint(expr= m.x571 + m.x655 + m.x1463 == 0) m.c2110 = Constraint(expr= m.x572 + m.x656 + m.x1464 == 0) m.c2111 = Constraint(expr= m.x573 + m.x657 + m.x1465 == 0) m.c2112 = Constraint(expr= m.x574 + m.x658 + m.x1466 == 0) m.c2113 = Constraint(expr= m.x575 + m.x659 + m.x1467 == 0) m.c2114 = Constraint(expr= m.x576 + m.x660 + m.x1468 == 100) m.c2115 = Constraint(expr= m.x577 + m.x661 + m.x1469 == 0) m.c2116 = Constraint(expr= m.x578 + m.x662 + m.x1470 == 0) m.c2117 = Constraint(expr= m.x579 + m.x663 + m.x1471 == 0) m.c2118 = Constraint(expr= - m.x562 + m.x580 + m.x586 - m.x646 + m.x664 + m.x670 + m.x1472 == 20) m.c2119 = Constraint(expr= - m.x563 + m.x581 + m.x587 - m.x647 + m.x665 + m.x671 + m.x1473 == 0) m.c2120 = Constraint(expr= - m.x564 + m.x582 + m.x588 - m.x648 + m.x666 + m.x672 + m.x1474 == 0) m.c2121 = Constraint(expr= - m.x565 + m.x583 + m.x589 - m.x649 + m.x667 + m.x673 + m.x1475 == 0) m.c2122 = Constraint(expr= - m.x566 + m.x584 + m.x590 - m.x650 + m.x668 + m.x674 + m.x1476 == 0) m.c2123 = Constraint(expr= - m.x567 + m.x585 + m.x591 - m.x651 + m.x669 + m.x675 + m.x1477 == 0) m.c2124 = Constraint(expr= - m.x568 + m.x592 + m.x598 + m.x604 - m.x652 + m.x676 + m.x682 + m.x688 + m.x1478 == 0) m.c2125 = Constraint(expr= - m.x569 + m.x593 + m.x599 + m.x605 - m.x653 + m.x677 + m.x683 + m.x689 + m.x1479 == 50) m.c2126 = Constraint(expr= - m.x570 + m.x594 + m.x600 + m.x606 - m.x654 + m.x678 + m.x684 + m.x690 + m.x1480 == 0) m.c2127 = Constraint(expr= - m.x571 + m.x595 + m.x601 + m.x607 - m.x655 + m.x679 + m.x685 + m.x691 + m.x1481 == 0) m.c2128 = Constraint(expr= - m.x572 + m.x596 + m.x602 + m.x608 - m.x656 + m.x680 + m.x686 + m.x692 + m.x1482 == 0) m.c2129 = Constraint(expr= - m.x573 + m.x597 + m.x603 + m.x609 - m.x657 + m.x681 + m.x687 + m.x693 + m.x1483 == 0) m.c2130 = Constraint(expr= - m.x574 + m.x610 + m.x616 - m.x658 + m.x694 + m.x700 + m.x1484 == 0) m.c2131 = Constraint(expr= - m.x575 + m.x611 + m.x617 - m.x659 + m.x695 + m.x701 + m.x1485 == 0) m.c2132 = Constraint(expr= - m.x576 + m.x612 + m.x618 - m.x660 + m.x696 + m.x702 + m.x1486 == 70) m.c2133 = Constraint(expr= - m.x577 + m.x613 + m.x619 - m.x661 + m.x697 + m.x703 + m.x1487 == 0) m.c2134 = Constraint(expr= - m.x578 + m.x614 + m.x620 - m.x662 + m.x698 + m.x704 + m.x1488 == 0) m.c2135 = Constraint(expr= - m.x579 + m.x615 + m.x621 - m.x663 + m.x699 + m.x705 + m.x1489 == 0) m.c2136 = Constraint(expr= - m.x580 - m.x592 + m.x622 - m.x664 - m.x676 + m.x706 + m.x1490 == 0) m.c2137 = Constraint(expr= - m.x581 - m.x593 + m.x623 - m.x665 - m.x677 + m.x707 + m.x1491 == 0) m.c2138 = Constraint(expr= - m.x582 - m.x594 + m.x624 - m.x666 - m.x678 + m.x708 + m.x1492 == 0) m.c2139 = Constraint(expr= - m.x583 - m.x595 + m.x625 - m.x667 - m.x679 + m.x709 + m.x1493 == 30) m.c2140 = Constraint(expr= - m.x584 - m.x596 + m.x626 - m.x668 - m.x680 + m.x710 + m.x1494 == 0) m.c2141 = Constraint(expr= - m.x585 - m.x597 + m.x627 - m.x669 - m.x681 + m.x711 + m.x1495 == 0) m.c2142 = Constraint(expr= - m.x586 - m.x598 - m.x610 + m.x628 + m.x634 - m.x670 - m.x682 - m.x694 + m.x712 + m.x718 + m.x1496 == 0) m.c2143 = Constraint(expr= - m.x587 - m.x599 - m.x611 + m.x629 + m.x635 - m.x671 - m.x683 - m.x695 + m.x713 + m.x719 + m.x1497 == 0) m.c2144 = Constraint(expr= - m.x588 - m.x600 - m.x612 + m.x630 + m.x636 - m.x672 - m.x684 - m.x696 + m.x714 + m.x720 + m.x1498 == 0) m.c2145 = Constraint(expr= - m.x589 - m.x601 - m.x613 + m.x631 + m.x637 - m.x673 - m.x685 - m.x697 + m.x715 + m.x721 + m.x1499 == 0) m.c2146 = Constraint(expr= - m.x590 - m.x602 - m.x614 + m.x632 + m.x638 - m.x674 - m.x686 - m.x698 + m.x716 + m.x722 + m.x1500 == 50) m.c2147 = Constraint(expr= - m.x591 - m.x603 - m.x615 + m.x633 + m.x639 - m.x675 - m.x687 - m.x699 + m.x717 + m.x723 + m.x1501 == 0) m.c2148 = Constraint(expr= - m.x604 - m.x616 + m.x640 - m.x688 - m.x700 + m.x724 + m.x1502 == 0) m.c2149 = Constraint(expr= - m.x605 - m.x617 + m.x641 - m.x689 - m.x701 + m.x725 + m.x1503 == 0) m.c2150 = Constraint(expr= - m.x606 - m.x618 + m.x642 - m.x690 - m.x702 + m.x726 + m.x1504 == 0) m.c2151 = Constraint(expr= - m.x607 - m.x619 + m.x643 - m.x691 - m.x703 + m.x727 + m.x1505 == 0) m.c2152 = Constraint(expr= - m.x608 - m.x620 + m.x644 - m.x692 - m.x704 + m.x728 + m.x1506 == 0) m.c2153 = Constraint(expr= - m.x609 - m.x621 + m.x645 - m.x693 - m.x705 + m.x729 + m.x1507 == 30) m.c2154 = Constraint(expr= - m.x622 - m.x628 - m.x706 - m.x712 + m.x1508 == 0) m.c2155 = Constraint(expr= - m.x623 - m.x629 - m.x707 - m.x713 + m.x1509 == 0) m.c2156 = Constraint(expr= - m.x624 - m.x630 - m.x708 - m.x714 + m.x1510 == 0) m.c2157 = Constraint(expr= - m.x625 - m.x631 - m.x709 - m.x715 + m.x1511 == 0) m.c2158 = Constraint(expr= - m.x626 - m.x632 - m.x710 - m.x716 + m.x1512 == 0) m.c2159 = Constraint(expr= - m.x627 - m.x633 - m.x711 - m.x717 + m.x1513 == 0) m.c2160 = Constraint(expr= - m.x634 - m.x640 - m.x718 - m.x724 + m.x1514 == 0) m.c2161 = Constraint(expr= - m.x635 - m.x641 - m.x719 - m.x725 + m.x1515 == 0) m.c2162 = Constraint(expr= - m.x636 - m.x642 - m.x720 - m.x726 + m.x1516 == 0) m.c2163 = Constraint(expr= - m.x637 - m.x643 - m.x721 - m.x727 + m.x1517 == 0) m.c2164 = Constraint(expr= - m.x638 - m.x644 - m.x722 - m.x728 + m.x1518 == 0) m.c2165 = Constraint(expr= - m.x639 - m.x645 - m.x723 - m.x729 + m.x1519 == 0) m.c2166 = Constraint(expr= m.x562 + m.x646 + m.x730 + m.x1520 == 100) m.c2167 = Constraint(expr= m.x563 + m.x647 + m.x731 + m.x1521 == 0) m.c2168 = Constraint(expr= m.x564 + m.x648 + m.x732 + m.x1522 == 0) m.c2169 = Constraint(expr= m.x565 + m.x649 + m.x733 + m.x1523 == 0) m.c2170 = Constraint(expr= m.x566 + m.x650 + m.x734 + m.x1524 == 0) m.c2171 = Constraint(expr= m.x567 + m.x651 + m.x735 + m.x1525 == 0) m.c2172 = Constraint(expr= m.x568 + m.x652 + m.x736 + m.x1526 == 0) m.c2173 = Constraint(expr= m.x569 + m.x653 + m.x737 + m.x1527 == 100) m.c2174 = Constraint(expr= m.x570 + m.x654 + m.x738 + m.x1528 == 0) m.c2175 = Constraint(expr= m.x571 + m.x655 + m.x739 + m.x1529 == 0) m.c2176 = Constraint(expr= m.x572 + m.x656 + m.x740 + m.x1530 == 0) m.c2177 = Constraint(expr= m.x573 + m.x657 + m.x741 + m.x1531 == 0) m.c2178 = Constraint(expr= m.x574 + m.x658 + m.x742 + m.x1532 == 0) m.c2179 = Constraint(expr= m.x575 + m.x659 + m.x743 + m.x1533 == 0) m.c2180 = Constraint(expr= m.x576 + m.x660 + m.x744 + m.x1534 == 100) m.c2181 = Constraint(expr= m.x577 + m.x661 + m.x745 + m.x1535 == 0) m.c2182 = Constraint(expr= m.x578 + m.x662 + m.x746 + m.x1536 == 0) m.c2183 = Constraint(expr= m.x579 + m.x663 + m.x747 + m.x1537 == 0) m.c2184 = Constraint(expr= - m.x562 + m.x580 + m.x586 - m.x646 + m.x664 + m.x670 - m.x730 + m.x748 + m.x754 + m.x1538 == 20) m.c2185 = Constraint(expr= - m.x563 + m.x581 + m.x587 - m.x647 + m.x665 + m.x671 - m.x731 + m.x749 + m.x755 + m.x1539 == 0) m.c2186 = Constraint(expr= - m.x564 + m.x582 + m.x588 - m.x648 + m.x666 + m.x672 - m.x732 + m.x750 + m.x756 + m.x1540 == 0) m.c2187 = Constraint(expr= - m.x565 + m.x583 + m.x589 - m.x649 + m.x667 + m.x673 - m.x733 + m.x751 + m.x757 + m.x1541 == 0) m.c2188 = Constraint(expr= - m.x566 + m.x584 + m.x590 - m.x650 + m.x668 + m.x674 - m.x734 + m.x752 + m.x758 + m.x1542 == 0) m.c2189 = Constraint(expr= - m.x567 + m.x585 + m.x591 - m.x651 + m.x669 + m.x675 - m.x735 + m.x753 + m.x759 + m.x1543 == 0) m.c2190 = Constraint(expr= - m.x568 + m.x592 + m.x598 + m.x604 - m.x652 + m.x676 + m.x682 + m.x688 - m.x736 + m.x760 + m.x766 + m.x772 + m.x1544 == 0) m.c2191 = Constraint(expr= - m.x569 + m.x593 + m.x599 + m.x605 - m.x653 + m.x677 + m.x683 + m.x689 - m.x737 + m.x761 + m.x767 + m.x773 + m.x1545 == 50) m.c2192 = Constraint(expr= - m.x570 + m.x594 + m.x600 + m.x606 - m.x654 + m.x678 + m.x684 + m.x690 - m.x738 + m.x762 + m.x768 + m.x774 + m.x1546 == 0) m.c2193 = Constraint(expr= - m.x571 + m.x595 + m.x601 + m.x607 - m.x655 + m.x679 + m.x685 + m.x691 - m.x739 + m.x763 + m.x769 + m.x775 + m.x1547 == 0) m.c2194 = Constraint(expr= - m.x572 + m.x596 + m.x602 + m.x608 - m.x656 + m.x680 + m.x686 + m.x692 - m.x740 + m.x764 + m.x770 + m.x776 + m.x1548 == 0) m.c2195 = Constraint(expr= - m.x573 + m.x597 + m.x603 + m.x609 - m.x657 + m.x681 + m.x687 + m.x693 - m.x741 + m.x765 + m.x771 + m.x777 + m.x1549 == 0) m.c2196 = Constraint(expr= - m.x574 + m.x610 + m.x616 - m.x658 + m.x694 + m.x700 - m.x742 + m.x778 + m.x784 + m.x1550 == 0) m.c2197 = Constraint(expr= - m.x575 + m.x611 + m.x617 - m.x659 + m.x695 + m.x701 - m.x743 + m.x779 + m.x785 + m.x1551 == 0) m.c2198 = Constraint(expr= - m.x576 + m.x612 + m.x618 - m.x660 + m.x696 + m.x702 - m.x744 + m.x780 + m.x786 + m.x1552 == 70) m.c2199 = Constraint(expr= - m.x577 + m.x613 + m.x619 - m.x661 + m.x697 + m.x703 - m.x745 + m.x781 + m.x787 + m.x1553 == 0) m.c2200 = Constraint(expr= - m.x578 + m.x614 + m.x620 - m.x662 + m.x698 + m.x704 - m.x746 + m.x782 + m.x788 + m.x1554 == 0) m.c2201 = Constraint(expr= - m.x579 + m.x615 + m.x621 - m.x663 + m.x699 + m.x705 - m.x747 + m.x783 + m.x789 + m.x1555 == 0) m.c2202 = Constraint(expr= - m.x580 - m.x592 + m.x622 - m.x664 - m.x676 + m.x706 - m.x748 - m.x760 + m.x790 + m.x1556 == 0) m.c2203 = Constraint(expr= - m.x581 - m.x593 + m.x623 - m.x665 - m.x677 + m.x707 - m.x749 - m.x761 + m.x791 + m.x1557 == 0) m.c2204 = Constraint(expr= - m.x582 - m.x594 + m.x624 - m.x666 - m.x678 + m.x708 - m.x750 - m.x762 + m.x792 + m.x1558 == 0) m.c2205 = Constraint(expr= - m.x583 - m.x595 + m.x625 - m.x667 - m.x679 + m.x709 - m.x751 - m.x763 + m.x793 + m.x1559 == 30) m.c2206 = Constraint(expr= - m.x584 - m.x596 + m.x626 - m.x668 - m.x680 + m.x710 - m.x752 - m.x764 + m.x794 + m.x1560 == 0) m.c2207 = Constraint(expr= - m.x585 - m.x597 + m.x627 - m.x669 - m.x681 + m.x711 - m.x753 - m.x765 + m.x795 + m.x1561 == 0) m.c2208 = Constraint(expr= - m.x586 - m.x598 - m.x610 + m.x628 + m.x634 - m.x670 - m.x682 - m.x694 + m.x712 + m.x718 - m.x754 - m.x766 - m.x778 + m.x796 + m.x802 + m.x1562 == 0) m.c2209 = Constraint(expr= - m.x587 - m.x599 - m.x611 + m.x629 + m.x635 - m.x671 - m.x683 - m.x695 + m.x713 + m.x719 - m.x755 - m.x767 - m.x779 + m.x797 + m.x803 + m.x1563 == 0) m.c2210 = Constraint(expr= - m.x588 - m.x600 - m.x612 + m.x630 + m.x636 - m.x672 - m.x684 - m.x696 + m.x714 + m.x720 - m.x756 - m.x768 - m.x780 + m.x798 + m.x804 + m.x1564 == 0) m.c2211 = Constraint(expr= - m.x589 - m.x601 - m.x613 + m.x631 + m.x637 - m.x673 - m.x685 - m.x697 + m.x715 + m.x721 - m.x757 - m.x769 - m.x781 + m.x799 + m.x805 + m.x1565 == 0) m.c2212 = Constraint(expr= - m.x590 - m.x602 - m.x614 + m.x632 + m.x638 - m.x674 - m.x686 - m.x698 + m.x716 + m.x722 - m.x758 - m.x770 - m.x782 + m.x800 + m.x806 + m.x1566 == 50) m.c2213 = Constraint(expr= - m.x591 - m.x603 - m.x615 + m.x633 + m.x639 - m.x675 - m.x687 - m.x699 + m.x717 + m.x723 - m.x759 - m.x771 - m.x783 + m.x801 + m.x807 + m.x1567 == 0) m.c2214 = Constraint(expr= - m.x604 - m.x616 + m.x640 - m.x688 - m.x700 + m.x724 - m.x772 - m.x784 + m.x808 + m.x1568 == 0) m.c2215 = Constraint(expr= - m.x605 - m.x617 + m.x641 - m.x689 - m.x701 + m.x725 - m.x773 - m.x785 + m.x809 + m.x1569 == 0) m.c2216 = Constraint(expr= - m.x606 - m.x618 + m.x642 - m.x690 - m.x702 + m.x726 - m.x774 - m.x786 + m.x810 + m.x1570 == 0) m.c2217 = Constraint(expr= - m.x607 - m.x619 + m.x643 - m.x691 - m.x703 + m.x727 - m.x775 - m.x787 + m.x811 + m.x1571 == 0) m.c2218 = Constraint(expr= - m.x608 - m.x620 + m.x644 - m.x692 - m.x704 + m.x728 - m.x776 - m.x788 + m.x812 + m.x1572 == 0) m.c2219 = Constraint(expr= - m.x609 - m.x621 + m.x645 - m.x693 - m.x705 + m.x729 - m.x777 - m.x789 + m.x813 + m.x1573 == 30) m.c2220 = Constraint(expr= - m.x622 - m.x628 - m.x706 - m.x712 - m.x790 - m.x796 + m.x1574 == 0) m.c2221 = Constraint(expr= - m.x623 - m.x629 - m.x707 - m.x713 - m.x791 - m.x797 + m.x1575 == 0) m.c2222 = Constraint(expr= - m.x624 - m.x630 - m.x708 - m.x714 - m.x792 - m.x798 + m.x1576 == 0) m.c2223 = Constraint(expr= - m.x625 - m.x631 - m.x709 - m.x715 - m.x793 - m.x799 + m.x1577 == 0) m.c2224 = Constraint(expr= - m.x626 - m.x632 - m.x710 - m.x716 - m.x794 - m.x800 + m.x1578 == 0) m.c2225 = Constraint(expr= - m.x627 - m.x633 - m.x711 - m.x717 - m.x795 - m.x801 + m.x1579 == 0) m.c2226 = Constraint(expr= - m.x634 - m.x640 - m.x718 - m.x724 - m.x802 - m.x808 + m.x1580 == 0) m.c2227 = Constraint(expr= - m.x635 - m.x641 - m.x719 - m.x725 - m.x803 - m.x809 + m.x1581 == 0) m.c2228 = Constraint(expr= - m.x636 - m.x642 - m.x720 - m.x726 - m.x804 - m.x810 + m.x1582 == 0) m.c2229 = Constraint(expr= - m.x637 - m.x643 - m.x721 - m.x727 - m.x805 - m.x811 + m.x1583 == 0) m.c2230 = Constraint(expr= - m.x638 - m.x644 - m.x722 - m.x728 - m.x806 - m.x812 + m.x1584 == 0) m.c2231 = Constraint(expr= - m.x639 - m.x645 - m.x723 - m.x729 - m.x807 - m.x813 + m.x1585 == 0) m.c2232 = Constraint(expr= m.x562 + m.x646 + m.x730 + m.x814 + m.x1586 == 100) m.c2233 = Constraint(expr= m.x563 + m.x647 + m.x731 + m.x815 + m.x1587 == 0) m.c2234 = Constraint(expr= m.x564 + m.x648 + m.x732 + m.x816 + m.x1588 == 0) m.c2235 = Constraint(expr= m.x565 + m.x649 + m.x733 + m.x817 + m.x1589 == 0) m.c2236 = Constraint(expr= m.x566 + m.x650 + m.x734 + m.x818 + m.x1590 == 0) m.c2237 = Constraint(expr= m.x567 + m.x651 + m.x735 + m.x819 + m.x1591 == 0) m.c2238 = Constraint(expr= m.x568 + m.x652 + m.x736 + m.x820 + m.x1592 == 0) m.c2239 = Constraint(expr= m.x569 + m.x653 + m.x737 + m.x821 + m.x1593 == 100) m.c2240 = Constraint(expr= m.x570 + m.x654 + m.x738 + m.x822 + m.x1594 == 0) m.c2241 = Constraint(expr= m.x571 + m.x655 + m.x739 + m.x823 + m.x1595 == 0) m.c2242 = Constraint(expr= m.x572 + m.x656 + m.x740 + m.x824 + m.x1596 == 0) m.c2243 = Constraint(expr= m.x573 + m.x657 + m.x741 + m.x825 + m.x1597 == 0) m.c2244 = Constraint(expr= m.x574 + m.x658 + m.x742 + m.x826 + m.x1598 == 0) m.c2245 = Constraint(expr= m.x575 + m.x659 + m.x743 + m.x827 + m.x1599 == 0) m.c2246 = Constraint(expr= m.x576 + m.x660 + m.x744 + m.x828 + m.x1600 == 100) m.c2247 = Constraint(expr= m.x577 + m.x661 + m.x745 + m.x829 + m.x1601 == 0) m.c2248 = Constraint(expr= m.x578 + m.x662 + m.x746 + m.x830 + m.x1602 == 0) m.c2249 = Constraint(expr= m.x579 + m.x663 + m.x747 + m.x831 + m.x1603 == 0) m.c2250 = Constraint(expr= - m.x562 + m.x580 + m.x586 - m.x646 + m.x664 + m.x670 - m.x730 + m.x748 + m.x754 - m.x814 + m.x832 + m.x838 + m.x1604 == 20) m.c2251 = Constraint(expr= - m.x563 + m.x581 + m.x587 - m.x647 + m.x665 + m.x671 - m.x731 + m.x749 + m.x755 - m.x815 + m.x833 + m.x839 + m.x1605 == 0) m.c2252 = Constraint(expr= - m.x564 + m.x582 + m.x588 - m.x648 + m.x666 + m.x672 - m.x732 + m.x750 + m.x756 - m.x816 + m.x834 + m.x840 + m.x1606 == 0) m.c2253 = Constraint(expr= - m.x565 + m.x583 + m.x589 - m.x649 + m.x667 + m.x673 - m.x733 + m.x751 + m.x757 - m.x817 + m.x835 + m.x841 + m.x1607 == 0) m.c2254 = Constraint(expr= - m.x566 + m.x584 + m.x590 - m.x650 + m.x668 + m.x674 - m.x734 + m.x752 + m.x758 - m.x818 + m.x836 + m.x842 + m.x1608 == 0) m.c2255 = Constraint(expr= - m.x567 + m.x585 + m.x591 - m.x651 + m.x669 + m.x675 - m.x735 + m.x753 + m.x759 - m.x819 + m.x837 + m.x843 + m.x1609 == 0) m.c2256 = Constraint(expr= - m.x568 + m.x592 + m.x598 + m.x604 - m.x652 + m.x676 + m.x682 + m.x688 - m.x736 + m.x760 + m.x766 + m.x772 - m.x820 + m.x844 + m.x850 + m.x856 + m.x1610 == 0) m.c2257 = Constraint(expr= - m.x569 + m.x593 + m.x599 + m.x605 - m.x653 + m.x677 + m.x683 + m.x689 - m.x737 + m.x761 + m.x767 + m.x773 - m.x821 + m.x845 + m.x851 + m.x857 + m.x1611 == 50) m.c2258 = Constraint(expr= - m.x570 + m.x594 + m.x600 + m.x606 - m.x654 + m.x678 + m.x684 + m.x690 - m.x738 + m.x762 + m.x768 + m.x774 - m.x822 + m.x846 + m.x852 + m.x858 + m.x1612 == 0) m.c2259 = Constraint(expr= - m.x571 + m.x595 + m.x601 + m.x607 - m.x655 + m.x679 + m.x685 + m.x691 - m.x739 + m.x763 + m.x769 + m.x775 - m.x823 + m.x847 + m.x853 + m.x859 + m.x1613 == 0) m.c2260 = Constraint(expr= - m.x572 + m.x596 + m.x602 + m.x608 - m.x656 + m.x680 + m.x686 + m.x692 - m.x740 + m.x764 + m.x770 + m.x776 - m.x824 + m.x848 + m.x854 + m.x860 + m.x1614 == 0) m.c2261 = Constraint(expr= - m.x573 + m.x597 + m.x603 + m.x609 - m.x657 + m.x681 + m.x687 + m.x693 - m.x741 + m.x765 + m.x771 + m.x777 - m.x825 + m.x849 + m.x855 + m.x861 + m.x1615 == 0) m.c2262 = Constraint(expr= - m.x574 + m.x610 + m.x616 - m.x658 + m.x694 + m.x700 - m.x742 + m.x778 + m.x784 - m.x826 + m.x862 + m.x868 + m.x1616 == 0) m.c2263 = Constraint(expr= - m.x575 + m.x611 + m.x617 - m.x659 + m.x695 + m.x701 - m.x743 + m.x779 + m.x785 - m.x827 + m.x863 + m.x869 + m.x1617 == 0) m.c2264 = Constraint(expr= - m.x576 + m.x612 + m.x618 - m.x660 + m.x696 + m.x702 - m.x744 + m.x780 + m.x786 - m.x828 + m.x864 + m.x870 + m.x1618 == 70) m.c2265 = Constraint(expr= - m.x577 + m.x613 + m.x619 - m.x661 + m.x697 + m.x703 - m.x745 + m.x781 + m.x787 - m.x829 + m.x865 + m.x871 + m.x1619 == 0) m.c2266 = Constraint(expr= - m.x578 + m.x614 + m.x620 - m.x662 + m.x698 + m.x704 - m.x746 + m.x782 + m.x788 - m.x830 + m.x866 + m.x872 + m.x1620 == 0) m.c2267 = Constraint(expr= - m.x579 + m.x615 + m.x621 - m.x663 + m.x699 + m.x705 - m.x747 + m.x783 + m.x789 - m.x831 + m.x867 + m.x873 + m.x1621 == 0) m.c2268 = Constraint(expr= - m.x580 - m.x592 + m.x622 - m.x664 - m.x676 + m.x706 - m.x748 - m.x760 + m.x790 - m.x832 - m.x844 + m.x874 + m.x1622 == 0) m.c2269 = Constraint(expr= - m.x581 - m.x593 + m.x623 - m.x665 - m.x677 + m.x707 - m.x749 - m.x761 + m.x791 - m.x833 - m.x845 + m.x875 + m.x1623 == 0) m.c2270 = Constraint(expr= - m.x582 - m.x594 + m.x624 - m.x666 - m.x678 + m.x708 - m.x750 - m.x762 + m.x792 - m.x834 - m.x846 + m.x876 + m.x1624 == 0) m.c2271 = Constraint(expr= - m.x583 - m.x595 + m.x625 - m.x667 - m.x679 + m.x709 - m.x751 - m.x763 + m.x793 - m.x835 - m.x847 + m.x877 + m.x1625 == 30) m.c2272 = Constraint(expr= - m.x584 - m.x596 + m.x626 - m.x668 - m.x680 + m.x710 - m.x752 - m.x764 + m.x794 - m.x836 - m.x848 + m.x878 + m.x1626 == 0) m.c2273 = Constraint(expr= - m.x585 - m.x597 + m.x627 - m.x669 - m.x681 + m.x711 - m.x753 - m.x765 + m.x795 - m.x837 - m.x849 + m.x879 + m.x1627 == 0) m.c2274 = Constraint(expr= - m.x586 - m.x598 - m.x610 + m.x628 + m.x634 - m.x670 - m.x682 - m.x694 + m.x712 + m.x718 - m.x754 - m.x766 - m.x778 + m.x796 + m.x802 - m.x838 - m.x850 - m.x862 + m.x880 + m.x886 + m.x1628 == 0) m.c2275 = Constraint(expr= - m.x587 - m.x599 - m.x611 + m.x629 + m.x635 - m.x671 - m.x683 - m.x695 + m.x713 + m.x719 - m.x755 - m.x767 - m.x779 + m.x797 + m.x803 - m.x839 - m.x851 - m.x863 + m.x881 + m.x887 + m.x1629 == 0) m.c2276 = Constraint(expr= - m.x588 - m.x600 - m.x612 + m.x630 + m.x636 - m.x672 - m.x684 - m.x696 + m.x714 + m.x720 - m.x756 - m.x768 - m.x780 + m.x798 + m.x804 - m.x840 - m.x852 - m.x864 + m.x882 + m.x888 + m.x1630 == 0) m.c2277 = Constraint(expr= - m.x589 - m.x601 - m.x613 + m.x631 + m.x637 - m.x673 - m.x685 - m.x697 + m.x715 + m.x721 - m.x757 - m.x769 - m.x781 + m.x799 + m.x805 - m.x841 - m.x853 - m.x865 + m.x883 + m.x889 + m.x1631 == 0) m.c2278 = Constraint(expr= - m.x590 - m.x602 - m.x614 + m.x632 + m.x638 - m.x674 - m.x686 - m.x698 + m.x716 + m.x722 - m.x758 - m.x770 - m.x782 + m.x800 + m.x806 - m.x842 - m.x854 - m.x866 + m.x884 + m.x890 + m.x1632 == 50) m.c2279 = Constraint(expr= - m.x591 - m.x603 - m.x615 + m.x633 + m.x639 - m.x675 - m.x687 - m.x699 + m.x717 + m.x723 - m.x759 - m.x771 - m.x783 + m.x801 + m.x807 - m.x843 - m.x855 - m.x867 + m.x885 + m.x891 + m.x1633 == 0) m.c2280 = Constraint(expr= - m.x604 - m.x616 + m.x640 - m.x688 - m.x700 + m.x724 - m.x772 - m.x784 + m.x808 - m.x856 - m.x868 + m.x892 + m.x1634 == 0) m.c2281 = Constraint(expr= - m.x605 - m.x617 + m.x641 - m.x689 - m.x701 + m.x725 - m.x773 - m.x785 + m.x809 - m.x857 - m.x869 + m.x893 + m.x1635 == 0) m.c2282 = Constraint(expr= - m.x606 - m.x618 + m.x642 - m.x690 - m.x702 + m.x726 - m.x774 - m.x786 + m.x810 - m.x858 - m.x870 + m.x894 + m.x1636 == 0) m.c2283 = Constraint(expr= - m.x607 - m.x619 + m.x643 - m.x691 - m.x703 + m.x727 - m.x775 - m.x787 + m.x811 - m.x859 - m.x871 + m.x895 + m.x1637 == 0) m.c2284 = Constraint(expr= - m.x608 - m.x620 + m.x644 - m.x692 - m.x704 + m.x728 - m.x776 - m.x788 + m.x812 - m.x860 - m.x872 + m.x896 + m.x1638 == 0) m.c2285 = Constraint(expr= - m.x609 - m.x621 + m.x645 - m.x693 - m.x705 + m.x729 - m.x777 - m.x789 + m.x813 - m.x861 - m.x873 + m.x897 + m.x1639 == 30) m.c2286 = Constraint(expr= - m.x622 - m.x628 - m.x706 - m.x712 - m.x790 - m.x796 - m.x874 - m.x880 + m.x1640 == 0) m.c2287 = Constraint(expr= - m.x623 - m.x629 - m.x707 - m.x713 - m.x791 - m.x797 - m.x875 - m.x881 + m.x1641 == 0) m.c2288 = Constraint(expr= - m.x624 - m.x630 - m.x708 - m.x714 - m.x792 - m.x798 - m.x876 - m.x882 + m.x1642 == 0) m.c2289 = Constraint(expr= - m.x625 - m.x631 - m.x709 - m.x715 - m.x793 - m.x799 - m.x877 - m.x883 + m.x1643 == 0) m.c2290 = Constraint(expr= - m.x626 - m.x632 - m.x710 - m.x716 - m.x794 - m.x800 - m.x878 - m.x884 + m.x1644 == 0) m.c2291 = Constraint(expr= - m.x627 - m.x633 - m.x711 - m.x717 - m.x795 - m.x801 - m.x879 - m.x885 + m.x1645 == 0) m.c2292 = Constraint(expr= - m.x634 - m.x640 - m.x718 - m.x724 - m.x802 - m.x808 - m.x886 - m.x892 + m.x1646 == 0) m.c2293 = Constraint(expr= - m.x635 - m.x641 - m.x719 - m.x725 - m.x803 - m.x809 - m.x887 - m.x893 + m.x1647 == 0) m.c2294 = Constraint(expr= - m.x636 - m.x642 - m.x720 - m.x726 - m.x804 - m.x810 - m.x888 - m.x894 + m.x1648 == 0) m.c2295 = Constraint(expr= - m.x637 - m.x643 - m.x721 - m.x727 - m.x805 - m.x811 - m.x889 - m.x895 + m.x1649 == 0) m.c2296 = Constraint(expr= - m.x638 - m.x644 - m.x722 - m.x728 - m.x806 - m.x812 - m.x890 - m.x896 + m.x1650 == 0) m.c2297 = Constraint(expr= - m.x639 - m.x645 - m.x723 - m.x729 - m.x807 - m.x813 - m.x891 - m.x897 + m.x1651 == 0) m.c2298 = Constraint(expr= m.x562 + m.x646 + m.x730 + m.x814 + m.x898 + m.x1652 == 100) m.c2299 = Constraint(expr= m.x563 + m.x647 + m.x731 + m.x815 + m.x899 + m.x1653 == 0) m.c2300 = Constraint(expr= m.x564 + m.x648 + m.x732 + m.x816 + m.x900 + m.x1654 == 0) m.c2301 = Constraint(expr= m.x565 + m.x649 + m.x733 + m.x817 + m.x901 + m.x1655 == 0) m.c2302 = Constraint(expr= m.x566 + m.x650 + m.x734 + m.x818 + m.x902 + m.x1656 == 0) m.c2303 = Constraint(expr= m.x567 + m.x651 + m.x735 + m.x819 + m.x903 + m.x1657 == 0) m.c2304 = Constraint(expr= m.x568 + m.x652 + m.x736 + m.x820 + m.x904 + m.x1658 == 0) m.c2305 = Constraint(expr= m.x569 + m.x653 + m.x737 + m.x821 + m.x905 + m.x1659 == 100) m.c2306 = Constraint(expr= m.x570 + m.x654 + m.x738 + m.x822 + m.x906 + m.x1660 == 0) m.c2307 = Constraint(expr= m.x571 + m.x655 + m.x739 + m.x823 + m.x907 + m.x1661 == 0) m.c2308 = Constraint(expr= m.x572 + m.x656 + m.x740 + m.x824 + m.x908 + m.x1662 == 0) m.c2309 = Constraint(expr= m.x573 + m.x657 + m.x741 + m.x825 + m.x909 + m.x1663 == 0) m.c2310 = Constraint(expr= m.x574 + m.x658 + m.x742 + m.x826 + m.x910 + m.x1664 == 0) m.c2311 = Constraint(expr= m.x575 + m.x659 + m.x743 + m.x827 + m.x911 + m.x1665 == 0) m.c2312 = Constraint(expr= m.x576 + m.x660 + m.x744 + m.x828 + m.x912 + m.x1666 == 100) m.c2313 = Constraint(expr= m.x577 + m.x661 + m.x745 + m.x829 + m.x913 + m.x1667 == 0) m.c2314 = Constraint(expr= m.x578 + m.x662 + m.x746 + m.x830 + m.x914 + m.x1668 == 0) m.c2315 = Constraint(expr= m.x579 + m.x663 + m.x747 + m.x831 + m.x915 + m.x1669 == 0) m.c2316 = Constraint(expr= - m.x562 + m.x580 + m.x586 - m.x646 + m.x664 + m.x670 - m.x730 + m.x748 + m.x754 - m.x814 + m.x832 + m.x838 - m.x898 + m.x916 + m.x922 + m.x1670 == 20) m.c2317 = Constraint(expr= - m.x563 + m.x581 + m.x587 - m.x647 + m.x665 + m.x671 - m.x731 + m.x749 + m.x755 - m.x815 + m.x833 + m.x839 - m.x899 + m.x917 + m.x923 + m.x1671 == 0) m.c2318 = Constraint(expr= - m.x564 + m.x582 + m.x588 - m.x648 + m.x666 + m.x672 - m.x732 + m.x750 + m.x756 - m.x816 + m.x834 + m.x840 - m.x900 + m.x918 + m.x924 + m.x1672 == 0) m.c2319 = Constraint(expr= - m.x565 + m.x583 + m.x589 - m.x649 + m.x667 + m.x673 - m.x733 + m.x751 + m.x757 - m.x817 + m.x835 + m.x841 - m.x901 + m.x919 + m.x925 + m.x1673 == 0) m.c2320 = Constraint(expr= - m.x566 + m.x584 + m.x590 - m.x650 + m.x668 + m.x674 - m.x734 + m.x752 + m.x758 - m.x818 + m.x836 + m.x842 - m.x902 + m.x920 + m.x926 + m.x1674 == 0) m.c2321 = Constraint(expr= - m.x567 + m.x585 + m.x591 - m.x651 + m.x669 + m.x675 - m.x735 + m.x753 + m.x759 - m.x819 + m.x837 + m.x843 - m.x903 + m.x921 + m.x927 + m.x1675 == 0) m.c2322 = Constraint(expr= - m.x568 + m.x592 + m.x598 + m.x604 - m.x652 + m.x676 + m.x682 + m.x688 - m.x736 + m.x760 + m.x766 + m.x772 - m.x820 + m.x844 + m.x850 + m.x856 - m.x904 + m.x928 + m.x934 + m.x940 + m.x1676 == 0) m.c2323 = Constraint(expr= - m.x569 + m.x593 + m.x599 + m.x605 - m.x653 + m.x677 + m.x683 + m.x689 - m.x737 + m.x761 + m.x767 + m.x773 - m.x821 + m.x845 + m.x851 + m.x857 - m.x905 + m.x929 + m.x935 + m.x941 + m.x1677 == 50) m.c2324 = Constraint(expr= - m.x570 + m.x594 + m.x600 + m.x606 - m.x654 + m.x678 + m.x684 + m.x690 - m.x738 + m.x762 + m.x768 + m.x774 - m.x822 + m.x846 + m.x852 + m.x858 - m.x906 + m.x930 + m.x936 + m.x942 + m.x1678 == 0) m.c2325 = Constraint(expr= - m.x571 + m.x595 + m.x601 + m.x607 - m.x655 + m.x679 + m.x685 + m.x691 - m.x739 + m.x763 + m.x769 + m.x775 - m.x823 + m.x847 + m.x853 + m.x859 - m.x907 + m.x931 + m.x937 + m.x943 + m.x1679 == 0) m.c2326 = Constraint(expr= - m.x572 + m.x596 + m.x602 + m.x608 - m.x656 + m.x680 + m.x686 + m.x692 - m.x740 + m.x764 + m.x770 + m.x776 - m.x824 + m.x848 + m.x854 + m.x860 - m.x908 + m.x932 + m.x938 + m.x944 + m.x1680 == 0) m.c2327 = Constraint(expr= - m.x573 + m.x597 + m.x603 + m.x609 - m.x657 + m.x681 + m.x687 + m.x693 - m.x741 + m.x765 + m.x771 + m.x777 - m.x825 + m.x849 + m.x855 + m.x861 - m.x909 + m.x933 + m.x939 + m.x945 + m.x1681 == 0) m.c2328 = Constraint(expr= - m.x574 + m.x610 + m.x616 - m.x658 + m.x694 + m.x700 - m.x742 + m.x778 + m.x784 - m.x826 + m.x862 + m.x868 - m.x910 + m.x946 + m.x952 + m.x1682 == 0) m.c2329 = Constraint(expr= - m.x575 + m.x611 + m.x617 - m.x659 + m.x695 + m.x701 - m.x743 + m.x779 + m.x785 - m.x827 + m.x863 + m.x869 - m.x911 + m.x947 + m.x953 + m.x1683 == 0) m.c2330 = Constraint(expr= - m.x576 + m.x612 + m.x618 - m.x660 + m.x696 + m.x702 - m.x744 + m.x780 + m.x786 - m.x828 + m.x864 + m.x870 - m.x912 + m.x948 + m.x954 + m.x1684 == 70) m.c2331 = Constraint(expr= - m.x577 + m.x613 + m.x619 - m.x661 + m.x697 + m.x703 - m.x745 + m.x781 + m.x787 - m.x829 + m.x865 + m.x871 - m.x913 + m.x949 + m.x955 + m.x1685 == 0) m.c2332 = Constraint(expr= - m.x578 + m.x614 + m.x620 - m.x662 + m.x698 + m.x704 - m.x746 + m.x782 + m.x788 - m.x830 + m.x866 + m.x872 - m.x914 + m.x950 + m.x956 + m.x1686 == 0) m.c2333 = Constraint(expr= - m.x579 + m.x615 + m.x621 - m.x663 + m.x699 + m.x705 - m.x747 + m.x783 + m.x789 - m.x831 + m.x867 + m.x873 - m.x915 + m.x951 + m.x957 + m.x1687 == 0) m.c2334 = Constraint(expr= - m.x580 - m.x592 + m.x622 - m.x664 - m.x676 + m.x706 - m.x748 - m.x760 + m.x790 - m.x832 - m.x844 + m.x874 - m.x916 - m.x928 + m.x958 + m.x1688 == 0) m.c2335 = Constraint(expr= - m.x581 - m.x593 + m.x623 - m.x665 - m.x677 + m.x707 - m.x749 - m.x761 + m.x791 - m.x833 - m.x845 + m.x875 - m.x917 - m.x929 + m.x959 + m.x1689 == 0) m.c2336 = Constraint(expr= - m.x582 - m.x594 + m.x624 - m.x666 - m.x678 + m.x708 - m.x750 - m.x762 + m.x792 - m.x834 - m.x846 + m.x876 - m.x918 - m.x930 + m.x960 + m.x1690 == 0) m.c2337 = Constraint(expr= - m.x583 - m.x595 + m.x625 - m.x667 - m.x679 + m.x709 - m.x751 - m.x763 + m.x793 - m.x835 - m.x847 + m.x877 - m.x919 - m.x931 + m.x961 + m.x1691 == 30) m.c2338 = Constraint(expr= - m.x584 - m.x596 + m.x626 - m.x668 - m.x680 + m.x710 - m.x752 - m.x764 + m.x794 - m.x836 - m.x848 + m.x878 - m.x920 - m.x932 + m.x962 + m.x1692 == 0) m.c2339 = Constraint(expr= - m.x585 - m.x597 + m.x627 - m.x669 - m.x681 + m.x711 - m.x753 - m.x765 + m.x795 - m.x837 - m.x849 + m.x879 - m.x921 - m.x933 + m.x963 + m.x1693 == 0) m.c2340 = Constraint(expr= - m.x586 - m.x598 - m.x610 + m.x628 + m.x634 - m.x670 - m.x682 - m.x694 + m.x712 + m.x718 - m.x754 - m.x766 - m.x778 + m.x796 + m.x802 - m.x838 - m.x850 - m.x862 + m.x880 + m.x886 - m.x922 - m.x934 - m.x946 + m.x964 + m.x970 + m.x1694 == 0) m.c2341 = Constraint(expr= - m.x587 - m.x599 - m.x611 + m.x629 + m.x635 - m.x671 - m.x683 - m.x695 + m.x713 + m.x719 - m.x755 - m.x767 - m.x779 + m.x797 + m.x803 - m.x839 - m.x851 - m.x863 + m.x881 + m.x887 - m.x923 - m.x935 - m.x947 + m.x965 + m.x971 + m.x1695 == 0) m.c2342 = Constraint(expr= - m.x588 - m.x600 - m.x612 + m.x630 + m.x636 - m.x672 - m.x684 - m.x696 + m.x714 + m.x720 - m.x756 - m.x768 - m.x780 + m.x798 + m.x804 - m.x840 - m.x852 - m.x864 + m.x882 + m.x888 - m.x924 - m.x936 - m.x948 + m.x966 + m.x972 + m.x1696 == 0) m.c2343 = Constraint(expr= - m.x589 - m.x601 - m.x613 + m.x631 + m.x637 - m.x673 - m.x685 - m.x697 + m.x715 + m.x721 - m.x757 - m.x769 - m.x781 + m.x799 + m.x805 - m.x841 - m.x853 - m.x865 + m.x883 + m.x889 - m.x925 - m.x937 - m.x949 + m.x967 + m.x973 + m.x1697 == 0) m.c2344 = Constraint(expr= - m.x590 - m.x602 - m.x614 + m.x632 + m.x638 - m.x674 - m.x686 - m.x698 + m.x716 + m.x722 - m.x758 - m.x770 - m.x782 + m.x800 + m.x806 - m.x842 - m.x854 - m.x866 + m.x884 + m.x890 - m.x926 - m.x938 - m.x950 + m.x968 + m.x974 + m.x1698 == 50) m.c2345 = Constraint(expr= - m.x591 - m.x603 - m.x615 + m.x633 + m.x639 - m.x675 - m.x687 - m.x699 + m.x717 + m.x723 - m.x759 - m.x771 - m.x783 + m.x801 + m.x807 - m.x843 - m.x855 - m.x867 + m.x885 + m.x891 - m.x927 - m.x939 - m.x951 + m.x969 + m.x975 + m.x1699 == 0) m.c2346 = Constraint(expr= - m.x604 - m.x616 + m.x640 - m.x688 - m.x700 + m.x724 - m.x772 - m.x784 + m.x808 - m.x856 - m.x868 + m.x892 - m.x940 - m.x952 + m.x976 + m.x1700 == 0) m.c2347 = Constraint(expr= - m.x605 - m.x617 + m.x641 - m.x689 - m.x701 + m.x725 - m.x773 - m.x785 + m.x809 - m.x857 - m.x869 + m.x893 - m.x941 - m.x953 + m.x977 + m.x1701 == 0) m.c2348 = Constraint(expr= - m.x606 - m.x618 + m.x642 - m.x690 - m.x702 + m.x726 - m.x774 - m.x786 + m.x810 - m.x858 - m.x870 + m.x894 - m.x942 - m.x954 + m.x978 + m.x1702 == 0) m.c2349 = Constraint(expr= - m.x607 - m.x619 + m.x643 - m.x691 - m.x703 + m.x727 - m.x775 - m.x787 + m.x811 - m.x859 - m.x871 + m.x895 - m.x943 - m.x955 + m.x979 + m.x1703 == 0) m.c2350 = Constraint(expr= - m.x608 - m.x620 + m.x644 - m.x692 - m.x704 + m.x728 - m.x776 - m.x788 + m.x812 - m.x860 - m.x872 + m.x896 - m.x944 - m.x956 + m.x980 + m.x1704 == 0) m.c2351 = Constraint(expr= - m.x609 - m.x621 + m.x645 - m.x693 - m.x705 + m.x729 - m.x777 - m.x789 + m.x813 - m.x861 - m.x873 + m.x897 - m.x945 - m.x957 + m.x981 + m.x1705 == 30) m.c2352 = Constraint(expr= - m.x622 - m.x628 - m.x706 - m.x712 - m.x790 - m.x796 - m.x874 - m.x880 - m.x958 - m.x964 + m.x1706 == 0) m.c2353 = Constraint(expr= - m.x623 - m.x629 - m.x707 - m.x713 - m.x791 - m.x797 - m.x875 - m.x881 - m.x959 - m.x965 + m.x1707 == 0) m.c2354 = Constraint(expr= - m.x624 - m.x630 - m.x708 - m.x714 - m.x792 - m.x798 - m.x876 - m.x882 - m.x960 - m.x966 + m.x1708 == 0) m.c2355 = Constraint(expr= - m.x625 - m.x631 - m.x709 - m.x715 - m.x793 - m.x799 - m.x877 - m.x883 - m.x961 - m.x967 + m.x1709 == 0) m.c2356 = Constraint(expr= - m.x626 - m.x632 - m.x710 - m.x716 - m.x794 - m.x800 - m.x878 - m.x884 - m.x962 - m.x968 + m.x1710 == 0) m.c2357 = Constraint(expr= - m.x627 - m.x633 - m.x711 - m.x717 - m.x795 - m.x801 - m.x879 - m.x885 - m.x963 - m.x969 + m.x1711 == 0) m.c2358 = Constraint(expr= - m.x634 - m.x640 - m.x718 - m.x724 - m.x802 - m.x808 - m.x886 - m.x892 - m.x970 - m.x976 + m.x1712 == 0) m.c2359 = Constraint(expr= - m.x635 - m.x641 - m.x719 - m.x725 - m.x803 - m.x809 - m.x887 - m.x893 - m.x971 - m.x977 + m.x1713 == 0) m.c2360 = Constraint(expr= - m.x636 - m.x642 - m.x720 - m.x726 - m.x804 - m.x810 - m.x888 - m.x894 - m.x972 - m.x978 + m.x1714 == 0) m.c2361 = Constraint(expr= - m.x637 - m.x643 - m.x721 - m.x727 - m.x805 - m.x811 - m.x889 - m.x895 - m.x973 - m.x979 + m.x1715 == 0) m.c2362 = Constraint(expr= - m.x638 - m.x644 - m.x722 - m.x728 - m.x806 - m.x812 - m.x890 - m.x896 - m.x974 - m.x980 + m.x1716 == 0) m.c2363 = Constraint(expr= - m.x639 - m.x645 - m.x723 - m.x729 - m.x807 - m.x813 - m.x891 - m.x897 - m.x975 - m.x981 + m.x1717 == 0) m.c2364 = Constraint(expr= m.x562 + m.x646 + m.x730 + m.x814 + m.x898 + m.x982 + m.x1718 == 100) m.c2365 = Constraint(expr= m.x563 + m.x647 + m.x731 + m.x815 + m.x899 + m.x983 + m.x1719 == 0) m.c2366 = Constraint(expr= m.x564 + m.x648 + m.x732 + m.x816 + m.x900 + m.x984 + m.x1720 == 0) m.c2367 = Constraint(expr= m.x565 + m.x649 + m.x733 + m.x817 + m.x901 + m.x985 + m.x1721 == 0) m.c2368 = Constraint(expr= m.x566 + m.x650 + m.x734 + m.x818 + m.x902 + m.x986 + m.x1722 == 0) m.c2369 = Constraint(expr= m.x567 + m.x651 + m.x735 + m.x819 + m.x903 + m.x987 + m.x1723 == 0) m.c2370 = Constraint(expr= m.x568 + m.x652 + m.x736 + m.x820 + m.x904 + m.x988 + m.x1724 == 0) m.c2371 = Constraint(expr= m.x569 + m.x653 + m.x737 + m.x821 + m.x905 + m.x989 + m.x1725 == 100) m.c2372 = Constraint(expr= m.x570 + m.x654 + m.x738 + m.x822 + m.x906 + m.x990 + m.x1726 == 0) m.c2373 = Constraint(expr= m.x571 + m.x655 + m.x739 + m.x823 + m.x907 + m.x991 + m.x1727 == 0) m.c2374 = Constraint(expr= m.x572 + m.x656 + m.x740 + m.x824 + m.x908 + m.x992 + m.x1728 == 0) m.c2375 = Constraint(expr= m.x573 + m.x657 + m.x741 + m.x825 + m.x909 + m.x993 + m.x1729 == 0) m.c2376 = Constraint(expr= m.x574 + m.x658 + m.x742 + m.x826 + m.x910 + m.x994 + m.x1730 == 0) m.c2377 = Constraint(expr= m.x575 + m.x659 + m.x743 + m.x827 + m.x911 + m.x995 + m.x1731 == 0) m.c2378 = Constraint(expr= m.x576 + m.x660 + m.x744 + m.x828 + m.x912 + m.x996 + m.x1732 == 100) m.c2379 = Constraint(expr= m.x577 + m.x661 + m.x745 + m.x829 + m.x913 + m.x997 + m.x1733 == 0) m.c2380 = Constraint(expr= m.x578 + m.x662 + m.x746 + m.x830 + m.x914 + m.x998 + m.x1734 == 0) m.c2381 = Constraint(expr= m.x579 + m.x663 + m.x747 + m.x831 + m.x915 + m.x999 + m.x1735 == 0) m.c2382 = Constraint(expr= - m.x562 + m.x580 + m.x586 - m.x646 + m.x664 + m.x670 - m.x730 + m.x748 + m.x754 - m.x814 + m.x832 + m.x838 - m.x898 + m.x916 + m.x922 - m.x982 + m.x1000 + m.x1006 + m.x1736 == 20) m.c2383 = Constraint(expr= - m.x563 + m.x581 + m.x587 - m.x647 + m.x665 + m.x671 - m.x731 + m.x749 + m.x755 - m.x815 + m.x833 + m.x839 - m.x899 + m.x917 + m.x923 - m.x983 + m.x1001 + m.x1007 + m.x1737 == 0) m.c2384 = Constraint(expr= - m.x564 + m.x582 + m.x588 - m.x648 + m.x666 + m.x672 - m.x732 + m.x750 + m.x756 - m.x816 + m.x834 + m.x840 - m.x900 + m.x918 + m.x924 - m.x984 + m.x1002 + m.x1008 + m.x1738 == 0) m.c2385 = Constraint(expr= - m.x565 + m.x583 + m.x589 - m.x649 + m.x667 + m.x673 - m.x733 + m.x751 + m.x757 - m.x817 + m.x835 + m.x841 - m.x901 + m.x919 + m.x925 - m.x985 + m.x1003 + m.x1009 + m.x1739 == 0) m.c2386 = Constraint(expr= - m.x566 + m.x584 + m.x590 - m.x650 + m.x668 + m.x674 - m.x734 + m.x752 + m.x758 - m.x818 + m.x836 + m.x842 - m.x902 + m.x920 + m.x926 - m.x986 + m.x1004 + m.x1010 + m.x1740 == 0) m.c2387 = Constraint(expr= - m.x567 + m.x585 + m.x591 - m.x651 + m.x669 + m.x675 - m.x735 + m.x753 + m.x759 - m.x819 + m.x837 + m.x843 - m.x903 + m.x921 + m.x927 - m.x987 + m.x1005 + m.x1011 + m.x1741 == 0) m.c2388 = Constraint(expr= - m.x568 + m.x592 + m.x598 + m.x604 - m.x652 + m.x676 + m.x682 + m.x688 - m.x736 + m.x760 + m.x766 + m.x772 - m.x820 + m.x844 + m.x850 + m.x856 - m.x904 + m.x928 + m.x934 + m.x940 - m.x988 + m.x1012 + m.x1018 + m.x1024 + m.x1742 == 0) m.c2389 = Constraint(expr= - m.x569 + m.x593 + m.x599 + m.x605 - m.x653 + m.x677 + m.x683 + m.x689 - m.x737 + m.x761 + m.x767 + m.x773 - m.x821 + m.x845 + m.x851 + m.x857 - m.x905 + m.x929 + m.x935 + m.x941 - m.x989 + m.x1013 + m.x1019 + m.x1025 + m.x1743 == 50) m.c2390 = Constraint(expr= - m.x570 + m.x594 + m.x600 + m.x606 - m.x654 + m.x678 + m.x684 + m.x690 - m.x738 + m.x762 + m.x768 + m.x774 - m.x822 + m.x846 + m.x852 + m.x858 - m.x906 + m.x930 + m.x936 + m.x942 - m.x990 + m.x1014 + m.x1020 + m.x1026 + m.x1744 == 0) m.c2391 = Constraint(expr= - m.x571 + m.x595 + m.x601 + m.x607 - m.x655 + m.x679 + m.x685 + m.x691 - m.x739 + m.x763 + m.x769 + m.x775 - m.x823 + m.x847 + m.x853 + m.x859 - m.x907 + m.x931 + m.x937 + m.x943 - m.x991 + m.x1015 + m.x1021 + m.x1027 + m.x1745 == 0) m.c2392 = Constraint(expr= - m.x572 + m.x596 + m.x602 + m.x608 - m.x656 + m.x680 + m.x686 + m.x692 - m.x740 + m.x764 + m.x770 + m.x776 - m.x824 + m.x848 + m.x854 + m.x860 - m.x908 + m.x932 + m.x938 + m.x944 - m.x992 + m.x1016 + m.x1022 + m.x1028 + m.x1746 == 0) m.c2393 = Constraint(expr= - m.x573 + m.x597 + m.x603 + m.x609 - m.x657 + m.x681 + m.x687 + m.x693 - m.x741 + m.x765 + m.x771 + m.x777 - m.x825 + m.x849 + m.x855 + m.x861 - m.x909 + m.x933 + m.x939 + m.x945 - m.x993 + m.x1017 + m.x1023 + m.x1029 + m.x1747 == 0) m.c2394 = Constraint(expr= - m.x574 + m.x610 + m.x616 - m.x658 + m.x694 + m.x700 - m.x742 + m.x778 + m.x784 - m.x826 + m.x862 + m.x868 - m.x910 + m.x946 + m.x952 - m.x994 + m.x1030 + m.x1036 + m.x1748 == 0) m.c2395 = Constraint(expr= - m.x575 + m.x611 + m.x617 - m.x659 + m.x695 + m.x701 - m.x743 + m.x779 + m.x785 - m.x827 + m.x863 + m.x869 - m.x911 + m.x947 + m.x953 - m.x995 + m.x1031 + m.x1037 + m.x1749 == 0) m.c2396 = Constraint(expr= - m.x576 + m.x612 + m.x618 - m.x660 + m.x696 + m.x702 - m.x744 + m.x780 + m.x786 - m.x828 + m.x864 + m.x870 - m.x912 + m.x948 + m.x954 - m.x996 + m.x1032 + m.x1038 + m.x1750 == 70) m.c2397 = Constraint(expr= - m.x577 + m.x613 + m.x619 - m.x661 + m.x697 + m.x703 - m.x745 + m.x781 + m.x787 - m.x829 + m.x865 + m.x871 - m.x913 + m.x949 + m.x955 - m.x997 + m.x1033 + m.x1039 + m.x1751 == 0) m.c2398 = Constraint(expr= - m.x578 + m.x614 + m.x620 - m.x662 + m.x698 + m.x704 - m.x746 + m.x782 + m.x788 - m.x830 + m.x866 + m.x872 - m.x914 + m.x950 + m.x956 - m.x998 + m.x1034 + m.x1040 + m.x1752 == 0) m.c2399 = Constraint(expr= - m.x579 + m.x615 + m.x621 - m.x663 + m.x699 + m.x705 - m.x747 + m.x783 + m.x789 - m.x831 + m.x867 + m.x873 - m.x915 + m.x951 + m.x957 - m.x999 + m.x1035 + m.x1041 + m.x1753 == 0) m.c2400 = Constraint(expr= - m.x580 - m.x592 + m.x622 - m.x664 - m.x676 + m.x706 - m.x748 - m.x760 + m.x790 - m.x832 - m.x844 + m.x874 - m.x916 - m.x928 + m.x958 - m.x1000 - m.x1012 + m.x1042 + m.x1754 == 0) m.c2401 = Constraint(expr= - m.x581 - m.x593 + m.x623 - m.x665 - m.x677 + m.x707 - m.x749 - m.x761 + m.x791 - m.x833 - m.x845 + m.x875 - m.x917 - m.x929 + m.x959 - m.x1001 - m.x1013 + m.x1043 + m.x1755 == 0) m.c2402 = Constraint(expr= - m.x582 - m.x594 + m.x624 - m.x666 - m.x678 + m.x708 - m.x750 - m.x762 + m.x792 - m.x834 - m.x846 + m.x876 - m.x918 - m.x930 + m.x960 - m.x1002 - m.x1014 + m.x1044 + m.x1756 == 0) m.c2403 = Constraint(expr= - m.x583 - m.x595 + m.x625 - m.x667 - m.x679 + m.x709 - m.x751 - m.x763 + m.x793 - m.x835 - m.x847 + m.x877 - m.x919 - m.x931 + m.x961 - m.x1003 - m.x1015 + m.x1045 + m.x1757 == 30) m.c2404 = Constraint(expr= - m.x584 - m.x596 + m.x626 - m.x668 - m.x680 + m.x710 - m.x752 - m.x764 + m.x794 - m.x836 - m.x848 + m.x878 - m.x920 - m.x932 + m.x962 - m.x1004 - m.x1016 + m.x1046 + m.x1758 == 0) m.c2405 = Constraint(expr= - m.x585 - m.x597 + m.x627 - m.x669 - m.x681 + m.x711 - m.x753 - m.x765 + m.x795 - m.x837 - m.x849 + m.x879 - m.x921 - m.x933 + m.x963 - m.x1005 - m.x1017 + m.x1047 + m.x1759 == 0) m.c2406 = Constraint(expr= - m.x586 - m.x598 - m.x610 + m.x628 + m.x634 - m.x670 - m.x682 - m.x694 + m.x712 + m.x718 - m.x754 - m.x766 - m.x778 + m.x796 + m.x802 - m.x838 - m.x850 - m.x862 + m.x880 + m.x886 - m.x922 - m.x934 - m.x946 + m.x964 + m.x970 - m.x1006 - m.x1018 - m.x1030 + m.x1048 + m.x1054 + m.x1760 == 0) m.c2407 = Constraint(expr= - m.x587 - m.x599 - m.x611 + m.x629 + m.x635 - m.x671 - m.x683 - m.x695 + m.x713 + m.x719 - m.x755 - m.x767 - m.x779 + m.x797 + m.x803 - m.x839 - m.x851 - m.x863 + m.x881 + m.x887 - m.x923 - m.x935 - m.x947 + m.x965 + m.x971 - m.x1007 - m.x1019 - m.x1031 + m.x1049 + m.x1055 + m.x1761 == 0) m.c2408 = Constraint(expr= - m.x588 - m.x600 - m.x612 + m.x630 + m.x636 - m.x672 - m.x684 - m.x696 + m.x714 + m.x720 - m.x756 - m.x768 - m.x780 + m.x798 + m.x804 - m.x840 - m.x852 - m.x864 + m.x882 + m.x888 - m.x924 - m.x936 - m.x948 + m.x966 + m.x972 - m.x1008 - m.x1020 - m.x1032 + m.x1050 + m.x1056 + m.x1762 == 0) m.c2409 = Constraint(expr= - m.x589 - m.x601 - m.x613 + m.x631 + m.x637 - m.x673 - m.x685 - m.x697 + m.x715 + m.x721 - m.x757 - m.x769 - m.x781 + m.x799 + m.x805 - m.x841 - m.x853 - m.x865 + m.x883 + m.x889 - m.x925 - m.x937 - m.x949 + m.x967 + m.x973 - m.x1009 - m.x1021 - m.x1033 + m.x1051 + m.x1057 + m.x1763 == 0) m.c2410 = Constraint(expr= - m.x590 - m.x602 - m.x614 + m.x632 + m.x638 - m.x674 - m.x686 - m.x698 + m.x716 + m.x722 - m.x758 - m.x770 - m.x782 + m.x800 + m.x806 - m.x842 - m.x854 - m.x866 + m.x884 + m.x890 - m.x926 - m.x938 - m.x950 + m.x968 + m.x974 - m.x1010 - m.x1022 - m.x1034 + m.x1052 + m.x1058 + m.x1764 == 50) m.c2411 = Constraint(expr= - m.x591 - m.x603 - m.x615 + m.x633 + m.x639 - m.x675 - m.x687 - m.x699 + m.x717 + m.x723 - m.x759 - m.x771 - m.x783 + m.x801 + m.x807 - m.x843 - m.x855 - m.x867 + m.x885 + m.x891 - m.x927 - m.x939 - m.x951 + m.x969 + m.x975 - m.x1011 - m.x1023 - m.x1035 + m.x1053 + m.x1059 + m.x1765 == 0) m.c2412 = Constraint(expr= - m.x604 - m.x616 + m.x640 - m.x688 - m.x700 + m.x724 - m.x772 - m.x784 + m.x808 - m.x856 - m.x868 + m.x892 - m.x940 - m.x952 + m.x976 - m.x1024 - m.x1036 + m.x1060 + m.x1766 == 0) m.c2413 = Constraint(expr= - m.x605 - m.x617 + m.x641 - m.x689 - m.x701 + m.x725 - m.x773 - m.x785 + m.x809 - m.x857 - m.x869 + m.x893 - m.x941 - m.x953 + m.x977 - m.x1025 - m.x1037 + m.x1061 + m.x1767 == 0) m.c2414 = Constraint(expr= - m.x606 - m.x618 + m.x642 - m.x690 - m.x702 + m.x726 - m.x774 - m.x786 + m.x810 - m.x858 - m.x870 + m.x894 - m.x942 - m.x954 + m.x978 - m.x1026 - m.x1038 + m.x1062 + m.x1768 == 0) m.c2415 = Constraint(expr= - m.x607 - m.x619 + m.x643 - m.x691 - m.x703 + m.x727 - m.x775 - m.x787 + m.x811 - m.x859 - m.x871 + m.x895 - m.x943 - m.x955 + m.x979 - m.x1027 - m.x1039 + m.x1063 + m.x1769 == 0) m.c2416 = Constraint(expr= - m.x608 - m.x620 + m.x644 - m.x692 - m.x704 + m.x728 - m.x776 - m.x788 + m.x812 - m.x860 - m.x872 + m.x896 - m.x944 - m.x956 + m.x980 - m.x1028 - m.x1040 + m.x1064 + m.x1770 == 0) m.c2417 = Constraint(expr= - m.x609 - m.x621 + m.x645 - m.x693 - m.x705 + m.x729 - m.x777 - m.x789 + m.x813 - m.x861 - m.x873 + m.x897 - m.x945 - m.x957 + m.x981 - m.x1029 - m.x1041 + m.x1065 + m.x1771 == 30) m.c2418 = Constraint(expr= - m.x622 - m.x628 - m.x706 - m.x712 - m.x790 - m.x796 - m.x874 - m.x880 - m.x958 - m.x964 - m.x1042 - m.x1048 + m.x1772 == 0) m.c2419 = Constraint(expr= - m.x623 - m.x629 - m.x707 - m.x713 - m.x791 - m.x797 - m.x875 - m.x881 - m.x959 - m.x965 - m.x1043 - m.x1049 + m.x1773 == 0) m.c2420 = Constraint(expr= - m.x624 - m.x630 - m.x708 - m.x714 - m.x792 - m.x798 - m.x876 - m.x882 - m.x960 - m.x966 - m.x1044 - m.x1050 + m.x1774 == 0) m.c2421 = Constraint(expr= - m.x625 - m.x631 - m.x709 - m.x715 - m.x793 - m.x799 - m.x877 - m.x883 - m.x961 - m.x967 - m.x1045 - m.x1051 + m.x1775 == 0) m.c2422 = Constraint(expr= - m.x626 - m.x632 - m.x710 - m.x716 - m.x794 - m.x800 - m.x878 - m.x884 - m.x962 - m.x968 - m.x1046 - m.x1052 + m.x1776 == 0) m.c2423 = Constraint(expr= - m.x627 - m.x633 - m.x711 - m.x717 - m.x795 - m.x801 - m.x879 - m.x885 - m.x963 - m.x969 - m.x1047 - m.x1053 + m.x1777 == 0) m.c2424 = Constraint(expr= - m.x634 - m.x640 - m.x718 - m.x724 - m.x802 - m.x808 - m.x886 - m.x892 - m.x970 - m.x976 - m.x1054 - m.x1060 + m.x1778 == 0) m.c2425 = Constraint(expr= - m.x635 - m.x641 - m.x719 - m.x725 - m.x803 - m.x809 - m.x887 - m.x893 - m.x971 - m.x977 - m.x1055 - m.x1061 + m.x1779 == 0) m.c2426 = Constraint(expr= - m.x636 - m.x642 - m.x720 - m.x726 - m.x804 - m.x810 - m.x888 - m.x894 - m.x972 - m.x978 - m.x1056 - m.x1062 + m.x1780 == 0) m.c2427 = Constraint(expr= - m.x637 - m.x643 - m.x721 - m.x727 - m.x805 - m.x811 - m.x889 - m.x895 - m.x973 - m.x979 - m.x1057 - m.x1063 + m.x1781 == 0) m.c2428 = Constraint(expr= - m.x638 - m.x644 - m.x722 - m.x728 - m.x806 - m.x812 - m.x890 - m.x896 - m.x974 - m.x980 - m.x1058 - m.x1064 + m.x1782 == 0) m.c2429 = Constraint(expr= - m.x639 - m.x645 - m.x723 - m.x729 - m.x807 - m.x813 - m.x891 - m.x897 - m.x975 - m.x981 - m.x1059 - m.x1065 + m.x1783 == 0) m.c2430 = Constraint(expr= m.x562 + m.x646 + m.x730 + m.x814 + m.x898 + m.x982 + m.x1066 + m.x1784 == 100) m.c2431 = Constraint(expr= m.x563 + m.x647 + m.x731 + m.x815 + m.x899 + m.x983 + m.x1067 + m.x1785 == 0) m.c2432 = Constraint(expr= m.x564 + m.x648 + m.x732 + m.x816 + m.x900 + m.x984 + m.x1068 + m.x1786 == 0) m.c2433 = Constraint(expr= m.x565 + m.x649 + m.x733 + m.x817 + m.x901 + m.x985 + m.x1069 + m.x1787 == 0) m.c2434 = Constraint(expr= m.x566 + m.x650 + m.x734 + m.x818 + m.x902 + m.x986 + m.x1070 + m.x1788 == 0) m.c2435 = Constraint(expr= m.x567 + m.x651 + m.x735 + m.x819 + m.x903 + m.x987 + m.x1071 + m.x1789 == 0) m.c2436 = Constraint(expr= m.x568 + m.x652 + m.x736 + m.x820 + m.x904 + m.x988 + m.x1072 + m.x1790 == 0) m.c2437 = Constraint(expr= m.x569 + m.x653 + m.x737 + m.x821 + m.x905 + m.x989 + m.x1073 + m.x1791 == 100) m.c2438 = Constraint(expr= m.x570 + m.x654 + m.x738 + m.x822 + m.x906 + m.x990 + m.x1074 + m.x1792 == 0) m.c2439 = Constraint(expr= m.x571 + m.x655 + m.x739 + m.x823 + m.x907 + m.x991 + m.x1075 + m.x1793 == 0) m.c2440 = Constraint(expr= m.x572 + m.x656 + m.x740 + m.x824 + m.x908 + m.x992 + m.x1076 + m.x1794 == 0) m.c2441 = Constraint(expr= m.x573 + m.x657 + m.x741 + m.x825 + m.x909 + m.x993 + m.x1077 + m.x1795 == 0) m.c2442 = Constraint(expr= m.x574 + m.x658 + m.x742 + m.x826 + m.x910 + m.x994 + m.x1078 + m.x1796 == 0) m.c2443 = Constraint(expr= m.x575 + m.x659 + m.x743 + m.x827 + m.x911 + m.x995 + m.x1079 + m.x1797 == 0) m.c2444 = Constraint(expr= m.x576 + m.x660 + m.x744 + m.x828 + m.x912 + m.x996 + m.x1080 + m.x1798 == 100) m.c2445 = Constraint(expr= m.x577 + m.x661 + m.x745 + m.x829 + m.x913 + m.x997 + m.x1081 + m.x1799 == 0) m.c2446 = Constraint(expr= m.x578 + m.x662 + m.x746 + m.x830 + m.x914 + m.x998 + m.x1082 + m.x1800 == 0) m.c2447 = Constraint(expr= m.x579 + m.x663 + m.x747 + m.x831 + m.x915 + m.x999 + m.x1083 + m.x1801 == 0) m.c2448 = Constraint(expr= - m.x562 + m.x580 + m.x586 - m.x646 + m.x664 + m.x670 - m.x730 + m.x748 + m.x754 - m.x814 + m.x832 + m.x838 - m.x898 + m.x916 + m.x922 - m.x982 + m.x1000 + m.x1006 - m.x1066 + m.x1084 + m.x1090 + m.x1802 == 20) m.c2449 = Constraint(expr= - m.x563 + m.x581 + m.x587 - m.x647 + m.x665 + m.x671 - m.x731 + m.x749 + m.x755 - m.x815 + m.x833 + m.x839 - m.x899 + m.x917 + m.x923 - m.x983 + m.x1001 + m.x1007 - m.x1067 + m.x1085 + m.x1091 + m.x1803 == 0) m.c2450 = Constraint(expr= - m.x564 + m.x582 + m.x588 - m.x648 + m.x666 + m.x672 - m.x732 + m.x750 + m.x756 - m.x816 + m.x834 + m.x840 - m.x900 + m.x918 + m.x924 - m.x984 + m.x1002 + m.x1008 - m.x1068 + m.x1086 + m.x1092 + m.x1804 == 0) m.c2451 = Constraint(expr= - m.x565 + m.x583 + m.x589 - m.x649 + m.x667 + m.x673 - m.x733 + m.x751 + m.x757 - m.x817 + m.x835 + m.x841 - m.x901 + m.x919 + m.x925 - m.x985 + m.x1003 + m.x1009 - m.x1069 + m.x1087 + m.x1093 + m.x1805 == 0) m.c2452 = Constraint(expr= - m.x566 + m.x584 + m.x590 - m.x650 + m.x668 + m.x674 - m.x734 + m.x752 + m.x758 - m.x818 + m.x836 + m.x842 - m.x902 + m.x920 + m.x926 - m.x986 + m.x1004 + m.x1010 - m.x1070 + m.x1088 + m.x1094 + m.x1806 == 0) m.c2453 = Constraint(expr= - m.x567 + m.x585 + m.x591 - m.x651 + m.x669 + m.x675 - m.x735 + m.x753 + m.x759 - m.x819 + m.x837 + m.x843 - m.x903 + m.x921 + m.x927 - m.x987 + m.x1005 + m.x1011 - m.x1071 + m.x1089 + m.x1095 + m.x1807 == 0) m.c2454 = Constraint(expr= - m.x568 + m.x592 + m.x598 + m.x604 - m.x652 + m.x676 + m.x682 + m.x688 - m.x736 + m.x760 + m.x766 + m.x772 - m.x820 + m.x844 + m.x850 + m.x856 - m.x904 + m.x928 + m.x934 + m.x940 - m.x988 + m.x1012 + m.x1018 + m.x1024 - m.x1072 + m.x1096 + m.x1102 + m.x1108 + m.x1808 == 0) m.c2455 = Constraint(expr= - m.x569 + m.x593 + m.x599 + m.x605 - m.x653 + m.x677 + m.x683 + m.x689 - m.x737 + m.x761 + m.x767 + m.x773 - m.x821 + m.x845 + m.x851 + m.x857 - m.x905 + m.x929 + m.x935 + m.x941 - m.x989 + m.x1013 + m.x1019 + m.x1025 - m.x1073 + m.x1097 + m.x1103 + m.x1109 + m.x1809 == 50) m.c2456 = Constraint(expr= - m.x570 + m.x594 + m.x600 + m.x606 - m.x654 + m.x678 + m.x684 + m.x690 - m.x738 + m.x762 + m.x768 + m.x774 - m.x822 + m.x846 + m.x852 + m.x858 - m.x906 + m.x930 + m.x936 + m.x942 - m.x990 + m.x1014 + m.x1020 + m.x1026 - m.x1074 + m.x1098 + m.x1104 + m.x1110 + m.x1810 == 0) m.c2457 = Constraint(expr= - m.x571 + m.x595 + m.x601 + m.x607 - m.x655 + m.x679 + m.x685 + m.x691 - m.x739 + m.x763 + m.x769 + m.x775 - m.x823 + m.x847 + m.x853 + m.x859 - m.x907 + m.x931 + m.x937 + m.x943 - m.x991 + m.x1015 + m.x1021 + m.x1027 - m.x1075 + m.x1099 + m.x1105 + m.x1111 + m.x1811 == 0) m.c2458 = Constraint(expr= - m.x572 + m.x596 + m.x602 + m.x608 - m.x656 + m.x680 + m.x686 + m.x692 - m.x740 + m.x764 + m.x770 + m.x776 - m.x824 + m.x848 + m.x854 + m.x860 - m.x908 + m.x932 + m.x938 + m.x944 - m.x992 + m.x1016 + m.x1022 + m.x1028 - m.x1076 + m.x1100 + m.x1106 + m.x1112 + m.x1812 == 0) m.c2459 = Constraint(expr= - m.x573 + m.x597 + m.x603 + m.x609 - m.x657 + m.x681 + m.x687 + m.x693 - m.x741 + m.x765 + m.x771 + m.x777 - m.x825 + m.x849 + m.x855 + m.x861 - m.x909 + m.x933 + m.x939 + m.x945 - m.x993 + m.x1017 + m.x1023 + m.x1029 - m.x1077 + m.x1101 + m.x1107 + m.x1113 + m.x1813 == 0) m.c2460 = Constraint(expr= - m.x574 + m.x610 + m.x616 - m.x658 + m.x694 + m.x700 - m.x742 + m.x778 + m.x784 - m.x826 + m.x862 + m.x868 - m.x910 + m.x946 + m.x952 - m.x994 + m.x1030 + m.x1036 - m.x1078 + m.x1114 + m.x1120 + m.x1814 == 0) m.c2461 = Constraint(expr= - m.x575 + m.x611 + m.x617 - m.x659 + m.x695 + m.x701 - m.x743 + m.x779 + m.x785 - m.x827 + m.x863 + m.x869 - m.x911 + m.x947 + m.x953 - m.x995 + m.x1031 + m.x1037 - m.x1079 + m.x1115 + m.x1121 + m.x1815 == 0) m.c2462 = Constraint(expr= - m.x576 + m.x612 + m.x618 - m.x660 + m.x696 + m.x702 - m.x744 + m.x780 + m.x786 - m.x828 + m.x864 + m.x870 - m.x912 + m.x948 + m.x954 - m.x996 + m.x1032 + m.x1038 - m.x1080 + m.x1116 + m.x1122 + m.x1816 == 70) m.c2463 = Constraint(expr= - m.x577 + m.x613 + m.x619 - m.x661 + m.x697 + m.x703 - m.x745 + m.x781 + m.x787 - m.x829 + m.x865 + m.x871 - m.x913 + m.x949 + m.x955 - m.x997 + m.x1033 + m.x1039 - m.x1081 + m.x1117 + m.x1123 + m.x1817 == 0) m.c2464 = Constraint(expr= - m.x578 + m.x614 + m.x620 - m.x662 + m.x698 + m.x704 - m.x746 + m.x782 + m.x788 - m.x830 + m.x866 + m.x872 - m.x914 + m.x950 + m.x956 - m.x998 + m.x1034 + m.x1040 - m.x1082 + m.x1118 + m.x1124 + m.x1818 == 0) m.c2465 = Constraint(expr= - m.x579 + m.x615 + m.x621 - m.x663 + m.x699 + m.x705 - m.x747 + m.x783 + m.x789 - m.x831 + m.x867 + m.x873 - m.x915 + m.x951 + m.x957 - m.x999 + m.x1035 + m.x1041 - m.x1083 + m.x1119 + m.x1125 + m.x1819 == 0) m.c2466 = Constraint(expr= - m.x580 - m.x592 + m.x622 - m.x664 - m.x676 + m.x706 - m.x748 - m.x760 + m.x790 - m.x832 - m.x844 + m.x874 - m.x916 - m.x928 + m.x958 - m.x1000 - m.x1012 + m.x1042 - m.x1084 - m.x1096 + m.x1126 + m.x1820 == 0) m.c2467 = Constraint(expr= - m.x581 - m.x593 + m.x623 - m.x665 - m.x677 + m.x707 - m.x749 - m.x761 + m.x791 - m.x833 - m.x845 + m.x875 - m.x917 - m.x929 + m.x959 - m.x1001 - m.x1013 + m.x1043 - m.x1085 - m.x1097 + m.x1127 + m.x1821 == 0) m.c2468 = Constraint(expr= - m.x582 - m.x594 + m.x624 - m.x666 - m.x678 + m.x708 - m.x750 - m.x762 + m.x792 - m.x834 - m.x846 + m.x876 - m.x918 - m.x930 + m.x960 - m.x1002 - m.x1014 + m.x1044 - m.x1086 - m.x1098 + m.x1128 + m.x1822 == 0) m.c2469 = Constraint(expr= - m.x583 - m.x595 + m.x625 - m.x667 - m.x679 + m.x709 - m.x751 - m.x763 + m.x793 - m.x835 - m.x847 + m.x877 - m.x919 - m.x931 + m.x961 - m.x1003 - m.x1015 + m.x1045 - m.x1087 - m.x1099 + m.x1129 + m.x1823 == 30) m.c2470 = Constraint(expr= - m.x584 - m.x596 + m.x626 - m.x668 - m.x680 + m.x710 - m.x752 - m.x764 + m.x794 - m.x836 - m.x848 + m.x878 - m.x920 - m.x932 + m.x962 - m.x1004 - m.x1016 + m.x1046 - m.x1088 - m.x1100 + m.x1130 + m.x1824 == 0) m.c2471 = Constraint(expr= - m.x585 - m.x597 + m.x627 - m.x669 - m.x681 + m.x711 - m.x753 - m.x765 + m.x795 - m.x837 - m.x849 + m.x879 - m.x921 - m.x933 + m.x963 - m.x1005 - m.x1017 + m.x1047 - m.x1089 - m.x1101 + m.x1131 + m.x1825 == 0) m.c2472 = Constraint(expr= - m.x586 - m.x598 - m.x610 + m.x628 + m.x634 - m.x670 - m.x682 - m.x694 + m.x712 + m.x718 - m.x754 - m.x766 - m.x778 + m.x796 + m.x802 - m.x838 - m.x850 - m.x862 + m.x880 + m.x886 - m.x922 - m.x934 - m.x946 + m.x964 + m.x970 - m.x1006 - m.x1018 - m.x1030 + m.x1048 + m.x1054 - m.x1090 - m.x1102 - m.x1114 + m.x1132 + m.x1138 + m.x1826 == 0) m.c2473 = Constraint(expr= - m.x587 - m.x599 - m.x611 + m.x629 + m.x635 - m.x671 - m.x683 - m.x695 + m.x713 + m.x719 - m.x755 - m.x767 - m.x779 + m.x797 + m.x803 - m.x839 - m.x851 - m.x863 + m.x881 + m.x887 - m.x923 - m.x935 - m.x947 + m.x965 + m.x971 - m.x1007 - m.x1019 - m.x1031 + m.x1049 + m.x1055 - m.x1091 - m.x1103 - m.x1115 + m.x1133 + m.x1139 + m.x1827 == 0) m.c2474 = Constraint(expr= - m.x588 - m.x600 - m.x612 + m.x630 + m.x636 - m.x672 - m.x684 - m.x696 + m.x714 + m.x720 - m.x756 - m.x768 - m.x780 + m.x798 + m.x804 - m.x840 - m.x852 - m.x864 + m.x882 + m.x888 - m.x924 - m.x936 - m.x948 + m.x966 + m.x972 - m.x1008 - m.x1020 - m.x1032 + m.x1050 + m.x1056 - m.x1092 - m.x1104 - m.x1116 + m.x1134 + m.x1140 + m.x1828 == 0) m.c2475 = Constraint(expr= - m.x589 - m.x601 - m.x613 + m.x631 + m.x637 - m.x673 - m.x685 - m.x697 + m.x715 + m.x721 - m.x757 - m.x769 - m.x781 + m.x799 + m.x805 - m.x841 - m.x853 - m.x865 + m.x883 + m.x889 - m.x925 - m.x937 - m.x949 + m.x967 + m.x973 - m.x1009 - m.x1021 - m.x1033 + m.x1051 + m.x1057 - m.x1093 - m.x1105 - m.x1117 + m.x1135 + m.x1141 + m.x1829 == 0) m.c2476 = Constraint(expr= - m.x590 - m.x602 - m.x614 + m.x632 + m.x638 - m.x674 - m.x686 - m.x698 + m.x716 + m.x722 - m.x758 - m.x770 - m.x782 + m.x800 + m.x806 - m.x842 - m.x854 - m.x866 + m.x884 + m.x890 - m.x926 - m.x938 - m.x950 + m.x968 + m.x974 - m.x1010 - m.x1022 - m.x1034 + m.x1052 + m.x1058 - m.x1094 - m.x1106 - m.x1118 + m.x1136 + m.x1142 + m.x1830 == 50) m.c2477 = Constraint(expr= - m.x591 - m.x603 - m.x615 + m.x633 + m.x639 - m.x675 - m.x687 - m.x699 + m.x717 + m.x723 - m.x759 - m.x771 - m.x783 + m.x801 + m.x807 - m.x843 - m.x855 - m.x867 + m.x885 + m.x891 - m.x927 - m.x939 - m.x951 + m.x969 + m.x975 - m.x1011 - m.x1023 - m.x1035 + m.x1053 + m.x1059 - m.x1095 - m.x1107 - m.x1119 + m.x1137 + m.x1143 + m.x1831 == 0) m.c2478 = Constraint(expr= - m.x604 - m.x616 + m.x640 - m.x688 - m.x700 + m.x724 - m.x772 - m.x784 + m.x808 - m.x856 - m.x868 + m.x892 - m.x940 - m.x952 + m.x976 - m.x1024 - m.x1036 + m.x1060 - m.x1108 - m.x1120 + m.x1144 + m.x1832 == 0) m.c2479 = Constraint(expr= - m.x605 - m.x617 + m.x641 - m.x689 - m.x701 + m.x725 - m.x773 - m.x785 + m.x809 - m.x857 - m.x869 + m.x893 - m.x941 - m.x953 + m.x977 - m.x1025 - m.x1037 + m.x1061 - m.x1109 - m.x1121 + m.x1145 + m.x1833 == 0) m.c2480 = Constraint(expr= - m.x606 - m.x618 + m.x642 - m.x690 - m.x702 + m.x726 - m.x774 - m.x786 + m.x810 - m.x858 - m.x870 + m.x894 - m.x942 - m.x954 + m.x978 - m.x1026 - m.x1038 + m.x1062 - m.x1110 - m.x1122 + m.x1146 + m.x1834 == 0) m.c2481 = Constraint(expr= - m.x607 - m.x619 + m.x643 - m.x691 - m.x703 + m.x727 - m.x775 - m.x787 + m.x811 - m.x859 - m.x871 + m.x895 - m.x943 - m.x955 + m.x979 - m.x1027 - m.x1039 + m.x1063 - m.x1111 - m.x1123 + m.x1147 + m.x1835 == 0) m.c2482 = Constraint(expr= - m.x608 - m.x620 + m.x644 - m.x692 - m.x704 + m.x728 - m.x776 - m.x788 + m.x812 - m.x860 - m.x872 + m.x896 - m.x944 - m.x956 + m.x980 - m.x1028 - m.x1040 + m.x1064 - m.x1112 - m.x1124 + m.x1148 + m.x1836 == 0) m.c2483 = Constraint(expr= - m.x609 - m.x621 + m.x645 - m.x693 - m.x705 + m.x729 - m.x777 - m.x789 + m.x813 - m.x861 - m.x873 + m.x897 - m.x945 - m.x957 + m.x981 - m.x1029 - m.x1041 + m.x1065 - m.x1113 - m.x1125 + m.x1149 + m.x1837 == 30) m.c2484 = Constraint(expr= - m.x622 - m.x628 - m.x706 - m.x712 - m.x790 - m.x796 - m.x874 - m.x880 - m.x958 - m.x964 - m.x1042 - m.x1048 - m.x1126 - m.x1132 + m.x1838 == 0) m.c2485 = Constraint(expr= - m.x623 - m.x629 - m.x707 - m.x713 - m.x791 - m.x797 - m.x875 - m.x881 - m.x959 - m.x965 - m.x1043 - m.x1049 - m.x1127 - m.x1133 + m.x1839 == 0) m.c2486 = Constraint(expr= - m.x624 - m.x630 - m.x708 - m.x714 - m.x792 - m.x798 - m.x876 - m.x882 - m.x960 - m.x966 - m.x1044 - m.x1050 - m.x1128 - m.x1134 + m.x1840 == 0) m.c2487 = Constraint(expr= - m.x625 - m.x631 - m.x709 - m.x715 - m.x793 - m.x799 - m.x877 - m.x883 - m.x961 - m.x967 - m.x1045 - m.x1051 - m.x1129 - m.x1135 + m.x1841 == 0) m.c2488 = Constraint(expr= - m.x626 - m.x632 - m.x710 - m.x716 - m.x794 - m.x800 - m.x878 - m.x884 - m.x962 - m.x968 - m.x1046 - m.x1052 - m.x1130 - m.x1136 + m.x1842 == 0) m.c2489 = Constraint(expr= - m.x627 - m.x633 - m.x711 - m.x717 - m.x795 - m.x801 - m.x879 - m.x885 - m.x963 - m.x969 - m.x1047 - m.x1053 - m.x1131 - m.x1137 + m.x1843 == 0) m.c2490 = Constraint(expr= - m.x634 - m.x640 - m.x718 - m.x724 - m.x802 - m.x808 - m.x886 - m.x892 - m.x970 - m.x976 - m.x1054 - m.x1060 - m.x1138 - m.x1144 + m.x1844 == 0) m.c2491 = Constraint(expr= - m.x635 - m.x641 - m.x719 - m.x725 - m.x803 - m.x809 - m.x887 - m.x893 - m.x971 - m.x977 - m.x1055 - m.x1061 - m.x1139 - m.x1145 + m.x1845 == 0) m.c2492 = Constraint(expr= - m.x636 - m.x642 - m.x720 - m.x726 - m.x804 - m.x810 - m.x888 - m.x894 - m.x972 - m.x978 - m.x1056 - m.x1062 - m.x1140 - m.x1146 + m.x1846 == 0) m.c2493 = Constraint(expr= - m.x637 - m.x643 - m.x721 - m.x727 - m.x805 - m.x811 - m.x889 - m.x895 - m.x973 - m.x979 - m.x1057 - m.x1063 - m.x1141 - m.x1147 + m.x1847 == 0) m.c2494 = Constraint(expr= - m.x638 - m.x644 - m.x722 - m.x728 - m.x806 - m.x812 - m.x890 - m.x896 - m.x974 - m.x980 - m.x1058 - m.x1064 - m.x1142 - m.x1148 + m.x1848 == 0) m.c2495 = Constraint(expr= - m.x639 - m.x645 - m.x723 - m.x729 - m.x807 - m.x813 - m.x891 - m.x897 - m.x975 - m.x981 - m.x1059 - m.x1065 - m.x1143 - m.x1149 + m.x1849 == 0) m.c2496 = Constraint(expr=m.x450*m.x1322 - m.x562*m.x1234 == 0) m.c2497 = Constraint(expr=m.x450*m.x1323 - m.x563*m.x1234 == 0) m.c2498 = Constraint(expr=m.x450*m.x1324 - m.x564*m.x1234 == 0) m.c2499 = Constraint(expr=m.x450*m.x1325 - m.x565*m.x1234 == 0) m.c2500 = Constraint(expr=m.x450*m.x1326 - m.x566*m.x1234 == 0) m.c2501 = Constraint(expr=m.x450*m.x1327 - m.x567*m.x1234 == 0) m.c2502 = Constraint(expr=m.x451*m.x1328 - m.x568*m.x1235 == 0) m.c2503 = Constraint(expr=m.x451*m.x1329 - m.x569*m.x1235 == 0) m.c2504 = Constraint(expr=m.x451*m.x1330 - m.x570*m.x1235 == 0) m.c2505 = Constraint(expr=m.x451*m.x1331 - m.x571*m.x1235 == 0) m.c2506 = Constraint(expr=m.x451*m.x1332 - m.x572*m.x1235 == 0) m.c2507 = Constraint(expr=m.x451*m.x1333 - m.x573*m.x1235 == 0) m.c2508 = Constraint(expr=m.x452*m.x1334 - m.x574*m.x1236 == 0) m.c2509 = Constraint(expr=m.x452*m.x1335 - m.x575*m.x1236 == 0) m.c2510 = Constraint(expr=m.x452*m.x1336 - m.x576*m.x1236 == 0) m.c2511 = Constraint(expr=m.x452*m.x1337 - m.x577*m.x1236 == 0) m.c2512 = Constraint(expr=m.x452*m.x1338 - m.x578*m.x1236 == 0) m.c2513 = Constraint(expr=m.x452*m.x1339 - m.x579*m.x1236 == 0) m.c2514 = Constraint(expr=m.x453*m.x1340 - m.x580*m.x1237 == 0) m.c2515 = Constraint(expr=m.x453*m.x1341 - m.x581*m.x1237 == 0) m.c2516 = Constraint(expr=m.x453*m.x1342 - m.x582*m.x1237 == 0) m.c2517 = Constraint(expr=m.x453*m.x1343 - m.x583*m.x1237 == 0) m.c2518 = Constraint(expr=m.x453*m.x1344 - m.x584*m.x1237 == 0) m.c2519 = Constraint(expr=m.x453*m.x1345 - m.x585*m.x1237 == 0) m.c2520 = Constraint(expr=m.x454*m.x1340 - m.x586*m.x1237 == 0) m.c2521 = Constraint(expr=m.x454*m.x1341 - m.x587*m.x1237 == 0) m.c2522 = Constraint(expr=m.x454*m.x1342 - m.x588*m.x1237 == 0) m.c2523 = Constraint(expr=m.x454*m.x1343 - m.x589*m.x1237 == 0) m.c2524 = Constraint(expr=m.x454*m.x1344 - m.x590*m.x1237 == 0) m.c2525 = Constraint(expr=m.x454*m.x1345 - m.x591*m.x1237 == 0) m.c2526 = Constraint(expr=m.x455*m.x1346 - m.x592*m.x1238 == 0) m.c2527 = Constraint(expr=m.x455*m.x1347 - m.x593*m.x1238 == 0) m.c2528 = Constraint(expr=m.x455*m.x1348 - m.x594*m.x1238 == 0) m.c2529 = Constraint(expr=m.x455*m.x1349 - m.x595*m.x1238 == 0) m.c2530 = Constraint(expr=m.x455*m.x1350 - m.x596*m.x1238 == 0) m.c2531 = Constraint(expr=m.x455*m.x1351 - m.x597*m.x1238 == 0) m.c2532 = Constraint(expr=m.x456*m.x1346 - m.x598*m.x1238 == 0) m.c2533 = Constraint(expr=m.x456*m.x1347 - m.x599*m.x1238 == 0) m.c2534 = Constraint(expr=m.x456*m.x1348 - m.x600*m.x1238 == 0) m.c2535 = Constraint(expr=m.x456*m.x1349 - m.x601*m.x1238 == 0) m.c2536 = Constraint(expr=m.x456*m.x1350 - m.x602*m.x1238 == 0) m.c2537 = Constraint(expr=m.x456*m.x1351 - m.x603*m.x1238 == 0) m.c2538 = Constraint(expr=m.x457*m.x1346 - m.x604*m.x1238 == 0) m.c2539 = Constraint(expr=m.x457*m.x1347 - m.x605*m.x1238 == 0) m.c2540 = Constraint(expr=m.x457*m.x1348 - m.x606*m.x1238 == 0) m.c2541 = Constraint(expr=m.x457*m.x1349 - m.x607*m.x1238 == 0) m.c2542 = Constraint(expr=m.x457*m.x1350 - m.x608*m.x1238 == 0) m.c2543 = Constraint(expr=m.x457*m.x1351 - m.x609*m.x1238 == 0) m.c2544 = Constraint(expr=m.x458*m.x1352 - m.x610*m.x1239 == 0) m.c2545 = Constraint(expr=m.x458*m.x1353 - m.x611*m.x1239 == 0) m.c2546 = Constraint(expr=m.x458*m.x1354 - m.x612*m.x1239 == 0) m.c2547 = Constraint(expr=m.x458*m.x1355 - m.x613*m.x1239 == 0) m.c2548 = Constraint(expr=m.x458*m.x1356 - m.x614*m.x1239 == 0) m.c2549 = Constraint(expr=m.x458*m.x1357 - m.x615*m.x1239 == 0) m.c2550 = Constraint(expr=m.x459*m.x1352 - m.x616*m.x1239 == 0) m.c2551 = Constraint(expr=m.x459*m.x1353 - m.x617*m.x1239 == 0) m.c2552 = Constraint(expr=m.x459*m.x1354 - m.x618*m.x1239 == 0) m.c2553 = Constraint(expr=m.x459*m.x1355 - m.x619*m.x1239 == 0) m.c2554 = Constraint(expr=m.x459*m.x1356 - m.x620*m.x1239 == 0) m.c2555 = Constraint(expr=m.x459*m.x1357 - m.x621*m.x1239 == 0) m.c2556 = Constraint(expr=m.x460*m.x1358 - m.x622*m.x1240 == 0) m.c2557 = Constraint(expr=m.x460*m.x1359 - m.x623*m.x1240 == 0) m.c2558 = Constraint(expr=m.x460*m.x1360 - m.x624*m.x1240 == 0) m.c2559 = Constraint(expr=m.x460*m.x1361 - m.x625*m.x1240 == 0) m.c2560 = Constraint(expr=m.x460*m.x1362 - m.x626*m.x1240 == 0) m.c2561 = Constraint(expr=m.x460*m.x1363 - m.x627*m.x1240 == 0) m.c2562 = Constraint(expr=m.x461*m.x1364 - m.x628*m.x1241 == 0) m.c2563 = Constraint(expr=m.x461*m.x1365 - m.x629*m.x1241 == 0) m.c2564 = Constraint(expr=m.x461*m.x1366 - m.x630*m.x1241 == 0) m.c2565 = Constraint(expr=m.x461*m.x1367 - m.x631*m.x1241 == 0) m.c2566 = Constraint(expr=m.x461*m.x1368 - m.x632*m.x1241 == 0) m.c2567 = Constraint(expr=m.x461*m.x1369 - m.x633*m.x1241 == 0) m.c2568 = Constraint(expr=m.x462*m.x1364 - m.x634*m.x1241 == 0) m.c2569 = Constraint(expr=m.x462*m.x1365 - m.x635*m.x1241 == 0) m.c2570 = Constraint(expr=m.x462*m.x1366 - m.x636*m.x1241 == 0) m.c2571 = Constraint(expr=m.x462*m.x1367 - m.x637*m.x1241 == 0) m.c2572 = Constraint(expr=m.x462*m.x1368 - m.x638*m.x1241 == 0) m.c2573 = Constraint(expr=m.x462*m.x1369 - m.x639*m.x1241 == 0) m.c2574 = Constraint(expr=m.x463*m.x1370 - m.x640*m.x1242 == 0) m.c2575 = Constraint(expr=m.x463*m.x1371 - m.x641*m.x1242 == 0) m.c2576 = Constraint(expr=m.x463*m.x1372 - m.x642*m.x1242 == 0) m.c2577 = Constraint(expr=m.x463*m.x1373 - m.x643*m.x1242 == 0) m.c2578 = Constraint(expr=m.x463*m.x1374 - m.x644*m.x1242 == 0) m.c2579 = Constraint(expr=m.x463*m.x1375 - m.x645*m.x1242 == 0) m.c2580 = Constraint(expr=m.x464*m.x1388 - m.x646*m.x1245 == 0) m.c2581 = Constraint(expr=m.x464*m.x1389 - m.x647*m.x1245 == 0) m.c2582 = Constraint(expr=m.x464*m.x1390 - m.x648*m.x1245 == 0) m.c2583 = Constraint(expr=m.x464*m.x1391 - m.x649*m.x1245 == 0) m.c2584 = Constraint(expr=m.x464*m.x1392 - m.x650*m.x1245 == 0) m.c2585 = Constraint(expr=m.x464*m.x1393 - m.x651*m.x1245 == 0) m.c2586 = Constraint(expr=m.x465*m.x1394 - m.x652*m.x1246 == 0) m.c2587 = Constraint(expr=m.x465*m.x1395 - m.x653*m.x1246 == 0) m.c2588 = Constraint(expr=m.x465*m.x1396 - m.x654*m.x1246 == 0) m.c2589 = Constraint(expr=m.x465*m.x1397 - m.x655*m.x1246 == 0) m.c2590 = Constraint(expr=m.x465*m.x1398 - m.x656*m.x1246 == 0) m.c2591 = Constraint(expr=m.x465*m.x1399 - m.x657*m.x1246 == 0) m.c2592 = Constraint(expr=m.x466*m.x1400 - m.x658*m.x1247 == 0) m.c2593 = Constraint(expr=m.x466*m.x1401 - m.x659*m.x1247 == 0) m.c2594 = Constraint(expr=m.x466*m.x1402 - m.x660*m.x1247 == 0) m.c2595 = Constraint(expr=m.x466*m.x1403 - m.x661*m.x1247 == 0) m.c2596 = Constraint(expr=m.x466*m.x1404 - m.x662*m.x1247 == 0) m.c2597 = Constraint(expr=m.x466*m.x1405 - m.x663*m.x1247 == 0) m.c2598 = Constraint(expr=m.x467*m.x1406 - m.x664*m.x1248 == 0) m.c2599 = Constraint(expr=m.x467*m.x1407 - m.x665*m.x1248 == 0) m.c2600 = Constraint(expr=m.x467*m.x1408 - m.x666*m.x1248 == 0) m.c2601 = Constraint(expr=m.x467*m.x1409 - m.x667*m.x1248 == 0) m.c2602 = Constraint(expr=m.x467*m.x1410 - m.x668*m.x1248 == 0) m.c2603 = Constraint(expr=m.x467*m.x1411 - m.x669*m.x1248 == 0) m.c2604 = Constraint(expr=m.x468*m.x1406 - m.x670*m.x1248 == 0) m.c2605 = Constraint(expr=m.x468*m.x1407 - m.x671*m.x1248 == 0) m.c2606 = Constraint(expr=m.x468*m.x1408 - m.x672*m.x1248 == 0) m.c2607 = Constraint(expr=m.x468*m.x1409 - m.x673*m.x1248 == 0) m.c2608 = Constraint(expr=m.x468*m.x1410 - m.x674*m.x1248 == 0) m.c2609 = Constraint(expr=m.x468*m.x1411 - m.x675*m.x1248 == 0) m.c2610 = Constraint(expr=m.x469*m.x1412 - m.x676*m.x1249 == 0) m.c2611 = Constraint(expr=m.x469*m.x1413 - m.x677*m.x1249 == 0) m.c2612 = Constraint(expr=m.x469*m.x1414 - m.x678*m.x1249 == 0) m.c2613 = Constraint(expr=m.x469*m.x1415 - m.x679*m.x1249 == 0) m.c2614 = Constraint(expr=m.x469*m.x1416 - m.x680*m.x1249 == 0) m.c2615 = Constraint(expr=m.x469*m.x1417 - m.x681*m.x1249 == 0) m.c2616 = Constraint(expr=m.x470*m.x1412 - m.x682*m.x1249 == 0) m.c2617 = Constraint(expr=m.x470*m.x1413 - m.x683*m.x1249 == 0) m.c2618 = Constraint(expr=m.x470*m.x1414 - m.x684*m.x1249 == 0) m.c2619 = Constraint(expr=m.x470*m.x1415 - m.x685*m.x1249 == 0) m.c2620 = Constraint(expr=m.x470*m.x1416 - m.x686*m.x1249 == 0) m.c2621 = Constraint(expr=m.x470*m.x1417 - m.x687*m.x1249 == 0) m.c2622 = Constraint(expr=m.x471*m.x1412 - m.x688*m.x1249 == 0) m.c2623 = Constraint(expr=m.x471*m.x1413 - m.x689*m.x1249 == 0) m.c2624 = Constraint(expr=m.x471*m.x1414 - m.x690*m.x1249 == 0) m.c2625 = Constraint(expr=m.x471*m.x1415 - m.x691*m.x1249 == 0) m.c2626 = Constraint(expr=m.x471*m.x1416 - m.x692*m.x1249 == 0) m.c2627 = Constraint(expr=m.x471*m.x1417 - m.x693*m.x1249 == 0) m.c2628 = Constraint(expr=m.x472*m.x1418 - m.x694*m.x1250 == 0) m.c2629 = Constraint(expr=m.x472*m.x1419 - m.x695*m.x1250 == 0) m.c2630 = Constraint(expr=m.x472*m.x1420 - m.x696*m.x1250 == 0) m.c2631 = Constraint(expr=m.x472*m.x1421 - m.x697*m.x1250 == 0) m.c2632 = Constraint(expr=m.x472*m.x1422 - m.x698*m.x1250 == 0) m.c2633 = Constraint(expr=m.x472*m.x1423 - m.x699*m.x1250 == 0) m.c2634 = Constraint(expr=m.x473*m.x1418 - m.x700*m.x1250 == 0) m.c2635 = Constraint(expr=m.x473*m.x1419 - m.x701*m.x1250 == 0) m.c2636 = Constraint(expr=m.x473*m.x1420 - m.x702*m.x1250 == 0) m.c2637 = Constraint(expr=m.x473*m.x1421 - m.x703*m.x1250 == 0) m.c2638 = Constraint(expr=m.x473*m.x1422 - m.x704*m.x1250 == 0) m.c2639 = Constraint(expr=m.x473*m.x1423 - m.x705*m.x1250 == 0) m.c2640 = Constraint(expr=m.x474*m.x1424 - m.x706*m.x1251 == 0) m.c2641 = Constraint(expr=m.x474*m.x1425 - m.x707*m.x1251 == 0) m.c2642 = Constraint(expr=m.x474*m.x1426 - m.x708*m.x1251 == 0) m.c2643 = Constraint(expr=m.x474*m.x1427 - m.x709*m.x1251 == 0) m.c2644 = Constraint(expr=m.x474*m.x1428 - m.x710*m.x1251 == 0) m.c2645 = Constraint(expr=m.x474*m.x1429 - m.x711*m.x1251 == 0) m.c2646 = Constraint(expr=m.x475*m.x1430 - m.x712*m.x1252 == 0) m.c2647 = Constraint(expr=m.x475*m.x1431 - m.x713*m.x1252 == 0) m.c2648 = Constraint(expr=m.x475*m.x1432 - m.x714*m.x1252 == 0) m.c2649 = Constraint(expr=m.x475*m.x1433 - m.x715*m.x1252 == 0) m.c2650 = Constraint(expr=m.x475*m.x1434 - m.x716*m.x1252 == 0) m.c2651 = Constraint(expr=m.x475*m.x1435 - m.x717*m.x1252 == 0) m.c2652 = Constraint(expr=m.x476*m.x1430 - m.x718*m.x1252 == 0) m.c2653 = Constraint(expr=m.x476*m.x1431 - m.x719*m.x1252 == 0) m.c2654 = Constraint(expr=m.x476*m.x1432 - m.x720*m.x1252 == 0) m.c2655 = Constraint(expr=m.x476*m.x1433 - m.x721*m.x1252 == 0) m.c2656 = Constraint(expr=m.x476*m.x1434 - m.x722*m.x1252 == 0) m.c2657 = Constraint(expr=m.x476*m.x1435 - m.x723*m.x1252 == 0) m.c2658 = Constraint(expr=m.x477*m.x1436 - m.x724*m.x1253 == 0) m.c2659 = Constraint(expr=m.x477*m.x1437 - m.x725*m.x1253 == 0) m.c2660 = Constraint(expr=m.x477*m.x1438 - m.x726*m.x1253 == 0) m.c2661 = Constraint(expr=m.x477*m.x1439 - m.x727*m.x1253 == 0) m.c2662 = Constraint(expr=m.x477*m.x1440 - m.x728*m.x1253 == 0) m.c2663 = Constraint(expr=m.x477*m.x1441 - m.x729*m.x1253 == 0) m.c2664 = Constraint(expr=m.x478*m.x1454 - m.x730*m.x1256 == 0) m.c2665 = Constraint(expr=m.x478*m.x1455 - m.x731*m.x1256 == 0) m.c2666 = Constraint(expr=m.x478*m.x1456 - m.x732*m.x1256 == 0) m.c2667 = Constraint(expr=m.x478*m.x1457 - m.x733*m.x1256 == 0) m.c2668 = Constraint(expr=m.x478*m.x1458 - m.x734*m.x1256 == 0) m.c2669 = Constraint(expr=m.x478*m.x1459 - m.x735*m.x1256 == 0) m.c2670 = Constraint(expr=m.x479*m.x1460 - m.x736*m.x1257 == 0) m.c2671 = Constraint(expr=m.x479*m.x1461 - m.x737*m.x1257 == 0) m.c2672 = Constraint(expr=m.x479*m.x1462 - m.x738*m.x1257 == 0) m.c2673 = Constraint(expr=m.x479*m.x1463 - m.x739*m.x1257 == 0) m.c2674 = Constraint(expr=m.x479*m.x1464 - m.x740*m.x1257 == 0) m.c2675 = Constraint(expr=m.x479*m.x1465 - m.x741*m.x1257 == 0) m.c2676 = Constraint(expr=m.x480*m.x1466 - m.x742*m.x1258 == 0) m.c2677 = Constraint(expr=m.x480*m.x1467 - m.x743*m.x1258 == 0) m.c2678 = Constraint(expr=m.x480*m.x1468 - m.x744*m.x1258 == 0) m.c2679 = Constraint(expr=m.x480*m.x1469 - m.x745*m.x1258 == 0) m.c2680 = Constraint(expr=m.x480*m.x1470 - m.x746*m.x1258 == 0) m.c2681 = Constraint(expr=m.x480*m.x1471 - m.x747*m.x1258 == 0) m.c2682 = Constraint(expr=m.x481*m.x1472 - m.x748*m.x1259 == 0) m.c2683 = Constraint(expr=m.x481*m.x1473 - m.x749*m.x1259 == 0) m.c2684 = Constraint(expr=m.x481*m.x1474 - m.x750*m.x1259 == 0) m.c2685 = Constraint(expr=m.x481*m.x1475 - m.x751*m.x1259 == 0) m.c2686 = Constraint(expr=m.x481*m.x1476 - m.x752*m.x1259 == 0) m.c2687 = Constraint(expr=m.x481*m.x1477 - m.x753*m.x1259 == 0) m.c2688 = Constraint(expr=m.x482*m.x1472 - m.x754*m.x1259 == 0) m.c2689 = Constraint(expr=m.x482*m.x1473 - m.x755*m.x1259 == 0) m.c2690 = Constraint(expr=m.x482*m.x1474 - m.x756*m.x1259 == 0) m.c2691 = Constraint(expr=m.x482*m.x1475 - m.x757*m.x1259 == 0) m.c2692 = Constraint(expr=m.x482*m.x1476 - m.x758*m.x1259 == 0) m.c2693 = Constraint(expr=m.x482*m.x1477 - m.x759*m.x1259 == 0) m.c2694 = Constraint(expr=m.x483*m.x1478 - m.x760*m.x1260 == 0) m.c2695 = Constraint(expr=m.x483*m.x1479 - m.x761*m.x1260 == 0) m.c2696 = Constraint(expr=m.x483*m.x1480 - m.x762*m.x1260 == 0) m.c2697 = Constraint(expr=m.x483*m.x1481 - m.x763*m.x1260 == 0) m.c2698 = Constraint(expr=m.x483*m.x1482 - m.x764*m.x1260 == 0) m.c2699 = Constraint(expr=m.x483*m.x1483 - m.x765*m.x1260 == 0) m.c2700 = Constraint(expr=m.x484*m.x1478 - m.x766*m.x1260 == 0) m.c2701 = Constraint(expr=m.x484*m.x1479 - m.x767*m.x1260 == 0) m.c2702 = Constraint(expr=m.x484*m.x1480 - m.x768*m.x1260 == 0) m.c2703 = Constraint(expr=m.x484*m.x1481 - m.x769*m.x1260 == 0) m.c2704 = Constraint(expr=m.x484*m.x1482 - m.x770*m.x1260 == 0) m.c2705 = Constraint(expr=m.x484*m.x1483 - m.x771*m.x1260 == 0) m.c2706 = Constraint(expr=m.x485*m.x1478 - m.x772*m.x1260 == 0) m.c2707 = Constraint(expr=m.x485*m.x1479 - m.x773*m.x1260 == 0) m.c2708 = Constraint(expr=m.x485*m.x1480 - m.x774*m.x1260 == 0) m.c2709 = Constraint(expr=m.x485*m.x1481 - m.x775*m.x1260 == 0) m.c2710 = Constraint(expr=m.x485*m.x1482 - m.x776*m.x1260 == 0) m.c2711 = Constraint(expr=m.x485*m.x1483 - m.x777*m.x1260 == 0) m.c2712 = Constraint(expr=m.x486*m.x1484 - m.x778*m.x1261 == 0) m.c2713 = Constraint(expr=m.x486*m.x1485 - m.x779*m.x1261 == 0) m.c2714 = Constraint(expr=m.x486*m.x1486 - m.x780*m.x1261 == 0) m.c2715 = Constraint(expr=m.x486*m.x1487 - m.x781*m.x1261 == 0) m.c2716 = Constraint(expr=m.x486*m.x1488 - m.x782*m.x1261 == 0) m.c2717 = Constraint(expr=m.x486*m.x1489 - m.x783*m.x1261 == 0) m.c2718 = Constraint(expr=m.x487*m.x1484 - m.x784*m.x1261 == 0) m.c2719 = Constraint(expr=m.x487*m.x1485 - m.x785*m.x1261 == 0) m.c2720 = Constraint(expr=m.x487*m.x1486 - m.x786*m.x1261 == 0) m.c2721 = Constraint(expr=m.x487*m.x1487 - m.x787*m.x1261 == 0) m.c2722 = Constraint(expr=m.x487*m.x1488 - m.x788*m.x1261 == 0) m.c2723 = Constraint(expr=m.x487*m.x1489 - m.x789*m.x1261 == 0) m.c2724 = Constraint(expr=m.x488*m.x1490 - m.x790*m.x1262 == 0) m.c2725 = Constraint(expr=m.x488*m.x1491 - m.x791*m.x1262 == 0) m.c2726 = Constraint(expr=m.x488*m.x1492 - m.x792*m.x1262 == 0) m.c2727 = Constraint(expr=m.x488*m.x1493 - m.x793*m.x1262 == 0) m.c2728 = Constraint(expr=m.x488*m.x1494 - m.x794*m.x1262 == 0) m.c2729 = Constraint(expr=m.x488*m.x1495 - m.x795*m.x1262 == 0) m.c2730 = Constraint(expr=m.x489*m.x1496 - m.x796*m.x1263 == 0) m.c2731 = Constraint(expr=m.x489*m.x1497 - m.x797*m.x1263 == 0) m.c2732 = Constraint(expr=m.x489*m.x1498 - m.x798*m.x1263 == 0) m.c2733 = Constraint(expr=m.x489*m.x1499 - m.x799*m.x1263 == 0) m.c2734 = Constraint(expr=m.x489*m.x1500 - m.x800*m.x1263 == 0) m.c2735 = Constraint(expr=m.x489*m.x1501 - m.x801*m.x1263 == 0) m.c2736 = Constraint(expr=m.x490*m.x1496 - m.x802*m.x1263 == 0) m.c2737 = Constraint(expr=m.x490*m.x1497 - m.x803*m.x1263 == 0) m.c2738 = Constraint(expr=m.x490*m.x1498 - m.x804*m.x1263 == 0) m.c2739 = Constraint(expr=m.x490*m.x1499 - m.x805*m.x1263 == 0) m.c2740 = Constraint(expr=m.x490*m.x1500 - m.x806*m.x1263 == 0) m.c2741 = Constraint(expr=m.x490*m.x1501 - m.x807*m.x1263 == 0) m.c2742 = Constraint(expr=m.x491*m.x1502 - m.x808*m.x1264 == 0) m.c2743 = Constraint(expr=m.x491*m.x1503 - m.x809*m.x1264 == 0) m.c2744 = Constraint(expr=m.x491*m.x1504 - m.x810*m.x1264 == 0) m.c2745 = Constraint(expr=m.x491*m.x1505 - m.x811*m.x1264 == 0) m.c2746 = Constraint(expr=m.x491*m.x1506 - m.x812*m.x1264 == 0) m.c2747 = Constraint(expr=m.x491*m.x1507 - m.x813*m.x1264 == 0) m.c2748 = Constraint(expr=m.x492*m.x1520 - m.x814*m.x1267 == 0) m.c2749 = Constraint(expr=m.x492*m.x1521 - m.x815*m.x1267 == 0) m.c2750 = Constraint(expr=m.x492*m.x1522 - m.x816*m.x1267 == 0) m.c2751 = Constraint(expr=m.x492*m.x1523 - m.x817*m.x1267 == 0) m.c2752 = Constraint(expr=m.x492*m.x1524 - m.x818*m.x1267 == 0) m.c2753 = Constraint(expr=m.x492*m.x1525 - m.x819*m.x1267 == 0) m.c2754 = Constraint(expr=m.x493*m.x1526 - m.x820*m.x1268 == 0) m.c2755 = Constraint(expr=m.x493*m.x1527 - m.x821*m.x1268 == 0) m.c2756 = Constraint(expr=m.x493*m.x1528 - m.x822*m.x1268 == 0) m.c2757 = Constraint(expr=m.x493*m.x1529 - m.x823*m.x1268 == 0) m.c2758 = Constraint(expr=m.x493*m.x1530 - m.x824*m.x1268 == 0) m.c2759 = Constraint(expr=m.x493*m.x1531 - m.x825*m.x1268 == 0) m.c2760 = Constraint(expr=m.x494*m.x1532 - m.x826*m.x1269 == 0) m.c2761 = Constraint(expr=m.x494*m.x1533 - m.x827*m.x1269 == 0) m.c2762 = Constraint(expr=m.x494*m.x1534 - m.x828*m.x1269 == 0) m.c2763 = Constraint(expr=m.x494*m.x1535 - m.x829*m.x1269 == 0) m.c2764 = Constraint(expr=m.x494*m.x1536 - m.x830*m.x1269 == 0) m.c2765 = Constraint(expr=m.x494*m.x1537 - m.x831*m.x1269 == 0) m.c2766 = Constraint(expr=m.x495*m.x1538 - m.x832*m.x1270 == 0) m.c2767 = Constraint(expr=m.x495*m.x1539 - m.x833*m.x1270 == 0) m.c2768 = Constraint(expr=m.x495*m.x1540 - m.x834*m.x1270 == 0) m.c2769 = Constraint(expr=m.x495*m.x1541 - m.x835*m.x1270 == 0) m.c2770 = Constraint(expr=m.x495*m.x1542 - m.x836*m.x1270 == 0) m.c2771 = Constraint(expr=m.x495*m.x1543 - m.x837*m.x1270 == 0) m.c2772 = Constraint(expr=m.x496*m.x1538 - m.x838*m.x1270 == 0) m.c2773 = Constraint(expr=m.x496*m.x1539 - m.x839*m.x1270 == 0) m.c2774 = Constraint(expr=m.x496*m.x1540 - m.x840*m.x1270 == 0) m.c2775 = Constraint(expr=m.x496*m.x1541 - m.x841*m.x1270 == 0) m.c2776 = Constraint(expr=m.x496*m.x1542 - m.x842*m.x1270 == 0) m.c2777 = Constraint(expr=m.x496*m.x1543 - m.x843*m.x1270 == 0) m.c2778 = Constraint(expr=m.x497*m.x1544 - m.x844*m.x1271 == 0) m.c2779 = Constraint(expr=m.x497*m.x1545 - m.x845*m.x1271 == 0) m.c2780 = Constraint(expr=m.x497*m.x1546 - m.x846*m.x1271 == 0) m.c2781 = Constraint(expr=m.x497*m.x1547 - m.x847*m.x1271 == 0) m.c2782 = Constraint(expr=m.x497*m.x1548 - m.x848*m.x1271 == 0) m.c2783 = Constraint(expr=m.x497*m.x1549 - m.x849*m.x1271 == 0) m.c2784 = Constraint(expr=m.x498*m.x1544 - m.x850*m.x1271 == 0) m.c2785 = Constraint(expr=m.x498*m.x1545 - m.x851*m.x1271 == 0) m.c2786 = Constraint(expr=m.x498*m.x1546 - m.x852*m.x1271 == 0) m.c2787 = Constraint(expr=m.x498*m.x1547 - m.x853*m.x1271 == 0) m.c2788 = Constraint(expr=m.x498*m.x1548 - m.x854*m.x1271 == 0) m.c2789 = Constraint(expr=m.x498*m.x1549 - m.x855*m.x1271 == 0) m.c2790 = Constraint(expr=m.x499*m.x1544 - m.x856*m.x1271 == 0) m.c2791 = Constraint(expr=m.x499*m.x1545 - m.x857*m.x1271 == 0) m.c2792 = Constraint(expr=m.x499*m.x1546 - m.x858*m.x1271 == 0) m.c2793 = Constraint(expr=m.x499*m.x1547 - m.x859*m.x1271 == 0) m.c2794 = Constraint(expr=m.x499*m.x1548 - m.x860*m.x1271 == 0) m.c2795 = Constraint(expr=m.x499*m.x1549 - m.x861*m.x1271 == 0) m.c2796 = Constraint(expr=m.x500*m.x1550 - m.x862*m.x1272 == 0) m.c2797 = Constraint(expr=m.x500*m.x1551 - m.x863*m.x1272 == 0) m.c2798 = Constraint(expr=m.x500*m.x1552 - m.x864*m.x1272 == 0) m.c2799 = Constraint(expr=m.x500*m.x1553 - m.x865*m.x1272 == 0) m.c2800 = Constraint(expr=m.x500*m.x1554 - m.x866*m.x1272 == 0) m.c2801 = Constraint(expr=m.x500*m.x1555 - m.x867*m.x1272 == 0) m.c2802 = Constraint(expr=m.x501*m.x1550 - m.x868*m.x1272 == 0) m.c2803 = Constraint(expr=m.x501*m.x1551 - m.x869*m.x1272 == 0) m.c2804 = Constraint(expr=m.x501*m.x1552 - m.x870*m.x1272 == 0) m.c2805 = Constraint(expr=m.x501*m.x1553 - m.x871*m.x1272 == 0) m.c2806 = Constraint(expr=m.x501*m.x1554 - m.x872*m.x1272 == 0) m.c2807 = Constraint(expr=m.x501*m.x1555 - m.x873*m.x1272 == 0) m.c2808 = Constraint(expr=m.x502*m.x1556 - m.x874*m.x1273 == 0) m.c2809 = Constraint(expr=m.x502*m.x1557 - m.x875*m.x1273 == 0) m.c2810 = Constraint(expr=m.x502*m.x1558 - m.x876*m.x1273 == 0) m.c2811 = Constraint(expr=m.x502*m.x1559 - m.x877*m.x1273 == 0) m.c2812 = Constraint(expr=m.x502*m.x1560 - m.x878*m.x1273 == 0) m.c2813 = Constraint(expr=m.x502*m.x1561 - m.x879*m.x1273 == 0) m.c2814 = Constraint(expr=m.x503*m.x1562 - m.x880*m.x1274 == 0) m.c2815 = Constraint(expr=m.x503*m.x1563 - m.x881*m.x1274 == 0) m.c2816 = Constraint(expr=m.x503*m.x1564 - m.x882*m.x1274 == 0) m.c2817 = Constraint(expr=m.x503*m.x1565 - m.x883*m.x1274 == 0) m.c2818 = Constraint(expr=m.x503*m.x1566 - m.x884*m.x1274 == 0) m.c2819 = Constraint(expr=m.x503*m.x1567 - m.x885*m.x1274 == 0) m.c2820 = Constraint(expr=m.x504*m.x1562 - m.x886*m.x1274 == 0) m.c2821 = Constraint(expr=m.x504*m.x1563 - m.x887*m.x1274 == 0) m.c2822 = Constraint(expr=m.x504*m.x1564 - m.x888*m.x1274 == 0) m.c2823 = Constraint(expr=m.x504*m.x1565 - m.x889*m.x1274 == 0) m.c2824 = Constraint(expr=m.x504*m.x1566 - m.x890*m.x1274 == 0) m.c2825 = Constraint(expr=m.x504*m.x1567 - m.x891*m.x1274 == 0) m.c2826 = Constraint(expr=m.x505*m.x1568 - m.x892*m.x1275 == 0) m.c2827 = Constraint(expr=m.x505*m.x1569 - m.x893*m.x1275 == 0) m.c2828 = Constraint(expr=m.x505*m.x1570 - m.x894*m.x1275 == 0) m.c2829 = Constraint(expr=m.x505*m.x1571 - m.x895*m.x1275 == 0) m.c2830 = Constraint(expr=m.x505*m.x1572 - m.x896*m.x1275 == 0) m.c2831 = Constraint(expr=m.x505*m.x1573 - m.x897*m.x1275 == 0) m.c2832 = Constraint(expr=m.x506*m.x1586 - m.x898*m.x1278 == 0) m.c2833 = Constraint(expr=m.x506*m.x1587 - m.x899*m.x1278 == 0) m.c2834 = Constraint(expr=m.x506*m.x1588 - m.x900*m.x1278 == 0) m.c2835 = Constraint(expr=m.x506*m.x1589 - m.x901*m.x1278 == 0) m.c2836 = Constraint(expr=m.x506*m.x1590 - m.x902*m.x1278 == 0) m.c2837 = Constraint(expr=m.x506*m.x1591 - m.x903*m.x1278 == 0) m.c2838 = Constraint(expr=m.x507*m.x1592 - m.x904*m.x1279 == 0) m.c2839 = Constraint(expr=m.x507*m.x1593 - m.x905*m.x1279 == 0) m.c2840 = Constraint(expr=m.x507*m.x1594 - m.x906*m.x1279 == 0) m.c2841 = Constraint(expr=m.x507*m.x1595 - m.x907*m.x1279 == 0) m.c2842 = Constraint(expr=m.x507*m.x1596 - m.x908*m.x1279 == 0) m.c2843 = Constraint(expr=m.x507*m.x1597 - m.x909*m.x1279 == 0) m.c2844 = Constraint(expr=m.x508*m.x1598 - m.x910*m.x1280 == 0) m.c2845 = Constraint(expr=m.x508*m.x1599 - m.x911*m.x1280 == 0) m.c2846 = Constraint(expr=m.x508*m.x1600 - m.x912*m.x1280 == 0) m.c2847 = Constraint(expr=m.x508*m.x1601 - m.x913*m.x1280 == 0) m.c2848 = Constraint(expr=m.x508*m.x1602 - m.x914*m.x1280 == 0) m.c2849 = Constraint(expr=m.x508*m.x1603 - m.x915*m.x1280 == 0) m.c2850 = Constraint(expr=m.x509*m.x1604 - m.x916*m.x1281 == 0) m.c2851 = Constraint(expr=m.x509*m.x1605 - m.x917*m.x1281 == 0) m.c2852 = Constraint(expr=m.x509*m.x1606 - m.x918*m.x1281 == 0) m.c2853 = Constraint(expr=m.x509*m.x1607 - m.x919*m.x1281 == 0) m.c2854 = Constraint(expr=m.x509*m.x1608 - m.x920*m.x1281 == 0) m.c2855 = Constraint(expr=m.x509*m.x1609 - m.x921*m.x1281 == 0) m.c2856 = Constraint(expr=m.x510*m.x1604 - m.x922*m.x1281 == 0) m.c2857 = Constraint(expr=m.x510*m.x1605 - m.x923*m.x1281 == 0) m.c2858 = Constraint(expr=m.x510*m.x1606 - m.x924*m.x1281 == 0) m.c2859 = Constraint(expr=m.x510*m.x1607 - m.x925*m.x1281 == 0) m.c2860 = Constraint(expr=m.x510*m.x1608 - m.x926*m.x1281 == 0) m.c2861 = Constraint(expr=m.x510*m.x1609 - m.x927*m.x1281 == 0) m.c2862 = Constraint(expr=m.x511*m.x1610 - m.x928*m.x1282 == 0) m.c2863 = Constraint(expr=m.x511*m.x1611 - m.x929*m.x1282 == 0) m.c2864 = Constraint(expr=m.x511*m.x1612 - m.x930*m.x1282 == 0) m.c2865 = Constraint(expr=m.x511*m.x1613 - m.x931*m.x1282 == 0) m.c2866 = Constraint(expr=m.x511*m.x1614 - m.x932*m.x1282 == 0) m.c2867 = Constraint(expr=m.x511*m.x1615 - m.x933*m.x1282 == 0) m.c2868 = Constraint(expr=m.x512*m.x1610 - m.x934*m.x1282 == 0) m.c2869 = Constraint(expr=m.x512*m.x1611 - m.x935*m.x1282 == 0) m.c2870 = Constraint(expr=m.x512*m.x1612 - m.x936*m.x1282 == 0) m.c2871 = Constraint(expr=m.x512*m.x1613 - m.x937*m.x1282 == 0) m.c2872 = Constraint(expr=m.x512*m.x1614 - m.x938*m.x1282 == 0) m.c2873 = Constraint(expr=m.x512*m.x1615 - m.x939*m.x1282 == 0) m.c2874 = Constraint(expr=m.x513*m.x1610 - m.x940*m.x1282 == 0) m.c2875 = Constraint(expr=m.x513*m.x1611 - m.x941*m.x1282 == 0) m.c2876 = Constraint(expr=m.x513*m.x1612 - m.x942*m.x1282 == 0) m.c2877 = Constraint(expr=m.x513*m.x1613 - m.x943*m.x1282 == 0) m.c2878 = Constraint(expr=m.x513*m.x1614 - m.x944*m.x1282 == 0) m.c2879 = Constraint(expr=m.x513*m.x1615 - m.x945*m.x1282 == 0) m.c2880 = Constraint(expr=m.x514*m.x1616 - m.x946*m.x1283 == 0) m.c2881 = Constraint(expr=m.x514*m.x1617 - m.x947*m.x1283 == 0) m.c2882 = Constraint(expr=m.x514*m.x1618 - m.x948*m.x1283 == 0) m.c2883 = Constraint(expr=m.x514*m.x1619 - m.x949*m.x1283 == 0) m.c2884 = Constraint(expr=m.x514*m.x1620 - m.x950*m.x1283 == 0) m.c2885 = Constraint(expr=m.x514*m.x1621 - m.x951*m.x1283 == 0) m.c2886 = Constraint(expr=m.x515*m.x1616 - m.x952*m.x1283 == 0) m.c2887 = Constraint(expr=m.x515*m.x1617 - m.x953*m.x1283 == 0) m.c2888 = Constraint(expr=m.x515*m.x1618 - m.x954*m.x1283 == 0) m.c2889 = Constraint(expr=m.x515*m.x1619 - m.x955*m.x1283 == 0) m.c2890 = Constraint(expr=m.x515*m.x1620 - m.x956*m.x1283 == 0) m.c2891 = Constraint(expr=m.x515*m.x1621 - m.x957*m.x1283 == 0) m.c2892 = Constraint(expr=m.x516*m.x1622 - m.x958*m.x1284 == 0) m.c2893 = Constraint(expr=m.x516*m.x1623 - m.x959*m.x1284 == 0) m.c2894 = Constraint(expr=m.x516*m.x1624 - m.x960*m.x1284 == 0) m.c2895 = Constraint(expr=m.x516*m.x1625 - m.x961*m.x1284 == 0) m.c2896 = Constraint(expr=m.x516*m.x1626 - m.x962*m.x1284 == 0) m.c2897 = Constraint(expr=m.x516*m.x1627 - m.x963*m.x1284 == 0) m.c2898 = Constraint(expr=m.x517*m.x1628 - m.x964*m.x1285 == 0) m.c2899 = Constraint(expr=m.x517*m.x1629 - m.x965*m.x1285 == 0) m.c2900 = Constraint(expr=m.x517*m.x1630 - m.x966*m.x1285 == 0) m.c2901 = Constraint(expr=m.x517*m.x1631 - m.x967*m.x1285 == 0) m.c2902 = Constraint(expr=m.x517*m.x1632 - m.x968*m.x1285 == 0) m.c2903 = Constraint(expr=m.x517*m.x1633 - m.x969*m.x1285 == 0) m.c2904 = Constraint(expr=m.x518*m.x1628 - m.x970*m.x1285 == 0) m.c2905 = Constraint(expr=m.x518*m.x1629 - m.x971*m.x1285 == 0) m.c2906 = Constraint(expr=m.x518*m.x1630 - m.x972*m.x1285 == 0) m.c2907 = Constraint(expr=m.x518*m.x1631 - m.x973*m.x1285 == 0) m.c2908 = Constraint(expr=m.x518*m.x1632 - m.x974*m.x1285 == 0) m.c2909 = Constraint(expr=m.x518*m.x1633 - m.x975*m.x1285 == 0) m.c2910 = Constraint(expr=m.x519*m.x1634 - m.x976*m.x1286 == 0) m.c2911 = Constraint(expr=m.x519*m.x1635 - m.x977*m.x1286 == 0) m.c2912 = Constraint(expr=m.x519*m.x1636 - m.x978*m.x1286 == 0) m.c2913 = Constraint(expr=m.x519*m.x1637 - m.x979*m.x1286 == 0) m.c2914 = Constraint(expr=m.x519*m.x1638 - m.x980*m.x1286 == 0) m.c2915 = Constraint(expr=m.x519*m.x1639 - m.x981*m.x1286 == 0) m.c2916 = Constraint(expr=m.x520*m.x1652 - m.x982*m.x1289 == 0) m.c2917 = Constraint(expr=m.x520*m.x1653 - m.x983*m.x1289 == 0) m.c2918 = Constraint(expr=m.x520*m.x1654 - m.x984*m.x1289 == 0) m.c2919 = Constraint(expr=m.x520*m.x1655 - m.x985*m.x1289 == 0) m.c2920 = Constraint(expr=m.x520*m.x1656 - m.x986*m.x1289 == 0) m.c2921 = Constraint(expr=m.x520*m.x1657 - m.x987*m.x1289 == 0) m.c2922 = Constraint(expr=m.x521*m.x1658 - m.x988*m.x1290 == 0) m.c2923 = Constraint(expr=m.x521*m.x1659 - m.x989*m.x1290 == 0) m.c2924 = Constraint(expr=m.x521*m.x1660 - m.x990*m.x1290 == 0) m.c2925 = Constraint(expr=m.x521*m.x1661 - m.x991*m.x1290 == 0) m.c2926 = Constraint(expr=m.x521*m.x1662 - m.x992*m.x1290 == 0) m.c2927 = Constraint(expr=m.x521*m.x1663 - m.x993*m.x1290 == 0) m.c2928 = Constraint(expr=m.x522*m.x1664 - m.x994*m.x1291 == 0) m.c2929 = Constraint(expr=m.x522*m.x1665 - m.x995*m.x1291 == 0) m.c2930 = Constraint(expr=m.x522*m.x1666 - m.x996*m.x1291 == 0) m.c2931 = Constraint(expr=m.x522*m.x1667 - m.x997*m.x1291 == 0) m.c2932 = Constraint(expr=m.x522*m.x1668 - m.x998*m.x1291 == 0) m.c2933 = Constraint(expr=m.x522*m.x1669 - m.x999*m.x1291 == 0) m.c2934 = Constraint(expr=m.x523*m.x1670 - m.x1000*m.x1292 == 0) m.c2935 = Constraint(expr=m.x523*m.x1671 - m.x1001*m.x1292 == 0) m.c2936 = Constraint(expr=m.x523*m.x1672 - m.x1002*m.x1292 == 0) m.c2937 = Constraint(expr=m.x523*m.x1673 - m.x1003*m.x1292 == 0) m.c2938 = Constraint(expr=m.x523*m.x1674 - m.x1004*m.x1292 == 0) m.c2939 = Constraint(expr=m.x523*m.x1675 - m.x1005*m.x1292 == 0) m.c2940 = Constraint(expr=m.x524*m.x1670 - m.x1006*m.x1292 == 0) m.c2941 = Constraint(expr=m.x524*m.x1671 - m.x1007*m.x1292 == 0) m.c2942 = Constraint(expr=m.x524*m.x1672 - m.x1008*m.x1292 == 0) m.c2943 = Constraint(expr=m.x524*m.x1673 - m.x1009*m.x1292 == 0) m.c2944 = Constraint(expr=m.x524*m.x1674 - m.x1010*m.x1292 == 0) m.c2945 = Constraint(expr=m.x524*m.x1675 - m.x1011*m.x1292 == 0) m.c2946 = Constraint(expr=m.x525*m.x1676 - m.x1012*m.x1293 == 0) m.c2947 = Constraint(expr=m.x525*m.x1677 - m.x1013*m.x1293 == 0) m.c2948 = Constraint(expr=m.x525*m.x1678 - m.x1014*m.x1293 == 0) m.c2949 = Constraint(expr=m.x525*m.x1679 - m.x1015*m.x1293 == 0) m.c2950 = Constraint(expr=m.x525*m.x1680 - m.x1016*m.x1293 == 0) m.c2951 = Constraint(expr=m.x525*m.x1681 - m.x1017*m.x1293 == 0) m.c2952 = Constraint(expr=m.x526*m.x1676 - m.x1018*m.x1293 == 0) m.c2953 = Constraint(expr=m.x526*m.x1677 - m.x1019*m.x1293 == 0) m.c2954 = Constraint(expr=m.x526*m.x1678 - m.x1020*m.x1293 == 0) m.c2955 = Constraint(expr=m.x526*m.x1679 - m.x1021*m.x1293 == 0) m.c2956 = Constraint(expr=m.x526*m.x1680 - m.x1022*m.x1293 == 0) m.c2957 = Constraint(expr=m.x526*m.x1681 - m.x1023*m.x1293 == 0) m.c2958 = Constraint(expr=m.x527*m.x1676 - m.x1024*m.x1293 == 0) m.c2959 = Constraint(expr=m.x527*m.x1677 - m.x1025*m.x1293 == 0) m.c2960 = Constraint(expr=m.x527*m.x1678 - m.x1026*m.x1293 == 0) m.c2961 = Constraint(expr=m.x527*m.x1679 - m.x1027*m.x1293 == 0) m.c2962 = Constraint(expr=m.x527*m.x1680 - m.x1028*m.x1293 == 0) m.c2963 = Constraint(expr=m.x527*m.x1681 - m.x1029*m.x1293 == 0) m.c2964 = Constraint(expr=m.x528*m.x1682 - m.x1030*m.x1294 == 0) m.c2965 = Constraint(expr=m.x528*m.x1683 - m.x1031*m.x1294 == 0) m.c2966 = Constraint(expr=m.x528*m.x1684 - m.x1032*m.x1294 == 0) m.c2967 = Constraint(expr=m.x528*m.x1685 - m.x1033*m.x1294 == 0) m.c2968 = Constraint(expr=m.x528*m.x1686 - m.x1034*m.x1294 == 0) m.c2969 = Constraint(expr=m.x528*m.x1687 - m.x1035*m.x1294 == 0) m.c2970 = Constraint(expr=m.x529*m.x1682 - m.x1036*m.x1294 == 0) m.c2971 = Constraint(expr=m.x529*m.x1683 - m.x1037*m.x1294 == 0) m.c2972 = Constraint(expr=m.x529*m.x1684 - m.x1038*m.x1294 == 0) m.c2973 = Constraint(expr=m.x529*m.x1685 - m.x1039*m.x1294 == 0) m.c2974 = Constraint(expr=m.x529*m.x1686 - m.x1040*m.x1294 == 0) m.c2975 = Constraint(expr=m.x529*m.x1687 - m.x1041*m.x1294 == 0) m.c2976 = Constraint(expr=m.x530*m.x1688 - m.x1042*m.x1295 == 0) m.c2977 = Constraint(expr=m.x530*m.x1689 - m.x1043*m.x1295 == 0) m.c2978 = Constraint(expr=m.x530*m.x1690 - m.x1044*m.x1295 == 0) m.c2979 = Constraint(expr=m.x530*m.x1691 - m.x1045*m.x1295 == 0) m.c2980 = Constraint(expr=m.x530*m.x1692 - m.x1046*m.x1295 == 0) m.c2981 = Constraint(expr=m.x530*m.x1693 - m.x1047*m.x1295 == 0) m.c2982 = Constraint(expr=m.x531*m.x1694 - m.x1048*m.x1296 == 0) m.c2983 = Constraint(expr=m.x531*m.x1695 - m.x1049*m.x1296 == 0) m.c2984 = Constraint(expr=m.x531*m.x1696 - m.x1050*m.x1296 == 0) m.c2985 = Constraint(expr=m.x531*m.x1697 - m.x1051*m.x1296 == 0) m.c2986 = Constraint(expr=m.x531*m.x1698 - m.x1052*m.x1296 == 0) m.c2987 = Constraint(expr=m.x531*m.x1699 - m.x1053*m.x1296 == 0) m.c2988 = Constraint(expr=m.x532*m.x1694 - m.x1054*m.x1296 == 0) m.c2989 = Constraint(expr=m.x532*m.x1695 - m.x1055*m.x1296 == 0) m.c2990 = Constraint(expr=m.x532*m.x1696 - m.x1056*m.x1296 == 0) m.c2991 = Constraint(expr=m.x532*m.x1697 - m.x1057*m.x1296 == 0) m.c2992 = Constraint(expr=m.x532*m.x1698 - m.x1058*m.x1296 == 0) m.c2993 = Constraint(expr=m.x532*m.x1699 - m.x1059*m.x1296 == 0) m.c2994 = Constraint(expr=m.x533*m.x1700 - m.x1060*m.x1297 == 0) m.c2995 = Constraint(expr=m.x533*m.x1701 - m.x1061*m.x1297 == 0) m.c2996 = Constraint(expr=m.x533*m.x1702 - m.x1062*m.x1297 == 0) m.c2997 = Constraint(expr=m.x533*m.x1703 - m.x1063*m.x1297 == 0) m.c2998 = Constraint(expr=m.x533*m.x1704 - m.x1064*m.x1297 == 0) m.c2999 = Constraint(expr=m.x533*m.x1705 - m.x1065*m.x1297 == 0) m.c3000 = Constraint(expr=m.x534*m.x1718 - m.x1066*m.x1300 == 0) m.c3001 = Constraint(expr=m.x534*m.x1719 - m.x1067*m.x1300 == 0) m.c3002 = Constraint(expr=m.x534*m.x1720 - m.x1068*m.x1300 == 0) m.c3003 = Constraint(expr=m.x534*m.x1721 - m.x1069*m.x1300 == 0) m.c3004 = Constraint(expr=m.x534*m.x1722 - m.x1070*m.x1300 == 0) m.c3005 = Constraint(expr=m.x534*m.x1723 - m.x1071*m.x1300 == 0) m.c3006 = Constraint(expr=m.x535*m.x1724 - m.x1072*m.x1301 == 0) m.c3007 = Constraint(expr=m.x535*m.x1725 - m.x1073*m.x1301 == 0) m.c3008 = Constraint(expr=m.x535*m.x1726 - m.x1074*m.x1301 == 0) m.c3009 = Constraint(expr=m.x535*m.x1727 - m.x1075*m.x1301 == 0) m.c3010 = Constraint(expr=m.x535*m.x1728 - m.x1076*m.x1301 == 0) m.c3011 = Constraint(expr=m.x535*m.x1729 - m.x1077*m.x1301 == 0) m.c3012 = Constraint(expr=m.x536*m.x1730 - m.x1078*m.x1302 == 0) m.c3013 = Constraint(expr=m.x536*m.x1731 - m.x1079*m.x1302 == 0) m.c3014 = Constraint(expr=m.x536*m.x1732 - m.x1080*m.x1302 == 0) m.c3015 = Constraint(expr=m.x536*m.x1733 - m.x1081*m.x1302 == 0) m.c3016 = Constraint(expr=m.x536*m.x1734 - m.x1082*m.x1302 == 0) m.c3017 = Constraint(expr=m.x536*m.x1735 - m.x1083*m.x1302 == 0) m.c3018 = Constraint(expr=m.x537*m.x1736 - m.x1084*m.x1303 == 0) m.c3019 = Constraint(expr=m.x537*m.x1737 - m.x1085*m.x1303 == 0) m.c3020 = Constraint(expr=m.x537*m.x1738 - m.x1086*m.x1303 == 0) m.c3021 = Constraint(expr=m.x537*m.x1739 - m.x1087*m.x1303 == 0) m.c3022 = Constraint(expr=m.x537*m.x1740 - m.x1088*m.x1303 == 0) m.c3023 = Constraint(expr=m.x537*m.x1741 - m.x1089*m.x1303 == 0) m.c3024 = Constraint(expr=m.x538*m.x1736 - m.x1090*m.x1303 == 0) m.c3025 = Constraint(expr=m.x538*m.x1737 - m.x1091*m.x1303 == 0) m.c3026 = Constraint(expr=m.x538*m.x1738 - m.x1092*m.x1303 == 0) m.c3027 = Constraint(expr=m.x538*m.x1739 - m.x1093*m.x1303 == 0) m.c3028 = Constraint(expr=m.x538*m.x1740 - m.x1094*m.x1303 == 0) m.c3029 = Constraint(expr=m.x538*m.x1741 - m.x1095*m.x1303 == 0) m.c3030 = Constraint(expr=m.x539*m.x1742 - m.x1096*m.x1304 == 0) m.c3031 = Constraint(expr=m.x539*m.x1743 - m.x1097*m.x1304 == 0) m.c3032 = Constraint(expr=m.x539*m.x1744 - m.x1098*m.x1304 == 0) m.c3033 = Constraint(expr=m.x539*m.x1745 - m.x1099*m.x1304 == 0) m.c3034 = Constraint(expr=m.x539*m.x1746 - m.x1100*m.x1304 == 0) m.c3035 = Constraint(expr=m.x539*m.x1747 - m.x1101*m.x1304 == 0) m.c3036 = Constraint(expr=m.x540*m.x1742 - m.x1102*m.x1304 == 0) m.c3037 = Constraint(expr=m.x540*m.x1743 - m.x1103*m.x1304 == 0) m.c3038 = Constraint(expr=m.x540*m.x1744 - m.x1104*m.x1304 == 0) m.c3039 = Constraint(expr=m.x540*m.x1745 - m.x1105*m.x1304 == 0) m.c3040 = Constraint(expr=m.x540*m.x1746 - m.x1106*m.x1304 == 0) m.c3041 = Constraint(expr=m.x540*m.x1747 - m.x1107*m.x1304 == 0) m.c3042 = Constraint(expr=m.x541*m.x1742 - m.x1108*m.x1304 == 0) m.c3043 = Constraint(expr=m.x541*m.x1743 - m.x1109*m.x1304 == 0) m.c3044 = Constraint(expr=m.x541*m.x1744 - m.x1110*m.x1304 == 0) m.c3045 = Constraint(expr=m.x541*m.x1745 - m.x1111*m.x1304 == 0) m.c3046 = Constraint(expr=m.x541*m.x1746 - m.x1112*m.x1304 == 0) m.c3047 = Constraint(expr=m.x541*m.x1747 - m.x1113*m.x1304 == 0) m.c3048 = Constraint(expr=m.x542*m.x1748 - m.x1114*m.x1305 == 0) m.c3049 = Constraint(expr=m.x542*m.x1749 - m.x1115*m.x1305 == 0) m.c3050 = Constraint(expr=m.x542*m.x1750 - m.x1116*m.x1305 == 0) m.c3051 = Constraint(expr=m.x542*m.x1751 - m.x1117*m.x1305 == 0) m.c3052 = Constraint(expr=m.x542*m.x1752 - m.x1118*m.x1305 == 0) m.c3053 = Constraint(expr=m.x542*m.x1753 - m.x1119*m.x1305 == 0) m.c3054 = Constraint(expr=m.x543*m.x1748 - m.x1120*m.x1305 == 0) m.c3055 = Constraint(expr=m.x543*m.x1749 - m.x1121*m.x1305 == 0) m.c3056 = Constraint(expr=m.x543*m.x1750 - m.x1122*m.x1305 == 0) m.c3057 = Constraint(expr=m.x543*m.x1751 - m.x1123*m.x1305 == 0) m.c3058 = Constraint(expr=m.x543*m.x1752 - m.x1124*m.x1305 == 0) m.c3059 = Constraint(expr=m.x543*m.x1753 - m.x1125*m.x1305 == 0) m.c3060 = Constraint(expr=m.x544*m.x1754 - m.x1126*m.x1306 == 0) m.c3061 = Constraint(expr=m.x544*m.x1755 - m.x1127*m.x1306 == 0) m.c3062 = Constraint(expr=m.x544*m.x1756 - m.x1128*m.x1306 == 0) m.c3063 = Constraint(expr=m.x544*m.x1757 - m.x1129*m.x1306 == 0) m.c3064 = Constraint(expr=m.x544*m.x1758 - m.x1130*m.x1306 == 0) m.c3065 = Constraint(expr=m.x544*m.x1759 - m.x1131*m.x1306 == 0) m.c3066 = Constraint(expr=m.x545*m.x1760 - m.x1132*m.x1307 == 0) m.c3067 = Constraint(expr=m.x545*m.x1761 - m.x1133*m.x1307 == 0) m.c3068 = Constraint(expr=m.x545*m.x1762 - m.x1134*m.x1307 == 0) m.c3069 = Constraint(expr=m.x545*m.x1763 - m.x1135*m.x1307 == 0) m.c3070 = Constraint(expr=m.x545*m.x1764 - m.x1136*m.x1307 == 0) m.c3071 = Constraint(expr=m.x545*m.x1765 - m.x1137*m.x1307 == 0) m.c3072 = Constraint(expr=m.x546*m.x1760 - m.x1138*m.x1307 == 0) m.c3073 = Constraint(expr=m.x546*m.x1761 - m.x1139*m.x1307 == 0) m.c3074 = Constraint(expr=m.x546*m.x1762 - m.x1140*m.x1307 == 0) m.c3075 = Constraint(expr=m.x546*m.x1763 - m.x1141*m.x1307 == 0) m.c3076 = Constraint(expr=m.x546*m.x1764 - m.x1142*m.x1307 == 0) m.c3077 = Constraint(expr=m.x546*m.x1765 - m.x1143*m.x1307 == 0) m.c3078 = Constraint(expr=m.x547*m.x1766 - m.x1144*m.x1308 == 0) m.c3079 = Constraint(expr=m.x547*m.x1767 - m.x1145*m.x1308 == 0) m.c3080 = Constraint(expr=m.x547*m.x1768 - m.x1146*m.x1308 == 0) m.c3081 = Constraint(expr=m.x547*m.x1769 - m.x1147*m.x1308 == 0) m.c3082 = Constraint(expr=m.x547*m.x1770 - m.x1148*m.x1308 == 0) m.c3083 = Constraint(expr=m.x547*m.x1771 - m.x1149*m.x1308 == 0) m.c3084 = Constraint(expr=m.x548*m.x1784 - m.x1150*m.x1311 == 0) m.c3085 = Constraint(expr=m.x548*m.x1785 - m.x1151*m.x1311 == 0) m.c3086 = Constraint(expr=m.x548*m.x1786 - m.x1152*m.x1311 == 0) m.c3087 = Constraint(expr=m.x548*m.x1787 - m.x1153*m.x1311 == 0) m.c3088 = Constraint(expr=m.x548*m.x1788 - m.x1154*m.x1311 == 0) m.c3089 = Constraint(expr=m.x548*m.x1789 - m.x1155*m.x1311 == 0) m.c3090 = Constraint(expr=m.x549*m.x1790 - m.x1156*m.x1312 == 0) m.c3091 = Constraint(expr=m.x549*m.x1791 - m.x1157*m.x1312 == 0) m.c3092 = Constraint(expr=m.x549*m.x1792 - m.x1158*m.x1312 == 0) m.c3093 = Constraint(expr=m.x549*m.x1793 - m.x1159*m.x1312 == 0) m.c3094 = Constraint(expr=m.x549*m.x1794 - m.x1160*m.x1312 == 0) m.c3095 = Constraint(expr=m.x549*m.x1795 - m.x1161*m.x1312 == 0) m.c3096 = Constraint(expr=m.x550*m.x1796 - m.x1162*m.x1313 == 0) m.c3097 = Constraint(expr=m.x550*m.x1797 - m.x1163*m.x1313 == 0) m.c3098 = Constraint(expr=m.x550*m.x1798 - m.x1164*m.x1313 == 0) m.c3099 = Constraint(expr=m.x550*m.x1799 - m.x1165*m.x1313 == 0) m.c3100 = Constraint(expr=m.x550*m.x1800 - m.x1166*m.x1313 == 0) m.c3101 = Constraint(expr=m.x550*m.x1801 - m.x1167*m.x1313 == 0) m.c3102 = Constraint(expr=m.x551*m.x1802 - m.x1168*m.x1314 == 0) m.c3103 = Constraint(expr=m.x551*m.x1803 - m.x1169*m.x1314 == 0) m.c3104 = Constraint(expr=m.x551*m.x1804 - m.x1170*m.x1314 == 0) m.c3105 = Constraint(expr=m.x551*m.x1805 - m.x1171*m.x1314 == 0) m.c3106 = Constraint(expr=m.x551*m.x1806 - m.x1172*m.x1314 == 0) m.c3107 = Constraint(expr=m.x551*m.x1807 - m.x1173*m.x1314 == 0) m.c3108 = Constraint(expr=m.x552*m.x1802 - m.x1174*m.x1314 == 0) m.c3109 = Constraint(expr=m.x552*m.x1803 - m.x1175*m.x1314 == 0) m.c3110 = Constraint(expr=m.x552*m.x1804 - m.x1176*m.x1314 == 0) m.c3111 = Constraint(expr=m.x552*m.x1805 - m.x1177*m.x1314 == 0) m.c3112 = Constraint(expr=m.x552*m.x1806 - m.x1178*m.x1314 == 0) m.c3113 = Constraint(expr=m.x552*m.x1807 - m.x1179*m.x1314 == 0) m.c3114 = Constraint(expr=m.x553*m.x1808 - m.x1180*m.x1315 == 0) m.c3115 = Constraint(expr=m.x553*m.x1809 - m.x1181*m.x1315 == 0) m.c3116 = Constraint(expr=m.x553*m.x1810 - m.x1182*m.x1315 == 0) m.c3117 = Constraint(expr=m.x553*m.x1811 - m.x1183*m.x1315 == 0) m.c3118 = Constraint(expr=m.x553*m.x1812 - m.x1184*m.x1315 == 0) m.c3119 = Constraint(expr=m.x553*m.x1813 - m.x1185*m.x1315 == 0) m.c3120 = Constraint(expr=m.x554*m.x1808 - m.x1186*m.x1315 == 0) m.c3121 = Constraint(expr=m.x554*m.x1809 - m.x1187*m.x1315 == 0) m.c3122 = Constraint(expr=m.x554*m.x1810 - m.x1188*m.x1315 == 0) m.c3123 = Constraint(expr=m.x554*m.x1811 - m.x1189*m.x1315 == 0) m.c3124 = Constraint(expr=m.x554*m.x1812 - m.x1190*m.x1315 == 0) m.c3125 = Constraint(expr=m.x554*m.x1813 - m.x1191*m.x1315 == 0) m.c3126 = Constraint(expr=m.x555*m.x1808 - m.x1192*m.x1315 == 0) m.c3127 = Constraint(expr=m.x555*m.x1809 - m.x1193*m.x1315 == 0) m.c3128 = Constraint(expr=m.x555*m.x1810 - m.x1194*m.x1315 == 0) m.c3129 = Constraint(expr=m.x555*m.x1811 - m.x1195*m.x1315 == 0) m.c3130 = Constraint(expr=m.x555*m.x1812 - m.x1196*m.x1315 == 0) m.c3131 = Constraint(expr=m.x555*m.x1813 - m.x1197*m.x1315 == 0) m.c3132 = Constraint(expr=m.x556*m.x1814 - m.x1198*m.x1316 == 0) m.c3133 = Constraint(expr=m.x556*m.x1815 - m.x1199*m.x1316 == 0) m.c3134 = Constraint(expr=m.x556*m.x1816 - m.x1200*m.x1316 == 0) m.c3135 = Constraint(expr=m.x556*m.x1817 - m.x1201*m.x1316 == 0) m.c3136 = Constraint(expr=m.x556*m.x1818 - m.x1202*m.x1316 == 0) m.c3137 = Constraint(expr=m.x556*m.x1819 - m.x1203*m.x1316 == 0) m.c3138 = Constraint(expr=m.x557*m.x1814 - m.x1204*m.x1316 == 0) m.c3139 = Constraint(expr=m.x557*m.x1815 - m.x1205*m.x1316 == 0) m.c3140 = Constraint(expr=m.x557*m.x1816 - m.x1206*m.x1316 == 0) m.c3141 = Constraint(expr=m.x557*m.x1817 - m.x1207*m.x1316 == 0) m.c3142 = Constraint(expr=m.x557*m.x1818 - m.x1208*m.x1316 == 0) m.c3143 = Constraint(expr=m.x557*m.x1819 - m.x1209*m.x1316 == 0) m.c3144 = Constraint(expr=m.x558*m.x1820 - m.x1210*m.x1317 == 0) m.c3145 = Constraint(expr=m.x558*m.x1821 - m.x1211*m.x1317 == 0) m.c3146 = Constraint(expr=m.x558*m.x1822 - m.x1212*m.x1317 == 0) m.c3147 = Constraint(expr=m.x558*m.x1823 - m.x1213*m.x1317 == 0) m.c3148 = Constraint(expr=m.x558*m.x1824 - m.x1214*m.x1317 == 0) m.c3149 = Constraint(expr=m.x558*m.x1825 - m.x1215*m.x1317 == 0) m.c3150 = Constraint(expr=m.x559*m.x1826 - m.x1216*m.x1318 == 0) m.c3151 = Constraint(expr=m.x559*m.x1827 - m.x1217*m.x1318 == 0) m.c3152 = Constraint(expr=m.x559*m.x1828 - m.x1218*m.x1318 == 0) m.c3153 = Constraint(expr=m.x559*m.x1829 - m.x1219*m.x1318 == 0) m.c3154 = Constraint(expr=m.x559*m.x1830 - m.x1220*m.x1318 == 0) m.c3155 = Constraint(expr=m.x559*m.x1831 - m.x1221*m.x1318 == 0) m.c3156 = Constraint(expr=m.x560*m.x1826 - m.x1222*m.x1318 == 0) m.c3157 = Constraint(expr=m.x560*m.x1827 - m.x1223*m.x1318 == 0) m.c3158 = Constraint(expr=m.x560*m.x1828 - m.x1224*m.x1318 == 0) m.c3159 = Constraint(expr=m.x560*m.x1829 - m.x1225*m.x1318 == 0) m.c3160 = Constraint(expr=m.x560*m.x1830 - m.x1226*m.x1318 == 0) m.c3161 = Constraint(expr=m.x560*m.x1831 - m.x1227*m.x1318 == 0) m.c3162 = Constraint(expr=m.x561*m.x1832 - m.x1228*m.x1319 == 0) m.c3163 = Constraint(expr=m.x561*m.x1833 - m.x1229*m.x1319 == 0) m.c3164 = Constraint(expr=m.x561*m.x1834 - m.x1230*m.x1319 == 0) m.c3165 = Constraint(expr=m.x561*m.x1835 - m.x1231*m.x1319 == 0) m.c3166 = Constraint(expr=m.x561*m.x1836 - m.x1232*m.x1319 == 0) m.c3167 = Constraint(expr=m.x561*m.x1837 - m.x1233*m.x1319 == 0) m.c3168 = Constraint(expr= m.x450 >= 0) m.c3169 = Constraint(expr= m.x451 >= 0) m.c3170 = Constraint(expr= m.x452 >= 0) m.c3171 = Constraint(expr= m.x453 >= 0) m.c3172 = Constraint(expr= m.x454 >= 0) m.c3173 = Constraint(expr= m.x455 >= 0) m.c3174 = Constraint(expr= m.x456 >= 0) m.c3175 = Constraint(expr= m.x457 >= 0) m.c3176 = Constraint(expr= m.x458 >= 0) m.c3177 = Constraint(expr= m.x459 >= 0) m.c3178 = Constraint(expr= - 5*m.x236 + m.x460 >= 0) m.c3179 = Constraint(expr= - 5*m.x237 + m.x461 >= 0) m.c3180 = Constraint(expr= - 5*m.x238 + m.x462 >= 0) m.c3181 = Constraint(expr= - 5*m.x239 + m.x463 >= 0) m.c3182 = Constraint(expr= m.x464 >= 0) m.c3183 = Constraint(expr= m.x465 >= 0) m.c3184 = Constraint(expr= m.x466 >= 0) m.c3185 = Constraint(expr= m.x467 >= 0) m.c3186 = Constraint(expr= m.x468 >= 0) m.c3187 = Constraint(expr= m.x469 >= 0) m.c3188 = Constraint(expr= m.x470 >= 0) m.c3189 = Constraint(expr= m.x471 >= 0) m.c3190 = Constraint(expr= m.x472 >= 0) m.c3191 = Constraint(expr= m.x473 >= 0) m.c3192 = Constraint(expr= - 5*m.x250 + m.x474 >= 0) m.c3193 = Constraint(expr= - 5*m.x251 + m.x475 >= 0) m.c3194 = Constraint(expr= - 5*m.x252 + m.x476 >= 0) m.c3195 = Constraint(expr= - 5*m.x253 + m.x477 >= 0) m.c3196 = Constraint(expr= m.x478 >= 0) m.c3197 = Constraint(expr= m.x479 >= 0) m.c3198 = Constraint(expr= m.x480 >= 0) m.c3199 = Constraint(expr= m.x481 >= 0) m.c3200 = Constraint(expr= m.x482 >= 0) m.c3201 = Constraint(expr= m.x483 >= 0) m.c3202 = Constraint(expr= m.x484 >= 0) m.c3203 = Constraint(expr= m.x485 >= 0) m.c3204 = Constraint(expr= m.x486 >= 0) m.c3205 = Constraint(expr= m.x487 >= 0) m.c3206 = Constraint(expr= - 5*m.x264 + m.x488 >= 0) m.c3207 = Constraint(expr= - 5*m.x265 + m.x489 >= 0) m.c3208 = Constraint(expr= - 5*m.x266 + m.x490 >= 0) m.c3209 = Constraint(expr= - 5*m.x267 + m.x491 >= 0) m.c3210 = Constraint(expr= m.x492 >= 0) m.c3211 = Constraint(expr= m.x493 >= 0) m.c3212 = Constraint(expr= m.x494 >= 0) m.c3213 = Constraint(expr= m.x495 >= 0) m.c3214 = Constraint(expr= m.x496 >= 0) m.c3215 = Constraint(expr= m.x497 >= 0) m.c3216 = Constraint(expr= m.x498 >= 0) m.c3217 = Constraint(expr= m.x499 >= 0) m.c3218 = Constraint(expr= m.x500 >= 0) m.c3219 = Constraint(expr= m.x501 >= 0) m.c3220 = Constraint(expr= - 5*m.x278 + m.x502 >= 0) m.c3221 = Constraint(expr= - 5*m.x279 + m.x503 >= 0) m.c3222 = Constraint(expr= - 5*m.x280 + m.x504 >= 0) m.c3223 = Constraint(expr= - 5*m.x281 + m.x505 >= 0) m.c3224 = Constraint(expr= m.x506 >= 0) m.c3225 = Constraint(expr= m.x507 >= 0) m.c3226 = Constraint(expr= m.x508 >= 0) m.c3227 = Constraint(expr= m.x509 >= 0) m.c3228 = Constraint(expr= m.x510 >= 0) m.c3229 = Constraint(expr= m.x511 >= 0) m.c3230 = Constraint(expr= m.x512 >= 0) m.c3231 = Constraint(expr= m.x513 >= 0) m.c3232 = Constraint(expr= m.x514 >= 0) m.c3233 = Constraint(expr= m.x515 >= 0) m.c3234 = Constraint(expr= - 5*m.x292 + m.x516 >= 0) m.c3235 = Constraint(expr= - 5*m.x293 + m.x517 >= 0) m.c3236 = Constraint(expr= - 5*m.x294 + m.x518 >= 0) m.c3237 = Constraint(expr= - 5*m.x295 + m.x519 >= 0) m.c3238 = Constraint(expr= m.x520 >= 0) m.c3239 = Constraint(expr= m.x521 >= 0) m.c3240 = Constraint(expr= m.x522 >= 0) m.c3241 = Constraint(expr= m.x523 >= 0) m.c3242 = Constraint(expr= m.x524 >= 0) m.c3243 = Constraint(expr= m.x525 >= 0) m.c3244 = Constraint(expr= m.x526 >= 0) m.c3245 = Constraint(expr= m.x527 >= 0) m.c3246 = Constraint(expr= m.x528 >= 0) m.c3247 = Constraint(expr= m.x529 >= 0) m.c3248 = Constraint(expr= - 5*m.x306 + m.x530 >= 0) m.c3249 = Constraint(expr= - 5*m.x307 + m.x531 >= 0) m.c3250 = Constraint(expr= - 5*m.x308 + m.x532 >= 0) m.c3251 = Constraint(expr= - 5*m.x309 + m.x533 >= 0) m.c3252 = Constraint(expr= m.x534 >= 0) m.c3253 = Constraint(expr= m.x535 >= 0) m.c3254 = Constraint(expr= m.x536 >= 0) m.c3255 = Constraint(expr= m.x537 >= 0) m.c3256 = Constraint(expr= m.x538 >= 0) m.c3257 = Constraint(expr= m.x539 >= 0) m.c3258 = Constraint(expr= m.x540 >= 0) m.c3259 = Constraint(expr= m.x541 >= 0) m.c3260 = Constraint(expr= m.x542 >= 0) m.c3261 = Constraint(expr= m.x543 >= 0) m.c3262 = Constraint(expr= - 5*m.x320 + m.x544 >= 0) m.c3263 = Constraint(expr= - 5*m.x321 + m.x545 >= 0) m.c3264 = Constraint(expr= - 5*m.x322 + m.x546 >= 0) m.c3265 = Constraint(expr= - 5*m.x323 + m.x547 >= 0) m.c3266 = Constraint(expr= m.x548 >= 0) m.c3267 = Constraint(expr= m.x549 >= 0) m.c3268 = Constraint(expr= m.x550 >= 0) m.c3269 = Constraint(expr= m.x551 >= 0) m.c3270 = Constraint(expr= m.x552 >= 0) m.c3271 = Constraint(expr= m.x553 >= 0) m.c3272 = Constraint(expr= m.x554 >= 0) m.c3273 = Constraint(expr= m.x555 >= 0) m.c3274 = Constraint(expr= m.x556 >= 0) m.c3275 = Constraint(expr= m.x557 >= 0) m.c3276 = Constraint(expr= - 5*m.x334 + m.x558 >= 0) m.c3277 = Constraint(expr= - 5*m.x335 + m.x559 >= 0) m.c3278 = Constraint(expr= - 5*m.x336 + m.x560 >= 0) m.c3279 = Constraint(expr= - 5*m.x337 + m.x561 >= 0) m.c3280 = Constraint(expr= - 50*m.x226 + m.x450 <= 0) m.c3281 = Constraint(expr= - 50*m.x227 + m.x451 <= 0) m.c3282 = Constraint(expr= - 50*m.x228 + m.x452 <= 0) m.c3283 = Constraint(expr= - 50*m.x229 + m.x453 <= 0) m.c3284 = Constraint(expr= - 50*m.x230 + m.x454 <= 0) m.c3285 = Constraint(expr= - 50*m.x231 + m.x455 <= 0) m.c3286 = Constraint(expr= - 50*m.x232 + m.x456 <= 0) m.c3287 = Constraint(expr= - 50*m.x233 + m.x457 <= 0) m.c3288 = Constraint(expr= - 50*m.x234 + m.x458 <= 0) m.c3289 = Constraint(expr= - 50*m.x235 + m.x459 <= 0) m.c3290 = Constraint(expr= - 50*m.x236 + m.x460 <= 0) m.c3291 = Constraint(expr= - 50*m.x237 + m.x461 <= 0) m.c3292 = Constraint(expr= - 50*m.x238 + m.x462 <= 0) m.c3293 = Constraint(expr= - 50*m.x239 + m.x463 <= 0) m.c3294 = Constraint(expr= - 50*m.x240 + m.x464 <= 0) m.c3295 = Constraint(expr= - 50*m.x241 + m.x465 <= 0) m.c3296 = Constraint(expr= - 50*m.x242 + m.x466 <= 0) m.c3297 = Constraint(expr= - 50*m.x243 + m.x467 <= 0) m.c3298 = Constraint(expr= - 50*m.x244 + m.x468 <= 0) m.c3299 = Constraint(expr= - 50*m.x245 + m.x469 <= 0) m.c3300 = Constraint(expr= - 50*m.x246 + m.x470 <= 0) m.c3301 = Constraint(expr= - 50*m.x247 + m.x471 <= 0) m.c3302 = Constraint(expr= - 50*m.x248 + m.x472 <= 0) m.c3303 = Constraint(expr= - 50*m.x249 + m.x473 <= 0) m.c3304 = Constraint(expr= - 50*m.x250 + m.x474 <= 0) m.c3305 = Constraint(expr= - 50*m.x251 + m.x475 <= 0) m.c3306 = Constraint(expr= - 50*m.x252 + m.x476 <= 0) m.c3307 = Constraint(expr= - 50*m.x253 + m.x477 <= 0) m.c3308 = Constraint(expr= - 50*m.x254 + m.x478 <= 0) m.c3309 = Constraint(expr= - 50*m.x255 + m.x479 <= 0) m.c3310 = Constraint(expr= - 50*m.x256 + m.x480 <= 0) m.c3311 = Constraint(expr= - 50*m.x257 + m.x481 <= 0) m.c3312 = Constraint(expr= - 50*m.x258 + m.x482 <= 0) m.c3313 = Constraint(expr= - 50*m.x259 + m.x483 <= 0) m.c3314 = Constraint(expr= - 50*m.x260 + m.x484 <= 0) m.c3315 = Constraint(expr= - 50*m.x261 + m.x485 <= 0) m.c3316 = Constraint(expr= - 50*m.x262 + m.x486 <= 0) m.c3317 = Constraint(expr= - 50*m.x263 + m.x487 <= 0) m.c3318 = Constraint(expr= - 50*m.x264 + m.x488 <= 0) m.c3319 = Constraint(expr= - 50*m.x265 + m.x489 <= 0) m.c3320 = Constraint(expr= - 50*m.x266 + m.x490 <= 0) m.c3321 = Constraint(expr= - 50*m.x267 + m.x491 <= 0) m.c3322 = Constraint(expr= - 50*m.x268 + m.x492 <= 0) m.c3323 = Constraint(expr= - 50*m.x269 + m.x493 <= 0) m.c3324 = Constraint(expr= - 50*m.x270 + m.x494 <= 0) m.c3325 = Constraint(expr= - 50*m.x271 + m.x495 <= 0) m.c3326 = Constraint(expr= - 50*m.x272 + m.x496 <= 0) m.c3327 = Constraint(expr= - 50*m.x273 + m.x497 <= 0) m.c3328 = Constraint(expr= - 50*m.x274 + m.x498 <= 0) m.c3329 = Constraint(expr= - 50*m.x275 + m.x499 <= 0) m.c3330 = Constraint(expr= - 50*m.x276 + m.x500 <= 0) m.c3331 = Constraint(expr= - 50*m.x277 + m.x501 <= 0) m.c3332 = Constraint(expr= - 50*m.x278 + m.x502 <= 0) m.c3333 = Constraint(expr= - 50*m.x279 + m.x503 <= 0) m.c3334 = Constraint(expr= - 50*m.x280 + m.x504 <= 0) m.c3335 = Constraint(expr= - 50*m.x281 + m.x505 <= 0) m.c3336 = Constraint(expr= - 50*m.x282 + m.x506 <= 0) m.c3337 = Constraint(expr= - 50*m.x283 + m.x507 <= 0) m.c3338 = Constraint(expr= - 50*m.x284 + m.x508 <= 0) m.c3339 = Constraint(expr= - 50*m.x285 + m.x509 <= 0) m.c3340 = Constraint(expr= - 50*m.x286 + m.x510 <= 0) m.c3341 = Constraint(expr= - 50*m.x287 + m.x511 <= 0) m.c3342 = Constraint(expr= - 50*m.x288 + m.x512 <= 0) m.c3343 = Constraint(expr= - 50*m.x289 + m.x513 <= 0) m.c3344 = Constraint(expr= - 50*m.x290 + m.x514 <= 0) m.c3345 = Constraint(expr= - 50*m.x291 + m.x515 <= 0) m.c3346 = Constraint(expr= - 50*m.x292 + m.x516 <= 0) m.c3347 = Constraint(expr= - 50*m.x293 + m.x517 <= 0) m.c3348 = Constraint(expr= - 50*m.x294 + m.x518 <= 0) m.c3349 = Constraint(expr= - 50*m.x295 + m.x519 <= 0) m.c3350 = Constraint(expr= - 50*m.x296 + m.x520 <= 0) m.c3351 = Constraint(expr= - 50*m.x297 + m.x521 <= 0) m.c3352 = Constraint(expr= - 50*m.x298 + m.x522 <= 0) m.c3353 = Constraint(expr= - 50*m.x299 + m.x523 <= 0) m.c3354 = Constraint(expr= - 50*m.x300 + m.x524 <= 0) m.c3355 = Constraint(expr= - 50*m.x301 + m.x525 <= 0) m.c3356 = Constraint(expr= - 50*m.x302 + m.x526 <= 0) m.c3357 = Constraint(expr= - 50*m.x303 + m.x527 <= 0) m.c3358 = Constraint(expr= - 50*m.x304 + m.x528 <= 0) m.c3359 = Constraint(expr= - 50*m.x305 + m.x529 <= 0) m.c3360 = Constraint(expr= - 50*m.x306 + m.x530 <= 0) m.c3361 = Constraint(expr= - 50*m.x307 + m.x531 <= 0) m.c3362 = Constraint(expr= - 50*m.x308 + m.x532 <= 0) m.c3363 = Constraint(expr= - 50*m.x309 + m.x533 <= 0) m.c3364 = Constraint(expr= - 50*m.x310 + m.x534 <= 0) m.c3365 = Constraint(expr= - 50*m.x311 + m.x535 <= 0) m.c3366 = Constraint(expr= - 50*m.x312 + m.x536 <= 0) m.c3367 = Constraint(expr= - 50*m.x313 + m.x537 <= 0) m.c3368 = Constraint(expr= - 50*m.x314 + m.x538 <= 0) m.c3369 = Constraint(expr= - 50*m.x315 + m.x539 <= 0) m.c3370 = Constraint(expr= - 50*m.x316 + m.x540 <= 0) m.c3371 = Constraint(expr= - 50*m.x317 + m.x541 <= 0) m.c3372 = Constraint(expr= - 50*m.x318 + m.x542 <= 0) m.c3373 = Constraint(expr= - 50*m.x319 + m.x543 <= 0) m.c3374 = Constraint(expr= - 50*m.x320 + m.x544 <= 0) m.c3375 = Constraint(expr= - 50*m.x321 + m.x545 <= 0) m.c3376 = Constraint(expr= - 50*m.x322 + m.x546 <= 0) m.c3377 = Constraint(expr= - 50*m.x323 + m.x547 <= 0) m.c3378 = Constraint(expr= - 50*m.x324 + m.x548 <= 0) m.c3379 = Constraint(expr= - 50*m.x325 + m.x549 <= 0) m.c3380 = Constraint(expr= - 50*m.x326 + m.x550 <= 0) m.c3381 = Constraint(expr= - 50*m.x327 + m.x551 <= 0) m.c3382 = Constraint(expr= - 50*m.x328 + m.x552 <= 0) m.c3383 = Constraint(expr= - 50*m.x329 + m.x553 <= 0) m.c3384 = Constraint(expr= - 50*m.x330 + m.x554 <= 0) m.c3385 = Constraint(expr= - 50*m.x331 + m.x555 <= 0) m.c3386 = Constraint(expr= - 50*m.x332 + m.x556 <= 0) m.c3387 = Constraint(expr= - 50*m.x333 + m.x557 <= 0) m.c3388 = Constraint(expr= - 50*m.x334 + m.x558 <= 0) m.c3389 = Constraint(expr= - 50*m.x335 + m.x559 <= 0) m.c3390 = Constraint(expr= - 50*m.x336 + m.x560 <= 0) m.c3391 = Constraint(expr= - 50*m.x337 + m.x561 <= 0) m.c3392 = Constraint(expr= m.x236 + m.x237 + m.x250 + m.x251 + m.x264 + m.x265 + m.x278 + m.x279 + m.x292 + m.x293 + m.x306 + m.x307 + m.x320 + m.x321 + m.x334 + m.x335 == 10) m.c3393 = Constraint(expr= m.x238 + m.x239 + m.x252 + m.x253 + m.x266 + m.x267 + m.x280 + m.x281 + m.x294 + m.x295 + m.x308 + m.x309 + m.x322 + m.x323 + m.x336 + m.x337 == 10) m.c3394 = Constraint(expr= m.x460 + m.x474 + m.x488 + m.x502 + m.x516 + m.x530 + m.x544 + m.x558 >= 100) m.c3395 = Constraint(expr= m.x463 + m.x477 + m.x491 + m.x505 + m.x519 + m.x533 + m.x547 + m.x561 >= 100) m.c3396 = Constraint(expr= m.x461 + m.x462 + m.x475 + m.x476 + m.x489 + m.x490 + m.x503 + m.x504 + m.x517 + m.x518 + m.x531 + m.x532 + m.x545 + m.x546 + m.x559 + m.x560 >= 100) m.c3397 = Constraint(expr= m.x460 + m.x474 + m.x488 + m.x502 + m.x516 + m.x530 + m.x544 + m.x558 <= 100) m.c3398 = Constraint(expr= m.x463 + m.x477 + m.x491 + m.x505 + m.x519 + m.x533 + m.x547 + m.x561 <= 100) m.c3399 = Constraint(expr= m.x461 + m.x462 + m.x475 + m.x476 + m.x489 + m.x490 + m.x503 + m.x504 + m.x517 + m.x518 + m.x531 + m.x532 + m.x545 + m.x546 + m.x559 + m.x560 <= 100) m.c3400 = Constraint(expr= - 0.1*m.x460 + 0.1*m.x622 + 0.3*m.x623 + 0.5*m.x624 + 0.167*m.x625 + 0.3*m.x626 + 0.433*m.x627 >= 0) m.c3401 = Constraint(expr= - 0.3*m.x460 + 0.4*m.x622 + 0.2*m.x623 + 0.1*m.x624 + 0.333*m.x625 + 0.23*m.x626 + 0.133*m.x627 >= 0) m.c3402 = Constraint(expr= - 0.25*m.x461 + 0.1*m.x628 + 0.3*m.x629 + 0.5*m.x630 + 0.167*m.x631 + 0.3*m.x632 + 0.433*m.x633 >= 0) m.c3403 = Constraint(expr= - 0.18*m.x461 + 0.4*m.x628 + 0.2*m.x629 + 0.1*m.x630 + 0.333*m.x631 + 0.23*m.x632 + 0.133*m.x633 >= 0) m.c3404 = Constraint(expr= - 0.25*m.x462 + 0.1*m.x634 + 0.3*m.x635 + 0.5*m.x636 + 0.167*m.x637 + 0.3*m.x638 + 0.433*m.x639 >= 0) m.c3405 = Constraint(expr= - 0.18*m.x462 + 0.4*m.x634 + 0.2*m.x635 + 0.1*m.x636 + 0.333*m.x637 + 0.23*m.x638 + 0.133*m.x639 >= 0) m.c3406 = Constraint(expr= - 0.4*m.x463 + 0.1*m.x640 + 0.3*m.x641 + 0.5*m.x642 + 0.167*m.x643 + 0.3*m.x644 + 0.433*m.x645 >= 0) m.c3407 = Constraint(expr= - 0.1*m.x463 + 0.4*m.x640 + 0.2*m.x641 + 0.1*m.x642 + 0.333*m.x643 + 0.23*m.x644 + 0.133*m.x645 >= 0) m.c3408 = Constraint(expr= - 0.1*m.x474 + 0.1*m.x706 + 0.3*m.x707 + 0.5*m.x708 + 0.167*m.x709 + 0.3*m.x710 + 0.433*m.x711 >= 0) m.c3409 = Constraint(expr= - 0.3*m.x474 + 0.4*m.x706 + 0.2*m.x707 + 0.1*m.x708 + 0.333*m.x709 + 0.23*m.x710 + 0.133*m.x711 >= 0) m.c3410 = Constraint(expr= - 0.25*m.x475 + 0.1*m.x712 + 0.3*m.x713 + 0.5*m.x714 + 0.167*m.x715 + 0.3*m.x716 + 0.433*m.x717 >= 0) m.c3411 = Constraint(expr= - 0.18*m.x475 + 0.4*m.x712 + 0.2*m.x713 + 0.1*m.x714 + 0.333*m.x715 + 0.23*m.x716 + 0.133*m.x717 >= 0) m.c3412 = Constraint(expr= - 0.25*m.x476 + 0.1*m.x718 + 0.3*m.x719 + 0.5*m.x720 + 0.167*m.x721 + 0.3*m.x722 + 0.433*m.x723 >= 0) m.c3413 = Constraint(expr= - 0.18*m.x476 + 0.4*m.x718 + 0.2*m.x719 + 0.1*m.x720 + 0.333*m.x721 + 0.23*m.x722 + 0.133*m.x723 >= 0) m.c3414 = Constraint(expr= - 0.4*m.x477 + 0.1*m.x724 + 0.3*m.x725 + 0.5*m.x726 + 0.167*m.x727 + 0.3*m.x728 + 0.433*m.x729 >= 0) m.c3415 = Constraint(expr= - 0.1*m.x477 + 0.4*m.x724 + 0.2*m.x725 + 0.1*m.x726 + 0.333*m.x727 + 0.23*m.x728 + 0.133*m.x729 >= 0) m.c3416 = Constraint(expr= - 0.1*m.x488 + 0.1*m.x790 + 0.3*m.x791 + 0.5*m.x792 + 0.167*m.x793 + 0.3*m.x794 + 0.433*m.x795 >= 0) m.c3417 = Constraint(expr= - 0.3*m.x488 + 0.4*m.x790 + 0.2*m.x791 + 0.1*m.x792 + 0.333*m.x793 + 0.23*m.x794 + 0.133*m.x795 >= 0) m.c3418 = Constraint(expr= - 0.25*m.x489 + 0.1*m.x796 + 0.3*m.x797 + 0.5*m.x798 + 0.167*m.x799 + 0.3*m.x800 + 0.433*m.x801 >= 0) m.c3419 = Constraint(expr= - 0.18*m.x489 + 0.4*m.x796 + 0.2*m.x797 + 0.1*m.x798 + 0.333*m.x799 + 0.23*m.x800 + 0.133*m.x801 >= 0) m.c3420 = Constraint(expr= - 0.25*m.x490 + 0.1*m.x802 + 0.3*m.x803 + 0.5*m.x804 + 0.167*m.x805 + 0.3*m.x806 + 0.433*m.x807 >= 0) m.c3421 = Constraint(expr= - 0.18*m.x490 + 0.4*m.x802 + 0.2*m.x803 + 0.1*m.x804 + 0.333*m.x805 + 0.23*m.x806 + 0.133*m.x807 >= 0) m.c3422 = Constraint(expr= - 0.4*m.x491 + 0.1*m.x808 + 0.3*m.x809 + 0.5*m.x810 + 0.167*m.x811 + 0.3*m.x812 + 0.433*m.x813 >= 0) m.c3423 = Constraint(expr= - 0.1*m.x491 + 0.4*m.x808 + 0.2*m.x809 + 0.1*m.x810 + 0.333*m.x811 + 0.23*m.x812 + 0.133*m.x813 >= 0) m.c3424 = Constraint(expr= - 0.1*m.x502 + 0.1*m.x874 + 0.3*m.x875 + 0.5*m.x876 + 0.167*m.x877 + 0.3*m.x878 + 0.433*m.x879 >= 0) m.c3425 = Constraint(expr= - 0.3*m.x502 + 0.4*m.x874 + 0.2*m.x875 + 0.1*m.x876 + 0.333*m.x877 + 0.23*m.x878 + 0.133*m.x879 >= 0) m.c3426 = Constraint(expr= - 0.25*m.x503 + 0.1*m.x880 + 0.3*m.x881 + 0.5*m.x882 + 0.167*m.x883 + 0.3*m.x884 + 0.433*m.x885 >= 0) m.c3427 = Constraint(expr= - 0.18*m.x503 + 0.4*m.x880 + 0.2*m.x881 + 0.1*m.x882 + 0.333*m.x883 + 0.23*m.x884 + 0.133*m.x885 >= 0) m.c3428 = Constraint(expr= - 0.25*m.x504 + 0.1*m.x886 + 0.3*m.x887 + 0.5*m.x888 + 0.167*m.x889 + 0.3*m.x890 + 0.433*m.x891 >= 0) m.c3429 = Constraint(expr= - 0.18*m.x504 + 0.4*m.x886 + 0.2*m.x887 + 0.1*m.x888 + 0.333*m.x889 + 0.23*m.x890 + 0.133*m.x891 >= 0) m.c3430 = Constraint(expr= - 0.4*m.x505 + 0.1*m.x892 + 0.3*m.x893 + 0.5*m.x894 + 0.167*m.x895 + 0.3*m.x896 + 0.433*m.x897 >= 0) m.c3431 = Constraint(expr= - 0.1*m.x505 + 0.4*m.x892 + 0.2*m.x893 + 0.1*m.x894 + 0.333*m.x895 + 0.23*m.x896 + 0.133*m.x897 >= 0) m.c3432 = Constraint(expr= - 0.1*m.x516 + 0.1*m.x958 + 0.3*m.x959 + 0.5*m.x960 + 0.167*m.x961 + 0.3*m.x962 + 0.433*m.x963 >= 0) m.c3433 = Constraint(expr= - 0.3*m.x516 + 0.4*m.x958 + 0.2*m.x959 + 0.1*m.x960 + 0.333*m.x961 + 0.23*m.x962 + 0.133*m.x963 >= 0) m.c3434 = Constraint(expr= - 0.25*m.x517 + 0.1*m.x964 + 0.3*m.x965 + 0.5*m.x966 + 0.167*m.x967 + 0.3*m.x968 + 0.433*m.x969 >= 0) m.c3435 = Constraint(expr= - 0.18*m.x517 + 0.4*m.x964 + 0.2*m.x965 + 0.1*m.x966 + 0.333*m.x967 + 0.23*m.x968 + 0.133*m.x969 >= 0) m.c3436 = Constraint(expr= - 0.25*m.x518 + 0.1*m.x970 + 0.3*m.x971 + 0.5*m.x972 + 0.167*m.x973 + 0.3*m.x974 + 0.433*m.x975 >= 0) m.c3437 = Constraint(expr= - 0.18*m.x518 + 0.4*m.x970 + 0.2*m.x971 + 0.1*m.x972 + 0.333*m.x973 + 0.23*m.x974 + 0.133*m.x975 >= 0) m.c3438 = Constraint(expr= - 0.4*m.x519 + 0.1*m.x976 + 0.3*m.x977 + 0.5*m.x978 + 0.167*m.x979 + 0.3*m.x980 + 0.433*m.x981 >= 0) m.c3439 = Constraint(expr= - 0.1*m.x519 + 0.4*m.x976 + 0.2*m.x977 + 0.1*m.x978 + 0.333*m.x979 + 0.23*m.x980 + 0.133*m.x981 >= 0) m.c3440 = Constraint(expr= - 0.1*m.x530 + 0.1*m.x1042 + 0.3*m.x1043 + 0.5*m.x1044 + 0.167*m.x1045 + 0.3*m.x1046 + 0.433*m.x1047 >= 0) m.c3441 = Constraint(expr= - 0.3*m.x530 + 0.4*m.x1042 + 0.2*m.x1043 + 0.1*m.x1044 + 0.333*m.x1045 + 0.23*m.x1046 + 0.133*m.x1047 >= 0) m.c3442 = Constraint(expr= - 0.25*m.x531 + 0.1*m.x1048 + 0.3*m.x1049 + 0.5*m.x1050 + 0.167*m.x1051 + 0.3*m.x1052 + 0.433*m.x1053 >= 0) m.c3443 = Constraint(expr= - 0.18*m.x531 + 0.4*m.x1048 + 0.2*m.x1049 + 0.1*m.x1050 + 0.333*m.x1051 + 0.23*m.x1052 + 0.133*m.x1053 >= 0) m.c3444 = Constraint(expr= - 0.25*m.x532 + 0.1*m.x1054 + 0.3*m.x1055 + 0.5*m.x1056 + 0.167*m.x1057 + 0.3*m.x1058 + 0.433*m.x1059 >= 0) m.c3445 = Constraint(expr= - 0.18*m.x532 + 0.4*m.x1054 + 0.2*m.x1055 + 0.1*m.x1056 + 0.333*m.x1057 + 0.23*m.x1058 + 0.133*m.x1059 >= 0) m.c3446 = Constraint(expr= - 0.4*m.x533 + 0.1*m.x1060 + 0.3*m.x1061 + 0.5*m.x1062 + 0.167*m.x1063 + 0.3*m.x1064 + 0.433*m.x1065 >= 0) m.c3447 = Constraint(expr= - 0.1*m.x533 + 0.4*m.x1060 + 0.2*m.x1061 + 0.1*m.x1062 + 0.333*m.x1063 + 0.23*m.x1064 + 0.133*m.x1065 >= 0) m.c3448 = Constraint(expr= - 0.1*m.x544 + 0.1*m.x1126 + 0.3*m.x1127 + 0.5*m.x1128 + 0.167*m.x1129 + 0.3*m.x1130 + 0.433*m.x1131 >= 0) m.c3449 = Constraint(expr= - 0.3*m.x544 + 0.4*m.x1126 + 0.2*m.x1127 + 0.1*m.x1128 + 0.333*m.x1129 + 0.23*m.x1130 + 0.133*m.x1131 >= 0) m.c3450 = Constraint(expr= - 0.25*m.x545 + 0.1*m.x1132 + 0.3*m.x1133 + 0.5*m.x1134 + 0.167*m.x1135 + 0.3*m.x1136 + 0.433*m.x1137 >= 0) m.c3451 = Constraint(expr= - 0.18*m.x545 + 0.4*m.x1132 + 0.2*m.x1133 + 0.1*m.x1134 + 0.333*m.x1135 + 0.23*m.x1136 + 0.133*m.x1137 >= 0) m.c3452 = Constraint(expr= - 0.25*m.x546 + 0.1*m.x1138 + 0.3*m.x1139 + 0.5*m.x1140 + 0.167*m.x1141 + 0.3*m.x1142 + 0.433*m.x1143 >= 0) m.c3453 = Constraint(expr= - 0.18*m.x546 + 0.4*m.x1138 + 0.2*m.x1139 + 0.1*m.x1140 + 0.333*m.x1141 + 0.23*m.x1142 + 0.133*m.x1143 >= 0) m.c3454 = Constraint(expr= - 0.4*m.x547 + 0.1*m.x1144 + 0.3*m.x1145 + 0.5*m.x1146 + 0.167*m.x1147 + 0.3*m.x1148 + 0.433*m.x1149 >= 0) m.c3455 = Constraint(expr= - 0.1*m.x547 + 0.4*m.x1144 + 0.2*m.x1145 + 0.1*m.x1146 + 0.333*m.x1147 + 0.23*m.x1148 + 0.133*m.x1149 >= 0) m.c3456 = Constraint(expr= - 0.1*m.x558 + 0.1*m.x1210 + 0.3*m.x1211 + 0.5*m.x1212 + 0.167*m.x1213 + 0.3*m.x1214 + 0.433*m.x1215 >= 0) m.c3457 = Constraint(expr= - 0.3*m.x558 + 0.4*m.x1210 + 0.2*m.x1211 + 0.1*m.x1212 + 0.333*m.x1213 + 0.23*m.x1214 + 0.133*m.x1215 >= 0) m.c3458 = Constraint(expr= - 0.25*m.x559 + 0.1*m.x1216 + 0.3*m.x1217 + 0.5*m.x1218 + 0.167*m.x1219 + 0.3*m.x1220 + 0.433*m.x1221 >= 0) m.c3459 = Constraint(expr= - 0.18*m.x559 + 0.4*m.x1216 + 0.2*m.x1217 + 0.1*m.x1218 + 0.333*m.x1219 + 0.23*m.x1220 + 0.133*m.x1221 >= 0) m.c3460 = Constraint(expr= - 0.25*m.x560 + 0.1*m.x1222 + 0.3*m.x1223 + 0.5*m.x1224 + 0.167*m.x1225 + 0.3*m.x1226 + 0.433*m.x1227 >= 0) m.c3461 = Constraint(expr= - 0.18*m.x560 + 0.4*m.x1222 + 0.2*m.x1223 + 0.1*m.x1224 + 0.333*m.x1225 + 0.23*m.x1226 + 0.133*m.x1227 >= 0) m.c3462 = Constraint(expr= - 0.4*m.x561 + 0.1*m.x1228 + 0.3*m.x1229 + 0.5*m.x1230 + 0.167*m.x1231 + 0.3*m.x1232 + 0.433*m.x1233 >= 0) m.c3463 = Constraint(expr= - 0.1*m.x561 + 0.4*m.x1228 + 0.2*m.x1229 + 0.1*m.x1230 + 0.333*m.x1231 + 0.23*m.x1232 + 0.133*m.x1233 >= 0) m.c3464 = Constraint(expr= - 0.2*m.x460 + 0.1*m.x622 + 0.3*m.x623 + 0.5*m.x624 + 0.167*m.x625 + 0.3*m.x626 + 0.433*m.x627 <= 0) m.c3465 = Constraint(expr= - 0.38*m.x460 + 0.4*m.x622 + 0.2*m.x623 + 0.1*m.x624 + 0.333*m.x625 + 0.23*m.x626 + 0.133*m.x627 <= 0) m.c3466 = Constraint(expr= - 0.35*m.x461 + 0.1*m.x628 + 0.3*m.x629 + 0.5*m.x630 + 0.167*m.x631 + 0.3*m.x632 + 0.433*m.x633 <= 0) m.c3467 = Constraint(expr= - 0.27*m.x461 + 0.4*m.x628 + 0.2*m.x629 + 0.1*m.x630 + 0.333*m.x631 + 0.23*m.x632 + 0.133*m.x633 <= 0) m.c3468 = Constraint(expr= - 0.35*m.x462 + 0.1*m.x634 + 0.3*m.x635 + 0.5*m.x636 + 0.167*m.x637 + 0.3*m.x638 + 0.433*m.x639 <= 0) m.c3469 = Constraint(expr= - 0.27*m.x462 + 0.4*m.x634 + 0.2*m.x635 + 0.1*m.x636 + 0.333*m.x637 + 0.23*m.x638 + 0.133*m.x639 <= 0) m.c3470 = Constraint(expr= - 0.48*m.x463 + 0.1*m.x640 + 0.3*m.x641 + 0.5*m.x642 + 0.167*m.x643 + 0.3*m.x644 + 0.433*m.x645 <= 0) m.c3471 = Constraint(expr= - 0.18*m.x463 + 0.4*m.x640 + 0.2*m.x641 + 0.1*m.x642 + 0.333*m.x643 + 0.23*m.x644 + 0.133*m.x645 <= 0) m.c3472 = Constraint(expr= - 0.2*m.x474 + 0.1*m.x706 + 0.3*m.x707 + 0.5*m.x708 + 0.167*m.x709 + 0.3*m.x710 + 0.433*m.x711 <= 0) m.c3473 = Constraint(expr= - 0.38*m.x474 + 0.4*m.x706 + 0.2*m.x707 + 0.1*m.x708 + 0.333*m.x709 + 0.23*m.x710 + 0.133*m.x711 <= 0) m.c3474 = Constraint(expr= - 0.35*m.x475 + 0.1*m.x712 + 0.3*m.x713 + 0.5*m.x714 + 0.167*m.x715 + 0.3*m.x716 + 0.433*m.x717 <= 0) m.c3475 = Constraint(expr= - 0.27*m.x475 + 0.4*m.x712 + 0.2*m.x713 + 0.1*m.x714 + 0.333*m.x715 + 0.23*m.x716 + 0.133*m.x717 <= 0) m.c3476 = Constraint(expr= - 0.35*m.x476 + 0.1*m.x718 + 0.3*m.x719 + 0.5*m.x720 + 0.167*m.x721 + 0.3*m.x722 + 0.433*m.x723 <= 0) m.c3477 = Constraint(expr= - 0.27*m.x476 + 0.4*m.x718 + 0.2*m.x719 + 0.1*m.x720 + 0.333*m.x721 + 0.23*m.x722 + 0.133*m.x723 <= 0) m.c3478 = Constraint(expr= - 0.48*m.x477 + 0.1*m.x724 + 0.3*m.x725 + 0.5*m.x726 + 0.167*m.x727 + 0.3*m.x728 + 0.433*m.x729 <= 0) m.c3479 = Constraint(expr= - 0.18*m.x477 + 0.4*m.x724 + 0.2*m.x725 + 0.1*m.x726 + 0.333*m.x727 + 0.23*m.x728 + 0.133*m.x729 <= 0) m.c3480 = Constraint(expr= - 0.2*m.x488 + 0.1*m.x790 + 0.3*m.x791 + 0.5*m.x792 + 0.167*m.x793 + 0.3*m.x794 + 0.433*m.x795 <= 0) m.c3481 = Constraint(expr= - 0.38*m.x488 + 0.4*m.x790 + 0.2*m.x791 + 0.1*m.x792 + 0.333*m.x793 + 0.23*m.x794 + 0.133*m.x795 <= 0) m.c3482 = Constraint(expr= - 0.35*m.x489 + 0.1*m.x796 + 0.3*m.x797 + 0.5*m.x798 + 0.167*m.x799 + 0.3*m.x800 + 0.433*m.x801 <= 0) m.c3483 = Constraint(expr= - 0.27*m.x489 + 0.4*m.x796 + 0.2*m.x797 + 0.1*m.x798 + 0.333*m.x799 + 0.23*m.x800 + 0.133*m.x801 <= 0) m.c3484 = Constraint(expr= - 0.35*m.x490 + 0.1*m.x802 + 0.3*m.x803 + 0.5*m.x804 + 0.167*m.x805 + 0.3*m.x806 + 0.433*m.x807 <= 0) m.c3485 = Constraint(expr= - 0.27*m.x490 + 0.4*m.x802 + 0.2*m.x803 + 0.1*m.x804 + 0.333*m.x805 + 0.23*m.x806 + 0.133*m.x807 <= 0) m.c3486 = Constraint(expr= - 0.48*m.x491 + 0.1*m.x808 + 0.3*m.x809 + 0.5*m.x810 + 0.167*m.x811 + 0.3*m.x812 + 0.433*m.x813 <= 0) m.c3487 = Constraint(expr= - 0.18*m.x491 + 0.4*m.x808 + 0.2*m.x809 + 0.1*m.x810 + 0.333*m.x811 + 0.23*m.x812 + 0.133*m.x813 <= 0) m.c3488 = Constraint(expr= - 0.2*m.x502 + 0.1*m.x874 + 0.3*m.x875 + 0.5*m.x876 + 0.167*m.x877 + 0.3*m.x878 + 0.433*m.x879 <= 0) m.c3489 = Constraint(expr= - 0.38*m.x502 + 0.4*m.x874 + 0.2*m.x875 + 0.1*m.x876 + 0.333*m.x877 + 0.23*m.x878 + 0.133*m.x879 <= 0) m.c3490 = Constraint(expr= - 0.35*m.x503 + 0.1*m.x880 + 0.3*m.x881 + 0.5*m.x882 + 0.167*m.x883 + 0.3*m.x884 + 0.433*m.x885 <= 0) m.c3491 = Constraint(expr= - 0.27*m.x503 + 0.4*m.x880 + 0.2*m.x881 + 0.1*m.x882 + 0.333*m.x883 + 0.23*m.x884 + 0.133*m.x885 <= 0) m.c3492 = Constraint(expr= - 0.35*m.x504 + 0.1*m.x886 + 0.3*m.x887 + 0.5*m.x888 + 0.167*m.x889 + 0.3*m.x890 + 0.433*m.x891 <= 0) m.c3493 = Constraint(expr= - 0.27*m.x504 + 0.4*m.x886 + 0.2*m.x887 + 0.1*m.x888 + 0.333*m.x889 + 0.23*m.x890 + 0.133*m.x891 <= 0) m.c3494 = Constraint(expr= - 0.48*m.x505 + 0.1*m.x892 + 0.3*m.x893 + 0.5*m.x894 + 0.167*m.x895 + 0.3*m.x896 + 0.433*m.x897 <= 0) m.c3495 = Constraint(expr= - 0.18*m.x505 + 0.4*m.x892 + 0.2*m.x893 + 0.1*m.x894 + 0.333*m.x895 + 0.23*m.x896 + 0.133*m.x897 <= 0) m.c3496 = Constraint(expr= - 0.2*m.x516 + 0.1*m.x958 + 0.3*m.x959 + 0.5*m.x960 + 0.167*m.x961 + 0.3*m.x962 + 0.433*m.x963 <= 0) m.c3497 = Constraint(expr= - 0.38*m.x516 + 0.4*m.x958 + 0.2*m.x959 + 0.1*m.x960 + 0.333*m.x961 + 0.23*m.x962 + 0.133*m.x963 <= 0) m.c3498 = Constraint(expr= - 0.35*m.x517 + 0.1*m.x964 + 0.3*m.x965 + 0.5*m.x966 + 0.167*m.x967 + 0.3*m.x968 + 0.433*m.x969 <= 0) m.c3499 = Constraint(expr= - 0.27*m.x517 + 0.4*m.x964 + 0.2*m.x965 + 0.1*m.x966 + 0.333*m.x967 + 0.23*m.x968 + 0.133*m.x969 <= 0) m.c3500 = Constraint(expr= - 0.35*m.x518 + 0.1*m.x970 + 0.3*m.x971 + 0.5*m.x972 + 0.167*m.x973 + 0.3*m.x974 + 0.433*m.x975 <= 0) m.c3501 = Constraint(expr= - 0.27*m.x518 + 0.4*m.x970 + 0.2*m.x971 + 0.1*m.x972 + 0.333*m.x973 + 0.23*m.x974 + 0.133*m.x975 <= 0) m.c3502 = Constraint(expr= - 0.48*m.x519 + 0.1*m.x976 + 0.3*m.x977 + 0.5*m.x978 + 0.167*m.x979 + 0.3*m.x980 + 0.433*m.x981 <= 0) m.c3503 = Constraint(expr= - 0.18*m.x519 + 0.4*m.x976 + 0.2*m.x977 + 0.1*m.x978 + 0.333*m.x979 + 0.23*m.x980 + 0.133*m.x981 <= 0) m.c3504 = Constraint(expr= - 0.2*m.x530 + 0.1*m.x1042 + 0.3*m.x1043 + 0.5*m.x1044 + 0.167*m.x1045 + 0.3*m.x1046 + 0.433*m.x1047 <= 0) m.c3505 = Constraint(expr= - 0.38*m.x530 + 0.4*m.x1042 + 0.2*m.x1043 + 0.1*m.x1044 + 0.333*m.x1045 + 0.23*m.x1046 + 0.133*m.x1047 <= 0) m.c3506 = Constraint(expr= - 0.35*m.x531 + 0.1*m.x1048 + 0.3*m.x1049 + 0.5*m.x1050 + 0.167*m.x1051 + 0.3*m.x1052 + 0.433*m.x1053 <= 0) m.c3507 = Constraint(expr= - 0.27*m.x531 + 0.4*m.x1048 + 0.2*m.x1049 + 0.1*m.x1050 + 0.333*m.x1051 + 0.23*m.x1052 + 0.133*m.x1053 <= 0) m.c3508 = Constraint(expr= - 0.35*m.x532 + 0.1*m.x1054 + 0.3*m.x1055 + 0.5*m.x1056 + 0.167*m.x1057 + 0.3*m.x1058 + 0.433*m.x1059 <= 0) m.c3509 = Constraint(expr= - 0.27*m.x532 + 0.4*m.x1054 + 0.2*m.x1055 + 0.1*m.x1056 + 0.333*m.x1057 + 0.23*m.x1058 + 0.133*m.x1059 <= 0) m.c3510 = Constraint(expr= - 0.48*m.x533 + 0.1*m.x1060 + 0.3*m.x1061 + 0.5*m.x1062 + 0.167*m.x1063 + 0.3*m.x1064 + 0.433*m.x1065 <= 0) m.c3511 = Constraint(expr= - 0.18*m.x533 + 0.4*m.x1060 + 0.2*m.x1061 + 0.1*m.x1062 + 0.333*m.x1063 + 0.23*m.x1064 + 0.133*m.x1065 <= 0) m.c3512 = Constraint(expr= - 0.2*m.x544 + 0.1*m.x1126 + 0.3*m.x1127 + 0.5*m.x1128 + 0.167*m.x1129 + 0.3*m.x1130 + 0.433*m.x1131 <= 0) m.c3513 = Constraint(expr= - 0.38*m.x544 + 0.4*m.x1126 + 0.2*m.x1127 + 0.1*m.x1128 + 0.333*m.x1129 + 0.23*m.x1130 + 0.133*m.x1131 <= 0) m.c3514 = Constraint(expr= - 0.35*m.x545 + 0.1*m.x1132 + 0.3*m.x1133 + 0.5*m.x1134 + 0.167*m.x1135 + 0.3*m.x1136 + 0.433*m.x1137 <= 0) m.c3515 = Constraint(expr= - 0.27*m.x545 + 0.4*m.x1132 + 0.2*m.x1133 + 0.1*m.x1134 + 0.333*m.x1135 + 0.23*m.x1136 + 0.133*m.x1137 <= 0) m.c3516 = Constraint(expr= - 0.35*m.x546 + 0.1*m.x1138 + 0.3*m.x1139 + 0.5*m.x1140 + 0.167*m.x1141 + 0.3*m.x1142 + 0.433*m.x1143 <= 0) m.c3517 = Constraint(expr= - 0.27*m.x546 + 0.4*m.x1138 + 0.2*m.x1139 + 0.1*m.x1140 + 0.333*m.x1141 + 0.23*m.x1142 + 0.133*m.x1143 <= 0) m.c3518 = Constraint(expr= - 0.48*m.x547 + 0.1*m.x1144 + 0.3*m.x1145 + 0.5*m.x1146 + 0.167*m.x1147 + 0.3*m.x1148 + 0.433*m.x1149 <= 0) m.c3519 = Constraint(expr= - 0.18*m.x547 + 0.4*m.x1144 + 0.2*m.x1145 + 0.1*m.x1146 + 0.333*m.x1147 + 0.23*m.x1148 + 0.133*m.x1149 <= 0) m.c3520 = Constraint(expr= - 0.2*m.x558 + 0.1*m.x1210 + 0.3*m.x1211 + 0.5*m.x1212 + 0.167*m.x1213 + 0.3*m.x1214 + 0.433*m.x1215 <= 0) m.c3521 = Constraint(expr= - 0.38*m.x558 + 0.4*m.x1210 + 0.2*m.x1211 + 0.1*m.x1212 + 0.333*m.x1213 + 0.23*m.x1214 + 0.133*m.x1215 <= 0) m.c3522 = Constraint(expr= - 0.35*m.x559 + 0.1*m.x1216 + 0.3*m.x1217 + 0.5*m.x1218 + 0.167*m.x1219 + 0.3*m.x1220 + 0.433*m.x1221 <= 0) m.c3523 = Constraint(expr= - 0.27*m.x559 + 0.4*m.x1216 + 0.2*m.x1217 + 0.1*m.x1218 + 0.333*m.x1219 + 0.23*m.x1220 + 0.133*m.x1221 <= 0) m.c3524 = Constraint(expr= - 0.35*m.x560 + 0.1*m.x1222 + 0.3*m.x1223 + 0.5*m.x1224 + 0.167*m.x1225 + 0.3*m.x1226 + 0.433*m.x1227 <= 0) m.c3525 = Constraint(expr= - 0.27*m.x560 + 0.4*m.x1222 + 0.2*m.x1223 + 0.1*m.x1224 + 0.333*m.x1225 + 0.23*m.x1226 + 0.133*m.x1227 <= 0) m.c3526 = Constraint(expr= - 0.48*m.x561 + 0.1*m.x1228 + 0.3*m.x1229 + 0.5*m.x1230 + 0.167*m.x1231 + 0.3*m.x1232 + 0.433*m.x1233 <= 0) m.c3527 = Constraint(expr= - 0.18*m.x561 + 0.4*m.x1228 + 0.2*m.x1229 + 0.1*m.x1230 + 0.333*m.x1231 + 0.23*m.x1232 + 0.133*m.x1233 <= 0) m.c3528 = Constraint(expr= - m.x450 - m.x464 - m.x478 - m.x492 - m.x506 - m.x520 - m.x534 - m.x548 >= -100) m.c3529 = Constraint(expr= - m.x451 - m.x465 - m.x479 - m.x493 - m.x507 - m.x521 - m.x535 - m.x549 >= -100) m.c3530 = Constraint(expr= - m.x452 - m.x466 - m.x480 - m.x494 - m.x508 - m.x522 - m.x536 - m.x550 >= -100) m.c3531 = Constraint(expr= m.x450 - m.x453 - m.x454 + m.x464 - m.x467 - m.x468 + m.x478 - m.x481 - m.x482 + m.x492 - m.x495 - m.x496 + m.x506 - m.x509 - m.x510 + m.x520 - m.x523 - m.x524 + m.x534 - m.x537 - m.x538 + m.x548 - m.x551 - m.x552 >= -20) m.c3532 = Constraint(expr= m.x451 - m.x455 - m.x456 - m.x457 + m.x465 - m.x469 - m.x470 - m.x471 + m.x479 - m.x483 - m.x484 - m.x485 + m.x493 - m.x497 - m.x498 - m.x499 + m.x507 - m.x511 - m.x512 - m.x513 + m.x521 - m.x525 - m.x526 - m.x527 + m.x535 - m.x539 - m.x540 - m.x541 + m.x549 - m.x553 - m.x554 - m.x555 >= -50) m.c3533 = Constraint(expr= m.x452 - m.x458 - m.x459 + m.x466 - m.x472 - m.x473 + m.x480 - m.x486 - m.x487 + m.x494 - m.x500 - m.x501 + m.x508 - m.x514 - m.x515 + m.x522 - m.x528 - m.x529 + m.x536 - m.x542 - m.x543 + m.x550 - m.x556 - m.x557 >= -70) m.c3534 = Constraint(expr= m.x453 + m.x455 - m.x460 + m.x467 + m.x469 - m.x474 + m.x481 + m.x483 - m.x488 + m.x495 + m.x497 - m.x502 + m.x509 + m.x511 - m.x516 + m.x523 + m.x525 - m.x530 + m.x537 + m.x539 - m.x544 + m.x551 + m.x553 - m.x558 >= -30) m.c3535 = Constraint(expr= m.x454 + m.x456 + m.x458 - m.x461 - m.x462 + m.x468 + m.x470 + m.x472 - m.x475 - m.x476 + m.x482 + m.x484 + m.x486 - m.x489 - m.x490 + m.x496 + m.x498 + m.x500 - m.x503 - m.x504 + m.x510 + m.x512 + m.x514 - m.x517 - m.x518 + m.x524 + m.x526 + m.x528 - m.x531 - m.x532 + m.x538 + m.x540 + m.x542 - m.x545 - m.x546 + m.x552 + m.x554 + m.x556 - m.x559 - m.x560 >= -50) m.c3536 = Constraint(expr= m.x457 + m.x459 - m.x463 + m.x471 + m.x473 - m.x477 + m.x485 + m.x487 - m.x491 + m.x499 + m.x501 - m.x505 + m.x513 + m.x515 - m.x519 + m.x527 + m.x529 - m.x533 + m.x541 + m.x543 - m.x547 + m.x555 + m.x557 - m.x561 >= -30) m.c3537 = Constraint(expr= m.x460 + m.x461 + m.x474 + m.x475 + m.x488 + m.x489 + m.x502 + m.x503 + m.x516 + m.x517 + m.x530 + m.x531 + m.x544 + m.x545 + m.x558 + m.x559 >= 0) m.c3538 = Constraint(expr= m.x462 + m.x463 + m.x476 + m.x477 + m.x490 + m.x491 + m.x504 + m.x505 + m.x518 + m.x519 + m.x532 + m.x533 + m.x546 + m.x547 + m.x560 + m.x561 >= 0) m.c3539 = Constraint(expr= - m.x450 - m.x464 - m.x478 - m.x492 - m.x506 - m.x520 - m.x534 - m.x548 <= 0) m.c3540 = Constraint(expr= - m.x451 - m.x465 - m.x479 - m.x493 - m.x507 - m.x521 - m.x535 - m.x549 <= 0) m.c3541 = Constraint(expr= - m.x452 - m.x466 - m.x480 - m.x494 - m.x508 - m.x522 - m.x536 - m.x550 <= 0) m.c3542 = Constraint(expr= m.x450 - m.x453 - m.x454 + m.x464 - m.x467 - m.x468 + m.x478 - m.x481 - m.x482 + m.x492 - m.x495 - m.x496 + m.x506 - m.x509 - m.x510 + m.x520 - m.x523 - m.x524 + m.x534 - m.x537 - m.x538 + m.x548 - m.x551 - m.x552 <= 80) m.c3543 = Constraint(expr= m.x451 - m.x455 - m.x456 - m.x457 + m.x465 - m.x469 - m.x470 - m.x471 + m.x479 - m.x483 - m.x484 - m.x485 + m.x493 - m.x497 - m.x498 - m.x499 + m.x507 - m.x511 - m.x512 - m.x513 + m.x521 - m.x525 - m.x526 - m.x527 + m.x535 - m.x539 - m.x540 - m.x541 + m.x549 - m.x553 - m.x554 - m.x555 <= 50) m.c3544 = Constraint(expr= m.x452 - m.x458 - m.x459 + m.x466 - m.x472 - m.x473 + m.x480 - m.x486 - m.x487 + m.x494 - m.x500 - m.x501 + m.x508 - m.x514 - m.x515 + m.x522 - m.x528 - m.x529 + m.x536 - m.x542 - m.x543 + m.x550 - m.x556 - m.x557 <= 30) m.c3545 = Constraint(expr= m.x453 + m.x455 - m.x460 + m.x467 + m.x469 - m.x474 + m.x481 + m.x483 - m.x488 + m.x495 + m.x497 - m.x502 + m.x509 + m.x511 - m.x516 + m.x523 + m.x525 - m.x530 + m.x537 + m.x539 - m.x544 + m.x551 + m.x553 - m.x558 <= 70) m.c3546 = Constraint(expr= m.x454 + m.x456 + m.x458 - m.x461 - m.x462 + m.x468 + m.x470 + m.x472 - m.x475 - m.x476 + m.x482 + m.x484 + m.x486 - m.x489 - m.x490 + m.x496 + m.x498 + m.x500 - m.x503 - m.x504 + m.x510 + m.x512 + m.x514 - m.x517 - m.x518 + m.x524 + m.x526 + m.x528 - m.x531 - m.x532 + m.x538 + m.x540 + m.x542 - m.x545 - m.x546 + m.x552 + m.x554 + m.x556 - m.x559 - m.x560 <= 50) m.c3547 = Constraint(expr= m.x457 + m.x459 - m.x463 + m.x471 + m.x473 - m.x477 + m.x485 + m.x487 - m.x491 + m.x499 + m.x501 - m.x505 + m.x513 + m.x515 - m.x519 + m.x527 + m.x529 - m.x533 + m.x541 + m.x543 - m.x547 + m.x555 + m.x557 - m.x561 <= 70) m.c3548 = Constraint(expr= - m.x562 - m.x646 - m.x730 - m.x814 - m.x898 - m.x982 - m.x1066 - m.x1150 >= -100) m.c3549 = Constraint(expr= - m.x563 - m.x647 - m.x731 - m.x815 - m.x899 - m.x983 - m.x1067 - m.x1151 >= 0) m.c3550 = Constraint(expr= - m.x564 - m.x648 - m.x732 - m.x816 - m.x900 - m.x984 - m.x1068 - m.x1152 >= 0) m.c3551 = Constraint(expr= - m.x565 - m.x649 - m.x733 - m.x817 - m.x901 - m.x985 - m.x1069 - m.x1153 >= 0) m.c3552 = Constraint(expr= - m.x566 - m.x650 - m.x734 - m.x818 - m.x902 - m.x986 - m.x1070 - m.x1154 >= 0) m.c3553 = Constraint(expr= - m.x567 - m.x651 - m.x735 - m.x819 - m.x903 - m.x987 - m.x1071 - m.x1155 >= 0) m.c3554 = Constraint(expr= - m.x568 - m.x652 - m.x736 - m.x820 - m.x904 - m.x988 - m.x1072 - m.x1156 >= 0) m.c3555 = Constraint(expr= - m.x569 - m.x653 - m.x737 - m.x821 - m.x905 - m.x989 - m.x1073 - m.x1157 >= -100) m.c3556 = Constraint(expr= - m.x570 - m.x654 - m.x738 - m.x822 - m.x906 - m.x990 - m.x1074 - m.x1158 >= 0) m.c3557 = Constraint(expr= - m.x571 - m.x655 - m.x739 - m.x823 - m.x907 - m.x991 - m.x1075 - m.x1159 >= 0) m.c3558 = Constraint(expr= - m.x572 - m.x656 - m.x740 - m.x824 - m.x908 - m.x992 - m.x1076 - m.x1160 >= 0) m.c3559 = Constraint(expr= - m.x573 - m.x657 - m.x741 - m.x825 - m.x909 - m.x993 - m.x1077 - m.x1161 >= 0) m.c3560 = Constraint(expr= - m.x574 - m.x658 - m.x742 - m.x826 - m.x910 - m.x994 - m.x1078 - m.x1162 >= 0) m.c3561 = Constraint(expr= - m.x575 - m.x659 - m.x743 - m.x827 - m.x911 - m.x995 - m.x1079 - m.x1163 >= 0) m.c3562 = Constraint(expr= - m.x576 - m.x660 - m.x744 - m.x828 - m.x912 - m.x996 - m.x1080 - m.x1164 >= -100) m.c3563 = Constraint(expr= - m.x577 - m.x661 - m.x745 - m.x829 - m.x913 - m.x997 - m.x1081 - m.x1165 >= 0) m.c3564 = Constraint(expr= - m.x578 - m.x662 - m.x746 - m.x830 - m.x914 - m.x998 - m.x1082 - m.x1166 >= 0) m.c3565 = Constraint(expr= - m.x579 - m.x663 - m.x747 - m.x831 - m.x915 - m.x999 - m.x1083 - m.x1167 >= 0) m.c3566 = Constraint(expr= m.x562 - m.x580 - m.x586 + m.x646 - m.x664 - m.x670 + m.x730 - m.x748 - m.x754 + m.x814 - m.x832 - m.x838 + m.x898 - m.x916 - m.x922 + m.x982 - m.x1000 - m.x1006 + m.x1066 - m.x1084 - m.x1090 + m.x1150 - m.x1168 - m.x1174 >= -20) m.c3567 = Constraint(expr= m.x563 - m.x581 - m.x587 + m.x647 - m.x665 - m.x671 + m.x731 - m.x749 - m.x755 + m.x815 - m.x833 - m.x839 + m.x899 - m.x917 - m.x923 + m.x983 - m.x1001 - m.x1007 + m.x1067 - m.x1085 - m.x1091 + m.x1151 - m.x1169 - m.x1175 >= 0) m.c3568 = Constraint(expr= m.x564 - m.x582 - m.x588 + m.x648 - m.x666 - m.x672 + m.x732 - m.x750 - m.x756 + m.x816 - m.x834 - m.x840 + m.x900 - m.x918 - m.x924 + m.x984 - m.x1002 - m.x1008 + m.x1068 - m.x1086 - m.x1092 + m.x1152 - m.x1170 - m.x1176 >= 0) m.c3569 = Constraint(expr= m.x565 - m.x583 - m.x589 + m.x649 - m.x667 - m.x673 + m.x733 - m.x751 - m.x757 + m.x817 - m.x835 - m.x841 + m.x901 - m.x919 - m.x925 + m.x985 - m.x1003 - m.x1009 + m.x1069 - m.x1087 - m.x1093 + m.x1153 - m.x1171 - m.x1177 >= 0) m.c3570 = Constraint(expr= m.x566 - m.x584 - m.x590 + m.x650 - m.x668 - m.x674 + m.x734 - m.x752 - m.x758 + m.x818 - m.x836 - m.x842 + m.x902 - m.x920 - m.x926 + m.x986 - m.x1004 - m.x1010 + m.x1070 - m.x1088 - m.x1094 + m.x1154 - m.x1172 - m.x1178 >= 0) m.c3571 = Constraint(expr= m.x567 - m.x585 - m.x591 + m.x651 - m.x669 - m.x675 + m.x735 - m.x753 - m.x759 + m.x819 - m.x837 - m.x843 + m.x903 - m.x921 - m.x927 + m.x987 - m.x1005 - m.x1011 + m.x1071 - m.x1089 - m.x1095 + m.x1155 - m.x1173 - m.x1179 >= 0) m.c3572 = Constraint(expr= m.x568 - m.x592 - m.x598 - m.x604 + m.x652 - m.x676 - m.x682 - m.x688 + m.x736 - m.x760 - m.x766 - m.x772 + m.x820 - m.x844 - m.x850 - m.x856 + m.x904 - m.x928 - m.x934 - m.x940 + m.x988 - m.x1012 - m.x1018 - m.x1024 + m.x1072 - m.x1096 - m.x1102 - m.x1108 + m.x1156 - m.x1180 - m.x1186 - m.x1192 >= 0) m.c3573 = Constraint(expr= m.x569 - m.x593 - m.x599 - m.x605 + m.x653 - m.x677 - m.x683 - m.x689 + m.x737 - m.x761 - m.x767 - m.x773 + m.x821 - m.x845 - m.x851 - m.x857 + m.x905 - m.x929 - m.x935 - m.x941 + m.x989 - m.x1013 - m.x1019 - m.x1025 + m.x1073 - m.x1097 - m.x1103 - m.x1109 + m.x1157 - m.x1181 - m.x1187 - m.x1193 >= -50) m.c3574 = Constraint(expr= m.x570 - m.x594 - m.x600 - m.x606 + m.x654 - m.x678 - m.x684 - m.x690 + m.x738 - m.x762 - m.x768 - m.x774 + m.x822 - m.x846 - m.x852 - m.x858 + m.x906 - m.x930 - m.x936 - m.x942 + m.x990 - m.x1014 - m.x1020 - m.x1026 + m.x1074 - m.x1098 - m.x1104 - m.x1110 + m.x1158 - m.x1182 - m.x1188 - m.x1194 >= 0) m.c3575 = Constraint(expr= m.x571 - m.x595 - m.x601 - m.x607 + m.x655 - m.x679 - m.x685 - m.x691 + m.x739 - m.x763 - m.x769 - m.x775 + m.x823 - m.x847 - m.x853 - m.x859 + m.x907 - m.x931 - m.x937 - m.x943 + m.x991 - m.x1015 - m.x1021 - m.x1027 + m.x1075 - m.x1099 - m.x1105 - m.x1111 + m.x1159 - m.x1183 - m.x1189 - m.x1195 >= 0) m.c3576 = Constraint(expr= m.x572 - m.x596 - m.x602 - m.x608 + m.x656 - m.x680 - m.x686 - m.x692 + m.x740 - m.x764 - m.x770 - m.x776 + m.x824 - m.x848 - m.x854 - m.x860 + m.x908 - m.x932 - m.x938 - m.x944 + m.x992 - m.x1016 - m.x1022 - m.x1028 + m.x1076 - m.x1100 - m.x1106 - m.x1112 + m.x1160 - m.x1184 - m.x1190 - m.x1196 >= 0) m.c3577 = Constraint(expr= m.x573 - m.x597 - m.x603 - m.x609 + m.x657 - m.x681 - m.x687 - m.x693 + m.x741 - m.x765 - m.x771 - m.x777 + m.x825 - m.x849 - m.x855 - m.x861 + m.x909 - m.x933 - m.x939 - m.x945 + m.x993 - m.x1017 - m.x1023 - m.x1029 + m.x1077 - m.x1101 - m.x1107 - m.x1113 + m.x1161 - m.x1185 - m.x1191 - m.x1197 >= 0) m.c3578 = Constraint(expr= m.x574 - m.x610 - m.x616 + m.x658 - m.x694 - m.x700 + m.x742 - m.x778 - m.x784 + m.x826 - m.x862 - m.x868 + m.x910 - m.x946 - m.x952 + m.x994 - m.x1030 - m.x1036 + m.x1078 - m.x1114 - m.x1120 + m.x1162 - m.x1198 - m.x1204 >= 0) m.c3579 = Constraint(expr= m.x575 - m.x611 - m.x617 + m.x659 - m.x695 - m.x701 + m.x743 - m.x779 - m.x785 + m.x827 - m.x863 - m.x869 + m.x911 - m.x947 - m.x953 + m.x995 - m.x1031 - m.x1037 + m.x1079 - m.x1115 - m.x1121 + m.x1163 - m.x1199 - m.x1205 >= 0) m.c3580 = Constraint(expr= m.x576 - m.x612 - m.x618 + m.x660 - m.x696 - m.x702 + m.x744 - m.x780 - m.x786 + m.x828 - m.x864 - m.x870 + m.x912 - m.x948 - m.x954 + m.x996 - m.x1032 - m.x1038 + m.x1080 - m.x1116 - m.x1122 + m.x1164 - m.x1200 - m.x1206 >= -70) m.c3581 = Constraint(expr= m.x577 - m.x613 - m.x619 + m.x661 - m.x697 - m.x703 + m.x745 - m.x781 - m.x787 + m.x829 - m.x865 - m.x871 + m.x913 - m.x949 - m.x955 + m.x997 - m.x1033 - m.x1039 + m.x1081 - m.x1117 - m.x1123 + m.x1165 - m.x1201 - m.x1207 >= 0) m.c3582 = Constraint(expr= m.x578 - m.x614 - m.x620 + m.x662 - m.x698 - m.x704 + m.x746 - m.x782 - m.x788 + m.x830 - m.x866 - m.x872 + m.x914 - m.x950 - m.x956 + m.x998 - m.x1034 - m.x1040 + m.x1082 - m.x1118 - m.x1124 + m.x1166 - m.x1202 - m.x1208 >= 0) m.c3583 = Constraint(expr= m.x579 - m.x615 - m.x621 + m.x663 - m.x699 - m.x705 + m.x747 - m.x783 - m.x789 + m.x831 - m.x867 - m.x873 + m.x915 - m.x951 - m.x957 + m.x999 - m.x1035 - m.x1041 + m.x1083 - m.x1119 - m.x1125 + m.x1167 - m.x1203 - m.x1209 >= 0) m.c3584 = Constraint(expr= m.x580 + m.x592 - m.x622 + m.x664 + m.x676 - m.x706 + m.x748 + m.x760 - m.x790 + m.x832 + m.x844 - m.x874 + m.x916 + m.x928 - m.x958 + m.x1000 + m.x1012 - m.x1042 + m.x1084 + m.x1096 - m.x1126 + m.x1168 + m.x1180 - m.x1210 >= 0) m.c3585 = Constraint(expr= m.x581 + m.x593 - m.x623 + m.x665 + m.x677 - m.x707 + m.x749 + m.x761 - m.x791 + m.x833 + m.x845 - m.x875 + m.x917 + m.x929 - m.x959 + m.x1001 + m.x1013 - m.x1043 + m.x1085 + m.x1097 - m.x1127 + m.x1169 + m.x1181 - m.x1211 >= 0) m.c3586 = Constraint(expr= m.x582 + m.x594 - m.x624 + m.x666 + m.x678 - m.x708 + m.x750 + m.x762 - m.x792 + m.x834 + m.x846 - m.x876 + m.x918 + m.x930 - m.x960 + m.x1002 + m.x1014 - m.x1044 + m.x1086 + m.x1098 - m.x1128 + m.x1170 + m.x1182 - m.x1212 >= 0) m.c3587 = Constraint(expr= m.x583 + m.x595 - m.x625 + m.x667 + m.x679 - m.x709 + m.x751 + m.x763 - m.x793 + m.x835 + m.x847 - m.x877 + m.x919 + m.x931 - m.x961 + m.x1003 + m.x1015 - m.x1045 + m.x1087 + m.x1099 - m.x1129 + m.x1171 + m.x1183 - m.x1213 >= -30) m.c3588 = Constraint(expr= m.x584 + m.x596 - m.x626 + m.x668 + m.x680 - m.x710 + m.x752 + m.x764 - m.x794 + m.x836 + m.x848 - m.x878 + m.x920 + m.x932 - m.x962 + m.x1004 + m.x1016 - m.x1046 + m.x1088 + m.x1100 - m.x1130 + m.x1172 + m.x1184 - m.x1214 >= 0) m.c3589 = Constraint(expr= m.x585 + m.x597 - m.x627 + m.x669 + m.x681 - m.x711 + m.x753 + m.x765 - m.x795 + m.x837 + m.x849 - m.x879 + m.x921 + m.x933 - m.x963 + m.x1005 + m.x1017 - m.x1047 + m.x1089 + m.x1101 - m.x1131 + m.x1173 + m.x1185 - m.x1215 >= 0) m.c3590 = Constraint(expr= m.x586 + m.x598 + m.x610 - m.x628 - m.x634 + m.x670 + m.x682 + m.x694 - m.x712 - m.x718 + m.x754 + m.x766 + m.x778 - m.x796 - m.x802 + m.x838 + m.x850 + m.x862 - m.x880 - m.x886 + m.x922 + m.x934 + m.x946 - m.x964 - m.x970 + m.x1006 + m.x1018 + m.x1030 - m.x1048 - m.x1054 + m.x1090 + m.x1102 + m.x1114 - m.x1132 - m.x1138 + m.x1174 + m.x1186 + m.x1198 - m.x1216 - m.x1222 >= 0) m.c3591 = Constraint(expr= m.x587 + m.x599 + m.x611 - m.x629 - m.x635 + m.x671 + m.x683 + m.x695 - m.x713 - m.x719 + m.x755 + m.x767 + m.x779 - m.x797 - m.x803 + m.x839 + m.x851 + m.x863 - m.x881 - m.x887 + m.x923 + m.x935 + m.x947 - m.x965 - m.x971 + m.x1007 + m.x1019 + m.x1031 - m.x1049 - m.x1055 + m.x1091 + m.x1103 + m.x1115 - m.x1133 - m.x1139 + m.x1175 + m.x1187 + m.x1199 - m.x1217 - m.x1223 >= 0) m.c3592 = Constraint(expr= m.x588 + m.x600 + m.x612 - m.x630 - m.x636 + m.x672 + m.x684 + m.x696 - m.x714 - m.x720 + m.x756 + m.x768 + m.x780 - m.x798 - m.x804 + m.x840 + m.x852 + m.x864 - m.x882 - m.x888 + m.x924 + m.x936 + m.x948 - m.x966 - m.x972 + m.x1008 + m.x1020 + m.x1032 - m.x1050 - m.x1056 + m.x1092 + m.x1104 + m.x1116 - m.x1134 - m.x1140 + m.x1176 + m.x1188 + m.x1200 - m.x1218 - m.x1224 >= 0) m.c3593 = Constraint(expr= m.x589 + m.x601 + m.x613 - m.x631 - m.x637 + m.x673 + m.x685 + m.x697 - m.x715 - m.x721 + m.x757 + m.x769 + m.x781 - m.x799 - m.x805 + m.x841 + m.x853 + m.x865 - m.x883 - m.x889 + m.x925 + m.x937 + m.x949 - m.x967 - m.x973 + m.x1009 + m.x1021 + m.x1033 - m.x1051 - m.x1057 + m.x1093 + m.x1105 + m.x1117 - m.x1135 - m.x1141 + m.x1177 + m.x1189 + m.x1201 - m.x1219 - m.x1225 >= 0) m.c3594 = Constraint(expr= m.x590 + m.x602 + m.x614 - m.x632 - m.x638 + m.x674 + m.x686 + m.x698 - m.x716 - m.x722 + m.x758 + m.x770 + m.x782 - m.x800 - m.x806 + m.x842 + m.x854 + m.x866 - m.x884 - m.x890 + m.x926 + m.x938 + m.x950 - m.x968 - m.x974 + m.x1010 + m.x1022 + m.x1034 - m.x1052 - m.x1058 + m.x1094 + m.x1106 + m.x1118 - m.x1136 - m.x1142 + m.x1178 + m.x1190 + m.x1202 - m.x1220 - m.x1226 >= -50) m.c3595 = Constraint(expr= m.x591 + m.x603 + m.x615 - m.x633 - m.x639 + m.x675 + m.x687 + m.x699 - m.x717 - m.x723 + m.x759 + m.x771 + m.x783 - m.x801 - m.x807 + m.x843 + m.x855 + m.x867 - m.x885 - m.x891 + m.x927 + m.x939 + m.x951 - m.x969 - m.x975 + m.x1011 + m.x1023 + m.x1035 - m.x1053 - m.x1059 + m.x1095 + m.x1107 + m.x1119 - m.x1137 - m.x1143 + m.x1179 + m.x1191 + m.x1203 - m.x1221 - m.x1227 >= 0) m.c3596 = Constraint(expr= m.x604 + m.x616 - m.x640 + m.x688 + m.x700 - m.x724 + m.x772 + m.x784 - m.x808 + m.x856 + m.x868 - m.x892 + m.x940 + m.x952 - m.x976 + m.x1024 + m.x1036 - m.x1060 + m.x1108 + m.x1120 - m.x1144 + m.x1192 + m.x1204 - m.x1228 >= 0) m.c3597 = Constraint(expr= m.x605 + m.x617 - m.x641 + m.x689 + m.x701 - m.x725 + m.x773 + m.x785 - m.x809 + m.x857 + m.x869 - m.x893 + m.x941 + m.x953 - m.x977 + m.x1025 + m.x1037 - m.x1061 + m.x1109 + m.x1121 - m.x1145 + m.x1193 + m.x1205 - m.x1229 >= 0) m.c3598 = Constraint(expr= m.x606 + m.x618 - m.x642 + m.x690 + m.x702 - m.x726 + m.x774 + m.x786 - m.x810 + m.x858 + m.x870 - m.x894 + m.x942 + m.x954 - m.x978 + m.x1026 + m.x1038 - m.x1062 + m.x1110 + m.x1122 - m.x1146 + m.x1194 + m.x1206 - m.x1230 >= 0) m.c3599 = Constraint(expr= m.x607 + m.x619 - m.x643 + m.x691 + m.x703 - m.x727 + m.x775 + m.x787 - m.x811 + m.x859 + m.x871 - m.x895 + m.x943 + m.x955 - m.x979 + m.x1027 + m.x1039 - m.x1063 + m.x1111 + m.x1123 - m.x1147 + m.x1195 + m.x1207 - m.x1231 >= 0) m.c3600 = Constraint(expr= m.x608 + m.x620 - m.x644 + m.x692 + m.x704 - m.x728 + m.x776 + m.x788 - m.x812 + m.x860 + m.x872 - m.x896 + m.x944 + m.x956 - m.x980 + m.x1028 + m.x1040 - m.x1064 + m.x1112 + m.x1124 - m.x1148 + m.x1196 + m.x1208 - m.x1232 >= 0) m.c3601 = Constraint(expr= m.x609 + m.x621 - m.x645 + m.x693 + m.x705 - m.x729 + m.x777 + m.x789 - m.x813 + m.x861 + m.x873 - m.x897 + m.x945 + m.x957 - m.x981 + m.x1029 + m.x1041 - m.x1065 + m.x1113 + m.x1125 - m.x1149 + m.x1197 + m.x1209 - m.x1233 >= -30) m.c3602 = Constraint(expr= m.x622 + m.x628 + m.x706 + m.x712 + m.x790 + m.x796 + m.x874 + m.x880 + m.x958 + m.x964 + m.x1042 + m.x1048 + m.x1126 + m.x1132 + m.x1210 + m.x1216 >= 0) m.c3603 = Constraint(expr= m.x623 + m.x629 + m.x707 + m.x713 + m.x791 + m.x797 + m.x875 + m.x881 + m.x959 + m.x965 + m.x1043 + m.x1049 + m.x1127 + m.x1133 + m.x1211 + m.x1217 >= 0) m.c3604 = Constraint(expr= m.x624 + m.x630 + m.x708 + m.x714 + m.x792 + m.x798 + m.x876 + m.x882 + m.x960 + m.x966 + m.x1044 + m.x1050 + m.x1128 + m.x1134 + m.x1212 + m.x1218 >= 0) m.c3605 = Constraint(expr= m.x625 + m.x631 + m.x709 + m.x715 + m.x793 + m.x799 + m.x877 + m.x883 + m.x961 + m.x967 + m.x1045 + m.x1051 + m.x1129 + m.x1135 + m.x1213 + m.x1219 >= 0) m.c3606 = Constraint(expr= m.x626 + m.x632 + m.x710 + m.x716 + m.x794 + m.x800 + m.x878 + m.x884 + m.x962 + m.x968 + m.x1046 + m.x1052 + m.x1130 + m.x1136 + m.x1214 + m.x1220 >= 0) m.c3607 = Constraint(expr= m.x627 + m.x633 + m.x711 + m.x717 + m.x795 + m.x801 + m.x879 + m.x885 + m.x963 + m.x969 + m.x1047 + m.x1053 + m.x1131 + m.x1137 + m.x1215 + m.x1221 >= 0) m.c3608 = Constraint(expr= m.x634 + m.x640 + m.x718 + m.x724 + m.x802 + m.x808 + m.x886 + m.x892 + m.x970 + m.x976 + m.x1054 + m.x1060 + m.x1138 + m.x1144 + m.x1222 + m.x1228 >= 0) m.c3609 = Constraint(expr= m.x635 + m.x641 + m.x719 + m.x725 + m.x803 + m.x809 + m.x887 + m.x893 + m.x971 + m.x977 + m.x1055 + m.x1061 + m.x1139 + m.x1145 + m.x1223 + m.x1229 >= 0) m.c3610 = Constraint(expr= m.x636 + m.x642 + m.x720 + m.x726 + m.x804 + m.x810 + m.x888 + m.x894 + m.x972 + m.x978 + m.x1056 + m.x1062 + m.x1140 + m.x1146 + m.x1224 + m.x1230 >= 0) m.c3611 = Constraint(expr= m.x637 + m.x643 + m.x721 + m.x727 + m.x805 + m.x811 + m.x889 + m.x895 + m.x973 + m.x979 + m.x1057 + m.x1063 + m.x1141 + m.x1147 + m.x1225 + m.x1231 >= 0) m.c3612 = Constraint(expr= m.x638 + m.x644 + m.x722 + m.x728 + m.x806 + m.x812 + m.x890 + m.x896 + m.x974 + m.x980 + m.x1058 + m.x1064 + m.x1142 + m.x1148 + m.x1226 + m.x1232 >= 0) m.c3613 = Constraint(expr= m.x639 + m.x645 + m.x723 + m.x729 + m.x807 + m.x813 + m.x891 + m.x897 + m.x975 + m.x981 + m.x1059 + m.x1065 + m.x1143 + m.x1149 + m.x1227 + m.x1233 >= 0) m.c3614 = Constraint(expr= - m.x562 - m.x646 - m.x730 - m.x814 - m.x898 - m.x982 - m.x1066 - m.x1150 <= 0) m.c3615 = Constraint(expr= - m.x563 - m.x647 - m.x731 - m.x815 - m.x899 - m.x983 - m.x1067 - m.x1151 <= 100) m.c3616 = Constraint(expr= - m.x564 - m.x648 - m.x732 - m.x816 - m.x900 - m.x984 - m.x1068 - m.x1152 <= 100) m.c3617 = Constraint(expr= - m.x565 - m.x649 - m.x733 - m.x817 - m.x901 - m.x985 - m.x1069 - m.x1153 <= 100) m.c3618 = Constraint(expr= - m.x566 - m.x650 - m.x734 - m.x818 - m.x902 - m.x986 - m.x1070 - m.x1154 <= 100) m.c3619 = Constraint(expr= - m.x567 - m.x651 - m.x735 - m.x819 - m.x903 - m.x987 - m.x1071 - m.x1155 <= 100) m.c3620 = Constraint(expr= - m.x568 - m.x652 - m.x736 - m.x820 - m.x904 - m.x988 - m.x1072 - m.x1156 <= 100) m.c3621 = Constraint(expr= - m.x569 - m.x653 - m.x737 - m.x821 - m.x905 - m.x989 - m.x1073 - m.x1157 <= 0) m.c3622 = Constraint(expr= - m.x570 - m.x654 - m.x738 - m.x822 - m.x906 - m.x990 - m.x1074 - m.x1158 <= 100) m.c3623 = Constraint(expr= - m.x571 - m.x655 - m.x739 - m.x823 - m.x907 - m.x991 - m.x1075 - m.x1159 <= 100) m.c3624 = Constraint(expr= - m.x572 - m.x656 - m.x740 - m.x824 - m.x908 - m.x992 - m.x1076 - m.x1160 <= 100) m.c3625 = Constraint(expr= - m.x573 - m.x657 - m.x741 - m.x825 - m.x909 - m.x993 - m.x1077 - m.x1161 <= 100) m.c3626 = Constraint(expr= - m.x574 - m.x658 - m.x742 - m.x826 - m.x910 - m.x994 - m.x1078 - m.x1162 <= 100) m.c3627 = Constraint(expr= - m.x575 - m.x659 - m.x743 - m.x827 - m.x911 - m.x995 - m.x1079 - m.x1163 <= 100) m.c3628 = Constraint(expr= - m.x576 - m.x660 - m.x744 - m.x828 - m.x912 - m.x996 - m.x1080 - m.x1164 <= 0) m.c3629 = Constraint(expr= - m.x577 - m.x661 - m.x745 - m.x829 - m.x913 - m.x997 - m.x1081 - m.x1165 <= 100) m.c3630 = Constraint(expr= - m.x578 - m.x662 - m.x746 - m.x830 - m.x914 - m.x998 - m.x1082 - m.x1166 <= 100) m.c3631 = Constraint(expr= - m.x579 - m.x663 - m.x747 - m.x831 - m.x915 - m.x999 - m.x1083 - m.x1167 <= 100) m.c3632 = Constraint(expr= m.x562 - m.x580 - m.x586 + m.x646 - m.x664 - m.x670 + m.x730 - m.x748 - m.x754 + m.x814 - m.x832 - m.x838 + m.x898 - m.x916 - m.x922 + m.x982 - m.x1000 - m.x1006 + m.x1066 - m.x1084 - m.x1090 + m.x1150 - m.x1168 - m.x1174 <= 80) m.c3633 = Constraint(expr= m.x563 - m.x581 - m.x587 + m.x647 - m.x665 - m.x671 + m.x731 - m.x749 - m.x755 + m.x815 - m.x833 - m.x839 + m.x899 - m.x917 - m.x923 + m.x983 - m.x1001 - m.x1007 + m.x1067 - m.x1085 - m.x1091 + m.x1151 - m.x1169 - m.x1175 <= 100) m.c3634 = Constraint(expr= m.x564 - m.x582 - m.x588 + m.x648 - m.x666 - m.x672 + m.x732 - m.x750 - m.x756 + m.x816 - m.x834 - m.x840 + m.x900 - m.x918 - m.x924 + m.x984 - m.x1002 - m.x1008 + m.x1068 - m.x1086 - m.x1092 + m.x1152 - m.x1170 - m.x1176 <= 100) m.c3635 = Constraint(expr= m.x565 - m.x583 - m.x589 + m.x649 - m.x667 - m.x673 + m.x733 - m.x751 - m.x757 + m.x817 - m.x835 - m.x841 + m.x901 - m.x919 - m.x925 + m.x985 - m.x1003 - m.x1009 + m.x1069 - m.x1087 - m.x1093 + m.x1153 - m.x1171 - m.x1177 <= 100) m.c3636 = Constraint(expr= m.x566 - m.x584 - m.x590 + m.x650 - m.x668 - m.x674 + m.x734 - m.x752 - m.x758 + m.x818 - m.x836 - m.x842 + m.x902 - m.x920 - m.x926 + m.x986 - m.x1004 - m.x1010 + m.x1070 - m.x1088 - m.x1094 + m.x1154 - m.x1172 - m.x1178 <= 100) m.c3637 = Constraint(expr= m.x567 - m.x585 - m.x591 + m.x651 - m.x669 - m.x675 + m.x735 - m.x753 - m.x759 + m.x819 - m.x837 - m.x843 + m.x903 - m.x921 - m.x927 + m.x987 - m.x1005 - m.x1011 + m.x1071 - m.x1089 - m.x1095 + m.x1155 - m.x1173 - m.x1179 <= 100) m.c3638 = Constraint(expr= m.x568 - m.x592 - m.x598 - m.x604 + m.x652 - m.x676 - m.x682 - m.x688 + m.x736 - m.x760 - m.x766 - m.x772 + m.x820 - m.x844 - m.x850 - m.x856 + m.x904 - m.x928 - m.x934 - m.x940 + m.x988 - m.x1012 - m.x1018 - m.x1024 + m.x1072 - m.x1096 - m.x1102 - m.x1108 + m.x1156 - m.x1180 - m.x1186 - m.x1192 <= 100) m.c3639 = Constraint(expr= m.x569 - m.x593 - m.x599 - m.x605 + m.x653 - m.x677 - m.x683 - m.x689 + m.x737 - m.x761 - m.x767 - m.x773 + m.x821 - m.x845 - m.x851 - m.x857 + m.x905 - m.x929 - m.x935 - m.x941 + m.x989 - m.x1013 - m.x1019 - m.x1025 + m.x1073 - m.x1097 - m.x1103 - m.x1109 + m.x1157 - m.x1181 - m.x1187 - m.x1193 <= 50) m.c3640 = Constraint(expr= m.x570 - m.x594 - m.x600 - m.x606 + m.x654 - m.x678 - m.x684 - m.x690 + m.x738 - m.x762 - m.x768 - m.x774 + m.x822 - m.x846 - m.x852 - m.x858 + m.x906 - m.x930 - m.x936 - m.x942 + m.x990 - m.x1014 - m.x1020 - m.x1026 + m.x1074 - m.x1098 - m.x1104 - m.x1110 + m.x1158 - m.x1182 - m.x1188 - m.x1194 <= 100) m.c3641 = Constraint(expr= m.x571 - m.x595 - m.x601 - m.x607 + m.x655 - m.x679 - m.x685 - m.x691 + m.x739 - m.x763 - m.x769 - m.x775 + m.x823 - m.x847 - m.x853 - m.x859 + m.x907 - m.x931 - m.x937 - m.x943 + m.x991 - m.x1015 - m.x1021 - m.x1027 + m.x1075 - m.x1099 - m.x1105 - m.x1111 + m.x1159 - m.x1183 - m.x1189 - m.x1195 <= 100) m.c3642 = Constraint(expr= m.x572 - m.x596 - m.x602 - m.x608 + m.x656 - m.x680 - m.x686 - m.x692 + m.x740 - m.x764 - m.x770 - m.x776 + m.x824 - m.x848 - m.x854 - m.x860 + m.x908 - m.x932 - m.x938 - m.x944 + m.x992 - m.x1016 - m.x1022 - m.x1028 + m.x1076 - m.x1100 - m.x1106 - m.x1112 + m.x1160 - m.x1184 - m.x1190 - m.x1196 <= 100) m.c3643 = Constraint(expr= m.x573 - m.x597 - m.x603 - m.x609 + m.x657 - m.x681 - m.x687 - m.x693 + m.x741 - m.x765 - m.x771 - m.x777 + m.x825 - m.x849 - m.x855 - m.x861 + m.x909 - m.x933 - m.x939 - m.x945 + m.x993 - m.x1017 - m.x1023 - m.x1029 + m.x1077 - m.x1101 - m.x1107 - m.x1113 + m.x1161 - m.x1185 - m.x1191 - m.x1197 <= 100) m.c3644 = Constraint(expr= m.x574 - m.x610 - m.x616 + m.x658 - m.x694 - m.x700 + m.x742 - m.x778 - m.x784 + m.x826 - m.x862 - m.x868 + m.x910 - m.x946 - m.x952 + m.x994 - m.x1030 - m.x1036 + m.x1078 - m.x1114 - m.x1120 + m.x1162 - m.x1198 - m.x1204 <= 100) m.c3645 = Constraint(expr= m.x575 - m.x611 - m.x617 + m.x659 - m.x695 - m.x701 + m.x743 - m.x779 - m.x785 + m.x827 - m.x863 - m.x869 + m.x911 - m.x947 - m.x953 + m.x995 - m.x1031 - m.x1037 + m.x1079 - m.x1115 - m.x1121 + m.x1163 - m.x1199 - m.x1205 <= 100) m.c3646 = Constraint(expr= m.x576 - m.x612 - m.x618 + m.x660 - m.x696 - m.x702 + m.x744 - m.x780 - m.x786 + m.x828 - m.x864 - m.x870 + m.x912 - m.x948 - m.x954 + m.x996 - m.x1032 - m.x1038 + m.x1080 - m.x1116 - m.x1122 + m.x1164 - m.x1200 - m.x1206 <= 30) m.c3647 = Constraint(expr= m.x577 - m.x613 - m.x619 + m.x661 - m.x697 - m.x703 + m.x745 - m.x781 - m.x787 + m.x829 - m.x865 - m.x871 + m.x913 - m.x949 - m.x955 + m.x997 - m.x1033 - m.x1039 + m.x1081 - m.x1117 - m.x1123 + m.x1165 - m.x1201 - m.x1207 <= 100) m.c3648 = Constraint(expr= m.x578 - m.x614 - m.x620 + m.x662 - m.x698 - m.x704 + m.x746 - m.x782 - m.x788 + m.x830 - m.x866 - m.x872 + m.x914 - m.x950 - m.x956 + m.x998 - m.x1034 - m.x1040 + m.x1082 - m.x1118 - m.x1124 + m.x1166 - m.x1202 - m.x1208 <= 100) m.c3649 = Constraint(expr= m.x579 - m.x615 - m.x621 + m.x663 - m.x699 - m.x705 + m.x747 - m.x783 - m.x789 + m.x831 - m.x867 - m.x873 + m.x915 - m.x951 - m.x957 + m.x999 - m.x1035 - m.x1041 + m.x1083 - m.x1119 - m.x1125 + m.x1167 - m.x1203 - m.x1209 <= 100) m.c3650 = Constraint(expr= m.x580 + m.x592 - m.x622 + m.x664 + m.x676 - m.x706 + m.x748 + m.x760 - m.x790 + m.x832 + m.x844 - m.x874 + m.x916 + m.x928 - m.x958 + m.x1000 + m.x1012 - m.x1042 + m.x1084 + m.x1096 - m.x1126 + m.x1168 + m.x1180 - m.x1210 <= 100) m.c3651 = Constraint(expr= m.x581 + m.x593 - m.x623 + m.x665 + m.x677 - m.x707 + m.x749 + m.x761 - m.x791 + m.x833 + m.x845 - m.x875 + m.x917 + m.x929 - m.x959 + m.x1001 + m.x1013 - m.x1043 + m.x1085 + m.x1097 - m.x1127 + m.x1169 + m.x1181 - m.x1211 <= 100) m.c3652 = Constraint(expr= m.x582 + m.x594 - m.x624 + m.x666 + m.x678 - m.x708 + m.x750 + m.x762 - m.x792 + m.x834 + m.x846 - m.x876 + m.x918 + m.x930 - m.x960 + m.x1002 + m.x1014 - m.x1044 + m.x1086 + m.x1098 - m.x1128 + m.x1170 + m.x1182 - m.x1212 <= 100) m.c3653 = Constraint(expr= m.x583 + m.x595 - m.x625 + m.x667 + m.x679 - m.x709 + m.x751 + m.x763 - m.x793 + m.x835 + m.x847 - m.x877 + m.x919 + m.x931 - m.x961 + m.x1003 + m.x1015 - m.x1045 + m.x1087 + m.x1099 - m.x1129 + m.x1171 + m.x1183 - m.x1213 <= 70) m.c3654 = Constraint(expr= m.x584 + m.x596 - m.x626 + m.x668 + m.x680 - m.x710 + m.x752 + m.x764 - m.x794 + m.x836 + m.x848 - m.x878 + m.x920 + m.x932 - m.x962 + m.x1004 + m.x1016 - m.x1046 + m.x1088 + m.x1100 - m.x1130 + m.x1172 + m.x1184 - m.x1214 <= 100) m.c3655 = Constraint(expr= m.x585 + m.x597 - m.x627 + m.x669 + m.x681 - m.x711 + m.x753 + m.x765 - m.x795 + m.x837 + m.x849 - m.x879 + m.x921 + m.x933 - m.x963 + m.x1005 + m.x1017 - m.x1047 + m.x1089 + m.x1101 - m.x1131 + m.x1173 + m.x1185 - m.x1215 <= 100) m.c3656 = Constraint(expr= m.x586 + m.x598 + m.x610 - m.x628 - m.x634 + m.x670 + m.x682 + m.x694 - m.x712 - m.x718 + m.x754 + m.x766 + m.x778 - m.x796 - m.x802 + m.x838 + m.x850 + m.x862 - m.x880 - m.x886 + m.x922 + m.x934 + m.x946 - m.x964 - m.x970 + m.x1006 + m.x1018 + m.x1030 - m.x1048 - m.x1054 + m.x1090 + m.x1102 + m.x1114 - m.x1132 - m.x1138 + m.x1174 + m.x1186 + m.x1198 - m.x1216 - m.x1222 <= 100) m.c3657 = Constraint(expr= m.x587 + m.x599 + m.x611 - m.x629 - m.x635 + m.x671 + m.x683 + m.x695 - m.x713 - m.x719 + m.x755 + m.x767 + m.x779 - m.x797 - m.x803 + m.x839 + m.x851 + m.x863 - m.x881 - m.x887 + m.x923 + m.x935 + m.x947 - m.x965 - m.x971 + m.x1007 + m.x1019 + m.x1031 - m.x1049 - m.x1055 + m.x1091 + m.x1103 + m.x1115 - m.x1133 - m.x1139 + m.x1175 + m.x1187 + m.x1199 - m.x1217 - m.x1223 <= 100) m.c3658 = Constraint(expr= m.x588 + m.x600 + m.x612 - m.x630 - m.x636 + m.x672 + m.x684 + m.x696 - m.x714 - m.x720 + m.x756 + m.x768 + m.x780 - m.x798 - m.x804 + m.x840 + m.x852 + m.x864 - m.x882 - m.x888 + m.x924 + m.x936 + m.x948 - m.x966 - m.x972 + m.x1008 + m.x1020 + m.x1032 - m.x1050 - m.x1056 + m.x1092 + m.x1104 + m.x1116 - m.x1134 - m.x1140 + m.x1176 + m.x1188 + m.x1200 - m.x1218 - m.x1224 <= 100) m.c3659 = Constraint(expr= m.x589 + m.x601 + m.x613 - m.x631 - m.x637 + m.x673 + m.x685 + m.x697 - m.x715 - m.x721 + m.x757 + m.x769 + m.x781 - m.x799 - m.x805 + m.x841 + m.x853 + m.x865 - m.x883 - m.x889 + m.x925 + m.x937 + m.x949 - m.x967 - m.x973 + m.x1009 + m.x1021 + m.x1033 - m.x1051 - m.x1057 + m.x1093 + m.x1105 + m.x1117 - m.x1135 - m.x1141 + m.x1177 + m.x1189 + m.x1201 - m.x1219 - m.x1225 <= 100) m.c3660 = Constraint(expr= m.x590 + m.x602 + m.x614 - m.x632 - m.x638 + m.x674 + m.x686 + m.x698 - m.x716 - m.x722 + m.x758 + m.x770 + m.x782 - m.x800 - m.x806 + m.x842 + m.x854 + m.x866 - m.x884 - m.x890 + m.x926 + m.x938 + m.x950 - m.x968 - m.x974 + m.x1010 + m.x1022 + m.x1034 - m.x1052 - m.x1058 + m.x1094 + m.x1106 + m.x1118 - m.x1136 - m.x1142 + m.x1178 + m.x1190 + m.x1202 - m.x1220 - m.x1226 <= 50) m.c3661 = Constraint(expr= m.x591 + m.x603 + m.x615 - m.x633 - m.x639 + m.x675 + m.x687 + m.x699 - m.x717 - m.x723 + m.x759 + m.x771 + m.x783 - m.x801 - m.x807 + m.x843 + m.x855 + m.x867 - m.x885 - m.x891 + m.x927 + m.x939 + m.x951 - m.x969 - m.x975 + m.x1011 + m.x1023 + m.x1035 - m.x1053 - m.x1059 + m.x1095 + m.x1107 + m.x1119 - m.x1137 - m.x1143 + m.x1179 + m.x1191 + m.x1203 - m.x1221 - m.x1227 <= 100) m.c3662 = Constraint(expr= m.x604 + m.x616 - m.x640 + m.x688 + m.x700 - m.x724 + m.x772 + m.x784 - m.x808 + m.x856 + m.x868 - m.x892 + m.x940 + m.x952 - m.x976 + m.x1024 + m.x1036 - m.x1060 + m.x1108 + m.x1120 - m.x1144 + m.x1192 + m.x1204 - m.x1228 <= 100) m.c3663 = Constraint(expr= m.x605 + m.x617 - m.x641 + m.x689 + m.x701 - m.x725 + m.x773 + m.x785 - m.x809 + m.x857 + m.x869 - m.x893 + m.x941 + m.x953 - m.x977 + m.x1025 + m.x1037 - m.x1061 + m.x1109 + m.x1121 - m.x1145 + m.x1193 + m.x1205 - m.x1229 <= 100) m.c3664 = Constraint(expr= m.x606 + m.x618 - m.x642 + m.x690 + m.x702 - m.x726 + m.x774 + m.x786 - m.x810 + m.x858 + m.x870 - m.x894 + m.x942 + m.x954 - m.x978 + m.x1026 + m.x1038 - m.x1062 + m.x1110 + m.x1122 - m.x1146 + m.x1194 + m.x1206 - m.x1230 <= 100) m.c3665 = Constraint(expr= m.x607 + m.x619 - m.x643 + m.x691 + m.x703 - m.x727 + m.x775 + m.x787 - m.x811 + m.x859 + m.x871 - m.x895 + m.x943 + m.x955 - m.x979 + m.x1027 + m.x1039 - m.x1063 + m.x1111 + m.x1123 - m.x1147 + m.x1195 + m.x1207 - m.x1231 <= 100) m.c3666 = Constraint(expr= m.x608 + m.x620 - m.x644 + m.x692 + m.x704 - m.x728 + m.x776 + m.x788 - m.x812 + m.x860 + m.x872 - m.x896 + m.x944 + m.x956 - m.x980 + m.x1028 + m.x1040 - m.x1064 + m.x1112 + m.x1124 - m.x1148 + m.x1196 + m.x1208 - m.x1232 <= 100) m.c3667 = Constraint(expr= m.x609 + m.x621 - m.x645 + m.x693 + m.x705 - m.x729 + m.x777 + m.x789 - m.x813 + m.x861 + m.x873 - m.x897 + m.x945 + m.x957 - m.x981 + m.x1029 + m.x1041 - m.x1065 + m.x1113 + m.x1125 - m.x1149 + m.x1197 + m.x1209 - m.x1233 <= 70) m.c3668 = Constraint(expr= 10*m.b16 + 10*m.b19 - m.x128 - m.x131 + m.x338 + m.x341 <= 10) m.c3669 = Constraint(expr= 10*m.b16 + 10*m.b20 - m.x128 - m.x132 + m.x338 + m.x342 <= 10) m.c3670 = Constraint(expr= 10*m.b17 + 10*m.b21 - m.x129 - m.x133 + m.x339 + m.x343 <= 10) m.c3671 = Constraint(expr= 10*m.b17 + 10*m.b22 - m.x129 - m.x134 + m.x339 + m.x344 <= 10) m.c3672 = Constraint(expr= 10*m.b17 + 10*m.b23 - m.x129 - m.x135 + m.x339 + m.x345 <= 10) m.c3673 = Constraint(expr= 10*m.b18 + 10*m.b24 - m.x130 - m.x136 + m.x340 + m.x346 <= 10) m.c3674 = Constraint(expr= 10*m.b18 + 10*m.b25 - m.x130 - m.x137 + m.x340 + m.x347 <= 10) m.c3675 = Constraint(expr= 10*m.b19 + 10*m.b26 - m.x131 - m.x138 + m.x341 + m.x348 <= 10) m.c3676 = Constraint(expr= 10*m.b21 + 10*m.b26 - m.x133 - m.x138 + m.x343 + m.x348 <= 10) m.c3677 = Constraint(expr= 10*m.b23 + 10*m.b29 - m.x135 - m.x141 + m.x345 + m.x351 <= 10) m.c3678 = Constraint(expr= 10*m.b25 + 10*m.b29 - m.x137 - m.x141 + m.x347 + m.x351 <= 10) m.c3679 = Constraint(expr= 10*m.b26 + 10*m.b27 - m.x138 - m.x139 + m.x348 + m.x349 <= 10) m.c3680 = Constraint(expr= 10*m.b28 + 10*m.b29 - m.x140 - m.x141 + m.x350 + m.x351 <= 10) m.c3681 = Constraint(expr= 10*m.b16 + 10*m.b17 + 10*m.b18 - m.x128 - m.x129 - m.x130 + m.x338 + m.x339 + m.x340 <= 10) m.c3682 = Constraint(expr= 10*m.b20 + 10*m.b27 + 10*m.b28 - m.x132 - m.x139 - m.x140 + m.x342 + m.x349 + m.x350 <= 10) m.c3683 = Constraint(expr= 10*m.b22 + 10*m.b27 + 10*m.b28 - m.x134 - m.x139 - m.x140 + m.x344 + m.x349 + m.x350 <= 10) m.c3684 = Constraint(expr= 10*m.b24 + 10*m.b27 + 10*m.b28 - m.x136 - m.x139 - m.x140 + m.x346 + m.x349 + m.x350 <= 10) m.c3685 = Constraint(expr= 10*m.b30 + 10*m.b33 - m.x142 - m.x145 + m.x240 + m.x243 + m.x338 + m.x341 <= 10) m.c3686 = Constraint(expr= 10*m.b30 + 10*m.b34 - m.x142 - m.x146 + m.x240 + m.x244 + m.x338 + m.x342 <= 10) m.c3687 = Constraint(expr= 10*m.b31 + 10*m.b35 - m.x143 - m.x147 + m.x241 + m.x245 + m.x339 + m.x343 <= 10) m.c3688 = Constraint(expr= 10*m.b31 + 10*m.b36 - m.x143 - m.x148 + m.x241 + m.x246 + m.x339 + m.x344 <= 10) m.c3689 = Constraint(expr= 10*m.b31 + 10*m.b37 - m.x143 - m.x149 + m.x241 + m.x247 + m.x339 + m.x345 <= 10) m.c3690 = Constraint(expr= 10*m.b32 + 10*m.b38 - m.x144 - m.x150 + m.x242 + m.x248 + m.x340 + m.x346 <= 10) m.c3691 = Constraint(expr= 10*m.b32 + 10*m.b39 - m.x144 - m.x151 + m.x242 + m.x249 + m.x340 + m.x347 <= 10) m.c3692 = Constraint(expr= 10*m.b33 + 10*m.b40 - m.x145 - m.x152 + m.x243 + m.x250 + m.x341 + m.x348 <= 10) m.c3693 = Constraint(expr= 10*m.b35 + 10*m.b40 - m.x147 - m.x152 + m.x245 + m.x250 + m.x343 + m.x348 <= 10) m.c3694 = Constraint(expr= 10*m.b37 + 10*m.b43 - m.x149 - m.x155 + m.x247 + m.x253 + m.x345 + m.x351 <= 10) m.c3695 = Constraint(expr= 10*m.b39 + 10*m.b43 - m.x151 - m.x155 + m.x249 + m.x253 + m.x347 + m.x351 <= 10) m.c3696 = Constraint(expr= 10*m.b40 + 10*m.b41 - m.x152 - m.x153 + m.x250 + m.x251 + m.x348 + m.x349 <= 10) m.c3697 = Constraint(expr= 10*m.b42 + 10*m.b43 - m.x154 - m.x155 + m.x252 + m.x253 + m.x350 + m.x351 <= 10) m.c3698 = Constraint(expr= 10*m.b30 + 10*m.b31 + 10*m.b32 - m.x142 - m.x143 - m.x144 + m.x240 + m.x241 + m.x242 + m.x338 + m.x339 + m.x340 <= 10) m.c3699 = Constraint(expr= 10*m.b34 + 10*m.b41 + 10*m.b42 - m.x146 - m.x153 - m.x154 + m.x244 + m.x251 + m.x252 + m.x342 + m.x349 + m.x350 <= 10) m.c3700 = Constraint(expr= 10*m.b36 + 10*m.b41 + 10*m.b42 - m.x148 - m.x153 - m.x154 + m.x246 + m.x251 + m.x252 + m.x344 + m.x349 + m.x350 <= 10) m.c3701 = Constraint(expr= 10*m.b38 + 10*m.b41 + 10*m.b42 - m.x150 - m.x153 - m.x154 + m.x248 + m.x251 + m.x252 + m.x346 + m.x349 + m.x350 <= 10) m.c3702 = Constraint(expr= 10*m.b44 + 10*m.b47 - m.x156 - m.x159 + m.x240 + m.x243 + m.x254 + m.x257 + m.x338 + m.x341 <= 10) m.c3703 = Constraint(expr= 10*m.b44 + 10*m.b48 - m.x156 - m.x160 + m.x240 + m.x244 + m.x254 + m.x258 + m.x338 + m.x342 <= 10) m.c3704 = Constraint(expr= 10*m.b45 + 10*m.b49 - m.x157 - m.x161 + m.x241 + m.x245 + m.x255 + m.x259 + m.x339 + m.x343 <= 10) m.c3705 = Constraint(expr= 10*m.b45 + 10*m.b50 - m.x157 - m.x162 + m.x241 + m.x246 + m.x255 + m.x260 + m.x339 + m.x344 <= 10) m.c3706 = Constraint(expr= 10*m.b45 + 10*m.b51 - m.x157 - m.x163 + m.x241 + m.x247 + m.x255 + m.x261 + m.x339 + m.x345 <= 10) m.c3707 = Constraint(expr= 10*m.b46 + 10*m.b52 - m.x158 - m.x164 + m.x242 + m.x248 + m.x256 + m.x262 + m.x340 + m.x346 <= 10) m.c3708 = Constraint(expr= 10*m.b46 + 10*m.b53 - m.x158 - m.x165 + m.x242 + m.x249 + m.x256 + m.x263 + m.x340 + m.x347 <= 10) m.c3709 = Constraint(expr= 10*m.b47 + 10*m.b54 - m.x159 - m.x166 + m.x243 + m.x250 + m.x257 + m.x264 + m.x341 + m.x348 <= 10) m.c3710 = Constraint(expr= 10*m.b49 + 10*m.b54 - m.x161 - m.x166 + m.x245 + m.x250 + m.x259 + m.x264 + m.x343 + m.x348 <= 10) m.c3711 = Constraint(expr= 10*m.b51 + 10*m.b57 - m.x163 - m.x169 + m.x247 + m.x253 + m.x261 + m.x267 + m.x345 + m.x351 <= 10) m.c3712 = Constraint(expr= 10*m.b53 + 10*m.b57 - m.x165 - m.x169 + m.x249 + m.x253 + m.x263 + m.x267 + m.x347 + m.x351 <= 10) m.c3713 = Constraint(expr= 10*m.b54 + 10*m.b55 - m.x166 - m.x167 + m.x250 + m.x251 + m.x264 + m.x265 + m.x348 + m.x349 <= 10) m.c3714 = Constraint(expr= 10*m.b56 + 10*m.b57 - m.x168 - m.x169 + m.x252 + m.x253 + m.x266 + m.x267 + m.x350 + m.x351 <= 10) m.c3715 = Constraint(expr= 10*m.b44 + 10*m.b45 + 10*m.b46 - m.x156 - m.x157 - m.x158 + m.x240 + m.x241 + m.x242 + m.x254 + m.x255 + m.x256 + m.x338 + m.x339 + m.x340 <= 10) m.c3716 = Constraint(expr= 10*m.b48 + 10*m.b55 + 10*m.b56 - m.x160 - m.x167 - m.x168 + m.x244 + m.x251 + m.x252 + m.x258 + m.x265 + m.x266 + m.x342 + m.x349 + m.x350 <= 10) m.c3717 = Constraint(expr= 10*m.b50 + 10*m.b55 + 10*m.b56 - m.x162 - m.x167 - m.x168 + m.x246 + m.x251 + m.x252 + m.x260 + m.x265 + m.x266 + m.x344 + m.x349 + m.x350 <= 10) m.c3718 = Constraint(expr= 10*m.b52 + 10*m.b55 + 10*m.b56 - m.x164 - m.x167 - m.x168 + m.x248 + m.x251 + m.x252 + m.x262 + m.x265 + m.x266 + m.x346 + m.x349 + m.x350 <= 10) m.c3719 = Constraint(expr= 10*m.b58 + 10*m.b61 - m.x170 - m.x173 + m.x240 + m.x243 + m.x254 + m.x257 + m.x268 + m.x271 + m.x338 + m.x341 <= 10) m.c3720 = Constraint(expr= 10*m.b58 + 10*m.b62 - m.x170 - m.x174 + m.x240 + m.x244 + m.x254 + m.x258 + m.x268 + m.x272 + m.x338 + m.x342 <= 10) m.c3721 = Constraint(expr= 10*m.b59 + 10*m.b63 - m.x171 - m.x175 + m.x241 + m.x245 + m.x255 + m.x259 + m.x269 + m.x273 + m.x339 + m.x343 <= 10) m.c3722 = Constraint(expr= 10*m.b59 + 10*m.b64 - m.x171 - m.x176 + m.x241 + m.x246 + m.x255 + m.x260 + m.x269 + m.x274 + m.x339 + m.x344 <= 10) m.c3723 = Constraint(expr= 10*m.b59 + 10*m.b65 - m.x171 - m.x177 + m.x241 + m.x247 + m.x255 + m.x261 + m.x269 + m.x275 + m.x339 + m.x345 <= 10) m.c3724 = Constraint(expr= 10*m.b60 + 10*m.b66 - m.x172 - m.x178 + m.x242 + m.x248 + m.x256 + m.x262 + m.x270 + m.x276 + m.x340 + m.x346 <= 10) m.c3725 = Constraint(expr= 10*m.b60 + 10*m.b67 - m.x172 - m.x179 + m.x242 + m.x249 + m.x256 + m.x263 + m.x270 + m.x277 + m.x340 + m.x347 <= 10) m.c3726 = Constraint(expr= 10*m.b61 + 10*m.b68 - m.x173 - m.x180 + m.x243 + m.x250 + m.x257 + m.x264 + m.x271 + m.x278 + m.x341 + m.x348 <= 10) m.c3727 = Constraint(expr= 10*m.b63 + 10*m.b68 - m.x175 - m.x180 + m.x245 + m.x250 + m.x259 + m.x264 + m.x273 + m.x278 + m.x343 + m.x348 <= 10) m.c3728 = Constraint(expr= 10*m.b65 + 10*m.b71 - m.x177 - m.x183 + m.x247 + m.x253 + m.x261 + m.x267 + m.x275 + m.x281 + m.x345 + m.x351 <= 10) m.c3729 = Constraint(expr= 10*m.b67 + 10*m.b71 - m.x179 - m.x183 + m.x249 + m.x253 + m.x263 + m.x267 + m.x277 + m.x281 + m.x347 + m.x351 <= 10) m.c3730 = Constraint(expr= 10*m.b68 + 10*m.b69 - m.x180 - m.x181 + m.x250 + m.x251 + m.x264 + m.x265 + m.x278 + m.x279 + m.x348 + m.x349 <= 10) m.c3731 = Constraint(expr= 10*m.b70 + 10*m.b71 - m.x182 - m.x183 + m.x252 + m.x253 + m.x266 + m.x267 + m.x280 + m.x281 + m.x350 + m.x351 <= 10) m.c3732 = Constraint(expr= 10*m.b58 + 10*m.b59 + 10*m.b60 - m.x170 - m.x171 - m.x172 + m.x240 + m.x241 + m.x242 + m.x254 + m.x255 + m.x256 + m.x268 + m.x269 + m.x270 + m.x338 + m.x339 + m.x340 <= 10) m.c3733 = Constraint(expr= 10*m.b62 + 10*m.b69 + 10*m.b70 - m.x174 - m.x181 - m.x182 + m.x244 + m.x251 + m.x252 + m.x258 + m.x265 + m.x266 + m.x272 + m.x279 + m.x280 + m.x342 + m.x349 + m.x350 <= 10) m.c3734 = Constraint(expr= 10*m.b64 + 10*m.b69 + 10*m.b70 - m.x176 - m.x181 - m.x182 + m.x246 + m.x251 + m.x252 + m.x260 + m.x265 + m.x266 + m.x274 + m.x279 + m.x280 + m.x344 + m.x349 + m.x350 <= 10) m.c3735 = Constraint(expr= 10*m.b66 + 10*m.b69 + 10*m.b70 - m.x178 - m.x181 - m.x182 + m.x248 + m.x251 + m.x252 + m.x262 + m.x265 + m.x266 + m.x276 + m.x279 + m.x280 + m.x346 + m.x349 + m.x350 <= 10) m.c3736 = Constraint(expr= 10*m.b72 + 10*m.b75 - m.x184 - m.x187 + m.x240 + m.x243 + m.x254 + m.x257 + m.x268 + m.x271 + m.x282 + m.x285 + m.x338 + m.x341 <= 10) m.c3737 = Constraint(expr= 10*m.b72 + 10*m.b76 - m.x184 - m.x188 + m.x240 + m.x244 + m.x254 + m.x258 + m.x268 + m.x272 + m.x282 + m.x286 + m.x338 + m.x342 <= 10) m.c3738 = Constraint(expr= 10*m.b73 + 10*m.b77 - m.x185 - m.x189 + m.x241 + m.x245 + m.x255 + m.x259 + m.x269 + m.x273 + m.x283 + m.x287 + m.x339 + m.x343 <= 10) m.c3739 = Constraint(expr= 10*m.b73 + 10*m.b78 - m.x185 - m.x190 + m.x241 + m.x246 + m.x255 + m.x260 + m.x269 + m.x274 + m.x283 + m.x288 + m.x339 + m.x344 <= 10) m.c3740 = Constraint(expr= 10*m.b73 + 10*m.b79 - m.x185 - m.x191 + m.x241 + m.x247 + m.x255 + m.x261 + m.x269 + m.x275 + m.x283 + m.x289 + m.x339 + m.x345 <= 10) m.c3741 = Constraint(expr= 10*m.b74 + 10*m.b80 - m.x186 - m.x192 + m.x242 + m.x248 + m.x256 + m.x262 + m.x270 + m.x276 + m.x284 + m.x290 + m.x340 + m.x346 <= 10) m.c3742 = Constraint(expr= 10*m.b74 + 10*m.b81 - m.x186 - m.x193 + m.x242 + m.x249 + m.x256 + m.x263 + m.x270 + m.x277 + m.x284 + m.x291 + m.x340 + m.x347 <= 10) m.c3743 = Constraint(expr= 10*m.b75 + 10*m.b82 - m.x187 - m.x194 + m.x243 + m.x250 + m.x257 + m.x264 + m.x271 + m.x278 + m.x285 + m.x292 + m.x341 + m.x348 <= 10) m.c3744 = Constraint(expr= 10*m.b77 + 10*m.b82 - m.x189 - m.x194 + m.x245 + m.x250 + m.x259 + m.x264 + m.x273 + m.x278 + m.x287 + m.x292 + m.x343 + m.x348 <= 10) m.c3745 = Constraint(expr= 10*m.b79 + 10*m.b85 - m.x191 - m.x197 + m.x247 + m.x253 + m.x261 + m.x267 + m.x275 + m.x281 + m.x289 + m.x295 + m.x345 + m.x351 <= 10) m.c3746 = Constraint(expr= 10*m.b81 + 10*m.b85 - m.x193 - m.x197 + m.x249 + m.x253 + m.x263 + m.x267 + m.x277 + m.x281 + m.x291 + m.x295 + m.x347 + m.x351 <= 10) m.c3747 = Constraint(expr= 10*m.b82 + 10*m.b83 - m.x194 - m.x195 + m.x250 + m.x251 + m.x264 + m.x265 + m.x278 + m.x279 + m.x292 + m.x293 + m.x348 + m.x349 <= 10) m.c3748 = Constraint(expr= 10*m.b84 + 10*m.b85 - m.x196 - m.x197 + m.x252 + m.x253 + m.x266 + m.x267 + m.x280 + m.x281 + m.x294 + m.x295 + m.x350 + m.x351 <= 10) m.c3749 = Constraint(expr= 10*m.b72 + 10*m.b73 + 10*m.b74 - m.x184 - m.x185 - m.x186 + m.x240 + m.x241 + m.x242 + m.x254 + m.x255 + m.x256 + m.x268 + m.x269 + m.x270 + m.x282 + m.x283 + m.x284 + m.x338 + m.x339 + m.x340 <= 10) m.c3750 = Constraint(expr= 10*m.b76 + 10*m.b83 + 10*m.b84 - m.x188 - m.x195 - m.x196 + m.x244 + m.x251 + m.x252 + m.x258 + m.x265 + m.x266 + m.x272 + m.x279 + m.x280 + m.x286 + m.x293 + m.x294 + m.x342 + m.x349 + m.x350 <= 10) m.c3751 = Constraint(expr= 10*m.b78 + 10*m.b83 + 10*m.b84 - m.x190 - m.x195 - m.x196 + m.x246 + m.x251 + m.x252 + m.x260 + m.x265 + m.x266 + m.x274 + m.x279 + m.x280 + m.x288 + m.x293 + m.x294 + m.x344 + m.x349 + m.x350 <= 10) m.c3752 = Constraint(expr= 10*m.b80 + 10*m.b83 + 10*m.b84 - m.x192 - m.x195 - m.x196 + m.x248 + m.x251 + m.x252 + m.x262 + m.x265 + m.x266 + m.x276 + m.x279 + m.x280 + m.x290 + m.x293 + m.x294 + m.x346 + m.x349 + m.x350 <= 10) m.c3753 = Constraint(expr= 10*m.b86 + 10*m.b89 - m.x198 - m.x201 + m.x240 + m.x243 + m.x254 + m.x257 + m.x268 + m.x271 + m.x282 + m.x285 + m.x296 + m.x299 + m.x338 + m.x341 <= 10) m.c3754 = Constraint(expr= 10*m.b86 + 10*m.b90 - m.x198 - m.x202 + m.x240 + m.x244 + m.x254 + m.x258 + m.x268 + m.x272 + m.x282 + m.x286 + m.x296 + m.x300 + m.x338 + m.x342 <= 10) m.c3755 = Constraint(expr= 10*m.b87 + 10*m.b91 - m.x199 - m.x203 + m.x241 + m.x245 + m.x255 + m.x259 + m.x269 + m.x273 + m.x283 + m.x287 + m.x297 + m.x301 + m.x339 + m.x343 <= 10) m.c3756 = Constraint(expr= 10*m.b87 + 10*m.b92 - m.x199 - m.x204 + m.x241 + m.x246 + m.x255 + m.x260 + m.x269 + m.x274 + m.x283 + m.x288 + m.x297 + m.x302 + m.x339 + m.x344 <= 10) m.c3757 = Constraint(expr= 10*m.b87 + 10*m.b93 - m.x199 - m.x205 + m.x241 + m.x247 + m.x255 + m.x261 + m.x269 + m.x275 + m.x283 + m.x289 + m.x297 + m.x303 + m.x339 + m.x345 <= 10) m.c3758 = Constraint(expr= 10*m.b88 + 10*m.b94 - m.x200 - m.x206 + m.x242 + m.x248 + m.x256 + m.x262 + m.x270 + m.x276 + m.x284 + m.x290 + m.x298 + m.x304 + m.x340 + m.x346 <= 10) m.c3759 = Constraint(expr= 10*m.b88 + 10*m.b95 - m.x200 - m.x207 + m.x242 + m.x249 + m.x256 + m.x263 + m.x270 + m.x277 + m.x284 + m.x291 + m.x298 + m.x305 + m.x340 + m.x347 <= 10) m.c3760 = Constraint(expr= 10*m.b89 + 10*m.b96 - m.x201 - m.x208 + m.x243 + m.x250 + m.x257 + m.x264 + m.x271 + m.x278 + m.x285 + m.x292 + m.x299 + m.x306 + m.x341 + m.x348 <= 10) m.c3761 = Constraint(expr= 10*m.b91 + 10*m.b96 - m.x203 - m.x208 + m.x245 + m.x250 + m.x259 + m.x264 + m.x273 + m.x278 + m.x287 + m.x292 + m.x301 + m.x306 + m.x343 + m.x348 <= 10) m.c3762 = Constraint(expr= 10*m.b93 + 10*m.b99 - m.x205 - m.x211 + m.x247 + m.x253 + m.x261 + m.x267 + m.x275 + m.x281 + m.x289 + m.x295 + m.x303 + m.x309 + m.x345 + m.x351 <= 10) m.c3763 = Constraint(expr= 10*m.b95 + 10*m.b99 - m.x207 - m.x211 + m.x249 + m.x253 + m.x263 + m.x267 + m.x277 + m.x281 + m.x291 + m.x295 + m.x305 + m.x309 + m.x347 + m.x351 <= 10) m.c3764 = Constraint(expr= 10*m.b96 + 10*m.b97 - m.x208 - m.x209 + m.x250 + m.x251 + m.x264 + m.x265 + m.x278 + m.x279 + m.x292 + m.x293 + m.x306 + m.x307 + m.x348 + m.x349 <= 10) m.c3765 = Constraint(expr= 10*m.b98 + 10*m.b99 - m.x210 - m.x211 + m.x252 + m.x253 + m.x266 + m.x267 + m.x280 + m.x281 + m.x294 + m.x295 + m.x308 + m.x309 + m.x350 + m.x351 <= 10) m.c3766 = Constraint(expr= 10*m.b86 + 10*m.b87 + 10*m.b88 - m.x198 - m.x199 - m.x200 + m.x240 + m.x241 + m.x242 + m.x254 + m.x255 + m.x256 + m.x268 + m.x269 + m.x270 + m.x282 + m.x283 + m.x284 + m.x296 + m.x297 + m.x298 + m.x338 + m.x339 + m.x340 <= 10) m.c3767 = Constraint(expr= 10*m.b90 + 10*m.b97 + 10*m.b98 - m.x202 - m.x209 - m.x210 + m.x244 + m.x251 + m.x252 + m.x258 + m.x265 + m.x266 + m.x272 + m.x279 + m.x280 + m.x286 + m.x293 + m.x294 + m.x300 + m.x307 + m.x308 + m.x342 + m.x349 + m.x350 <= 10) m.c3768 = Constraint(expr= 10*m.b92 + 10*m.b97 + 10*m.b98 - m.x204 - m.x209 - m.x210 + m.x246 + m.x251 + m.x252 + m.x260 + m.x265 + m.x266 + m.x274 + m.x279 + m.x280 + m.x288 + m.x293 + m.x294 + m.x302 + m.x307 + m.x308 + m.x344 + m.x349 + m.x350 <= 10) m.c3769 = Constraint(expr= 10*m.b94 + 10*m.b97 + 10*m.b98 - m.x206 - m.x209 - m.x210 + m.x248 + m.x251 + m.x252 + m.x262 + m.x265 + m.x266 + m.x276 + m.x279 + m.x280 + m.x290 + m.x293 + m.x294 + m.x304 + m.x307 + m.x308 + m.x346 + m.x349 + m.x350 <= 10) m.c3770 = Constraint(expr= 10*m.b100 + 10*m.b103 - m.x212 - m.x215 + m.x240 + m.x243 + m.x254 + m.x257 + m.x268 + m.x271 + m.x282 + m.x285 + m.x296 + m.x299 + m.x310 + m.x313 + m.x338 + m.x341 <= 10) m.c3771 = Constraint(expr= 10*m.b100 + 10*m.b104 - m.x212 - m.x216 + m.x240 + m.x244 + m.x254 + m.x258 + m.x268 + m.x272 + m.x282 + m.x286 + m.x296 + m.x300 + m.x310 + m.x314 + m.x338 + m.x342 <= 10) m.c3772 = Constraint(expr= 10*m.b101 + 10*m.b105 - m.x213 - m.x217 + m.x241 + m.x245 + m.x255 + m.x259 + m.x269 + m.x273 + m.x283 + m.x287 + m.x297 + m.x301 + m.x311 + m.x315 + m.x339 + m.x343 <= 10) m.c3773 = Constraint(expr= 10*m.b101 + 10*m.b106 - m.x213 - m.x218 + m.x241 + m.x246 + m.x255 + m.x260 + m.x269 + m.x274 + m.x283 + m.x288 + m.x297 + m.x302 + m.x311 + m.x316 + m.x339 + m.x344 <= 10) m.c3774 = Constraint(expr= 10*m.b101 + 10*m.b107 - m.x213 - m.x219 + m.x241 + m.x247 + m.x255 + m.x261 + m.x269 + m.x275 + m.x283 + m.x289 + m.x297 + m.x303 + m.x311 + m.x317 + m.x339 + m.x345 <= 10) m.c3775 = Constraint(expr= 10*m.b102 + 10*m.b108 - m.x214 - m.x220 + m.x242 + m.x248 + m.x256 + m.x262 + m.x270 + m.x276 + m.x284 + m.x290 + m.x298 + m.x304 + m.x312 + m.x318 + m.x340 + m.x346 <= 10) m.c3776 = Constraint(expr= 10*m.b102 + 10*m.b109 - m.x214 - m.x221 + m.x242 + m.x249 + m.x256 + m.x263 + m.x270 + m.x277 + m.x284 + m.x291 + m.x298 + m.x305 + m.x312 + m.x319 + m.x340 + m.x347 <= 10) m.c3777 = Constraint(expr= 10*m.b103 + 10*m.b110 - m.x215 - m.x222 + m.x243 + m.x250 + m.x257 + m.x264 + m.x271 + m.x278 + m.x285 + m.x292 + m.x299 + m.x306 + m.x313 + m.x320 + m.x341 + m.x348 <= 10) m.c3778 = Constraint(expr= 10*m.b105 + 10*m.b110 - m.x217 - m.x222 + m.x245 + m.x250 + m.x259 + m.x264 + m.x273 + m.x278 + m.x287 + m.x292 + m.x301 + m.x306 + m.x315 + m.x320 + m.x343 + m.x348 <= 10) m.c3779 = Constraint(expr= 10*m.b107 + 10*m.b113 - m.x219 - m.x225 + m.x247 + m.x253 + m.x261 + m.x267 + m.x275 + m.x281 + m.x289 + m.x295 + m.x303 + m.x309 + m.x317 + m.x323 + m.x345 + m.x351 <= 10) m.c3780 = Constraint(expr= 10*m.b109 + 10*m.b113 - m.x221 - m.x225 + m.x249 + m.x253 + m.x263 + m.x267 + m.x277 + m.x281 + m.x291 + m.x295 + m.x305 + m.x309 + m.x319 + m.x323 + m.x347 + m.x351 <= 10) m.c3781 = Constraint(expr= 10*m.b110 + 10*m.b111 - m.x222 - m.x223 + m.x250 + m.x251 + m.x264 + m.x265 + m.x278 + m.x279 + m.x292 + m.x293 + m.x306 + m.x307 + m.x320 + m.x321 + m.x348 + m.x349 <= 10) m.c3782 = Constraint(expr= 10*m.b112 + 10*m.b113 - m.x224 - m.x225 + m.x252 + m.x253 + m.x266 + m.x267 + m.x280 + m.x281 + m.x294 + m.x295 + m.x308 + m.x309 + m.x322 + m.x323 + m.x350 + m.x351 <= 10) m.c3783 = Constraint(expr= 10*m.b100 + 10*m.b101 + 10*m.b102 - m.x212 - m.x213 - m.x214 + m.x240 + m.x241 + m.x242 + m.x254 + m.x255 + m.x256 + m.x268 + m.x269 + m.x270 + m.x282 + m.x283 + m.x284 + m.x296 + m.x297 + m.x298 + m.x310 + m.x311 + m.x312 + m.x338 + m.x339 + m.x340 <= 10) m.c3784 = Constraint(expr= 10*m.b104 + 10*m.b111 + 10*m.b112 - m.x216 - m.x223 - m.x224 + m.x244 + m.x251 + m.x252 + m.x258 + m.x265 + m.x266 + m.x272 + m.x279 + m.x280 + m.x286 + m.x293 + m.x294 + m.x300 + m.x307 + m.x308 + m.x314 + m.x321 + m.x322 + m.x342 + m.x349 + m.x350 <= 10) m.c3785 = Constraint(expr= 10*m.b106 + 10*m.b111 + 10*m.b112 - m.x218 - m.x223 - m.x224 + m.x246 + m.x251 + m.x252 + m.x260 + m.x265 + m.x266 + m.x274 + m.x279 + m.x280 + m.x288 + m.x293 + m.x294 + m.x302 + m.x307 + m.x308 + m.x316 + m.x321 + m.x322 + m.x344 + m.x349 + m.x350 <= 10) m.c3786 = Constraint(expr= 10*m.b108 + 10*m.b111 + 10*m.b112 - m.x220 - m.x223 - m.x224 + m.x248 + m.x251 + m.x252 + m.x262 + m.x265 + m.x266 + m.x276 + m.x279 + m.x280 + m.x290 + m.x293 + m.x294 + m.x304 + m.x307 + m.x308 + m.x318 + m.x321 + m.x322 + m.x346 + m.x349 + m.x350 <= 10) m.c3787 = Constraint(expr= 10*m.b30 + 10*m.b33 - m.x142 - m.x145 + m.x352 + m.x355 <= 10) m.c3788 = Constraint(expr= 10*m.b30 + 10*m.b34 - m.x142 - m.x146 + m.x352 + m.x356 <= 10) m.c3789 = Constraint(expr= 10*m.b31 + 10*m.b35 - m.x143 - m.x147 + m.x353 + m.x357 <= 10) m.c3790 = Constraint(expr= 10*m.b31 + 10*m.b36 - m.x143 - m.x148 + m.x353 + m.x358 <= 10) m.c3791 = Constraint(expr= 10*m.b31 + 10*m.b37 - m.x143 - m.x149 + m.x353 + m.x359 <= 10) m.c3792 = Constraint(expr= 10*m.b32 + 10*m.b38 - m.x144 - m.x150 + m.x354 + m.x360 <= 10) m.c3793 = Constraint(expr= 10*m.b32 + 10*m.b39 - m.x144 - m.x151 + m.x354 + m.x361 <= 10) m.c3794 = Constraint(expr= 10*m.b33 + 10*m.b40 - m.x145 - m.x152 + m.x355 + m.x362 <= 10) m.c3795 = Constraint(expr= 10*m.b35 + 10*m.b40 - m.x147 - m.x152 + m.x357 + m.x362 <= 10) m.c3796 = Constraint(expr= 10*m.b37 + 10*m.b43 - m.x149 - m.x155 + m.x359 + m.x365 <= 10) m.c3797 = Constraint(expr= 10*m.b39 + 10*m.b43 - m.x151 - m.x155 + m.x361 + m.x365 <= 10) m.c3798 = Constraint(expr= 10*m.b40 + 10*m.b41 - m.x152 - m.x153 + m.x362 + m.x363 <= 10) m.c3799 = Constraint(expr= 10*m.b42 + 10*m.b43 - m.x154 - m.x155 + m.x364 + m.x365 <= 10) m.c3800 = Constraint(expr= 10*m.b30 + 10*m.b31 + 10*m.b32 - m.x142 - m.x143 - m.x144 + m.x352 + m.x353 + m.x354 <= 10) m.c3801 = Constraint(expr= 10*m.b34 + 10*m.b41 + 10*m.b42 - m.x146 - m.x153 - m.x154 + m.x356 + m.x363 + m.x364 <= 10) m.c3802 = Constraint(expr= 10*m.b36 + 10*m.b41 + 10*m.b42 - m.x148 - m.x153 - m.x154 + m.x358 + m.x363 + m.x364 <= 10) m.c3803 = Constraint(expr= 10*m.b38 + 10*m.b41 + 10*m.b42 - m.x150 - m.x153 - m.x154 + m.x360 + m.x363 + m.x364 <= 10) m.c3804 = Constraint(expr= 10*m.b44 + 10*m.b47 - m.x156 - m.x159 + m.x254 + m.x257 + m.x352 + m.x355 <= 10) m.c3805 = Constraint(expr= 10*m.b44 + 10*m.b48 - m.x156 - m.x160 + m.x254 + m.x258 + m.x352 + m.x356 <= 10) m.c3806 = Constraint(expr= 10*m.b45 + 10*m.b49 - m.x157 - m.x161 + m.x255 + m.x259 + m.x353 + m.x357 <= 10) m.c3807 = Constraint(expr= 10*m.b45 + 10*m.b50 - m.x157 - m.x162 + m.x255 + m.x260 + m.x353 + m.x358 <= 10) m.c3808 = Constraint(expr= 10*m.b45 + 10*m.b51 - m.x157 - m.x163 + m.x255 + m.x261 + m.x353 + m.x359 <= 10) m.c3809 = Constraint(expr= 10*m.b46 + 10*m.b52 - m.x158 - m.x164 + m.x256 + m.x262 + m.x354 + m.x360 <= 10) m.c3810 = Constraint(expr= 10*m.b46 + 10*m.b53 - m.x158 - m.x165 + m.x256 + m.x263 + m.x354 + m.x361 <= 10) m.c3811 = Constraint(expr= 10*m.b47 + 10*m.b54 - m.x159 - m.x166 + m.x257 + m.x264 + m.x355 + m.x362 <= 10) m.c3812 = Constraint(expr= 10*m.b49 + 10*m.b54 - m.x161 - m.x166 + m.x259 + m.x264 + m.x357 + m.x362 <= 10) m.c3813 = Constraint(expr= 10*m.b51 + 10*m.b57 - m.x163 - m.x169 + m.x261 + m.x267 + m.x359 + m.x365 <= 10) m.c3814 = Constraint(expr= 10*m.b53 + 10*m.b57 - m.x165 - m.x169 + m.x263 + m.x267 + m.x361 + m.x365 <= 10) m.c3815 = Constraint(expr= 10*m.b54 + 10*m.b55 - m.x166 - m.x167 + m.x264 + m.x265 + m.x362 + m.x363 <= 10) m.c3816 = Constraint(expr= 10*m.b56 + 10*m.b57 - m.x168 - m.x169 + m.x266 + m.x267 + m.x364 + m.x365 <= 10) m.c3817 = Constraint(expr= 10*m.b44 + 10*m.b45 + 10*m.b46 - m.x156 - m.x157 - m.x158 + m.x254 + m.x255 + m.x256 + m.x352 + m.x353 + m.x354 <= 10) m.c3818 = Constraint(expr= 10*m.b48 + 10*m.b55 + 10*m.b56 - m.x160 - m.x167 - m.x168 + m.x258 + m.x265 + m.x266 + m.x356 + m.x363 + m.x364 <= 10) m.c3819 = Constraint(expr= 10*m.b50 + 10*m.b55 + 10*m.b56 - m.x162 - m.x167 - m.x168 + m.x260 + m.x265 + m.x266 + m.x358 + m.x363 + m.x364 <= 10) m.c3820 = Constraint(expr= 10*m.b52 + 10*m.b55 + 10*m.b56 - m.x164 - m.x167 - m.x168 + m.x262 + m.x265 + m.x266 + m.x360 + m.x363 + m.x364 <= 10) m.c3821 = Constraint(expr= 10*m.b58 + 10*m.b61 - m.x170 - m.x173 + m.x254 + m.x257 + m.x268 + m.x271 + m.x352 + m.x355 <= 10) m.c3822 = Constraint(expr= 10*m.b58 + 10*m.b62 - m.x170 - m.x174 + m.x254 + m.x258 + m.x268 + m.x272 + m.x352 + m.x356 <= 10) m.c3823 = Constraint(expr= 10*m.b59 + 10*m.b63 - m.x171 - m.x175 + m.x255 + m.x259 + m.x269 + m.x273 + m.x353 + m.x357 <= 10) m.c3824 = Constraint(expr= 10*m.b59 + 10*m.b64 - m.x171 - m.x176 + m.x255 + m.x260 + m.x269 + m.x274 + m.x353 + m.x358 <= 10) m.c3825 = Constraint(expr= 10*m.b59 + 10*m.b65 - m.x171 - m.x177 + m.x255 + m.x261 + m.x269 + m.x275 + m.x353 + m.x359 <= 10) m.c3826 = Constraint(expr= 10*m.b60 + 10*m.b66 - m.x172 - m.x178 + m.x256 + m.x262 + m.x270 + m.x276 + m.x354 + m.x360 <= 10) m.c3827 = Constraint(expr= 10*m.b60 + 10*m.b67 - m.x172 - m.x179 + m.x256 + m.x263 + m.x270 + m.x277 + m.x354 + m.x361 <= 10) m.c3828 = Constraint(expr= 10*m.b61 + 10*m.b68 - m.x173 - m.x180 + m.x257 + m.x264 + m.x271 + m.x278 + m.x355 + m.x362 <= 10) m.c3829 = Constraint(expr= 10*m.b63 + 10*m.b68 - m.x175 - m.x180 + m.x259 + m.x264 + m.x273 + m.x278 + m.x357 + m.x362 <= 10) m.c3830 = Constraint(expr= 10*m.b65 + 10*m.b71 - m.x177 - m.x183 + m.x261 + m.x267 + m.x275 + m.x281 + m.x359 + m.x365 <= 10) m.c3831 = Constraint(expr= 10*m.b67 + 10*m.b71 - m.x179 - m.x183 + m.x263 + m.x267 + m.x277 + m.x281 + m.x361 + m.x365 <= 10) m.c3832 = Constraint(expr= 10*m.b68 + 10*m.b69 - m.x180 - m.x181 + m.x264 + m.x265 + m.x278 + m.x279 + m.x362 + m.x363 <= 10) m.c3833 = Constraint(expr= 10*m.b70 + 10*m.b71 - m.x182 - m.x183 + m.x266 + m.x267 + m.x280 + m.x281 + m.x364 + m.x365 <= 10) m.c3834 = Constraint(expr= 10*m.b58 + 10*m.b59 + 10*m.b60 - m.x170 - m.x171 - m.x172 + m.x254 + m.x255 + m.x256 + m.x268 + m.x269 + m.x270 + m.x352 + m.x353 + m.x354 <= 10) m.c3835 = Constraint(expr= 10*m.b62 + 10*m.b69 + 10*m.b70 - m.x174 - m.x181 - m.x182 + m.x258 + m.x265 + m.x266 + m.x272 + m.x279 + m.x280 + m.x356 + m.x363 + m.x364 <= 10) m.c3836 = Constraint(expr= 10*m.b64 + 10*m.b69 + 10*m.b70 - m.x176 - m.x181 - m.x182 + m.x260 + m.x265 + m.x266 + m.x274 + m.x279 + m.x280 + m.x358 + m.x363 + m.x364 <= 10) m.c3837 = Constraint(expr= 10*m.b66 + 10*m.b69 + 10*m.b70 - m.x178 - m.x181 - m.x182 + m.x262 + m.x265 + m.x266 + m.x276 + m.x279 + m.x280 + m.x360 + m.x363 + m.x364 <= 10) m.c3838 = Constraint(expr= 10*m.b72 + 10*m.b75 - m.x184 - m.x187 + m.x254 + m.x257 + m.x268 + m.x271 + m.x282 + m.x285 + m.x352 + m.x355 <= 10) m.c3839 = Constraint(expr= 10*m.b72 + 10*m.b76 - m.x184 - m.x188 + m.x254 + m.x258 + m.x268 + m.x272 + m.x282 + m.x286 + m.x352 + m.x356 <= 10) m.c3840 = Constraint(expr= 10*m.b73 + 10*m.b77 - m.x185 - m.x189 + m.x255 + m.x259 + m.x269 + m.x273 + m.x283 + m.x287 + m.x353 + m.x357 <= 10) m.c3841 = Constraint(expr= 10*m.b73 + 10*m.b78 - m.x185 - m.x190 + m.x255 + m.x260 + m.x269 + m.x274 + m.x283 + m.x288 + m.x353 + m.x358 <= 10) m.c3842 = Constraint(expr= 10*m.b73 + 10*m.b79 - m.x185 - m.x191 + m.x255 + m.x261 + m.x269 + m.x275 + m.x283 + m.x289 + m.x353 + m.x359 <= 10) m.c3843 = Constraint(expr= 10*m.b74 + 10*m.b80 - m.x186 - m.x192 + m.x256 + m.x262 + m.x270 + m.x276 + m.x284 + m.x290 + m.x354 + m.x360 <= 10) m.c3844 = Constraint(expr= 10*m.b74 + 10*m.b81 - m.x186 - m.x193 + m.x256 + m.x263 + m.x270 + m.x277 + m.x284 + m.x291 + m.x354 + m.x361 <= 10) m.c3845 = Constraint(expr= 10*m.b75 + 10*m.b82 - m.x187 - m.x194 + m.x257 + m.x264 + m.x271 + m.x278 + m.x285 + m.x292 + m.x355 + m.x362 <= 10) m.c3846 = Constraint(expr= 10*m.b77 + 10*m.b82 - m.x189 - m.x194 + m.x259 + m.x264 + m.x273 + m.x278 + m.x287 + m.x292 + m.x357 + m.x362 <= 10) m.c3847 = Constraint(expr= 10*m.b79 + 10*m.b85 - m.x191 - m.x197 + m.x261 + m.x267 + m.x275 + m.x281 + m.x289 + m.x295 + m.x359 + m.x365 <= 10) m.c3848 = Constraint(expr= 10*m.b81 + 10*m.b85 - m.x193 - m.x197 + m.x263 + m.x267 + m.x277 + m.x281 + m.x291 + m.x295 + m.x361 + m.x365 <= 10) m.c3849 = Constraint(expr= 10*m.b82 + 10*m.b83 - m.x194 - m.x195 + m.x264 + m.x265 + m.x278 + m.x279 + m.x292 + m.x293 + m.x362 + m.x363 <= 10) m.c3850 = Constraint(expr= 10*m.b84 + 10*m.b85 - m.x196 - m.x197 + m.x266 + m.x267 + m.x280 + m.x281 + m.x294 + m.x295 + m.x364 + m.x365 <= 10) m.c3851 = Constraint(expr= 10*m.b72 + 10*m.b73 + 10*m.b74 - m.x184 - m.x185 - m.x186 + m.x254 + m.x255 + m.x256 + m.x268 + m.x269 + m.x270 + m.x282 + m.x283 + m.x284 + m.x352 + m.x353 + m.x354 <= 10) m.c3852 = Constraint(expr= 10*m.b76 + 10*m.b83 + 10*m.b84 - m.x188 - m.x195 - m.x196 + m.x258 + m.x265 + m.x266 + m.x272 + m.x279 + m.x280 + m.x286 + m.x293 + m.x294 + m.x356 + m.x363 + m.x364 <= 10) m.c3853 = Constraint(expr= 10*m.b78 + 10*m.b83 + 10*m.b84 - m.x190 - m.x195 - m.x196 + m.x260 + m.x265 + m.x266 + m.x274 + m.x279 + m.x280 + m.x288 + m.x293 + m.x294 + m.x358 + m.x363 + m.x364 <= 10) m.c3854 = Constraint(expr= 10*m.b80 + 10*m.b83 + 10*m.b84 - m.x192 - m.x195 - m.x196 + m.x262 + m.x265 + m.x266 + m.x276 + m.x279 + m.x280 + m.x290 + m.x293 + m.x294 + m.x360 + m.x363 + m.x364 <= 10) m.c3855 = Constraint(expr= 10*m.b86 + 10*m.b89 - m.x198 - m.x201 + m.x254 + m.x257 + m.x268 + m.x271 + m.x282 + m.x285 + m.x296 + m.x299 + m.x352 + m.x355 <= 10) m.c3856 = Constraint(expr= 10*m.b86 + 10*m.b90 - m.x198 - m.x202 + m.x254 + m.x258 + m.x268 + m.x272 + m.x282 + m.x286 + m.x296 + m.x300 + m.x352 + m.x356 <= 10) m.c3857 = Constraint(expr= 10*m.b87 + 10*m.b91 - m.x199 - m.x203 + m.x255 + m.x259 + m.x269 + m.x273 + m.x283 + m.x287 + m.x297 + m.x301 + m.x353 + m.x357 <= 10) m.c3858 = Constraint(expr= 10*m.b87 + 10*m.b92 - m.x199 - m.x204 + m.x255 + m.x260 + m.x269 + m.x274 + m.x283 + m.x288 + m.x297 + m.x302 + m.x353 + m.x358 <= 10) m.c3859 = Constraint(expr= 10*m.b87 + 10*m.b93 - m.x199 - m.x205 + m.x255 + m.x261 + m.x269 + m.x275 + m.x283 + m.x289 + m.x297 + m.x303 + m.x353 + m.x359 <= 10) m.c3860 = Constraint(expr= 10*m.b88 + 10*m.b94 - m.x200 - m.x206 + m.x256 + m.x262 + m.x270 + m.x276 + m.x284 + m.x290 + m.x298 + m.x304 + m.x354 + m.x360 <= 10) m.c3861 = Constraint(expr= 10*m.b88 + 10*m.b95 - m.x200 - m.x207 + m.x256 + m.x263 + m.x270 + m.x277 + m.x284 + m.x291 + m.x298 + m.x305 + m.x354 + m.x361 <= 10) m.c3862 = Constraint(expr= 10*m.b89 + 10*m.b96 - m.x201 - m.x208 + m.x257 + m.x264 + m.x271 + m.x278 + m.x285 + m.x292 + m.x299 + m.x306 + m.x355 + m.x362 <= 10) m.c3863 = Constraint(expr= 10*m.b91 + 10*m.b96 - m.x203 - m.x208 + m.x259 + m.x264 + m.x273 + m.x278 + m.x287 + m.x292 + m.x301 + m.x306 + m.x357 + m.x362 <= 10) m.c3864 = Constraint(expr= 10*m.b93 + 10*m.b99 - m.x205 - m.x211 + m.x261 + m.x267 + m.x275 + m.x281 + m.x289 + m.x295 + m.x303 + m.x309 + m.x359 + m.x365 <= 10) m.c3865 = Constraint(expr= 10*m.b95 + 10*m.b99 - m.x207 - m.x211 + m.x263 + m.x267 + m.x277 + m.x281 + m.x291 + m.x295 + m.x305 + m.x309 + m.x361 + m.x365 <= 10) m.c3866 = Constraint(expr= 10*m.b96 + 10*m.b97 - m.x208 - m.x209 + m.x264 + m.x265 + m.x278 + m.x279 + m.x292 + m.x293 + m.x306 + m.x307 + m.x362 + m.x363 <= 10) m.c3867 = Constraint(expr= 10*m.b98 + 10*m.b99 - m.x210 - m.x211 + m.x266 + m.x267 + m.x280 + m.x281 + m.x294 + m.x295 + m.x308 + m.x309 + m.x364 + m.x365 <= 10) m.c3868 = Constraint(expr= 10*m.b86 + 10*m.b87 + 10*m.b88 - m.x198 - m.x199 - m.x200 + m.x254 + m.x255 + m.x256 + m.x268 + m.x269 + m.x270 + m.x282 + m.x283 + m.x284 + m.x296 + m.x297 + m.x298 + m.x352 + m.x353 + m.x354 <= 10) m.c3869 = Constraint(expr= 10*m.b90 + 10*m.b97 + 10*m.b98 - m.x202 - m.x209 - m.x210 + m.x258 + m.x265 + m.x266 + m.x272 + m.x279 + m.x280 + m.x286 + m.x293 + m.x294 + m.x300 + m.x307 + m.x308 + m.x356 + m.x363 + m.x364 <= 10) m.c3870 = Constraint(expr= 10*m.b92 + 10*m.b97 + 10*m.b98 - m.x204 - m.x209 - m.x210 + m.x260 + m.x265 + m.x266 + m.x274 + m.x279 + m.x280 + m.x288 + m.x293 + m.x294 + m.x302 + m.x307 + m.x308 + m.x358 + m.x363 + m.x364 <= 10) m.c3871 = Constraint(expr= 10*m.b94 + 10*m.b97 + 10*m.b98 - m.x206 - m.x209 - m.x210 + m.x262 + m.x265 + m.x266 + m.x276 + m.x279 + m.x280 + m.x290 + m.x293 + m.x294 + m.x304 + m.x307 + m.x308 + m.x360 + m.x363 + m.x364 <= 10) m.c3872 = Constraint(expr= 10*m.b100 + 10*m.b103 - m.x212 - m.x215 + m.x254 + m.x257 + m.x268 + m.x271 + m.x282 + m.x285 + m.x296 + m.x299 + m.x310 + m.x313 + m.x352 + m.x355 <= 10) m.c3873 = Constraint(expr= 10*m.b100 + 10*m.b104 - m.x212 - m.x216 + m.x254 + m.x258 + m.x268 + m.x272 + m.x282 + m.x286 + m.x296 + m.x300 + m.x310 + m.x314 + m.x352 + m.x356 <= 10) m.c3874 = Constraint(expr= 10*m.b101 + 10*m.b105 - m.x213 - m.x217 + m.x255 + m.x259 + m.x269 + m.x273 + m.x283 + m.x287 + m.x297 + m.x301 + m.x311 + m.x315 + m.x353 + m.x357 <= 10) m.c3875 = Constraint(expr= 10*m.b101 + 10*m.b106 - m.x213 - m.x218 + m.x255 + m.x260 + m.x269 + m.x274 + m.x283 + m.x288 + m.x297 + m.x302 + m.x311 + m.x316 + m.x353 + m.x358 <= 10) m.c3876 = Constraint(expr= 10*m.b101 + 10*m.b107 - m.x213 - m.x219 + m.x255 + m.x261 + m.x269 + m.x275 + m.x283 + m.x289 + m.x297 + m.x303 + m.x311 + m.x317 + m.x353 + m.x359 <= 10) m.c3877 = Constraint(expr= 10*m.b102 + 10*m.b108 - m.x214 - m.x220 + m.x256 + m.x262 + m.x270 + m.x276 + m.x284 + m.x290 + m.x298 + m.x304 + m.x312 + m.x318 + m.x354 + m.x360 <= 10) m.c3878 = Constraint(expr= 10*m.b102 + 10*m.b109 - m.x214 - m.x221 + m.x256 + m.x263 + m.x270 + m.x277 + m.x284 + m.x291 + m.x298 + m.x305 + m.x312 + m.x319 + m.x354 + m.x361 <= 10) m.c3879 = Constraint(expr= 10*m.b103 + 10*m.b110 - m.x215 - m.x222 + m.x257 + m.x264 + m.x271 + m.x278 + m.x285 + m.x292 + m.x299 + m.x306 + m.x313 + m.x320 + m.x355 + m.x362 <= 10) m.c3880 = Constraint(expr= 10*m.b105 + 10*m.b110 - m.x217 - m.x222 + m.x259 + m.x264 + m.x273 + m.x278 + m.x287 + m.x292 + m.x301 + m.x306 + m.x315 + m.x320 + m.x357 + m.x362 <= 10) m.c3881 = Constraint(expr= 10*m.b107 + 10*m.b113 - m.x219 - m.x225 + m.x261 + m.x267 + m.x275 + m.x281 + m.x289 + m.x295 + m.x303 + m.x309 + m.x317 + m.x323 + m.x359 + m.x365 <= 10) m.c3882 = Constraint(expr= 10*m.b109 + 10*m.b113 - m.x221 - m.x225 + m.x263 + m.x267 + m.x277 + m.x281 + m.x291 + m.x295 + m.x305 + m.x309 + m.x319 + m.x323 + m.x361 + m.x365 <= 10) m.c3883 = Constraint(expr= 10*m.b110 + 10*m.b111 - m.x222 - m.x223 + m.x264 + m.x265 + m.x278 + m.x279 + m.x292 + m.x293 + m.x306 + m.x307 + m.x320 + m.x321 + m.x362 + m.x363 <= 10) m.c3884 = Constraint(expr= 10*m.b112 + 10*m.b113 - m.x224 - m.x225 + m.x266 + m.x267 + m.x280 + m.x281 + m.x294 + m.x295 + m.x308 + m.x309 + m.x322 + m.x323 + m.x364 + m.x365 <= 10) m.c3885 = Constraint(expr= 10*m.b100 + 10*m.b101 + 10*m.b102 - m.x212 - m.x213 - m.x214 + m.x254 + m.x255 + m.x256 + m.x268 + m.x269 + m.x270 + m.x282 + m.x283 + m.x284 + m.x296 + m.x297 + m.x298 + m.x310 + m.x311 + m.x312 + m.x352 + m.x353 + m.x354 <= 10) m.c3886 = Constraint(expr= 10*m.b104 + 10*m.b111 + 10*m.b112 - m.x216 - m.x223 - m.x224 + m.x258 + m.x265 + m.x266 + m.x272 + m.x279 + m.x280 + m.x286 + m.x293 + m.x294 + m.x300 + m.x307 + m.x308 + m.x314 + m.x321 + m.x322 + m.x356 + m.x363 + m.x364 <= 10) m.c3887 = Constraint(expr= 10*m.b106 + 10*m.b111 + 10*m.b112 - m.x218 - m.x223 - m.x224 + m.x260 + m.x265 + m.x266 + m.x274 + m.x279 + m.x280 + m.x288 + m.x293 + m.x294 + m.x302 + m.x307 + m.x308 + m.x316 + m.x321 + m.x322 + m.x358 + m.x363 + m.x364 <= 10) m.c3888 = Constraint(expr= 10*m.b108 + 10*m.b111 + 10*m.b112 - m.x220 - m.x223 - m.x224 + m.x262 + m.x265 + m.x266 + m.x276 + m.x279 + m.x280 + m.x290 + m.x293 + m.x294 + m.x304 + m.x307 + m.x308 + m.x318 + m.x321 + m.x322 + m.x360 + m.x363 + m.x364 <= 10) m.c3889 = Constraint(expr= 10*m.b44 + 10*m.b47 - m.x156 - m.x159 + m.x366 + m.x369 <= 10) m.c3890 = Constraint(expr= 10*m.b44 + 10*m.b48 - m.x156 - m.x160 + m.x366 + m.x370 <= 10) m.c3891 = Constraint(expr= 10*m.b45 + 10*m.b49 - m.x157 - m.x161 + m.x367 + m.x371 <= 10) m.c3892 = Constraint(expr= 10*m.b45 + 10*m.b50 - m.x157 - m.x162 + m.x367 + m.x372 <= 10) m.c3893 = Constraint(expr= 10*m.b45 + 10*m.b51 - m.x157 - m.x163 + m.x367 + m.x373 <= 10) m.c3894 = Constraint(expr= 10*m.b46 + 10*m.b52 - m.x158 - m.x164 + m.x368 + m.x374 <= 10) m.c3895 = Constraint(expr= 10*m.b46 + 10*m.b53 - m.x158 - m.x165 + m.x368 + m.x375 <= 10) m.c3896 = Constraint(expr= 10*m.b47 + 10*m.b54 - m.x159 - m.x166 + m.x369 + m.x376 <= 10) m.c3897 = Constraint(expr= 10*m.b49 + 10*m.b54 - m.x161 - m.x166 + m.x371 + m.x376 <= 10) m.c3898 = Constraint(expr= 10*m.b51 + 10*m.b57 - m.x163 - m.x169 + m.x373 + m.x379 <= 10) m.c3899 = Constraint(expr= 10*m.b53 + 10*m.b57 - m.x165 - m.x169 + m.x375 + m.x379 <= 10) m.c3900 = Constraint(expr= 10*m.b54 + 10*m.b55 - m.x166 - m.x167 + m.x376 + m.x377 <= 10) m.c3901 = Constraint(expr= 10*m.b56 + 10*m.b57 - m.x168 - m.x169 + m.x378 + m.x379 <= 10) m.c3902 = Constraint(expr= 10*m.b44 + 10*m.b45 + 10*m.b46 - m.x156 - m.x157 - m.x158 + m.x366 + m.x367 + m.x368 <= 10) m.c3903 = Constraint(expr= 10*m.b48 + 10*m.b55 + 10*m.b56 - m.x160 - m.x167 - m.x168 + m.x370 + m.x377 + m.x378 <= 10) m.c3904 = Constraint(expr= 10*m.b50 + 10*m.b55 + 10*m.b56 - m.x162 - m.x167 - m.x168 + m.x372 + m.x377 + m.x378 <= 10) m.c3905 = Constraint(expr= 10*m.b52 + 10*m.b55 + 10*m.b56 - m.x164 - m.x167 - m.x168 + m.x374 + m.x377 + m.x378 <= 10) m.c3906 = Constraint(expr= 10*m.b58 + 10*m.b61 - m.x170 - m.x173 + m.x268 + m.x271 + m.x366 + m.x369 <= 10) m.c3907 = Constraint(expr= 10*m.b58 + 10*m.b62 - m.x170 - m.x174 + m.x268 + m.x272 + m.x366 + m.x370 <= 10) m.c3908 = Constraint(expr= 10*m.b59 + 10*m.b63 - m.x171 - m.x175 + m.x269 + m.x273 + m.x367 + m.x371 <= 10) m.c3909 = Constraint(expr= 10*m.b59 + 10*m.b64 - m.x171 - m.x176 + m.x269 + m.x274 + m.x367 + m.x372 <= 10) m.c3910 = Constraint(expr= 10*m.b59 + 10*m.b65 - m.x171 - m.x177 + m.x269 + m.x275 + m.x367 + m.x373 <= 10) m.c3911 = Constraint(expr= 10*m.b60 + 10*m.b66 - m.x172 - m.x178 + m.x270 + m.x276 + m.x368 + m.x374 <= 10) m.c3912 = Constraint(expr= 10*m.b60 + 10*m.b67 - m.x172 - m.x179 + m.x270 + m.x277 + m.x368 + m.x375 <= 10) m.c3913 = Constraint(expr= 10*m.b61 + 10*m.b68 - m.x173 - m.x180 + m.x271 + m.x278 + m.x369 + m.x376 <= 10) m.c3914 = Constraint(expr= 10*m.b63 + 10*m.b68 - m.x175 - m.x180 + m.x273 + m.x278 + m.x371 + m.x376 <= 10) m.c3915 = Constraint(expr= 10*m.b65 + 10*m.b71 - m.x177 - m.x183 + m.x275 + m.x281 + m.x373 + m.x379 <= 10) m.c3916 = Constraint(expr= 10*m.b67 + 10*m.b71 - m.x179 - m.x183 + m.x277 + m.x281 + m.x375 + m.x379 <= 10) m.c3917 = Constraint(expr= 10*m.b68 + 10*m.b69 - m.x180 - m.x181 + m.x278 + m.x279 + m.x376 + m.x377 <= 10) m.c3918 = Constraint(expr= 10*m.b70 + 10*m.b71 - m.x182 - m.x183 + m.x280 + m.x281 + m.x378 + m.x379 <= 10) m.c3919 = Constraint(expr= 10*m.b58 + 10*m.b59 + 10*m.b60 - m.x170 - m.x171 - m.x172 + m.x268 + m.x269 + m.x270 + m.x366 + m.x367 + m.x368 <= 10) m.c3920 = Constraint(expr= 10*m.b62 + 10*m.b69 + 10*m.b70 - m.x174 - m.x181 - m.x182 + m.x272 + m.x279 + m.x280 + m.x370 + m.x377 + m.x378 <= 10) m.c3921 = Constraint(expr= 10*m.b64 + 10*m.b69 + 10*m.b70 - m.x176 - m.x181 - m.x182 + m.x274 + m.x279 + m.x280 + m.x372 + m.x377 + m.x378 <= 10) m.c3922 = Constraint(expr= 10*m.b66 + 10*m.b69 + 10*m.b70 - m.x178 - m.x181 - m.x182 + m.x276 + m.x279 + m.x280 + m.x374 + m.x377 + m.x378 <= 10) m.c3923 = Constraint(expr= 10*m.b72 + 10*m.b75 - m.x184 - m.x187 + m.x268 + m.x271 + m.x282 + m.x285 + m.x366 + m.x369 <= 10) m.c3924 = Constraint(expr= 10*m.b72 + 10*m.b76 - m.x184 - m.x188 + m.x268 + m.x272 + m.x282 + m.x286 + m.x366 + m.x370 <= 10) m.c3925 = Constraint(expr= 10*m.b73 + 10*m.b77 - m.x185 - m.x189 + m.x269 + m.x273 + m.x283 + m.x287 + m.x367 + m.x371 <= 10) m.c3926 = Constraint(expr= 10*m.b73 + 10*m.b78 - m.x185 - m.x190 + m.x269 + m.x274 + m.x283 + m.x288 + m.x367 + m.x372 <= 10) m.c3927 = Constraint(expr= 10*m.b73 + 10*m.b79 - m.x185 - m.x191 + m.x269 + m.x275 + m.x283 + m.x289 + m.x367 + m.x373 <= 10) m.c3928 = Constraint(expr= 10*m.b74 + 10*m.b80 - m.x186 - m.x192 + m.x270 + m.x276 + m.x284 + m.x290 + m.x368 + m.x374 <= 10) m.c3929 = Constraint(expr= 10*m.b74 + 10*m.b81 - m.x186 - m.x193 + m.x270 + m.x277 + m.x284 + m.x291 + m.x368 + m.x375 <= 10) m.c3930 = Constraint(expr= 10*m.b75 + 10*m.b82 - m.x187 - m.x194 + m.x271 + m.x278 + m.x285 + m.x292 + m.x369 + m.x376 <= 10) m.c3931 = Constraint(expr= 10*m.b77 + 10*m.b82 - m.x189 - m.x194 + m.x273 + m.x278 + m.x287 + m.x292 + m.x371 + m.x376 <= 10) m.c3932 = Constraint(expr= 10*m.b79 + 10*m.b85 - m.x191 - m.x197 + m.x275 + m.x281 + m.x289 + m.x295 + m.x373 + m.x379 <= 10) m.c3933 = Constraint(expr= 10*m.b81 + 10*m.b85 - m.x193 - m.x197 + m.x277 + m.x281 + m.x291 + m.x295 + m.x375 + m.x379 <= 10) m.c3934 = Constraint(expr= 10*m.b82 + 10*m.b83 - m.x194 - m.x195 + m.x278 + m.x279 + m.x292 + m.x293 + m.x376 + m.x377 <= 10) m.c3935 = Constraint(expr= 10*m.b84 + 10*m.b85 - m.x196 - m.x197 + m.x280 + m.x281 + m.x294 + m.x295 + m.x378 + m.x379 <= 10) m.c3936 = Constraint(expr= 10*m.b72 + 10*m.b73 + 10*m.b74 - m.x184 - m.x185 - m.x186 + m.x268 + m.x269 + m.x270 + m.x282 + m.x283 + m.x284 + m.x366 + m.x367 + m.x368 <= 10) m.c3937 = Constraint(expr= 10*m.b76 + 10*m.b83 + 10*m.b84 - m.x188 - m.x195 - m.x196 + m.x272 + m.x279 + m.x280 + m.x286 + m.x293 + m.x294 + m.x370 + m.x377 + m.x378 <= 10) m.c3938 = Constraint(expr= 10*m.b78 + 10*m.b83 + 10*m.b84 - m.x190 - m.x195 - m.x196 + m.x274 + m.x279 + m.x280 + m.x288 + m.x293 + m.x294 + m.x372 + m.x377 + m.x378 <= 10) m.c3939 = Constraint(expr= 10*m.b80 + 10*m.b83 + 10*m.b84 - m.x192 - m.x195 - m.x196 + m.x276 + m.x279 + m.x280 + m.x290 + m.x293 + m.x294 + m.x374 + m.x377 + m.x378 <= 10) m.c3940 = Constraint(expr= 10*m.b86 + 10*m.b89 - m.x198 - m.x201 + m.x268 + m.x271 + m.x282 + m.x285 + m.x296 + m.x299 + m.x366 + m.x369 <= 10) m.c3941 = Constraint(expr= 10*m.b86 + 10*m.b90 - m.x198 - m.x202 + m.x268 + m.x272 + m.x282 + m.x286 + m.x296 + m.x300 + m.x366 + m.x370 <= 10) m.c3942 = Constraint(expr= 10*m.b87 + 10*m.b91 - m.x199 - m.x203 + m.x269 + m.x273 + m.x283 + m.x287 + m.x297 + m.x301 + m.x367 + m.x371 <= 10) m.c3943 = Constraint(expr= 10*m.b87 + 10*m.b92 - m.x199 - m.x204 + m.x269 + m.x274 + m.x283 + m.x288 + m.x297 + m.x302 + m.x367 + m.x372 <= 10) m.c3944 = Constraint(expr= 10*m.b87 + 10*m.b93 - m.x199 - m.x205 + m.x269 + m.x275 + m.x283 + m.x289 + m.x297 + m.x303 + m.x367 + m.x373 <= 10) m.c3945 = Constraint(expr= 10*m.b88 + 10*m.b94 - m.x200 - m.x206 + m.x270 + m.x276 + m.x284 + m.x290 + m.x298 + m.x304 + m.x368 + m.x374 <= 10) m.c3946 = Constraint(expr= 10*m.b88 + 10*m.b95 - m.x200 - m.x207 + m.x270 + m.x277 + m.x284 + m.x291 + m.x298 + m.x305 + m.x368 + m.x375 <= 10) m.c3947 = Constraint(expr= 10*m.b89 + 10*m.b96 - m.x201 - m.x208 + m.x271 + m.x278 + m.x285 + m.x292 + m.x299 + m.x306 + m.x369 + m.x376 <= 10) m.c3948 = Constraint(expr= 10*m.b91 + 10*m.b96 - m.x203 - m.x208 + m.x273 + m.x278 + m.x287 + m.x292 + m.x301 + m.x306 + m.x371 + m.x376 <= 10) m.c3949 = Constraint(expr= 10*m.b93 + 10*m.b99 - m.x205 - m.x211 + m.x275 + m.x281 + m.x289 + m.x295 + m.x303 + m.x309 + m.x373 + m.x379 <= 10) m.c3950 = Constraint(expr= 10*m.b95 + 10*m.b99 - m.x207 - m.x211 + m.x277 + m.x281 + m.x291 + m.x295 + m.x305 + m.x309 + m.x375 + m.x379 <= 10) m.c3951 = Constraint(expr= 10*m.b96 + 10*m.b97 - m.x208 - m.x209 + m.x278 + m.x279 + m.x292 + m.x293 + m.x306 + m.x307 + m.x376 + m.x377 <= 10) m.c3952 = Constraint(expr= 10*m.b98 + 10*m.b99 - m.x210 - m.x211 + m.x280 + m.x281 + m.x294 + m.x295 + m.x308 + m.x309 + m.x378 + m.x379 <= 10) m.c3953 = Constraint(expr= 10*m.b86 + 10*m.b87 + 10*m.b88 - m.x198 - m.x199 - m.x200 + m.x268 + m.x269 + m.x270 + m.x282 + m.x283 + m.x284 + m.x296 + m.x297 + m.x298 + m.x366 + m.x367 + m.x368 <= 10) m.c3954 = Constraint(expr= 10*m.b90 + 10*m.b97 + 10*m.b98 - m.x202 - m.x209 - m.x210 + m.x272 + m.x279 + m.x280 + m.x286 + m.x293 + m.x294 + m.x300 + m.x307 + m.x308 + m.x370 + m.x377 + m.x378 <= 10) m.c3955 = Constraint(expr= 10*m.b92 + 10*m.b97 + 10*m.b98 - m.x204 - m.x209 - m.x210 + m.x274 + m.x279 + m.x280 + m.x288 + m.x293 + m.x294 + m.x302 + m.x307 + m.x308 + m.x372 + m.x377 + m.x378 <= 10) m.c3956 = Constraint(expr= 10*m.b94 + 10*m.b97 + 10*m.b98 - m.x206 - m.x209 - m.x210 + m.x276 + m.x279 + m.x280 + m.x290 + m.x293 + m.x294 + m.x304 + m.x307 + m.x308 + m.x374 + m.x377 + m.x378 <= 10) m.c3957 = Constraint(expr= 10*m.b100 + 10*m.b103 - m.x212 - m.x215 + m.x268 + m.x271 + m.x282 + m.x285 + m.x296 + m.x299 + m.x310 + m.x313 + m.x366 + m.x369 <= 10) m.c3958 = Constraint(expr= 10*m.b100 + 10*m.b104 - m.x212 - m.x216 + m.x268 + m.x272 + m.x282 + m.x286 + m.x296 + m.x300 + m.x310 + m.x314 + m.x366 + m.x370 <= 10) m.c3959 = Constraint(expr= 10*m.b101 + 10*m.b105 - m.x213 - m.x217 + m.x269 + m.x273 + m.x283 + m.x287 + m.x297 + m.x301 + m.x311 + m.x315 + m.x367 + m.x371 <= 10) m.c3960 = Constraint(expr= 10*m.b101 + 10*m.b106 - m.x213 - m.x218 + m.x269 + m.x274 + m.x283 + m.x288 + m.x297 + m.x302 + m.x311 + m.x316 + m.x367 + m.x372 <= 10) m.c3961 = Constraint(expr= 10*m.b101 + 10*m.b107 - m.x213 - m.x219 + m.x269 + m.x275 + m.x283 + m.x289 + m.x297 + m.x303 + m.x311 + m.x317 + m.x367 + m.x373 <= 10) m.c3962 = Constraint(expr= 10*m.b102 + 10*m.b108 - m.x214 - m.x220 + m.x270 + m.x276 + m.x284 + m.x290 + m.x298 + m.x304 + m.x312 + m.x318 + m.x368 + m.x374 <= 10) m.c3963 = Constraint(expr= 10*m.b102 + 10*m.b109 - m.x214 - m.x221 + m.x270 + m.x277 + m.x284 + m.x291 + m.x298 + m.x305 + m.x312 + m.x319 + m.x368 + m.x375 <= 10) m.c3964 = Constraint(expr= 10*m.b103 + 10*m.b110 - m.x215 - m.x222 + m.x271 + m.x278 + m.x285 + m.x292 + m.x299 + m.x306 + m.x313 + m.x320 + m.x369 + m.x376 <= 10) m.c3965 = Constraint(expr= 10*m.b105 + 10*m.b110 - m.x217 - m.x222 + m.x273 + m.x278 + m.x287 + m.x292 + m.x301 + m.x306 + m.x315 + m.x320 + m.x371 + m.x376 <= 10) m.c3966 = Constraint(expr= 10*m.b107 + 10*m.b113 - m.x219 - m.x225 + m.x275 + m.x281 + m.x289 + m.x295 + m.x303 + m.x309 + m.x317 + m.x323 + m.x373 + m.x379 <= 10) m.c3967 = Constraint(expr= 10*m.b109 + 10*m.b113 - m.x221 - m.x225 + m.x277 + m.x281 + m.x291 + m.x295 + m.x305 + m.x309 + m.x319 + m.x323 + m.x375 + m.x379 <= 10) m.c3968 = Constraint(expr= 10*m.b110 + 10*m.b111 - m.x222 - m.x223 + m.x278 + m.x279 + m.x292 + m.x293 + m.x306 + m.x307 + m.x320 + m.x321 + m.x376 + m.x377 <= 10) m.c3969 = Constraint(expr= 10*m.b112 + 10*m.b113 - m.x224 - m.x225 + m.x280 + m.x281 + m.x294 + m.x295 + m.x308 + m.x309 + m.x322 + m.x323 + m.x378 + m.x379 <= 10) m.c3970 = Constraint(expr= 10*m.b100 + 10*m.b101 + 10*m.b102 - m.x212 - m.x213 - m.x214 + m.x268 + m.x269 + m.x270 + m.x282 + m.x283 + m.x284 + m.x296 + m.x297 + m.x298 + m.x310 + m.x311 + m.x312 + m.x366 + m.x367 + m.x368 <= 10) m.c3971 = Constraint(expr= 10*m.b104 + 10*m.b111 + 10*m.b112 - m.x216 - m.x223 - m.x224 + m.x272 + m.x279 + m.x280 + m.x286 + m.x293 + m.x294 + m.x300 + m.x307 + m.x308 + m.x314 + m.x321 + m.x322 + m.x370 + m.x377 + m.x378 <= 10) m.c3972 = Constraint(expr= 10*m.b106 + 10*m.b111 + 10*m.b112 - m.x218 - m.x223 - m.x224 + m.x274 + m.x279 + m.x280 + m.x288 + m.x293 + m.x294 + m.x302 + m.x307 + m.x308 + m.x316 + m.x321 + m.x322 + m.x372 + m.x377 + m.x378 <= 10) m.c3973 = Constraint(expr= 10*m.b108 + 10*m.b111 + 10*m.b112 - m.x220 - m.x223 - m.x224 + m.x276 + m.x279 + m.x280 + m.x290 + m.x293 + m.x294 + m.x304 + m.x307 + m.x308 + m.x318 + m.x321 + m.x322 + m.x374 + m.x377 + m.x378 <= 10) m.c3974 = Constraint(expr= 10*m.b58 + 10*m.b61 - m.x170 - m.x173 + m.x380 + m.x383 <= 10) m.c3975 = Constraint(expr= 10*m.b58 + 10*m.b62 - m.x170 - m.x174 + m.x380 + m.x384 <= 10) m.c3976 = Constraint(expr= 10*m.b59 + 10*m.b63 - m.x171 - m.x175 + m.x381 + m.x385 <= 10) m.c3977 = Constraint(expr= 10*m.b59 + 10*m.b64 - m.x171 - m.x176 + m.x381 + m.x386 <= 10) m.c3978 = Constraint(expr= 10*m.b59 + 10*m.b65 - m.x171 - m.x177 + m.x381 + m.x387 <= 10) m.c3979 = Constraint(expr= 10*m.b60 + 10*m.b66 - m.x172 - m.x178 + m.x382 + m.x388 <= 10) m.c3980 = Constraint(expr= 10*m.b60 + 10*m.b67 - m.x172 - m.x179 + m.x382 + m.x389 <= 10) m.c3981 = Constraint(expr= 10*m.b61 + 10*m.b68 - m.x173 - m.x180 + m.x383 + m.x390 <= 10) m.c3982 = Constraint(expr= 10*m.b63 + 10*m.b68 - m.x175 - m.x180 + m.x385 + m.x390 <= 10) m.c3983 = Constraint(expr= 10*m.b65 + 10*m.b71 - m.x177 - m.x183 + m.x387 + m.x393 <= 10) m.c3984 = Constraint(expr= 10*m.b67 + 10*m.b71 - m.x179 - m.x183 + m.x389 + m.x393 <= 10) m.c3985 = Constraint(expr= 10*m.b68 + 10*m.b69 - m.x180 - m.x181 + m.x390 + m.x391 <= 10) m.c3986 = Constraint(expr= 10*m.b70 + 10*m.b71 - m.x182 - m.x183 + m.x392 + m.x393 <= 10) m.c3987 = Constraint(expr= 10*m.b58 + 10*m.b59 + 10*m.b60 - m.x170 - m.x171 - m.x172 + m.x380 + m.x381 + m.x382 <= 10) m.c3988 = Constraint(expr= 10*m.b62 + 10*m.b69 + 10*m.b70 - m.x174 - m.x181 - m.x182 + m.x384 + m.x391 + m.x392 <= 10) m.c3989 = Constraint(expr= 10*m.b64 + 10*m.b69 + 10*m.b70 - m.x176 - m.x181 - m.x182 + m.x386 + m.x391 + m.x392 <= 10) m.c3990 = Constraint(expr= 10*m.b66 + 10*m.b69 + 10*m.b70 - m.x178 - m.x181 - m.x182 + m.x388 + m.x391 + m.x392 <= 10) m.c3991 = Constraint(expr= 10*m.b72 + 10*m.b75 - m.x184 - m.x187 + m.x282 + m.x285 + m.x380 + m.x383 <= 10) m.c3992 = Constraint(expr= 10*m.b72 + 10*m.b76 - m.x184 - m.x188 + m.x282 + m.x286 + m.x380 + m.x384 <= 10) m.c3993 = Constraint(expr= 10*m.b73 + 10*m.b77 - m.x185 - m.x189 + m.x283 + m.x287 + m.x381 + m.x385 <= 10) m.c3994 = Constraint(expr= 10*m.b73 + 10*m.b78 - m.x185 - m.x190 + m.x283 + m.x288 + m.x381 + m.x386 <= 10) m.c3995 = Constraint(expr= 10*m.b73 + 10*m.b79 - m.x185 - m.x191 + m.x283 + m.x289 + m.x381 + m.x387 <= 10) m.c3996 = Constraint(expr= 10*m.b74 + 10*m.b80 - m.x186 - m.x192 + m.x284 + m.x290 + m.x382 + m.x388 <= 10) m.c3997 = Constraint(expr= 10*m.b74 + 10*m.b81 - m.x186 - m.x193 + m.x284 + m.x291 + m.x382 + m.x389 <= 10) m.c3998 = Constraint(expr= 10*m.b75 + 10*m.b82 - m.x187 - m.x194 + m.x285 + m.x292 + m.x383 + m.x390 <= 10) m.c3999 = Constraint(expr= 10*m.b77 + 10*m.b82 - m.x189 - m.x194 + m.x287 + m.x292 + m.x385 + m.x390 <= 10) m.c4000 = Constraint(expr= 10*m.b79 + 10*m.b85 - m.x191 - m.x197 + m.x289 + m.x295 + m.x387 + m.x393 <= 10) m.c4001 = Constraint(expr= 10*m.b81 + 10*m.b85 - m.x193 - m.x197 + m.x291 + m.x295 + m.x389 + m.x393 <= 10) m.c4002 = Constraint(expr= 10*m.b82 + 10*m.b83 - m.x194 - m.x195 + m.x292 + m.x293 + m.x390 + m.x391 <= 10) m.c4003 = Constraint(expr= 10*m.b84 + 10*m.b85 - m.x196 - m.x197 + m.x294 + m.x295 + m.x392 + m.x393 <= 10) m.c4004 = Constraint(expr= 10*m.b72 + 10*m.b73 + 10*m.b74 - m.x184 - m.x185 - m.x186 + m.x282 + m.x283 + m.x284 + m.x380 + m.x381 + m.x382 <= 10) m.c4005 = Constraint(expr= 10*m.b76 + 10*m.b83 + 10*m.b84 - m.x188 - m.x195 - m.x196 + m.x286 + m.x293 + m.x294 + m.x384 + m.x391 + m.x392 <= 10) m.c4006 = Constraint(expr= 10*m.b78 + 10*m.b83 + 10*m.b84 - m.x190 - m.x195 - m.x196 + m.x288 + m.x293 + m.x294 + m.x386 + m.x391 + m.x392 <= 10) m.c4007 = Constraint(expr= 10*m.b80 + 10*m.b83 + 10*m.b84 - m.x192 - m.x195 - m.x196 + m.x290 + m.x293 + m.x294 + m.x388 + m.x391 + m.x392 <= 10) m.c4008 = Constraint(expr= 10*m.b86 + 10*m.b89 - m.x198 - m.x201 + m.x282 + m.x285 + m.x296 + m.x299 + m.x380 + m.x383 <= 10) m.c4009 = Constraint(expr= 10*m.b86 + 10*m.b90 - m.x198 - m.x202 + m.x282 + m.x286 + m.x296 + m.x300 + m.x380 + m.x384 <= 10) m.c4010 = Constraint(expr= 10*m.b87 + 10*m.b91 - m.x199 - m.x203 + m.x283 + m.x287 + m.x297 + m.x301 + m.x381 + m.x385 <= 10) m.c4011 = Constraint(expr= 10*m.b87 + 10*m.b92 - m.x199 - m.x204 + m.x283 + m.x288 + m.x297 + m.x302 + m.x381 + m.x386 <= 10) m.c4012 = Constraint(expr= 10*m.b87 + 10*m.b93 - m.x199 - m.x205 + m.x283 + m.x289 + m.x297 + m.x303 + m.x381 + m.x387 <= 10) m.c4013 = Constraint(expr= 10*m.b88 + 10*m.b94 - m.x200 - m.x206 + m.x284 + m.x290 + m.x298 + m.x304 + m.x382 + m.x388 <= 10) m.c4014 = Constraint(expr= 10*m.b88 + 10*m.b95 - m.x200 - m.x207 + m.x284 + m.x291 + m.x298 + m.x305 + m.x382 + m.x389 <= 10) m.c4015 = Constraint(expr= 10*m.b89 + 10*m.b96 - m.x201 - m.x208 + m.x285 + m.x292 + m.x299 + m.x306 + m.x383 + m.x390 <= 10) m.c4016 = Constraint(expr= 10*m.b91 + 10*m.b96 - m.x203 - m.x208 + m.x287 + m.x292 + m.x301 + m.x306 + m.x385 + m.x390 <= 10) m.c4017 = Constraint(expr= 10*m.b93 + 10*m.b99 - m.x205 - m.x211 + m.x289 + m.x295 + m.x303 + m.x309 + m.x387 + m.x393 <= 10) m.c4018 = Constraint(expr= 10*m.b95 + 10*m.b99 - m.x207 - m.x211 + m.x291 + m.x295 + m.x305 + m.x309 + m.x389 + m.x393 <= 10) m.c4019 = Constraint(expr= 10*m.b96 + 10*m.b97 - m.x208 - m.x209 + m.x292 + m.x293 + m.x306 + m.x307 + m.x390 + m.x391 <= 10) m.c4020 = Constraint(expr= 10*m.b98 + 10*m.b99 - m.x210 - m.x211 + m.x294 + m.x295 + m.x308 + m.x309 + m.x392 + m.x393 <= 10) m.c4021 = Constraint(expr= 10*m.b86 + 10*m.b87 + 10*m.b88 - m.x198 - m.x199 - m.x200 + m.x282 + m.x283 + m.x284 + m.x296 + m.x297 + m.x298 + m.x380 + m.x381 + m.x382 <= 10) m.c4022 = Constraint(expr= 10*m.b90 + 10*m.b97 + 10*m.b98 - m.x202 - m.x209 - m.x210 + m.x286 + m.x293 + m.x294 + m.x300 + m.x307 + m.x308 + m.x384 + m.x391 + m.x392 <= 10) m.c4023 = Constraint(expr= 10*m.b92 + 10*m.b97 + 10*m.b98 - m.x204 - m.x209 - m.x210 + m.x288 + m.x293 + m.x294 + m.x302 + m.x307 + m.x308 + m.x386 + m.x391 + m.x392 <= 10) m.c4024 = Constraint(expr= 10*m.b94 + 10*m.b97 + 10*m.b98 - m.x206 - m.x209 - m.x210 + m.x290 + m.x293 + m.x294 + m.x304 + m.x307 + m.x308 + m.x388 + m.x391 + m.x392 <= 10) m.c4025 = Constraint(expr= 10*m.b100 + 10*m.b103 - m.x212 - m.x215 + m.x282 + m.x285 + m.x296 + m.x299 + m.x310 + m.x313 + m.x380 + m.x383 <= 10) m.c4026 = Constraint(expr= 10*m.b100 + 10*m.b104 - m.x212 - m.x216 + m.x282 + m.x286 + m.x296 + m.x300 + m.x310 + m.x314 + m.x380 + m.x384 <= 10) m.c4027 = Constraint(expr= 10*m.b101 + 10*m.b105 - m.x213 - m.x217 + m.x283 + m.x287 + m.x297 + m.x301 + m.x311 + m.x315 + m.x381 + m.x385 <= 10) m.c4028 = Constraint(expr= 10*m.b101 + 10*m.b106 - m.x213 - m.x218 + m.x283 + m.x288 + m.x297 + m.x302 + m.x311 + m.x316 + m.x381 + m.x386 <= 10) m.c4029 = Constraint(expr= 10*m.b101 + 10*m.b107 - m.x213 - m.x219 + m.x283 + m.x289 + m.x297 + m.x303 + m.x311 + m.x317 + m.x381 + m.x387 <= 10) m.c4030 = Constraint(expr= 10*m.b102 + 10*m.b108 - m.x214 - m.x220 + m.x284 + m.x290 + m.x298 + m.x304 + m.x312 + m.x318 + m.x382 + m.x388 <= 10) m.c4031 = Constraint(expr= 10*m.b102 + 10*m.b109 - m.x214 - m.x221 + m.x284 + m.x291 + m.x298 + m.x305 + m.x312 + m.x319 + m.x382 + m.x389 <= 10) m.c4032 = Constraint(expr= 10*m.b103 + 10*m.b110 - m.x215 - m.x222 + m.x285 + m.x292 + m.x299 + m.x306 + m.x313 + m.x320 + m.x383 + m.x390 <= 10) m.c4033 = Constraint(expr= 10*m.b105 + 10*m.b110 - m.x217 - m.x222 + m.x287 + m.x292 + m.x301 + m.x306 + m.x315 + m.x320 + m.x385 + m.x390 <= 10) m.c4034 = Constraint(expr= 10*m.b107 + 10*m.b113 - m.x219 - m.x225 + m.x289 + m.x295 + m.x303 + m.x309 + m.x317 + m.x323 + m.x387 + m.x393 <= 10) m.c4035 = Constraint(expr= 10*m.b109 + 10*m.b113 - m.x221 - m.x225 + m.x291 + m.x295 + m.x305 + m.x309 + m.x319 + m.x323 + m.x389 + m.x393 <= 10) m.c4036 = Constraint(expr= 10*m.b110 + 10*m.b111 - m.x222 - m.x223 + m.x292 + m.x293 + m.x306 + m.x307 + m.x320 + m.x321 + m.x390 + m.x391 <= 10) m.c4037 = Constraint(expr= 10*m.b112 + 10*m.b113 - m.x224 - m.x225 + m.x294 + m.x295 + m.x308 + m.x309 + m.x322 + m.x323 + m.x392 + m.x393 <= 10) m.c4038 = Constraint(expr= 10*m.b100 + 10*m.b101 + 10*m.b102 - m.x212 - m.x213 - m.x214 + m.x282 + m.x283 + m.x284 + m.x296 + m.x297 + m.x298 + m.x310 + m.x311 + m.x312 + m.x380 + m.x381 + m.x382 <= 10) m.c4039 = Constraint(expr= 10*m.b104 + 10*m.b111 + 10*m.b112 - m.x216 - m.x223 - m.x224 + m.x286 + m.x293 + m.x294 + m.x300 + m.x307 + m.x308 + m.x314 + m.x321 + m.x322 + m.x384 + m.x391 + m.x392 <= 10) m.c4040 = Constraint(expr= 10*m.b106 + 10*m.b111 + 10*m.b112 - m.x218 - m.x223 - m.x224 + m.x288 + m.x293 + m.x294 + m.x302 + m.x307 + m.x308 + m.x316 + m.x321 + m.x322 + m.x386 + m.x391 + m.x392 <= 10) m.c4041 = Constraint(expr= 10*m.b108 + 10*m.b111 + 10*m.b112 - m.x220 - m.x223 - m.x224 + m.x290 + m.x293 + m.x294 + m.x304 + m.x307 + m.x308 + m.x318 + m.x321 + m.x322 + m.x388 + m.x391 + m.x392 <= 10) m.c4042 = Constraint(expr= 10*m.b72 + 10*m.b75 - m.x184 - m.x187 + m.x394 + m.x397 <= 10) m.c4043 = Constraint(expr= 10*m.b72 + 10*m.b76 - m.x184 - m.x188 + m.x394 + m.x398 <= 10) m.c4044 = Constraint(expr= 10*m.b73 + 10*m.b77 - m.x185 - m.x189 + m.x395 + m.x399 <= 10) m.c4045 = Constraint(expr= 10*m.b73 + 10*m.b78 - m.x185 - m.x190 + m.x395 + m.x400 <= 10) m.c4046 = Constraint(expr= 10*m.b73 + 10*m.b79 - m.x185 - m.x191 + m.x395 + m.x401 <= 10) m.c4047 = Constraint(expr= 10*m.b74 + 10*m.b80 - m.x186 - m.x192 + m.x396 + m.x402 <= 10) m.c4048 = Constraint(expr= 10*m.b74 + 10*m.b81 - m.x186 - m.x193 + m.x396 + m.x403 <= 10) m.c4049 = Constraint(expr= 10*m.b75 + 10*m.b82 - m.x187 - m.x194 + m.x397 + m.x404 <= 10) m.c4050 = Constraint(expr= 10*m.b77 + 10*m.b82 - m.x189 - m.x194 + m.x399 + m.x404 <= 10) m.c4051 = Constraint(expr= 10*m.b79 + 10*m.b85 - m.x191 - m.x197 + m.x401 + m.x407 <= 10) m.c4052 = Constraint(expr= 10*m.b81 + 10*m.b85 - m.x193 - m.x197 + m.x403 + m.x407 <= 10) m.c4053 = Constraint(expr= 10*m.b82 + 10*m.b83 - m.x194 - m.x195 + m.x404 + m.x405 <= 10) m.c4054 = Constraint(expr= 10*m.b84 + 10*m.b85 - m.x196 - m.x197 + m.x406 + m.x407 <= 10) m.c4055 = Constraint(expr= 10*m.b72 + 10*m.b73 + 10*m.b74 - m.x184 - m.x185 - m.x186 + m.x394 + m.x395 + m.x396 <= 10) m.c4056 = Constraint(expr= 10*m.b76 + 10*m.b83 + 10*m.b84 - m.x188 - m.x195 - m.x196 + m.x398 + m.x405 + m.x406 <= 10) m.c4057 = Constraint(expr= 10*m.b78 + 10*m.b83 + 10*m.b84 - m.x190 - m.x195 - m.x196 + m.x400 + m.x405 + m.x406 <= 10) m.c4058 = Constraint(expr= 10*m.b80 + 10*m.b83 + 10*m.b84 - m.x192 - m.x195 - m.x196 + m.x402 + m.x405 + m.x406 <= 10) m.c4059 = Constraint(expr= 10*m.b86 + 10*m.b89 - m.x198 - m.x201 + m.x296 + m.x299 + m.x394 + m.x397 <= 10) m.c4060 = Constraint(expr= 10*m.b86 + 10*m.b90 - m.x198 - m.x202 + m.x296 + m.x300 + m.x394 + m.x398 <= 10) m.c4061 = Constraint(expr= 10*m.b87 + 10*m.b91 - m.x199 - m.x203 + m.x297 + m.x301 + m.x395 + m.x399 <= 10) m.c4062 = Constraint(expr= 10*m.b87 + 10*m.b92 - m.x199 - m.x204 + m.x297 + m.x302 + m.x395 + m.x400 <= 10) m.c4063 = Constraint(expr= 10*m.b87 + 10*m.b93 - m.x199 - m.x205 + m.x297 + m.x303 + m.x395 + m.x401 <= 10) m.c4064 = Constraint(expr= 10*m.b88 + 10*m.b94 - m.x200 - m.x206 + m.x298 + m.x304 + m.x396 + m.x402 <= 10) m.c4065 = Constraint(expr= 10*m.b88 + 10*m.b95 - m.x200 - m.x207 + m.x298 + m.x305 + m.x396 + m.x403 <= 10) m.c4066 = Constraint(expr= 10*m.b89 + 10*m.b96 - m.x201 - m.x208 + m.x299 + m.x306 + m.x397 + m.x404 <= 10) m.c4067 = Constraint(expr= 10*m.b91 + 10*m.b96 - m.x203 - m.x208 + m.x301 + m.x306 + m.x399 + m.x404 <= 10) m.c4068 = Constraint(expr= 10*m.b93 + 10*m.b99 - m.x205 - m.x211 + m.x303 + m.x309 + m.x401 + m.x407 <= 10) m.c4069 = Constraint(expr= 10*m.b95 + 10*m.b99 - m.x207 - m.x211 + m.x305 + m.x309 + m.x403 + m.x407 <= 10) m.c4070 = Constraint(expr= 10*m.b96 + 10*m.b97 - m.x208 - m.x209 + m.x306 + m.x307 + m.x404 + m.x405 <= 10) m.c4071 = Constraint(expr= 10*m.b98 + 10*m.b99 - m.x210 - m.x211 + m.x308 + m.x309 + m.x406 + m.x407 <= 10) m.c4072 = Constraint(expr= 10*m.b86 + 10*m.b87 + 10*m.b88 - m.x198 - m.x199 - m.x200 + m.x296 + m.x297 + m.x298 + m.x394 + m.x395 + m.x396 <= 10) m.c4073 = Constraint(expr= 10*m.b90 + 10*m.b97 + 10*m.b98 - m.x202 - m.x209 - m.x210 + m.x300 + m.x307 + m.x308 + m.x398 + m.x405 + m.x406 <= 10) m.c4074 = Constraint(expr= 10*m.b92 + 10*m.b97 + 10*m.b98 - m.x204 - m.x209 - m.x210 + m.x302 + m.x307 + m.x308 + m.x400 + m.x405 + m.x406 <= 10) m.c4075 = Constraint(expr= 10*m.b94 + 10*m.b97 + 10*m.b98 - m.x206 - m.x209 - m.x210 + m.x304 + m.x307 + m.x308 + m.x402 + m.x405 + m.x406 <= 10) m.c4076 = Constraint(expr= 10*m.b100 + 10*m.b103 - m.x212 - m.x215 + m.x296 + m.x299 + m.x310 + m.x313 + m.x394 + m.x397 <= 10) m.c4077 = Constraint(expr= 10*m.b100 + 10*m.b104 - m.x212 - m.x216 + m.x296 + m.x300 + m.x310 + m.x314 + m.x394 + m.x398 <= 10) m.c4078 = Constraint(expr= 10*m.b101 + 10*m.b105 - m.x213 - m.x217 + m.x297 + m.x301 + m.x311 + m.x315 + m.x395 + m.x399 <= 10) m.c4079 = Constraint(expr= 10*m.b101 + 10*m.b106 - m.x213 - m.x218 + m.x297 + m.x302 + m.x311 + m.x316 + m.x395 + m.x400 <= 10) m.c4080 = Constraint(expr= 10*m.b101 + 10*m.b107 - m.x213 - m.x219 + m.x297 + m.x303 + m.x311 + m.x317 + m.x395 + m.x401 <= 10) m.c4081 = Constraint(expr= 10*m.b102 + 10*m.b108 - m.x214 - m.x220 + m.x298 + m.x304 + m.x312 + m.x318 + m.x396 + m.x402 <= 10) m.c4082 = Constraint(expr= 10*m.b102 + 10*m.b109 - m.x214 - m.x221 + m.x298 + m.x305 + m.x312 + m.x319 + m.x396 + m.x403 <= 10) m.c4083 = Constraint(expr= 10*m.b103 + 10*m.b110 - m.x215 - m.x222 + m.x299 + m.x306 + m.x313 + m.x320 + m.x397 + m.x404 <= 10) m.c4084 = Constraint(expr= 10*m.b105 + 10*m.b110 - m.x217 - m.x222 + m.x301 + m.x306 + m.x315 + m.x320 + m.x399 + m.x404 <= 10) m.c4085 = Constraint(expr= 10*m.b107 + 10*m.b113 - m.x219 - m.x225 + m.x303 + m.x309 + m.x317 + m.x323 + m.x401 + m.x407 <= 10) m.c4086 = Constraint(expr= 10*m.b109 + 10*m.b113 - m.x221 - m.x225 + m.x305 + m.x309 + m.x319 + m.x323 + m.x403 + m.x407 <= 10) m.c4087 = Constraint(expr= 10*m.b110 + 10*m.b111 - m.x222 - m.x223 + m.x306 + m.x307 + m.x320 + m.x321 + m.x404 + m.x405 <= 10) m.c4088 = Constraint(expr= 10*m.b112 + 10*m.b113 - m.x224 - m.x225 + m.x308 + m.x309 + m.x322 + m.x323 + m.x406 + m.x407 <= 10) m.c4089 = Constraint(expr= 10*m.b100 + 10*m.b101 + 10*m.b102 - m.x212 - m.x213 - m.x214 + m.x296 + m.x297 + m.x298 + m.x310 + m.x311 + m.x312 + m.x394 + m.x395 + m.x396 <= 10) m.c4090 = Constraint(expr= 10*m.b104 + 10*m.b111 + 10*m.b112 - m.x216 - m.x223 - m.x224 + m.x300 + m.x307 + m.x308 + m.x314 + m.x321 + m.x322 + m.x398 + m.x405 + m.x406 <= 10) m.c4091 = Constraint(expr= 10*m.b106 + 10*m.b111 + 10*m.b112 - m.x218 - m.x223 - m.x224 + m.x302 + m.x307 + m.x308 + m.x316 + m.x321 + m.x322 + m.x400 + m.x405 + m.x406 <= 10) m.c4092 = Constraint(expr= 10*m.b108 + 10*m.b111 + 10*m.b112 - m.x220 - m.x223 - m.x224 + m.x304 + m.x307 + m.x308 + m.x318 + m.x321 + m.x322 + m.x402 + m.x405 + m.x406 <= 10) m.c4093 = Constraint(expr= 10*m.b86 + 10*m.b89 - m.x198 - m.x201 + m.x408 + m.x411 <= 10) m.c4094 = Constraint(expr= 10*m.b86 + 10*m.b90 - m.x198 - m.x202 + m.x408 + m.x412 <= 10) m.c4095 = Constraint(expr= 10*m.b87 + 10*m.b91 - m.x199 - m.x203 + m.x409 + m.x413 <= 10) m.c4096 = Constraint(expr= 10*m.b87 + 10*m.b92 - m.x199 - m.x204 + m.x409 + m.x414 <= 10) m.c4097 = Constraint(expr= 10*m.b87 + 10*m.b93 - m.x199 - m.x205 + m.x409 + m.x415 <= 10) m.c4098 = Constraint(expr= 10*m.b88 + 10*m.b94 - m.x200 - m.x206 + m.x410 + m.x416 <= 10) m.c4099 = Constraint(expr= 10*m.b88 + 10*m.b95 - m.x200 - m.x207 + m.x410 + m.x417 <= 10) m.c4100 = Constraint(expr= 10*m.b89 + 10*m.b96 - m.x201 - m.x208 + m.x411 + m.x418 <= 10) m.c4101 = Constraint(expr= 10*m.b91 + 10*m.b96 - m.x203 - m.x208 + m.x413 + m.x418 <= 10) m.c4102 = Constraint(expr= 10*m.b93 + 10*m.b99 - m.x205 - m.x211 + m.x415 + m.x421 <= 10) m.c4103 = Constraint(expr= 10*m.b95 + 10*m.b99 - m.x207 - m.x211 + m.x417 + m.x421 <= 10) m.c4104 = Constraint(expr= 10*m.b96 + 10*m.b97 - m.x208 - m.x209 + m.x418 + m.x419 <= 10) m.c4105 = Constraint(expr= 10*m.b98 + 10*m.b99 - m.x210 - m.x211 + m.x420 + m.x421 <= 10) m.c4106 = Constraint(expr= 10*m.b86 + 10*m.b87 + 10*m.b88 - m.x198 - m.x199 - m.x200 + m.x408 + m.x409 + m.x410 <= 10) m.c4107 = Constraint(expr= 10*m.b90 + 10*m.b97 + 10*m.b98 - m.x202 - m.x209 - m.x210 + m.x412 + m.x419 + m.x420 <= 10) m.c4108 = Constraint(expr= 10*m.b92 + 10*m.b97 + 10*m.b98 - m.x204 - m.x209 - m.x210 + m.x414 + m.x419 + m.x420 <= 10) m.c4109 = Constraint(expr= 10*m.b94 + 10*m.b97 + 10*m.b98 - m.x206 - m.x209 - m.x210 + m.x416 + m.x419 + m.x420 <= 10) m.c4110 = Constraint(expr= 10*m.b100 + 10*m.b103 - m.x212 - m.x215 + m.x310 + m.x313 + m.x408 + m.x411 <= 10) m.c4111 = Constraint(expr= 10*m.b100 + 10*m.b104 - m.x212 - m.x216 + m.x310 + m.x314 + m.x408 + m.x412 <= 10) m.c4112 = Constraint(expr= 10*m.b101 + 10*m.b105 - m.x213 - m.x217 + m.x311 + m.x315 + m.x409 + m.x413 <= 10) m.c4113 = Constraint(expr= 10*m.b101 + 10*m.b106 - m.x213 - m.x218 + m.x311 + m.x316 + m.x409 + m.x414 <= 10) m.c4114 = Constraint(expr= 10*m.b101 + 10*m.b107 - m.x213 - m.x219 + m.x311 + m.x317 + m.x409 + m.x415 <= 10) m.c4115 = Constraint(expr= 10*m.b102 + 10*m.b108 - m.x214 - m.x220 + m.x312 + m.x318 + m.x410 + m.x416 <= 10) m.c4116 = Constraint(expr= 10*m.b102 + 10*m.b109 - m.x214 - m.x221 + m.x312 + m.x319 + m.x410 + m.x417 <= 10) m.c4117 = Constraint(expr= 10*m.b103 + 10*m.b110 - m.x215 - m.x222 + m.x313 + m.x320 + m.x411 + m.x418 <= 10) m.c4118 = Constraint(expr= 10*m.b105 + 10*m.b110 - m.x217 - m.x222 + m.x315 + m.x320 + m.x413 + m.x418 <= 10) m.c4119 = Constraint(expr= 10*m.b107 + 10*m.b113 - m.x219 - m.x225 + m.x317 + m.x323 + m.x415 + m.x421 <= 10) m.c4120 = Constraint(expr= 10*m.b109 + 10*m.b113 - m.x221 - m.x225 + m.x319 + m.x323 + m.x417 + m.x421 <= 10) m.c4121 = Constraint(expr= 10*m.b110 + 10*m.b111 - m.x222 - m.x223 + m.x320 + m.x321 + m.x418 + m.x419 <= 10) m.c4122 = Constraint(expr= 10*m.b112 + 10*m.b113 - m.x224 - m.x225 + m.x322 + m.x323 + m.x420 + m.x421 <= 10) m.c4123 = Constraint(expr= 10*m.b100 + 10*m.b101 + 10*m.b102 - m.x212 - m.x213 - m.x214 + m.x310 + m.x311 + m.x312 + m.x408 + m.x409 + m.x410 <= 10) m.c4124 = Constraint(expr= 10*m.b104 + 10*m.b111 + 10*m.b112 - m.x216 - m.x223 - m.x224 + m.x314 + m.x321 + m.x322 + m.x412 + m.x419 + m.x420 <= 10) m.c4125 = Constraint(expr= 10*m.b106 + 10*m.b111 + 10*m.b112 - m.x218 - m.x223 - m.x224 + m.x316 + m.x321 + m.x322 + m.x414 + m.x419 + m.x420 <= 10) m.c4126 = Constraint(expr= 10*m.b108 + 10*m.b111 + 10*m.b112 - m.x220 - m.x223 - m.x224 + m.x318 + m.x321 + m.x322 + m.x416 + m.x419 + m.x420 <= 10) m.c4127 = Constraint(expr= 10*m.b100 + 10*m.b103 - m.x212 - m.x215 + m.x422 + m.x425 <= 10) m.c4128 = Constraint(expr= 10*m.b100 + 10*m.b104 - m.x212 - m.x216 + m.x422 + m.x426 <= 10) m.c4129 = Constraint(expr= 10*m.b101 + 10*m.b105 - m.x213 - m.x217 + m.x423 + m.x427 <= 10) m.c4130 = Constraint(expr= 10*m.b101 + 10*m.b106 - m.x213 - m.x218 + m.x423 + m.x428 <= 10) m.c4131 = Constraint(expr= 10*m.b101 + 10*m.b107 - m.x213 - m.x219 + m.x423 + m.x429 <= 10) m.c4132 = Constraint(expr= 10*m.b102 + 10*m.b108 - m.x214 - m.x220 + m.x424 + m.x430 <= 10) m.c4133 = Constraint(expr= 10*m.b102 + 10*m.b109 - m.x214 - m.x221 + m.x424 + m.x431 <= 10) m.c4134 = Constraint(expr= 10*m.b103 + 10*m.b110 - m.x215 - m.x222 + m.x425 + m.x432 <= 10) m.c4135 = Constraint(expr= 10*m.b105 + 10*m.b110 - m.x217 - m.x222 + m.x427 + m.x432 <= 10) m.c4136 = Constraint(expr= 10*m.b107 + 10*m.b113 - m.x219 - m.x225 + m.x429 + m.x435 <= 10) m.c4137 = Constraint(expr= 10*m.b109 + 10*m.b113 - m.x221 - m.x225 + m.x431 + m.x435 <= 10) m.c4138 = Constraint(expr= 10*m.b110 + 10*m.b111 - m.x222 - m.x223 + m.x432 + m.x433 <= 10) m.c4139 = Constraint(expr= 10*m.b112 + 10*m.b113 - m.x224 - m.x225 + m.x434 + m.x435 <= 10) m.c4140 = Constraint(expr= 10*m.b100 + 10*m.b101 + 10*m.b102 - m.x212 - m.x213 - m.x214 + m.x422 + m.x423 + m.x424 <= 10) m.c4141 = Constraint(expr= 10*m.b104 + 10*m.b111 + 10*m.b112 - m.x216 - m.x223 - m.x224 + m.x426 + m.x433 + m.x434 <= 10) m.c4142 = Constraint(expr= 10*m.b106 + 10*m.b111 + 10*m.b112 - m.x218 - m.x223 - m.x224 + m.x428 + m.x433 + m.x434 <= 10) m.c4143 = Constraint(expr= 10*m.b108 + 10*m.b111 + 10*m.b112 - m.x220 - m.x223 - m.x224 + m.x430 + m.x433 + m.x434 <= 10) m.c4144 = Constraint(expr= - m.b3 - m.b4 - m.b5 - m.b6 + m.b16 <= 0) m.c4145 = Constraint(expr= - m.b2 - m.b4 - m.b7 - m.b8 - m.b9 + m.b17 <= 0) m.c4146 = Constraint(expr= - m.b2 - m.b3 - m.b10 - m.b11 + m.b18 <= 0) m.c4147 = Constraint(expr= - m.b2 - m.b12 + m.b19 <= 0) m.c4148 = Constraint(expr= - m.b2 - m.b13 - m.b14 + m.b20 <= 0) m.c4149 = Constraint(expr= - m.b3 - m.b12 + m.b21 <= 0) m.c4150 = Constraint(expr= - m.b3 - m.b13 - m.b14 + m.b22 <= 0) m.c4151 = Constraint(expr= - m.b3 - m.b15 + m.b23 <= 0) m.c4152 = Constraint(expr= - m.b4 - m.b13 - m.b14 + m.b24 <= 0) m.c4153 = Constraint(expr= - m.b4 - m.b15 + m.b25 <= 0) m.c4154 = Constraint(expr= - m.b5 - m.b7 - m.b13 + m.b26 <= 0) m.c4155 = Constraint(expr= - m.b6 - m.b8 - m.b10 - m.b12 - m.b14 + m.b27 <= 0) m.c4156 = Constraint(expr= - m.b6 - m.b8 - m.b10 - m.b13 - m.b15 + m.b28 <= 0) m.c4157 = Constraint(expr= - m.b9 - m.b11 - m.b14 + m.b29 <= 0) m.c4158 = Constraint(expr= - m.b17 - m.b18 - m.b19 - m.b20 + m.b30 <= 0) m.c4159 = Constraint(expr= - m.b16 - m.b18 - m.b21 - m.b22 - m.b23 + m.b31 <= 0) m.c4160 = Constraint(expr= - m.b16 - m.b17 - m.b24 - m.b25 + m.b32 <= 0) m.c4161 = Constraint(expr= - m.b16 - m.b26 + m.b33 <= 0) m.c4162 = Constraint(expr= - m.b16 - m.b27 - m.b28 + m.b34 <= 0) m.c4163 = Constraint(expr= - m.b17 - m.b26 + m.b35 <= 0) m.c4164 = Constraint(expr= - m.b17 - m.b27 - m.b28 + m.b36 <= 0) m.c4165 = Constraint(expr= - m.b17 - m.b29 + m.b37 <= 0) m.c4166 = Constraint(expr= - m.b18 - m.b27 - m.b28 + m.b38 <= 0) m.c4167 = Constraint(expr= - m.b18 - m.b29 + m.b39 <= 0) m.c4168 = Constraint(expr= - m.b19 - m.b21 - m.b27 + m.b40 <= 0) m.c4169 = Constraint(expr= - m.b20 - m.b22 - m.b24 - m.b26 - m.b28 + m.b41 <= 0) m.c4170 = Constraint(expr= - m.b20 - m.b22 - m.b24 - m.b27 - m.b29 + m.b42 <= 0) m.c4171 = Constraint(expr= - m.b23 - m.b25 - m.b28 + m.b43 <= 0) m.c4172 = Constraint(expr= - m.b31 - m.b32 - m.b33 - m.b34 + m.b44 <= 0) m.c4173 = Constraint(expr= - m.b30 - m.b32 - m.b35 - m.b36 - m.b37 + m.b45 <= 0) m.c4174 = Constraint(expr= - m.b30 - m.b31 - m.b38 - m.b39 + m.b46 <= 0) m.c4175 = Constraint(expr= - m.b30 - m.b40 + m.b47 <= 0) m.c4176 = Constraint(expr= - m.b30 - m.b41 - m.b42 + m.b48 <= 0) m.c4177 = Constraint(expr= - m.b31 - m.b40 + m.b49 <= 0) m.c4178 = Constraint(expr= - m.b31 - m.b41 - m.b42 + m.b50 <= 0) m.c4179 = Constraint(expr= - m.b31 - m.b43 + m.b51 <= 0) m.c4180 = Constraint(expr= - m.b32 - m.b41 - m.b42 + m.b52 <= 0) m.c4181 = Constraint(expr= - m.b32 - m.b43 + m.b53 <= 0) m.c4182 = Constraint(expr= - m.b33 - m.b35 - m.b41 + m.b54 <= 0) m.c4183 = Constraint(expr= - m.b34 - m.b36 - m.b38 - m.b40 - m.b42 + m.b55 <= 0) m.c4184 = Constraint(expr= - m.b34 - m.b36 - m.b38 - m.b41 - m.b43 + m.b56 <= 0) m.c4185 = Constraint(expr= - m.b37 - m.b39 - m.b42 + m.b57 <= 0) m.c4186 = Constraint(expr= - m.b45 - m.b46 - m.b47 - m.b48 + m.b58 <= 0) m.c4187 = Constraint(expr= - m.b44 - m.b46 - m.b49 - m.b50 - m.b51 + m.b59 <= 0) m.c4188 = Constraint(expr= - m.b44 - m.b45 - m.b52 - m.b53 + m.b60 <= 0) m.c4189 = Constraint(expr= - m.b44 - m.b54 + m.b61 <= 0) m.c4190 = Constraint(expr= - m.b44 - m.b55 - m.b56 + m.b62 <= 0) m.c4191 = Constraint(expr= - m.b45 - m.b54 + m.b63 <= 0) m.c4192 = Constraint(expr= - m.b45 - m.b55 - m.b56 + m.b64 <= 0) m.c4193 = Constraint(expr= - m.b45 - m.b57 + m.b65 <= 0) m.c4194 = Constraint(expr= - m.b46 - m.b55 - m.b56 + m.b66 <= 0) m.c4195 = Constraint(expr= - m.b46 - m.b57 + m.b67 <= 0) m.c4196 = Constraint(expr= - m.b47 - m.b49 - m.b55 + m.b68 <= 0) m.c4197 = Constraint(expr= - m.b48 - m.b50 - m.b52 - m.b54 - m.b56 + m.b69 <= 0) m.c4198 = Constraint(expr= - m.b48 - m.b50 - m.b52 - m.b55 - m.b57 + m.b70 <= 0) m.c4199 = Constraint(expr= - m.b51 - m.b53 - m.b56 + m.b71 <= 0) m.c4200 = Constraint(expr= - m.b59 - m.b60 - m.b61 - m.b62 + m.b72 <= 0) m.c4201 = Constraint(expr= - m.b58 - m.b60 - m.b63 - m.b64 - m.b65 + m.b73 <= 0) m.c4202 = Constraint(expr= - m.b58 - m.b59 - m.b66 - m.b67 + m.b74 <= 0) m.c4203 = Constraint(expr= - m.b58 - m.b68 + m.b75 <= 0) m.c4204 = Constraint(expr= - m.b58 - m.b69 - m.b70 + m.b76 <= 0) m.c4205 = Constraint(expr= - m.b59 - m.b68 + m.b77 <= 0) m.c4206 = Constraint(expr= - m.b59 - m.b69 - m.b70 + m.b78 <= 0) m.c4207 = Constraint(expr= - m.b59 - m.b71 + m.b79 <= 0) m.c4208 = Constraint(expr= - m.b60 - m.b69 - m.b70 + m.b80 <= 0) m.c4209 = Constraint(expr= - m.b60 - m.b71 + m.b81 <= 0) m.c4210 = Constraint(expr= - m.b61 - m.b63 - m.b69 + m.b82 <= 0) m.c4211 = Constraint(expr= - m.b62 - m.b64 - m.b66 - m.b68 - m.b70 + m.b83 <= 0) m.c4212 = Constraint(expr= - m.b62 - m.b64 - m.b66 - m.b69 - m.b71 + m.b84 <= 0) m.c4213 = Constraint(expr= - m.b65 - m.b67 - m.b70 + m.b85 <= 0) m.c4214 = Constraint(expr= - m.b73 - m.b74 - m.b75 - m.b76 + m.b86 <= 0) m.c4215 = Constraint(expr= - m.b72 - m.b74 - m.b77 - m.b78 - m.b79 + m.b87 <= 0) m.c4216 = Constraint(expr= - m.b72 - m.b73 - m.b80 - m.b81 + m.b88 <= 0) m.c4217 = Constraint(expr= - m.b72 - m.b82 + m.b89 <= 0) m.c4218 = Constraint(expr= - m.b72 - m.b83 - m.b84 + m.b90 <= 0) m.c4219 = Constraint(expr= - m.b73 - m.b82 + m.b91 <= 0) m.c4220 = Constraint(expr= - m.b73 - m.b83 - m.b84 + m.b92 <= 0) m.c4221 = Constraint(expr= - m.b73 - m.b85 + m.b93 <= 0) m.c4222 = Constraint(expr= - m.b74 - m.b83 - m.b84 + m.b94 <= 0) m.c4223 = Constraint(expr= - m.b74 - m.b85 + m.b95 <= 0) m.c4224 = Constraint(expr= - m.b75 - m.b77 - m.b83 + m.b96 <= 0) m.c4225 = Constraint(expr= - m.b76 - m.b78 - m.b80 - m.b82 - m.b84 + m.b97 <= 0) m.c4226 = Constraint(expr= - m.b76 - m.b78 - m.b80 - m.b83 - m.b85 + m.b98 <= 0) m.c4227 = Constraint(expr= - m.b79 - m.b81 - m.b84 + m.b99 <= 0) m.c4228 = Constraint(expr= - m.b87 - m.b88 - m.b89 - m.b90 + m.b100 <= 0) m.c4229 = Constraint(expr= - m.b86 - m.b88 - m.b91 - m.b92 - m.b93 + m.b101 <= 0) m.c4230 = Constraint(expr= - m.b86 - m.b87 - m.b94 - m.b95 + m.b102 <= 0) m.c4231 = Constraint(expr= - m.b86 - m.b96 + m.b103 <= 0) m.c4232 = Constraint(expr= - m.b86 - m.b97 - m.b98 + m.b104 <= 0) m.c4233 = Constraint(expr= - m.b87 - m.b96 + m.b105 <= 0) m.c4234 = Constraint(expr= - m.b87 - m.b97 - m.b98 + m.b106 <= 0) m.c4235 = Constraint(expr= - m.b87 - m.b99 + m.b107 <= 0) m.c4236 = Constraint(expr= - m.b88 - m.b97 - m.b98 + m.b108 <= 0) m.c4237 = Constraint(expr= - m.b88 - m.b99 + m.b109 <= 0) m.c4238 = Constraint(expr= - m.b89 - m.b91 - m.b97 + m.b110 <= 0) m.c4239 = Constraint(expr= - m.b90 - m.b92 - m.b94 - m.b96 - m.b98 + m.b111 <= 0) m.c4240 = Constraint(expr= - m.b90 - m.b92 - m.b94 - m.b97 - m.b99 + m.b112 <= 0) m.c4241 = Constraint(expr= - m.b93 - m.b95 - m.b98 + m.b113 <= 0)
{"hexsha": "76811ddbffadd4c5e4dfe16ed523124e4b7d0e24", "size": 517559, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/examples/minlplib/crudeoil_lee2_08.py", "max_stars_repo_name": "ouyang-w-19/decogo", "max_stars_repo_head_hexsha": "52546480e49776251d4d27856e18a46f40c824a1", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max_stars_repo_stars_event_min_datetime": "2021-07-03T13:19:10.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-06T10:48:13.000Z", "max_issues_repo_path": "tests/examples/minlplib/crudeoil_lee2_08.py", "max_issues_repo_name": "ouyang-w-19/decogo", "max_issues_repo_head_hexsha": "52546480e49776251d4d27856e18a46f40c824a1", "max_issues_repo_licenses": ["MIT"], "max_issues_count": 1, "max_issues_repo_issues_event_min_datetime": "2021-07-04T14:52:14.000Z", "max_issues_repo_issues_event_max_datetime": "2021-07-15T10:17:11.000Z", "max_forks_repo_path": "tests/examples/minlplib/crudeoil_lee2_08.py", "max_forks_repo_name": "ouyang-w-19/decogo", "max_forks_repo_head_hexsha": "52546480e49776251d4d27856e18a46f40c824a1", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 45.3481994217, "max_line_length": 120, "alphanum_fraction": 0.6047832228, "include": true, "reason": "from pyomo", "num_tokens": 201988}
import unittest import numpy as np import torch from torch.autograd import Variable, grad, gradcheck from qmctorch.wavefunction.jastrows.elec_elec_nuclei.jastrow_factor_electron_electron_nuclei import JastrowFactorElectronElectronNuclei from qmctorch.wavefunction.jastrows.elec_elec_nuclei.kernels.boys_handy_jastrow_kernel import BoysHandyJastrowKernel torch.set_default_tensor_type(torch.DoubleTensor) def hess(out, pos): # compute the jacobian z = Variable(torch.ones(out.shape)) jacob = grad(out, pos, grad_outputs=z, only_inputs=True, create_graph=True)[0] # compute the diagonal element of the Hessian z = Variable(torch.ones(jacob.shape[0])) hess = torch.zeros(jacob.shape) for idim in range(jacob.shape[1]): tmp = grad(jacob[:, idim], pos, grad_outputs=z, only_inputs=True, create_graph=True)[0] hess[:, idim] = tmp[:, idim] return hess class TestThreeBodyBoysHandy(unittest.TestCase): def setUp(self): torch.manual_seed(0) np.random.seed(0) self.nup, self.ndown = 4, 4 self.nelec = self.nup + self.ndown self.natom = 4 self.atoms = 0.1*torch.rand(self.natom, 3) self.jastrow = JastrowFactorElectronElectronNuclei( self.nup, self.ndown, self.atoms, BoysHandyJastrowKernel) self.nbatch = 5 self.pos = 0.1*torch.rand(self.nbatch, self.nelec * 3) self.pos.requires_grad = True def test_grad_elel_distance(self): r = self.jastrow.elel_dist(self.pos) dr = self.jastrow.elel_dist(self.pos, derivative=1) dr_grad = grad( r, self.pos, grad_outputs=torch.ones_like(r))[0] dr_grad = dr_grad.reshape(self.nbatch, self.nelec, 3) dr = dr.sum(-1).permute(0, 2, 1) assert(torch.allclose(2*dr, dr_grad, atol=1E-5)) def test_grad_elnu_distance(self): r = self.jastrow.elnu_dist(self.pos) dr = self.jastrow.elnu_dist(self.pos, derivative=1) dr_grad = grad( r, self.pos, grad_outputs=torch.ones_like(r))[0] dr_grad = dr_grad.reshape(self.nbatch, self.nelec, 3) dr = dr.sum(-1).permute(0, 2, 1) assert(torch.allclose(dr, dr_grad, atol=1E-5)) def test_symmetry(self): val = self.jastrow(self.pos) # test spin up pos_xup = self.pos.clone() perm_up = list(range(self.nelec)) perm_up[0] = 1 perm_up[1] = 0 pos_xup = pos_xup.reshape(self.nbatch, self.nelec, 3) pos_xup = pos_xup[:, perm_up, :].reshape( self.nbatch, self.nelec*3) val_xup = self.jastrow(pos_xup) assert(torch.allclose(val, val_xup, atol=1E-3)) def test_jacobian_jastrow(self): val = self.jastrow(self.pos) dval = self.jastrow(self.pos, derivative=1) dval_grad = grad( val, self.pos, grad_outputs=torch.ones_like(val))[0] dval_grad = dval_grad.view( self.nbatch, self.nelec, 3).sum(2) assert(torch.allclose(dval.sum(), dval_grad.sum())) assert torch.allclose(dval, dval_grad) def test_grad_jastrow(self): val = self.jastrow(self.pos) dval = self.jastrow(self.pos, derivative=1, sum_grad=False) dval_grad = grad( val, self.pos, grad_outputs=torch.ones_like(val))[0] dval_grad = dval_grad.view( self.nbatch, self.nelec, 3) assert(torch.allclose(dval.sum(), dval_grad.sum())) # print(dval.permute(0, 2, 1)) # print(dval_grad) assert torch.allclose(dval.permute(0, 2, 1), dval_grad) def test_hess_jastrow(self): val = self.jastrow(self.pos) d2val_grad = hess(val, self.pos).view( self.nbatch, self.nelec, 3).sum(2) d2val = self.jastrow(self.pos, derivative=2) # print(torch.abs(d2val_grad-d2val)) assert(torch.allclose(d2val.sum(), d2val_grad.sum())) assert torch.allclose(d2val, d2val_grad) if __name__ == "__main__": unittest.main() # t = TestThreeBodyBoysHandy() # t.setUp() # t.test_symmetry() # t.test_grad_jastrow() # t.test_hess_jastrow()
{"hexsha": "b2d31fef1c497064ac8254e5ff8ad35b26f38b7c", "size": 4359, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/wavefunction/jastrows/elec_elec_nuc/test_three_body_jastrow_boys_handy.py", "max_stars_repo_name": "NLESC-JCER/QMCTorch", "max_stars_repo_head_hexsha": "c56472cd3e9cc59f2e01a880e674b7270d2cdc2b", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 16, "max_stars_repo_stars_event_min_datetime": "2020-06-26T17:43:38.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-03T14:16:02.000Z", "max_issues_repo_path": "tests/wavefunction/jastrows/elec_elec_nuc/test_three_body_jastrow_boys_handy.py", "max_issues_repo_name": "NLESC-JCER/QMCTorch", "max_issues_repo_head_hexsha": "c56472cd3e9cc59f2e01a880e674b7270d2cdc2b", "max_issues_repo_licenses": ["Apache-2.0"], "max_issues_count": 57, "max_issues_repo_issues_event_min_datetime": "2020-05-01T07:13:49.000Z", "max_issues_repo_issues_event_max_datetime": "2021-07-13T19:51:55.000Z", "max_forks_repo_path": "tests/wavefunction/jastrows/elec_elec_nuc/test_three_body_jastrow_boys_handy.py", "max_forks_repo_name": "NLESC-JCER/QMCTorch", "max_forks_repo_head_hexsha": "c56472cd3e9cc59f2e01a880e674b7270d2cdc2b", "max_forks_repo_licenses": ["Apache-2.0"], "max_forks_count": 3, "max_forks_repo_forks_event_min_datetime": "2020-07-30T09:56:04.000Z", "max_forks_repo_forks_event_max_datetime": "2021-08-12T02:55:45.000Z", "avg_line_length": 29.06, "max_line_length": 135, "alphanum_fraction": 0.608855242, "include": true, "reason": "import numpy", "num_tokens": 1211}
function z = quad_pos_over_lin( x, y, dim ) %QUAD_POS_OVER_LIN Sum of squares of positives over linear. % Z=QUAD_POS_OVER_LIN(X,Y), where X is a vector and Y is a scalar, is equal to % SUM(MAX(X,0).^2)./Y if Y is positive, and +Inf otherwise. Both X and Y must % be real. % % For matrices, QUAD_POS_OVER_LIN(X,Y) is a row vector containing the % application of QUAD_POS_OVER_LIN to each column. For N-D arrays, the % operation is applied to the first non-singleton dimension of X. % % QUAD_POS_OVER_LIN(X,Y,DIM) takes the sum along the dimension DIM of X. % A special value of DIM == 0, is accepted here, which is automatically % replaced with DIM == NDIMS(X) + 1. This has the effect of eliminating % the sum; thus QUAD_POS_OVER_LIN( X, Y, NDIMS(X) + 1 ) = MAX(X,0).^2./Y. % % In all cases, both X and Y must be real, and Y must either be a scalar % or a matrix of the same size as SUM(X,DIM). % % Disciplined convex programming information: % QUAD_POS_OVER_LIN is convex, nondecreasing in X, and nonincreasing % in Y. Thus when used with CVX expressions, X must be convex (or % affine) and Y must be concave (or affine). % % Check arguments % error( nargchk( 2, 3, nargin ) ); if ~isreal( x ), error( 'First argument must be real.' ); elseif ~isreal( y ), error( 'Second argument must be real.' ); elseif nargin < 3 || isempty( dim ), dim = cvx_default_dimension( size( x ) ); elseif ~cvx_check_dimension( dim ), error( 'Third argument, if supplied, must be a positive integer.' ); end % % Perform calculation % z = quad_over_lin( max( x, 0 ), y, dim ); % Copyright 2010 Michael C. Grant and Stephen P. Boyd. % See the file COPYING.txt for full copyright information. % The command 'cvx_where' will show where this file is located.
{"author": "goodshawn12", "repo": "REST", "sha": "e34ce521fcb36e7813357a9720072dd111edf797", "save_path": "github-repos/MATLAB/goodshawn12-REST", "path": "github-repos/MATLAB/goodshawn12-REST/REST-e34ce521fcb36e7813357a9720072dd111edf797/dependencies/BCILAB/dependencies/cvx-1.21.b795/functions/quad_pos_over_lin.m"}
!############################################################################## ! ________ _____ ______________ ! / ____/ |/ / / / /_ __/ _/ / ! / /_ / /|_/ / / / / / / / // / ! / __/ / / / / /_/ / / / _/ // /___ ! /_/ /_/ /_/\____/ /_/ /___/_____/ ! ! Copyright 2020 Bharat Mahajan ! ! 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. ! !> \brief List module !! \details This module provides the list data structure (similar to !! Python list) represented internally using an array. !! \author Bharat Mahajan !! \date Created: 05/27/2020 ! !############################################################################## module Lists use FMUTILBase implicit none private !> Default number of slots to create on list capacity increase integer, parameter :: DEFAULT_NEWSLOTSALLOCATED = 5 !> List Item type type, private :: ListItem private !> Must be .TRUE. if data item exists logical :: Valid = .FALSE. !> Pointer to the data item class(*), pointer :: item contains private !> Copy the given data in item procedure :: add_listitem !> Deallocate the item procedure :: del_listitem !> Check for valid item procedure :: isvalid_listitem end type ListItem !> List type type, public :: List private !> Status: 0-success, any negative value indicates exception condition integer, public :: status = 0 !> Number of slots that currently contain data integer :: UsedSlots = 0 !> Number of slots that are currently allocated integer :: AllocatedSlots = 0 !> Number of new slots to create on List capacity increase integer :: NewSlotsToAllocate = DEFAULT_NEWSLOTSALLOCATED !> Array of List items type(ListItem), dimension(:), allocatable :: ListData contains private procedure :: AssignList !> Assignment operator for the List type, this enables !! copying of RHS List items to LHS List. Note that !! after this operation, LHS List will be an exact copy !! of the RHS List including data and internal state. generic, public :: assignment(=) => AssignList ! procedure :: ConcatList ! !> Concatenate operator for the List type, this enables ! !! concatenationo of the two lists to create a new list ! !! with the combined contents. ! generic, public :: assignment(//) => ConcatList ! Internal procedures procedure :: create_newslots !> Returns size of the List or number of items stored procedure, public :: Size => list_size !> Push one item at the back of the List procedure, public :: PushBack => push_back !> Pop one item from the back of the List procedure, public :: PopBack => pop_back !> Returns a pointer to the item with the given index (1-based) procedure, public :: Item => item_at !> Returns the item with the index-1 procedure, public :: Front => item_front !> Returns the item with the last index procedure, public :: Back => item_back !> Inserts the item at the given index and relocate !! items at the later indices procedure, public :: Insert => item_insert !> Delete the item at the given index and relocate !! the item at the later indices procedure, public :: Erase => item_erase !> Deallocate unused List slots procedure, public :: ShrinkToFit !> Clear the contents of the List but memory is not deallocated procedure, public :: Clear !> Frees up all the memory allocated final :: Destroy end type List contains !> Returns the total number of items in the List pure function list_size(me) implicit none class(List), intent(in) :: me integer :: list_size list_size = me%UsedSlots end function list_size !> Subroutine to append an element at the back of the list function push_back(me, newitem) result(Index) implicit none class(List), intent(inout) :: me !> item to add to the list class(*), intent(in) :: newitem !> 0 on error, otherwise returns the position of the element integer :: Index Index = 0 if (me%UsedSlots == me%AllocatedSlots) then ! allocate new slots call me%create_newslots(me%NewSlotsToAllocate) if (me%status /= 0) return end if ! copy the item at the back of the list call me%ListData(me%UsedSlots+1)%add_listitem(newitem) me%UsedSlots = me%UsedSlots + 1 Index = me%UsedSlots end function push_back !> Function to extract the last item of List function pop_back(me) result(item) implicit none class(List), intent(inout) :: me class(*), allocatable :: item ! get the last item allocate(item, source=me%Listdata(me%UsedSlots)%item, stat=me%status) ! delete this item call me%ListData(me%UsedSlots)%del_listitem() me%UsedSlots = me%UsedSlots - 1 end function pop_back !> Returns a pointer to the item with the requested index (1-based) !! Pointer will not be associated in case of an exception function item_at(me, Index) result(item) implicit none class(List), intent(inout), target :: me !> Index of the requested item integer, intent(in) :: Index class(*), pointer :: item item => null() ! check if Index is valid if (Index < 1 .OR. Index > me%Size()) return ! If element is valid, return the pointer if (me%Listdata(Index)%isvalid_listitem()) item=>me%Listdata(Index)%item end function item_at !> Returns the item with the index=1 function item_front(me) result(item) implicit none class(List), intent(inout) :: me class(*), allocatable :: item class(*), pointer :: ptr ptr => me%Item(1) allocate(item, source=ptr) end function item_front !> Returns the last item in List function item_back(me) result(item) implicit none class(List), intent(inout) :: me class(*), allocatable :: item class(*), pointer :: ptr ptr => me%Item(me%Size()) allocate(item, source=ptr) end function item_back !> Inserts an item at the given position subroutine item_insert(me, pos, NewItem) implicit none class(List), intent(inout) :: me integer, intent(in) :: pos class(*), intent(in) :: NewItem integer :: ctr ! parameter check if (pos < 1 .OR. pos > (me%Size()+1)) then me%status = -1 return end if ! expand internal array if needed if (me%Size() == me%AllocatedSlots) then ! allocate new slots call me%create_newslots(me%NewSlotsToAllocate) if (me%status /= 0) return end if ! Move the old list item pointers do ctr = me%Size(), pos, -1 call me%ListData(ctr+1)%add_listitem(me%ListData(ctr)%item) end do ! insert the new item call me%ListData(pos)%add_listitem(NewItem) me%UsedSlots = me%UsedSlots + 1 end subroutine item_insert !> Erase an item at the given position subroutine item_erase(me, pos) implicit none class(List), intent(inout) :: me integer, intent(in) :: pos integer :: ctr ! parameter check if (pos < 1 .OR. pos > me%Size()) then me%status = -1 return end if ! delete the element call me%ListData(pos)%del_listitem() ! Move the other list item pointers do ctr = pos, me%Size()-1 call me%ListData(ctr)%add_listitem(me%ListData(ctr+1)%item) end do me%UsedSlots = me%UsedSlots - 1 end subroutine item_erase !> Subroutine to allocate storage for new slots subroutine create_newslots(me, NumSlots) implicit none class(List), intent(inout) :: me !> Number of slots to create integer, intent(in) :: NumSlots type(ListItem), dimension(:), allocatable :: tmp integer :: ctr ! allocate new item array allocate(tmp(me%AllocatedSlots+NumSlots), stat=me%status) if (me%status == 0) then ! if List already has some slots if (me%UsedSlots /= 0) then ! copy the previous data pointers tmp(1:me%AllocatedSlots) = me%ListData end if ! expand the list array call move_alloc(from=tmp, to=me%ListData) me%AllocatedSlots = me%AllocatedSlots + NumSlots end if end subroutine create_newslots !> Subroutine for List assignment operator subroutine AssignList(lhs, rhs) implicit none class(List), intent(out) :: lhs class(List), intent(in) :: rhs integer :: ctr ! we assign the contents by moving all the items of rhs to lhs ! allocate memory for items array allocate(lhs%ListData(rhs%AllocatedSlots)) ! copy items do ctr = 1, rhs%AllocatedSlots call lhs%ListData(ctr)%add_listitem(rhs%ListData(ctr)%item) end do ! copy List state lhs%status = rhs%status lhs%NewSlotsToAllocate = rhs%NewSlotsToAllocate lhs%UsedSlots = rhs%UsedSlots lhs%AllocatedSlots = rhs%AllocatedSlots end subroutine AssignList !> Clear the contents of List subroutine Clear(me) implicit none class(List), intent(inout) :: me integer :: ctr ! clear slots do ctr = 1, me%Size() call me%ListData(ctr)%del_listitem() end do ! used slots are 0 now me%UsedSlots = 0 end subroutine Clear !> Free up unused allocated memory and make List capacity equal to its size subroutine ShrinkToFit(me) implicit none class(List), intent(inout) :: me integer :: ctr type(ListItem), dimension(:), allocatable :: tmp if (me%Size() < me%AllocatedSlots) then ! destroy the slots do ctr = me%Size()+1, me%AllocatedSlots call me%ListData(ctr)%del_listitem() end do me%AllocatedSlots = me%Size() end if if (me%AllocatedSlots < 1) then if (allocated(me%ListData)) deallocate(me%ListData, stat=me%status) else ! shrink the list data pointer array allocate(tmp(1:me%AllocatedSlots), stat=me%status) if (me%status == 0) then tmp = me%ListData(1:me%AllocatedSlots) call move_alloc(from=tmp, to=me%ListData) end if end if end subroutine ShrinkToFit !> Destructor subroutine Destroy(me) implicit none type(List), intent(inout) :: me integer :: ctr ! free up memory held up by all the slots do ctr = 1, me%Size() call me%ListData(ctr)%del_listitem() end do end subroutine Destroy ! List Item procedures elemental subroutine add_listitem(me, item) implicit none class(ListItem), intent(inout) :: me !> new item to be allocated class(*), intent(in) :: item integer :: status allocate(me%item, source=item, stat=status) if (status == 0) then me%Valid = .TRUE. else me%Valid = .False. if (associated(me%item)) deallocate(me%item) me%item => null() end if end subroutine add_listitem subroutine del_listitem(me) implicit none class(ListItem), intent(inout) :: me if (associated(me%item)) deallocate(me%item) me%item => null() me%Valid = .False. end subroutine del_listitem pure elemental function isvalid_listitem(me) implicit none class(ListItem), intent(in) :: me logical :: isvalid_listitem isvalid_listitem = me%Valid end function isvalid_listitem end module Lists
{"hexsha": "91f3c065bec1092b9483e1772fb367808dfa557b", "size": 12246, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/datastructs/list.f90", "max_stars_repo_name": "princemahajan/FMUTIL", "max_stars_repo_head_hexsha": "30f19755291276287a2ab0cbf25b466f8a4be8d7", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 2, "max_stars_repo_stars_event_min_datetime": "2020-06-28T02:53:11.000Z", "max_stars_repo_stars_event_max_datetime": "2020-07-02T11:16:13.000Z", "max_issues_repo_path": "src/datastructs/list.f90", "max_issues_repo_name": "princemahajan/FMUTIL", "max_issues_repo_head_hexsha": "30f19755291276287a2ab0cbf25b466f8a4be8d7", "max_issues_repo_licenses": ["Apache-2.0"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/datastructs/list.f90", "max_forks_repo_name": "princemahajan/FMUTIL", "max_forks_repo_head_hexsha": "30f19755291276287a2ab0cbf25b466f8a4be8d7", "max_forks_repo_licenses": ["Apache-2.0"], "max_forks_count": 1, "max_forks_repo_forks_event_min_datetime": "2020-06-28T09:01:39.000Z", "max_forks_repo_forks_event_max_datetime": "2020-06-28T09:01:39.000Z", "avg_line_length": 26.2226980728, "max_line_length": 79, "alphanum_fraction": 0.6215090642, "num_tokens": 3133}
# MIT License # # Copyright (c) 2017 Tom Runia # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to conditions. # # Author: Tom Runia # Date Created: 2017-08-15 from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import numpy as np from scipy import misc from feature_extractor.feature_extractor import FeatureExtractor import feature_extractor.utils as utils def classification_queue_input(feature_extractor, image_path, logits_name, batch_size, num_classes): ''' Example function for performing image classification using a pre-trained network. This tests the filename queue as input method. Given a list of image files to process, these are fed into the filename queue and then the images are dequeued from the queue and classified. :param feature_extractor: object, TF feature extractor :param image_path: str, path to directory containing images :param logits_name: str, name of logits layer in network :param batch_size: int, batch size :param num_classes: int, number of classes for ImageNet (1000 or 1001) :return: ''' # Add a list of images to process image_files = utils.find_files(image_path, ("jpg", "png")) # Push the images through the network feature_extractor.enqueue_image_files(image_files) outputs = feature_extractor.feed_forward_batch([logits_name], fetch_images=True) # Compute the predictions, note that we asume layer_names[0] corresponds to logits predictions = np.squeeze(outputs[logits_name]) predictions = np.argmax(predictions, axis=1) for i in range(batch_size): image = misc.imread(image_files[i]) class_index = predictions[i] if num_classes == 1001 else predictions[i]+1 utils.display_imagenet_prediction(image, class_index) def classification_placeholder_input(feature_extractor, image_path, logits_name, batch_size, num_classes): ''' Example function for performing image classification using a pre-trained network. This function test simple the simple input method using placeholders. It loads one batch of images from disk, pre-processes them using Inception pre-processing and then feed-forwards them through the network. Input images and predicted ImageNet classes are displayed once finished. :param feature_extractor: object, TF feature extractor :param image_path: str, path to directory containing images :param logits_name: str, name of logits layer in network :param batch_size: int, batch size :param num_classes: int, number of classes for ImageNet (1000 or 1001) :return: ''' # Add a list of images to process image_files = utils.find_files(image_path, ("jpg", "png")) # Load one batch of images batch_images = np.zeros([batch_size, feature_extractor.image_size, feature_extractor.image_size, 3], dtype=np.float32) for i in range(batch_size): # Note: this corresponds to 'inception' preprocessing. You don't need # this when using the queues as input pipeline, since the get_preprocessing() # function automatically determines it. image = misc.imread(image_files[i]) image = misc.imresize( image, (feature_extractor.image_size, feature_extractor.image_size)) image = (image/255.0).astype(dtype=np.float32) image -= 0.5 image *= 2.0 batch_images[i] = image # Push the images through the network outputs = feature_extractor.feed_forward_batch( [logits_name], batch_images, fetch_images=True) # Compute the predictions, note that we asume layer_names[0] corresponds to logits predictions = np.squeeze(outputs[logits_name]) predictions = np.argmax(predictions, axis=1) # Display predictions for i in range(batch_size): image = (((batch_images[i]/2.0)+0.5)*255.0).astype(np.uint8) class_index = predictions[i] if num_classes == 1001 else predictions[i]+1 utils.display_imagenet_prediction(image, class_index) ################################################################################ ################################################################################ ################################################################################ if __name__ == "__main__": parser = argparse.ArgumentParser(description="TensorFlow feature extraction") parser.add_argument("--network", dest="network_name", type=str, required=True, help="model name, e.g. 'resnet_v2_101'") parser.add_argument("--checkpoint", dest="checkpoint", type=str, required=True, help="path to pre-trained checkpoint file") parser.add_argument("--image_path", dest="image_path", type=str, required=True, help="path to directory containing images") parser.add_argument("--logits_name", dest="logits_name", type=str, required=True, help="name of logits layer in network") parser.add_argument("--preproc_func", dest="preproc_func", type=str, default=None, help="force the image preprocessing function (None)") parser.add_argument("--batch_size", dest="batch_size", type=int, default=32, help="batch size (32)") parser.add_argument("--num_classes", dest="num_classes", type=int, default=1001, help="number of classes (1001)") args = parser.parse_args() # Initialize the feature extractor feature_extractor = FeatureExtractor( network_name=args.network_name, checkpoint_path=args.checkpoint, batch_size=args.batch_size, num_classes=args.num_classes, preproc_func_name=args.preproc_func) # Print the network summary, use these layer names for feature extraction feature_extractor.print_network_summary() # OPTION 1. Test image classification using a filename queue to feed images classification_queue_input( feature_extractor, args.image_path, args.logits_name, args.batch_size, args.num_classes) # OPTION 2. Test image classification by manually feeding images into placeholders classification_placeholder_input( feature_extractor, args.image_path, args.logits_name, args.batch_size, args.num_classes)
{"hexsha": "343f56a583e8caa058ebadc3c837a30874dad286", "size": 6647, "ext": "py", "lang": "Python", "max_stars_repo_path": "feature_extraction/example_classification.py", "max_stars_repo_name": "ec500-software-engineering/project-07-aurora-borealis-classification", "max_stars_repo_head_hexsha": "9ad1627741a6b3af4a9ba118095580418ff5a533", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_stars_repo_stars_event_min_datetime": "2019-04-21T16:37:55.000Z", "max_stars_repo_stars_event_max_datetime": "2019-04-21T16:37:55.000Z", "max_issues_repo_path": "feature_extraction/example_classification.py", "max_issues_repo_name": "ec500-software-engineering/project-aurora-borealis-classification", "max_issues_repo_head_hexsha": "9ad1627741a6b3af4a9ba118095580418ff5a533", "max_issues_repo_licenses": ["MIT"], "max_issues_count": 1, "max_issues_repo_issues_event_min_datetime": "2019-04-28T22:48:10.000Z", "max_issues_repo_issues_event_max_datetime": "2019-04-28T22:48:10.000Z", "max_forks_repo_path": "feature_extraction/example_classification.py", "max_forks_repo_name": "ec500-software-engineering/project-aurora-borealis-classification", "max_forks_repo_head_hexsha": "9ad1627741a6b3af4a9ba118095580418ff5a533", "max_forks_repo_licenses": ["MIT"], "max_forks_count": 1, "max_forks_repo_forks_event_min_datetime": "2019-05-08T03:54:00.000Z", "max_forks_repo_forks_event_max_datetime": "2019-05-08T03:54:00.000Z", "avg_line_length": 44.610738255, "max_line_length": 140, "alphanum_fraction": 0.6992628253, "include": true, "reason": "import numpy,from scipy", "num_tokens": 1390}
[STATEMENT] lemma exec_mbindFStop_E: assumes seq : "(\<sigma> \<Turnstile> (s \<leftarrow> mbind\<^sub>F\<^sub>a\<^sub>i\<^sub>l\<^sub>S\<^sub>t\<^sub>o\<^sub>p (a#S) ioprog ; (P s)))" and some: "\<And>b \<sigma>'. ioprog a \<sigma> = Some(b,\<sigma>') \<Longrightarrow> (\<sigma>'\<Turnstile> (s \<leftarrow> mbind\<^sub>F\<^sub>a\<^sub>i\<^sub>l\<^sub>S\<^sub>t\<^sub>o\<^sub>p S ioprog;(P(b#s)))) \<Longrightarrow> Q" shows "Q" [PROOF STATE] proof (prove) goal (1 subgoal): 1. Q [PROOF STEP] using seq [PROOF STATE] proof (prove) using this: \<sigma> \<Turnstile> bind\<^sub>S\<^sub>E (mbind\<^sub>F\<^sub>a\<^sub>i\<^sub>l\<^sub>S\<^sub>t\<^sub>o\<^sub>p (a # S) ioprog) P goal (1 subgoal): 1. Q [PROOF STEP] proof(cases "ioprog a \<sigma>") [PROOF STATE] proof (state) goal (2 subgoals): 1. \<lbrakk>\<sigma> \<Turnstile> bind\<^sub>S\<^sub>E (mbind\<^sub>F\<^sub>a\<^sub>i\<^sub>l\<^sub>S\<^sub>t\<^sub>o\<^sub>p (a # S) ioprog) P; ioprog a \<sigma> = None\<rbrakk> \<Longrightarrow> Q 2. \<And>aa. \<lbrakk>\<sigma> \<Turnstile> bind\<^sub>S\<^sub>E (mbind\<^sub>F\<^sub>a\<^sub>i\<^sub>l\<^sub>S\<^sub>t\<^sub>o\<^sub>p (a # S) ioprog) P; ioprog a \<sigma> = Some aa\<rbrakk> \<Longrightarrow> Q [PROOF STEP] case None [PROOF STATE] proof (state) this: ioprog a \<sigma> = None goal (2 subgoals): 1. \<lbrakk>\<sigma> \<Turnstile> bind\<^sub>S\<^sub>E (mbind\<^sub>F\<^sub>a\<^sub>i\<^sub>l\<^sub>S\<^sub>t\<^sub>o\<^sub>p (a # S) ioprog) P; ioprog a \<sigma> = None\<rbrakk> \<Longrightarrow> Q 2. \<And>aa. \<lbrakk>\<sigma> \<Turnstile> bind\<^sub>S\<^sub>E (mbind\<^sub>F\<^sub>a\<^sub>i\<^sub>l\<^sub>S\<^sub>t\<^sub>o\<^sub>p (a # S) ioprog) P; ioprog a \<sigma> = Some aa\<rbrakk> \<Longrightarrow> Q [PROOF STEP] assume ass:"ioprog a \<sigma> = None" [PROOF STATE] proof (state) this: ioprog a \<sigma> = None goal (2 subgoals): 1. \<lbrakk>\<sigma> \<Turnstile> bind\<^sub>S\<^sub>E (mbind\<^sub>F\<^sub>a\<^sub>i\<^sub>l\<^sub>S\<^sub>t\<^sub>o\<^sub>p (a # S) ioprog) P; ioprog a \<sigma> = None\<rbrakk> \<Longrightarrow> Q 2. \<And>aa. \<lbrakk>\<sigma> \<Turnstile> bind\<^sub>S\<^sub>E (mbind\<^sub>F\<^sub>a\<^sub>i\<^sub>l\<^sub>S\<^sub>t\<^sub>o\<^sub>p (a # S) ioprog) P; ioprog a \<sigma> = Some aa\<rbrakk> \<Longrightarrow> Q [PROOF STEP] show "Q" [PROOF STATE] proof (prove) goal (1 subgoal): 1. Q [PROOF STEP] apply(insert ass seq) [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>ioprog a \<sigma> = None; \<sigma> \<Turnstile> bind\<^sub>S\<^sub>E (mbind\<^sub>F\<^sub>a\<^sub>i\<^sub>l\<^sub>S\<^sub>t\<^sub>o\<^sub>p (a # S) ioprog) P\<rbrakk> \<Longrightarrow> Q [PROOF STEP] apply(drule_tac \<sigma>=\<sigma> and S=S and M=P in exec_mbindFStop_failure, simp) [PROOF STATE] proof (prove) goal: No subgoals! [PROOF STEP] done [PROOF STATE] proof (state) this: Q goal (1 subgoal): 1. \<And>aa. \<lbrakk>\<sigma> \<Turnstile> bind\<^sub>S\<^sub>E (mbind\<^sub>F\<^sub>a\<^sub>i\<^sub>l\<^sub>S\<^sub>t\<^sub>o\<^sub>p (a # S) ioprog) P; ioprog a \<sigma> = Some aa\<rbrakk> \<Longrightarrow> Q [PROOF STEP] next [PROOF STATE] proof (state) goal (1 subgoal): 1. \<And>aa. \<lbrakk>\<sigma> \<Turnstile> bind\<^sub>S\<^sub>E (mbind\<^sub>F\<^sub>a\<^sub>i\<^sub>l\<^sub>S\<^sub>t\<^sub>o\<^sub>p (a # S) ioprog) P; ioprog a \<sigma> = Some aa\<rbrakk> \<Longrightarrow> Q [PROOF STEP] case (Some aa) [PROOF STATE] proof (state) this: ioprog a \<sigma> = Some aa goal (1 subgoal): 1. \<And>aa. \<lbrakk>\<sigma> \<Turnstile> bind\<^sub>S\<^sub>E (mbind\<^sub>F\<^sub>a\<^sub>i\<^sub>l\<^sub>S\<^sub>t\<^sub>o\<^sub>p (a # S) ioprog) P; ioprog a \<sigma> = Some aa\<rbrakk> \<Longrightarrow> Q [PROOF STEP] assume ass:"ioprog a \<sigma> = Some aa" [PROOF STATE] proof (state) this: ioprog a \<sigma> = Some aa goal (1 subgoal): 1. \<And>aa. \<lbrakk>\<sigma> \<Turnstile> bind\<^sub>S\<^sub>E (mbind\<^sub>F\<^sub>a\<^sub>i\<^sub>l\<^sub>S\<^sub>t\<^sub>o\<^sub>p (a # S) ioprog) P; ioprog a \<sigma> = Some aa\<rbrakk> \<Longrightarrow> Q [PROOF STEP] show "Q" [PROOF STATE] proof (prove) goal (1 subgoal): 1. Q [PROOF STEP] apply(insert ass,cases "aa",simp, rename_tac "out" "\<sigma>'") [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<And>out \<sigma>'. \<lbrakk>ioprog a \<sigma> = Some (out, \<sigma>'); aa = (out, \<sigma>')\<rbrakk> \<Longrightarrow> Q [PROOF STEP] apply(erule some) [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<And>out \<sigma>'. aa = (out, \<sigma>') \<Longrightarrow> \<sigma>' \<Turnstile> _bind_SE s (mbind\<^sub>F\<^sub>a\<^sub>i\<^sub>l\<^sub>S\<^sub>t\<^sub>o\<^sub>p S ioprog) (P (out # s)) [PROOF STEP] apply(insert ass,simp) [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<And>out \<sigma>'. \<lbrakk>aa = (out, \<sigma>'); ioprog a \<sigma> = Some (out, \<sigma>')\<rbrakk> \<Longrightarrow> \<sigma>' \<Turnstile> _bind_SE s (mbind\<^sub>F\<^sub>a\<^sub>i\<^sub>l\<^sub>S\<^sub>t\<^sub>o\<^sub>p S ioprog) (P (out # s)) [PROOF STEP] apply(erule_tac ioprog1=ioprog in exec_mbindFStop_success[THEN iffD1],rule seq) [PROOF STATE] proof (prove) goal: No subgoals! [PROOF STEP] done [PROOF STATE] proof (state) this: Q goal: No subgoals! [PROOF STEP] qed
{"llama_tokens": 2298, "file": "Clean_src_Symbex_MonadSE", "length": 18}
function CatStr(s1::Array,sep::AbstractString,s2::Array) #Assume s1 and s2 are arrays of String #Also sep is a string s12 = s1 .* [sep] .* s2 return s12 end
{"hexsha": "4228368daf58f9fe05e583e824356436be7b0530", "size": 176, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/CatStr.jl", "max_stars_repo_name": "achen12/julia-d4m", "max_stars_repo_head_hexsha": "29b90b63ca620b726ced121d76c2d4912354dc4d", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 7, "max_stars_repo_stars_event_min_datetime": "2015-12-05T04:43:10.000Z", "max_stars_repo_stars_event_max_datetime": "2019-02-18T02:51:12.000Z", "max_issues_repo_path": "src/CatStr.jl", "max_issues_repo_name": "achen12/D4M.jl", "max_issues_repo_head_hexsha": "29b90b63ca620b726ced121d76c2d4912354dc4d", "max_issues_repo_licenses": ["Apache-2.0"], "max_issues_count": 14, "max_issues_repo_issues_event_min_datetime": "2015-11-07T22:31:17.000Z", "max_issues_repo_issues_event_max_datetime": "2016-10-20T02:59:11.000Z", "max_forks_repo_path": "src/CatStr.jl", "max_forks_repo_name": "achen12/julia-d4m", "max_forks_repo_head_hexsha": "29b90b63ca620b726ced121d76c2d4912354dc4d", "max_forks_repo_licenses": ["Apache-2.0"], "max_forks_count": 2, "max_forks_repo_forks_event_min_datetime": "2017-10-02T14:20:30.000Z", "max_forks_repo_forks_event_max_datetime": "2021-10-01T18:44:19.000Z", "avg_line_length": 25.1428571429, "max_line_length": 56, "alphanum_fraction": 0.6420454545, "num_tokens": 60}
module Prinz using ModelingToolkit using ..NeuronBuilder import ..get_parameters, ..get_states, ..default_params, ..default_states include("channels.jl") include("calc_dynamics.jl") export get_parameters, get_states, default_params, default_states end
{"hexsha": "adf87f9d20be01e6ca16daa9ee735efa4e6c193e", "size": 258, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/assets/Prinz/Prinz.jl", "max_stars_repo_name": "Dhruva2/NeuronBuilder.jl", "max_stars_repo_head_hexsha": "06ab50874d84c33ae25e120ca4b29d2b1ac293a9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "max_stars_repo_stars_event_min_datetime": "2022-03-30T14:19:29.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-31T10:25:45.000Z", "max_issues_repo_path": "src/assets/Prinz/Prinz.jl", "max_issues_repo_name": "Dhruva2/NeuronBuilder.jl", "max_issues_repo_head_hexsha": "06ab50874d84c33ae25e120ca4b29d2b1ac293a9", "max_issues_repo_licenses": ["MIT"], "max_issues_count": 1, "max_issues_repo_issues_event_min_datetime": "2022-03-27T11:55:16.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-31T16:11:27.000Z", "max_forks_repo_path": "src/assets/Prinz/Prinz.jl", "max_forks_repo_name": "Dhruva2/NeuronBuilder.jl", "max_forks_repo_head_hexsha": "06ab50874d84c33ae25e120ca4b29d2b1ac293a9", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 17.2, "max_line_length": 73, "alphanum_fraction": 0.8023255814, "num_tokens": 60}
//------------------------------------------------------------------------------ /// \file BinaryTrees_tests.cpp /// \date 20201023 03:44 //------------------------------------------------------------------------------ #include "DataStructures/BinaryTrees.h" #include <boost/test/unit_test.hpp> #include <string> #include <vector> using DataStructures::BinaryTrees::TreeNode; using DataStructures::BinaryTrees::balance_max_height_recursive; using DataStructures::BinaryTrees::inorder_traversal_iterative; using DataStructures::BinaryTrees::inorder_traversal_recursive; using DataStructures::BinaryTrees::is_same_recursive; using DataStructures::BinaryTrees::level_order_traversal; using DataStructures::BinaryTrees::max_depth; using DataStructures::BinaryTrees::postorder_traversal_iterative_simple; using DataStructures::BinaryTrees::postorder_traversal_recursive; using DataStructures::BinaryTrees::preorder_traversal; using DataStructures::BinaryTrees::preorder_traversal_recursive; using DataStructures::BinaryTrees::serialize; using std::string; using std::vector; BOOST_AUTO_TEST_SUITE(DataStructures) BOOST_AUTO_TEST_SUITE(BinaryTrees_tests) // cf. https://leetcode.com/explore/learn/card/data-structure-tree/134/traverse-a-tree/992/ TreeNode example_root {6}; TreeNode d11 {2}; TreeNode d12 {7}; TreeNode d21 {1}; TreeNode d22 {4}; TreeNode d23 {9}; TreeNode d31 {3}; TreeNode d32 {5}; TreeNode d33 {8}; TreeNode example_root_A {1}; TreeNode d11_A {2}; TreeNode d12_A {3}; TreeNode d21_A {4}; TreeNode d22_A {5}; TreeNode d23_A {6}; TreeNode example_root_B {3}; TreeNode d11_B {9}; TreeNode d12_B {20}; TreeNode d21_B {15}; TreeNode d22_B {7}; TreeNode leaf {42}; TreeNode base_case_1_root {1}; TreeNode base_case_1_d11 {2}; TreeNode base_case_1_d12 {3}; //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ BOOST_AUTO_TEST_CASE(PreorderTraversalTraversesFirstEncounters) { example_root.left_ = &d11; example_root.right_ = &d12; d11.left_ = &d21; d11.right_ = &d22; d22.left_ = &d31; d22.right_ = &d32; d12.right_ = &d23; d23.right_ = &d33; TreeNode* example_root_ptr {&example_root}; vector<int> result {preorder_traversal(example_root_ptr)}; vector<int> expected {6, 2, 1, 4, 3, 5, 7, 9, 8}; BOOST_TEST(result == expected); } //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ BOOST_AUTO_TEST_CASE(PreorderTraversalRecursiveTraversesFirstEncounters) { example_root.left_ = &d11; example_root.right_ = &d12; d11.left_ = &d21; d11.right_ = &d22; d22.left_ = &d31; d22.right_ = &d32; d12.right_ = &d23; d23.right_ = &d33; TreeNode* example_root_ptr {&example_root}; vector<int> result {preorder_traversal_recursive(example_root_ptr)}; vector<int> expected {6, 2, 1, 4, 3, 5, 7, 9, 8}; BOOST_TEST(result == expected); } //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ BOOST_AUTO_TEST_CASE(InorderTraversalIterativeTraversesAfterLeftSubtree) { example_root_A.left_ = &d11_A; example_root_A.right_ = &d12_A; d11_A.left_ = &d21_A; d11_A.right_ = &d22_A; d12_A.left_ = &d23_A; TreeNode* example_root_ptr {&example_root_A}; vector<int> result {inorder_traversal_iterative(example_root_ptr)}; vector<int> expected {4, 2, 5, 1, 6, 3}; BOOST_TEST(result == expected); } //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ BOOST_AUTO_TEST_CASE(InorderTraversalRecursiveTraversesAfterLeftSubtree) { example_root.left_ = &d11; example_root.right_ = &d12; d11.left_ = &d21; d11.right_ = &d22; d22.left_ = &d31; d22.right_ = &d32; d12.right_ = &d23; d23.right_ = &d33; TreeNode* example_root_ptr {&example_root}; vector<int> result {inorder_traversal_recursive(example_root_ptr)}; vector<int> expected {1, 2, 3, 4, 5, 6, 7, 9, 8}; BOOST_TEST(result == expected); } //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ BOOST_AUTO_TEST_CASE(PostorderTraversalIterativeTraversesAfterRightSubtree) { example_root_A.left_ = &d11_A; example_root_A.right_ = &d12_A; d11_A.left_ = &d21_A; d11_A.right_ = &d22_A; d12_A.left_ = &d23_A; TreeNode* example_root_ptr {&example_root_A}; vector<int> result {postorder_traversal_iterative(example_root_ptr)}; vector<int> expected {4, 5, 2, 6, 3, 1}; BOOST_TEST(result == expected); } //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ BOOST_AUTO_TEST_CASE(PostorderTraversalRecursiveTraversesAfterRightSubtree) { example_root.left_ = &d11; example_root.right_ = &d12; d11.left_ = &d21; d11.right_ = &d22; d22.left_ = &d31; d22.right_ = &d32; d12.right_ = &d23; d23.right_ = &d33; TreeNode* example_root_ptr {&example_root}; vector<int> result {postorder_traversal_recursive(example_root_ptr)}; vector<int> expected {1, 3, 5, 4, 2, 8, 9, 7, 6}; BOOST_TEST(result == expected); } //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ BOOST_AUTO_TEST_CASE( PostorderTraversalIterativeSimpleTraversesAfterRightSubtree) { example_root_A.left_ = &d11_A; example_root_A.right_ = &d12_A; d11_A.left_ = &d21_A; d11_A.right_ = &d22_A; d12_A.left_ = &d23_A; TreeNode* example_root_ptr {&example_root_A}; vector<int> result {postorder_traversal_iterative_simple(example_root_ptr)}; vector<int> expected {4, 5, 2, 6, 3, 1}; BOOST_TEST(result == expected); } //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ BOOST_AUTO_TEST_CASE(LevelOrderTraversalReturnsNodesInByLevels) { example_root_B.left_ = &d11_B; example_root_B.right_ = &d12_B; d12_B.left_ = &d21_B; d12_B.right_ = &d22_B; TreeNode* example_root_ptr {&example_root_B}; vector<vector<int>> result {level_order_traversal(example_root_ptr)}; BOOST_TEST(result.at(0) == vector<int>{3}); BOOST_TEST(result.at(1) == vector<int>({9, 20})); BOOST_TEST(result.at(2) == vector<int>({15, 7})); BOOST_TEST(result.size() == 3); } //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ BOOST_AUTO_TEST_CASE(MaxDepthFindsMaximumDepth) { example_root_B.left_ = &d11_B; example_root_B.right_ = &d12_B; d12_B.left_ = &d21_B; d12_B.right_ = &d22_B; TreeNode* example_root_ptr {&example_root_B}; const int result {max_depth(example_root_ptr)}; BOOST_TEST(result == 3); } //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ BOOST_AUTO_TEST_CASE(BalanceMaxHeightRecursiveWorksOnSimpleBaseCases) { { TreeNode* example_ptr {nullptr}; const auto result = balance_max_height_recursive(example_ptr); BOOST_TEST(result.first == true); BOOST_TEST(result.second == -1); } { // Check if we have the test setup initial conditions we want. TreeNode* example_root_ptr {&leaf}; BOOST_TEST(example_root_ptr->left_ == nullptr); BOOST_TEST(example_root_ptr->right_ == nullptr); const auto result = balance_max_height_recursive(example_root_ptr); BOOST_TEST(result.first == true); BOOST_TEST(result.second == 0); } { base_case_1_root.left_ = &base_case_1_d11; base_case_1_root.right_ = &base_case_1_d12; TreeNode* example_root_ptr {&base_case_1_root}; const auto result = balance_max_height_recursive(example_root_ptr); BOOST_TEST(result.first == true); BOOST_TEST(result.second == 1); } { TreeNode* example_root_ptr {&example_root_B}; BOOST_TEST(example_root_ptr->left_ != nullptr); BOOST_TEST(example_root_ptr->right_ != nullptr); const auto result = balance_max_height_recursive(example_root_ptr); BOOST_TEST(result.first == true); BOOST_TEST(result.second == 2); } } TreeNode height_example_1_root {3}; TreeNode height_example_1_d11 {9}; TreeNode height_example_1_d12 {20}; TreeNode height_example_1_d21 {15}; TreeNode height_example_1_d22 {7}; TreeNode height_example_2_root {1}; TreeNode height_example_2_d11 {2}; TreeNode height_example_2_d12 {2}; TreeNode height_example_2_d21 {3}; TreeNode height_example_2_d22 {3}; TreeNode height_example_2_d31 {4}; TreeNode height_example_2_d32 {4}; //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ BOOST_AUTO_TEST_CASE(BalanceMaxHeightRecursiveDeterminesBalanceProperty) { { TreeNode* example_root_ptr {&example_root_B}; BOOST_TEST(example_root_ptr->left_ != nullptr); BOOST_TEST(example_root_ptr->right_ != nullptr); const auto result = balance_max_height_recursive(example_root_ptr); BOOST_TEST(result.first == true); BOOST_TEST(result.second == 2); } { TreeNode* example_root_ptr {&example_root_A}; BOOST_TEST(example_root_ptr->left_ != nullptr); BOOST_TEST(example_root_ptr->right_ != nullptr); const auto result = balance_max_height_recursive(example_root_ptr); BOOST_TEST(result.first == true); BOOST_TEST(result.second == 2); } { TreeNode* example_root_ptr {&example_root}; BOOST_TEST(example_root_ptr->left_ != nullptr); BOOST_TEST(example_root_ptr->right_ != nullptr); const auto result = balance_max_height_recursive(example_root_ptr); BOOST_TEST(result.first == false); BOOST_TEST(result.second == 3); } { height_example_1_root.left_ = &height_example_1_d11; height_example_1_root.right_ = &height_example_1_d12; height_example_1_d12.left_ = &height_example_1_d21; height_example_1_d12.right_ = &height_example_1_d22; TreeNode* example_root_ptr {&height_example_1_root}; BOOST_TEST(example_root_ptr->left_ != nullptr); BOOST_TEST(example_root_ptr->right_ != nullptr); const auto result = balance_max_height_recursive(example_root_ptr); BOOST_TEST(result.first == true); BOOST_TEST(result.second == 2); } { height_example_2_root.left_ = &height_example_2_d11; height_example_2_root.right_ = &height_example_2_d12; height_example_2_d11.left_ = &height_example_2_d21; height_example_2_d11.right_ = &height_example_2_d22; height_example_2_d21.left_ = &height_example_2_d31; height_example_2_d21.right_ = &height_example_2_d32; TreeNode* example_root_ptr {&height_example_2_root}; BOOST_TEST(example_root_ptr->left_ != nullptr); BOOST_TEST(example_root_ptr->right_ != nullptr); const auto result = balance_max_height_recursive(example_root_ptr); BOOST_TEST(result.first == false); BOOST_TEST(result.second == 3); } } /// cf. https://www.techiedelight.com/check-if-two-binary-trees-are-identical-not-iterative-recursive/ /// cf. https://medium.com/techie-delight/binary-tree-interview-questions-and-practice-problems-439df7e5ea1f //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ BOOST_AUTO_TEST_CASE(IsSameRecursiveReturnsTrueForSameTrees) { { TreeNode x {15}; TreeNode x_d11 {10}; TreeNode x_d12 {20}; TreeNode x_d21 {8}; TreeNode x_d22 {12}; TreeNode x_d23 {16}; TreeNode x_d24 {25}; TreeNode* x_ptr {&x}; x_ptr->left_ = &x_d11; x_ptr->right_ = &x_d12; x_ptr->left_->left_ = &x_d21; x_ptr->left_->right_ = &x_d22; x_ptr->right_->left_ = &x_d23; x_ptr->right_->left_ = &x_d24; TreeNode y {15}; TreeNode y_d11 {10}; TreeNode y_d12 {20}; TreeNode y_d21 {8}; TreeNode y_d22 {12}; TreeNode y_d23 {16}; TreeNode y_d24 {25}; TreeNode* y_ptr {&y}; y_ptr->left_ = &y_d11; y_ptr->right_ = &y_d12; y_ptr->left_->left_ = &y_d21; y_ptr->left_->right_ = &y_d22; y_ptr->right_->left_ = &y_d23; y_ptr->right_->left_ = &y_d24; BOOST_TEST(is_same_recursive(x_ptr, y_ptr)); } { TreeNode* example_root_ptr {&example_root}; TreeNode* example_root_A_ptr {&example_root_A}; BOOST_TEST(!is_same_recursive(example_root_ptr, example_root_A_ptr)); } } //------------------------------------------------------------------------------ /// cf. https://leetcode.com/problems/serialize-and-deserialize-binary-tree/ //------------------------------------------------------------------------------ TreeNode serialize_example_1_root {1}; TreeNode serialize_example_1_d11 {2}; TreeNode serialize_example_1_d12 {3}; TreeNode serialize_example_1_d21 {4}; TreeNode serialize_example_1_d22 {5}; //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ BOOST_AUTO_TEST_CASE(SerializeSerializesBinaryTree) { serialize_example_1_root.left_ = &serialize_example_1_d11; serialize_example_1_root.right_ = &serialize_example_1_d12; serialize_example_1_d12.left_ = &serialize_example_1_d21; serialize_example_1_d12.right_ = &serialize_example_1_d22; TreeNode* example_root_ptr {&serialize_example_1_root}; const string result {serialize(example_root_ptr)}; BOOST_TEST(result == "1,2,null,null,3,4,null,null,5,null,null"); } BOOST_AUTO_TEST_SUITE_END() // BinaryTrees_tests BOOST_AUTO_TEST_SUITE_END() // DataStructures
{"hexsha": "fdef3fd2d83d39ae79ff4f1f73d122e21275c9c9", "size": 13990, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "Voltron/Source/UnitTests/DataStructures/BinaryTrees_tests.cpp", "max_stars_repo_name": "ernestyalumni/HrdwCCppCUDA", "max_stars_repo_head_hexsha": "17ed937dea06431a4d5ca103f993ea69a6918734", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1.0, "max_stars_repo_stars_event_min_datetime": "2018-02-09T19:44:51.000Z", "max_stars_repo_stars_event_max_datetime": "2018-02-09T19:44:51.000Z", "max_issues_repo_path": "Voltron/Source/UnitTests/DataStructures/BinaryTrees_tests.cpp", "max_issues_repo_name": "ernestyalumni/HrdwCCppCUDA", "max_issues_repo_head_hexsha": "17ed937dea06431a4d5ca103f993ea69a6918734", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "Voltron/Source/UnitTests/DataStructures/BinaryTrees_tests.cpp", "max_forks_repo_name": "ernestyalumni/HrdwCCppCUDA", "max_forks_repo_head_hexsha": "17ed937dea06431a4d5ca103f993ea69a6918734", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 32.3094688222, "max_line_length": 108, "alphanum_fraction": 0.6109363831, "num_tokens": 3355}
import numpy as np import math import pandas as pd import sys import minimize as mini delta = 10e-4 if len(sys.argv) > 1: method = sys.argv[1] else: method = "newton" print('method:',method) # f(x, y) = 100(y-x²)² + (1-x)² def f(entry): x, y = entry[0], entry[1] return 100*(y-x**2)**2 + (1-x)**2 def grad_f(entry): x, y = entry[0], entry[1] return np.array([2*(200*x**3-200*x*y+x-1), 200*(y-x**2)]) def hess_f(entry): x, y = entry[0], entry[1] return np.array([[-400*(y-x**2)+800*x**2+2, -400*x],[-400*x, 200]]) mim = mini.Minimizer(f, 2, np.array([0, 0])) mim.f_grad = grad_f mim.f_hess = hess_f mim.iterate(method=method, log=True) vet_f = np.vectorize(lambda in1, in2: f((in1, in2))) drawer = mini.Drawer() drawer.draw_f(vet_f, mim) drawer.draw_path(vet_f, mim, mim.x) drawer.show()
{"hexsha": "cfeb1bc3716792c418317a5db577ff66e4d47927", "size": 824, "ext": "py", "lang": "Python", "max_stars_repo_path": "proj.py", "max_stars_repo_name": "gabriel-valle/minimizer", "max_stars_repo_head_hexsha": "eb3e42ca5fa4667c712ad2228a6c8af3bdb73185", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "proj.py", "max_issues_repo_name": "gabriel-valle/minimizer", "max_issues_repo_head_hexsha": "eb3e42ca5fa4667c712ad2228a6c8af3bdb73185", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "proj.py", "max_forks_repo_name": "gabriel-valle/minimizer", "max_forks_repo_head_hexsha": "eb3e42ca5fa4667c712ad2228a6c8af3bdb73185", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 23.5428571429, "max_line_length": 71, "alphanum_fraction": 0.6177184466, "include": true, "reason": "import numpy", "num_tokens": 311}
import os.path as osp import tempfile import mmcv from .builder import DATASETS from .custom import CustomDataset import numpy as np from PIL import Image @DATASETS.register_module() class PascalVOCDataset(CustomDataset): """Pascal VOC dataset. Args: split (str): Split txt file for Pascal VOC. """ CLASSES = ('background', 'aeroplane', 'bicycle', 'bird', 'boat', 'bottle', 'bus', 'car', 'cat', 'chair', 'cow', 'diningtable', 'dog', 'horse', 'motorbike', 'person', 'pottedplant', 'sheep', 'sofa', 'train', 'tvmonitor') PALETTE = [[0, 0, 0], [128, 0, 0], [0, 128, 0], [128, 128, 0], [0, 0, 128], [128, 0, 128], [0, 128, 128], [128, 128, 128], [64, 0, 0], [192, 0, 0], [64, 128, 0], [192, 128, 0], [64, 0, 128], [192, 0, 128], [64, 128, 128], [192, 128, 128], [0, 64, 0], [128, 64, 0], [0, 192, 0], [128, 192, 0], [0, 64, 128]] palette = [] for i in range(256): palette.extend((i, i, i)) palette[:3 * 21] = np.array([[0, 0, 0], [128, 0, 0], [0, 128, 0], [128, 128, 0], [0, 0, 128], [128, 0, 128], [0, 128, 128], [128, 128, 128], [64, 0, 0], [192, 0, 0], [64, 128, 0], [192, 128, 0], [64, 0, 128], [192, 0, 128], [64, 128, 128], [192, 128, 128], [0, 64, 0], [128, 64, 0], [0, 192, 0], [128, 192, 0], [0, 64, 128] ], dtype='uint8').flatten() def __init__(self, split, **kwargs): super(PascalVOCDataset, self).__init__( img_suffix='.jpg', seg_map_suffix='.png', split=split, **kwargs) assert osp.exists(self.img_dir) and self.split is not None def format_results(self, results, imgfile_prefix=None, to_label_id=True): """Format the results into dir (standard format for Cityscapes evaluation). Args: results (list): Testing results of the dataset. imgfile_prefix (str | None): The prefix of images files. It includes the file path and the prefix of filename, e.g., "a/b/prefix". If not specified, a temp file will be created. Default: None. to_label_id (bool): whether convert output to label_id for submission. Default: False Returns: tuple: (result_files, tmp_dir), result_files is a list containing the image paths, tmp_dir is the temporal directory created for saving json/png files when img_prefix is not specified. """ assert isinstance(results, list), 'results must be a list' assert len(results) == len(self), ( 'The length of results is not equal to the dataset len: ' f'{len(results)} != {len(self)}') if imgfile_prefix is None: tmp_dir = tempfile.TemporaryDirectory() imgfile_prefix = tmp_dir.name else: tmp_dir = None result_files = self.results2img(results, imgfile_prefix, to_label_id) return result_files, tmp_dir def results2img(self, results, imgfile_prefix, to_label_id): """Write the segmentation results to images. Args: results (list[list | tuple | ndarray]): Testing results of the dataset. imgfile_prefix (str): The filename prefix of the png files. If the prefix is "somepath/xxx", the png files will be named "somepath/xxx.png". to_label_id (bool): whether convert output to label_id for submission Returns: list[str: str]: result txt files which contains corresponding semantic segmentation images. """ mmcv.mkdir_or_exist(imgfile_prefix) result_files = [] prog_bar = mmcv.ProgressBar(len(self)) for idx in range(len(self)): result = results[idx] filename = self.img_infos[idx]['filename'] basename = osp.splitext(osp.basename(filename))[0] png_filename = osp.join(imgfile_prefix, f'{basename}.png') output = Image.fromarray(result.astype(np.uint8)).convert('P') output.putpalette(self.palette) output.save(png_filename) result_files.append(png_filename) prog_bar.update() return result_files
{"hexsha": "2b670ebef044f6006075d9f38f82e6ada40e5c25", "size": 5015, "ext": "py", "lang": "Python", "max_stars_repo_path": "mmseg/datasets/voc.py", "max_stars_repo_name": "aim-uofa/NRD_decoder", "max_stars_repo_head_hexsha": "275f0a1e74bb24cd8555fa8bcccb488d5bf1ed8c", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 9, "max_stars_repo_stars_event_min_datetime": "2021-10-30T07:12:12.000Z", "max_stars_repo_stars_event_max_datetime": "2021-11-01T12:54:50.000Z", "max_issues_repo_path": "mmseg/datasets/voc.py", "max_issues_repo_name": "aim-uofa/NRD_decoder", "max_issues_repo_head_hexsha": "275f0a1e74bb24cd8555fa8bcccb488d5bf1ed8c", "max_issues_repo_licenses": ["Apache-2.0"], "max_issues_count": 1, "max_issues_repo_issues_event_min_datetime": "2022-01-28T02:45:06.000Z", "max_issues_repo_issues_event_max_datetime": "2022-01-28T02:45:06.000Z", "max_forks_repo_path": "mmseg/datasets/voc.py", "max_forks_repo_name": "zbwxp/NRD_decoder", "max_forks_repo_head_hexsha": "4b75721daeb620ff5b71dd7f629c319e17e0eaa5", "max_forks_repo_licenses": ["Apache-2.0"], "max_forks_count": 1, "max_forks_repo_forks_event_min_datetime": "2021-12-29T08:48:37.000Z", "max_forks_repo_forks_event_max_datetime": "2021-12-29T08:48:37.000Z", "avg_line_length": 39.8015873016, "max_line_length": 79, "alphanum_fraction": 0.4925224327, "include": true, "reason": "import numpy", "num_tokens": 1203}
[STATEMENT] lemma strongBisimWeakPsiCong: fixes \<Psi> :: 'b and P :: "('a, 'b, 'c) psi" and Q :: "('a, 'b, 'c) psi" assumes "\<Psi> \<rhd> P \<sim> Q" shows "\<Psi> \<rhd> P \<doteq> Q" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<Psi> \<rhd> P \<doteq> Q [PROOF STEP] using assms [PROOF STATE] proof (prove) using this: \<Psi> \<rhd> P \<sim> Q goal (1 subgoal): 1. \<Psi> \<rhd> P \<doteq> Q [PROOF STEP] proof(induct rule: weakPsiCongSymI) [PROOF STATE] proof (state) goal (3 subgoals): 1. \<And>P Q. \<Psi> \<rhd> P \<sim> Q \<Longrightarrow> \<Psi> \<rhd> Q \<sim> P 2. \<And>P Q. \<Psi> \<rhd> P \<sim> Q \<Longrightarrow> \<Psi> \<rhd> P \<approx> Q 3. \<And>P Q. \<Psi> \<rhd> P \<sim> Q \<Longrightarrow> \<Psi> \<rhd> P \<leadsto>\<guillemotleft>weakBisim\<guillemotright> Q [PROOF STEP] case(cSym P Q) [PROOF STATE] proof (state) this: \<Psi> \<rhd> P \<sim> Q goal (3 subgoals): 1. \<And>P Q. \<Psi> \<rhd> P \<sim> Q \<Longrightarrow> \<Psi> \<rhd> Q \<sim> P 2. \<And>P Q. \<Psi> \<rhd> P \<sim> Q \<Longrightarrow> \<Psi> \<rhd> P \<approx> Q 3. \<And>P Q. \<Psi> \<rhd> P \<sim> Q \<Longrightarrow> \<Psi> \<rhd> P \<leadsto>\<guillemotleft>weakBisim\<guillemotright> Q [PROOF STEP] from \<open>\<Psi> \<rhd> P \<sim> Q\<close> [PROOF STATE] proof (chain) picking this: \<Psi> \<rhd> P \<sim> Q [PROOF STEP] show ?case [PROOF STATE] proof (prove) using this: \<Psi> \<rhd> P \<sim> Q goal (1 subgoal): 1. \<Psi> \<rhd> Q \<sim> P [PROOF STEP] by(rule bisimE) [PROOF STATE] proof (state) this: \<Psi> \<rhd> Q \<sim> P goal (2 subgoals): 1. \<And>P Q. \<Psi> \<rhd> P \<sim> Q \<Longrightarrow> \<Psi> \<rhd> P \<approx> Q 2. \<And>P Q. \<Psi> \<rhd> P \<sim> Q \<Longrightarrow> \<Psi> \<rhd> P \<leadsto>\<guillemotleft>weakBisim\<guillemotright> Q [PROOF STEP] next [PROOF STATE] proof (state) goal (2 subgoals): 1. \<And>P Q. \<Psi> \<rhd> P \<sim> Q \<Longrightarrow> \<Psi> \<rhd> P \<approx> Q 2. \<And>P Q. \<Psi> \<rhd> P \<sim> Q \<Longrightarrow> \<Psi> \<rhd> P \<leadsto>\<guillemotleft>weakBisim\<guillemotright> Q [PROOF STEP] case(cSim P Q) [PROOF STATE] proof (state) this: \<Psi> \<rhd> P \<sim> Q goal (2 subgoals): 1. \<And>P Q. \<Psi> \<rhd> P \<sim> Q \<Longrightarrow> \<Psi> \<rhd> P \<approx> Q 2. \<And>P Q. \<Psi> \<rhd> P \<sim> Q \<Longrightarrow> \<Psi> \<rhd> P \<leadsto>\<guillemotleft>weakBisim\<guillemotright> Q [PROOF STEP] from \<open>\<Psi> \<rhd> P \<sim> Q\<close> [PROOF STATE] proof (chain) picking this: \<Psi> \<rhd> P \<sim> Q [PROOF STEP] have "\<Psi> \<rhd> P \<leadsto>[bisim] Q" [PROOF STATE] proof (prove) using this: \<Psi> \<rhd> P \<sim> Q goal (1 subgoal): 1. \<Psi> \<rhd> P \<leadsto>[bisim] Q [PROOF STEP] by(rule bisimE) [PROOF STATE] proof (state) this: \<Psi> \<rhd> P \<leadsto>[bisim] Q goal (2 subgoals): 1. \<And>P Q. \<Psi> \<rhd> P \<sim> Q \<Longrightarrow> \<Psi> \<rhd> P \<approx> Q 2. \<And>P Q. \<Psi> \<rhd> P \<sim> Q \<Longrightarrow> \<Psi> \<rhd> P \<leadsto>\<guillemotleft>weakBisim\<guillemotright> Q [PROOF STEP] thus "\<Psi> \<rhd> P \<leadsto>\<guillemotleft>weakBisim\<guillemotright> Q" [PROOF STATE] proof (prove) using this: \<Psi> \<rhd> P \<leadsto>[bisim] Q goal (1 subgoal): 1. \<Psi> \<rhd> P \<leadsto>\<guillemotleft>weakBisim\<guillemotright> Q [PROOF STEP] using strongBisimWeakBisim [PROOF STATE] proof (prove) using this: \<Psi> \<rhd> P \<leadsto>[bisim] Q ?\<Psi> \<rhd> ?P \<sim> ?Q \<Longrightarrow> ?\<Psi> \<rhd> ?P \<approx> ?Q goal (1 subgoal): 1. \<Psi> \<rhd> P \<leadsto>\<guillemotleft>weakBisim\<guillemotright> Q [PROOF STEP] by(rule_tac strongSimWeakCongSim) auto [PROOF STATE] proof (state) this: \<Psi> \<rhd> P \<leadsto>\<guillemotleft>weakBisim\<guillemotright> Q goal (1 subgoal): 1. \<And>P Q. \<Psi> \<rhd> P \<sim> Q \<Longrightarrow> \<Psi> \<rhd> P \<approx> Q [PROOF STEP] next [PROOF STATE] proof (state) goal (1 subgoal): 1. \<And>P Q. \<Psi> \<rhd> P \<sim> Q \<Longrightarrow> \<Psi> \<rhd> P \<approx> Q [PROOF STEP] case(cWeakBisim P Q) [PROOF STATE] proof (state) this: \<Psi> \<rhd> P \<sim> Q goal (1 subgoal): 1. \<And>P Q. \<Psi> \<rhd> P \<sim> Q \<Longrightarrow> \<Psi> \<rhd> P \<approx> Q [PROOF STEP] thus ?case [PROOF STATE] proof (prove) using this: \<Psi> \<rhd> P \<sim> Q goal (1 subgoal): 1. \<Psi> \<rhd> P \<approx> Q [PROOF STEP] by(rule strongBisimWeakBisim) [PROOF STATE] proof (state) this: \<Psi> \<rhd> P \<approx> Q goal: No subgoals! [PROOF STEP] qed
{"llama_tokens": 2037, "file": "Psi_Calculi_Weak_Psi_Congruence", "length": 19}
''' Author: Shangjie Lyu GitHub: https://github.com/josephlyu The figures for the UK page, using data from Public Health Englend's COVID-19 UK API and Oxford University's GitHub repository. Link1: https://coronavirus.data.gov.uk/developers-guide Link2: https://github.com/OxCGRT/covid-policy-tracker ''' import os import numpy as np import pandas as pd import plotly.graph_objects as go from uk_covid19 import Cov19API import datetime as dt from pmdarima.arima import auto_arima from tensorflow.keras import Model, Input, callbacks from tensorflow.keras.layers import LSTM, Dense, Dropout ##### DEFINE GLOBAL VARIABLES ##### os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' COLORS = {'text':'#114b5f', 'background': '#e6ecec', 'case':'#3f6678', 'death':'#ba3a0a', 'pred':'#d7d9db', 'case_scatter':'#7498a8', 'case_pred':'#005f86', 'death_scatter':'#d88f74', 'death_pred':'#b8272e', 'index_case':'#666666', 'index_death':'#c65d35', 'index_text':'#9e9e9e'} FIXED_ANNOTATIONS = [dict(x=-0.03, y=1.15, text='<b><i>Model Selection:</i></b>', font={'size':13}, xref='paper', yref='paper', showarrow=False), dict(x=0.875, y=1.17, text='<b><i>Major<br>Events</i></b>', xref='paper', yref='paper', showarrow=False)] UK_CASES_EVENTS = [dict(x='2020-3-23', y=1198, text='National Lockdown', ax=-30, ay=-40, arrowhead=5, arrowcolor=COLORS['text'], arrowwidth=1), dict(x='2020-7-4', y=575, text='(Eat out to Help out)<br>Lockdown Eased', ax=-20, ay=-35, arrowhead=5, arrowcolor=COLORS['text'], arrowwidth=1), dict(x='2020-9-7', y=2532, text='University Students Return', ax=-65, ay=-65, arrowhead=5, arrowcolor=COLORS['text'], arrowwidth=1), dict(x='2020-11-5', y=22826, text='Second Lockdown', ax=-90, ay=-25, arrowhead=5, arrowcolor=COLORS['text'], arrowwidth=1), dict(x='2020-12-2', y=14400, text='(Christmas Period)<br>Lockdown Eased', ax=-45, ay=-90, arrowhead=5, arrowcolor=COLORS['text'], arrowwidth=1), dict(x='2020-12-21', y=34396, text='Mass Vaccination<br>(1% Population)', ax=-45, ay=-65, arrowhead=5, arrowcolor=COLORS['text'], arrowwidth=1), dict(x='2021-1-5', y=59344, text='Third Lockdown', ax=-70, ay=-20, arrowhead=5, arrowcolor=COLORS['text'], arrowwidth=1), dict(x='2021-1-12', y=51221, text='Mass Vaccination<br>(5% Population)', ax=80, ay=-15, arrowhead=5, arrowcolor=COLORS['text'], arrowwidth=1), dict(x='2021-2-5', y=17714, text='Mass Vaccination<br>(20% Population)', ax=55, ay=-55, arrowhead=5, arrowcolor=COLORS['text'], arrowwidth=1), dict(x='2021-3-19', y=5485, text='Mass Vaccination<br>(50% Population)', ax=15, ay=-40, arrowhead=5, arrowcolor=COLORS['text'], arrowwidth=1)] UK_DEATHS_EVENTS = [dict(x='2020-3-23', y=103, text='National Lockdown', ax=-55, ay=-35, arrowhead=5, arrowcolor=COLORS['text'], arrowwidth=1), dict(x='2020-7-4', y=43, text='(Eat out to Help out)<br>Lockdown Eased', ax=15, ay=-55, arrowhead=5, arrowcolor=COLORS['text'], arrowwidth=1), dict(x='2020-9-7', y=12, text='University Students Return', ax=-25, ay=-25, arrowhead=5, arrowcolor=COLORS['text'], arrowwidth=1), dict(x='2020-11-5', y=332, text='Second Lockdown', ax=-85, ay=-10, arrowhead=5, arrowcolor=COLORS['text'], arrowwidth=1), dict(x='2020-12-2', y=427, text='(Christmas Period)<br>Lockdown Eased', ax=-100, ay=-35, arrowhead=5, arrowcolor=COLORS['text'], arrowwidth=1), dict(x='2020-12-21', y=512, text='Mass Vaccination<br>(1% Population)', ax=-80, ay=-65, arrowhead=5, arrowcolor=COLORS['text'], arrowwidth=1), dict(x='2021-1-5', y=809, text='Third Lockdown', ax=-70, ay=-65, arrowhead=5, arrowcolor=COLORS['text'], arrowwidth=1), dict(x='2021-1-12', y=1066, text='Mass Vaccination<br>(5% Population)', ax=-50, ay=-75, arrowhead=5, arrowcolor=COLORS['text'], arrowwidth=1), dict(x='2021-2-5', y=891, text='Mass Vaccination<br>(20% Population)', ax=65, ay=-50, arrowhead=5, arrowcolor=COLORS['text'], arrowwidth=1), dict(x='2021-3-19', y=85, text='Mass Vaccination<br>(50% Population)', ax=30, ay=-50, arrowhead=5, arrowcolor=COLORS['text'], arrowwidth=1)] CASES_UPDATE_MENUS = [dict(type='dropdown', direction='down', x=0.214, y=1.17, buttons=list([ dict(label='Ensemble', method='update', args=[{'visible': [True, True, True, True, True, False, False, False, False, False, False]}]), dict(label='ARIMA', method='update', args=[{'visible': [True, True, False, False, False, True, True, True, False, False, False]}]), dict(label='LSTM', method='update', args=[{'visible': [True, True, False, False, False, False, False, False, True, True, True]}])])), dict(type='buttons', direction='right', x=1, y=1.17, buttons=list([ dict(label='Show', method='update', args=[{}, {'annotations': UK_CASES_EVENTS + FIXED_ANNOTATIONS}]), dict(label='Hide', method='update', args=[{}, {'annotations': FIXED_ANNOTATIONS}])]))] DEATHS_UPDATE_MENUS = [dict(type='dropdown', direction='down', x=0.214, y=1.17, buttons=list([ dict(label='Ensemble', method='update', args=[{'visible': [True, True, True, True, True, False, False, False, False, False, False]}]), dict(label='ARIMA', method='update', args=[{'visible': [True, True, False, False, False, True, True, True, False, False, False]}]), dict(label='LSTM', method='update', args=[{'visible': [True, True, False, False, False, False, False, False, True, True, True]}])])), dict(type='buttons', direction='right', x=1, y=1.17, buttons=list([ dict(label='Show', method='update', args=[{}, {'annotations': UK_DEATHS_EVENTS + FIXED_ANNOTATIONS}]), dict(label='Hide', method='update', args=[{}, {'annotations': FIXED_ANNOTATIONS}])]))] ##### DEFINE FUNCTIONS TO CONSTRUCT MODELS ##### def to_feature(feature_series, cases=True): target_index = INDEX_CASES if cases else INDEX_DEATHS feature_index = feature_series.index if target_index[0] in feature_index: feature_index = feature_series[target_index[0]:].index feature_series = feature_series[feature_index] if target_index[-1] in feature_index: return feature_series[:target_index[-1]].tolist() else: padding_right = [feature_series[-1] for n in range(len(target_index)-len(feature_index))] return feature_series.tolist() + padding_right else: if target_index[-1] in feature_index: feature_index = feature_series[:target_index[-1]].index feature_series = feature_series[feature_index] padding_left = [feature_series[0] for n in range(len(target_index)-len(feature_index))] return padding_left + feature_series.tolist() else: padding_left = [feature_series[0] for n in range(target_index.tolist().index(feature_index[0]))] padding_right = [feature_series[-1] for n in range(len(target_index)-len(feature_index)-len(padding_left))] return padding_left + feature_series.tolist() + padding_right def to_sequence(data, features=[], input_size=7, output_size=21): x, y, arrs = [], [], [data] + features for i in range(len(data)-input_size-output_size+1): x.append([[arr[n] for arr in arrs] for n in range(i,i+input_size)]) y.append(data[i+input_size:i+input_size+output_size]) return np.array(x), np.array(y) def scale(original): return [(n-min(original)) / (max(original)-min(original)) for n in original] def unscale(scaled, cases=True): original = DATA_UK_CASES_DIFF_LIST if cases else DATA_UK_DEATHS_DIFF_LIST return [n*(max(original)-min(original)) + min(original) for n in scaled] def undifference(difference, start_index, cases=True): start = DATA_UK_CASES_LIST[start_index] if cases else DATA_UK_DEATHS_LIST[start_index] undifferenced = [difference[0] + start] for i in range(1, len(difference)): undifferenced.append(difference[i] + undifferenced[i-1]) return undifferenced def get_original(difference_scaled, start_index, cases=True): return undifference(unscale(difference_scaled, cases), start_index, cases) def predict_LSTM(model, latest_data, cases=True): return get_original(model(latest_data).numpy()[0], -1, cases) def result_LSTM(model, latest_data, cases=True, output_size=21, n_iter=10): outputs = np.zeros((n_iter, output_size)) for i in range(n_iter): outputs[i] = predict_LSTM(model, latest_data, cases) return outputs.mean(axis=0), np.percentile(outputs,2.5,axis=0), np.percentile(outputs,97.5,axis=0) def construct_LSTM(cases=True): num_features = 4 if cases else 3 inputs = Input(shape=(None, num_features)) x = LSTM(128, return_sequences=True)(inputs) x = Dropout(0.2)(x, training=True) x = LSTM(64)(x) x = Dropout(0.2)(x, training=True) x = Dense(128, 'relu')(x) x = Dense(64, 'relu')(x) outputs = Dense(21)(x) model = Model(inputs, outputs) if cases: x_train, y_train = to_sequence(DATA_UK_CASES_DIFF_LIST_SCALED, [FEATURE_STRINGENCY_FOR_CASES, FEATURE_VACCINATION_FOR_CASES, FEATURE_TESTS_FOR_CASES]) latest_data, _ = to_sequence(DATA_UK_CASES_DIFF_LIST_SCALED[-7:], [FEATURE_STRINGENCY_FOR_CASES[-7:], FEATURE_VACCINATION_FOR_CASES[-7:], FEATURE_TESTS_FOR_CASES[-7:]], output_size=0) else: x_train, y_train = to_sequence(DATA_UK_DEATHS_DIFF_LIST_SCALED, [FEATURE_CASES_FOR_DEATHS, FEATURE_VACCINATION_FOR_DEATHS]) latest_data, _ = to_sequence(DATA_UK_DEATHS_DIFF_LIST_SCALED[-7:], [FEATURE_CASES_FOR_DEATHS[-7:], FEATURE_VACCINATION_FOR_DEATHS[-7:]], output_size=0) earlyStopping = callbacks.EarlyStopping(monitor='loss', patience=10, restore_best_weights=True) model.compile('adam', 'mse') model.fit(x_train, y_train, callbacks=earlyStopping, epochs=300, verbose=0) return result_LSTM(model, latest_data, cases) def construct_ARIMA(cases=True): data = DATA_UK_CASES_LIST if cases else DATA_UK_DEATHS_LIST model = auto_arima(data, seasonal=False, test='adf', information_criterion='bic', error_action='ignore', suppress_warnings=True, njob=-1) return model.predict(21, return_conf_int=True) ##### LOAD DATA ##### filters_uk = ['areaType=overview'] structure_total = { 'date': 'date', 'newcases': 'newCasesByPublishDate', 'cumcases': 'cumCasesByPublishDate', 'newdeaths': 'newDeaths28DaysByPublishDate', 'cumdeaths': 'cumDeaths28DaysByPublishDate' } api_uk = Cov19API(filters_uk, structure_total) df_uk = api_uk.get_dataframe() df_uk['date'] = df_uk['date'].astype('datetime64[ns]') df_uk_cases = df_uk.query('cumcases >= 1') df_uk_deaths = df_uk.query('cumdeaths >= 1') ##### COMPONENTS FOR INDEX PAGE ##### api_uk_timestamp = api_uk.last_update api_uk_last_update = api_uk_timestamp[:10] + ' ' + api_uk_timestamp[11:19] + ' UTC' api_uk_date_str = dt.datetime.strptime(api_uk_timestamp[2:10], '%y-%m-%d') api_uk_date = api_uk_date_str.strftime('%d %B, %Y') today_uk_newcases, today_uk_newdeaths = df_uk['newcases'][0], df_uk['newdeaths'][0] today_uk_cumcases, today_uk_cumdeaths = df_uk['cumcases'][0], df_uk['cumdeaths'][0] fig_index_cases = go.Figure() fig_index_cases.add_scatter(x=df_uk_cases['date'], y=df_uk_cases['cumcases'], line={'color':COLORS['index_case']}, fill='tozeroy') fig_index_cases.update_layout(font={'color':COLORS['index_text']}, hovermode='closest', template='none', margin={'l':0, 'r':0, 't':10, 'b':25}, height=130) fig_index_cases.update_xaxes(showgrid=False, showline=True, linecolor=COLORS['index_text'], tickformat='%d/%m') fig_index_cases.update_yaxes(nticks=3) fig_index_deaths = go.Figure() fig_index_deaths.add_scatter(x=df_uk_cases['date'], y=df_uk_cases['cumdeaths'], line={'color':COLORS['index_death']}, fill='tozeroy') fig_index_deaths.update_layout(font={'color':COLORS['index_text']}, hovermode='closest', template='none', margin={'l':0, 'r':0, 't':10, 'b':25}, height=130) fig_index_deaths.update_xaxes(showgrid=False, showline=True, linecolor=COLORS['index_text'], tickformat='%d/%m') fig_index_deaths.update_yaxes(nticks=3) ##### PREPARE DATA FOR FORECASTING ##### data_uk_cases = df_uk_cases[['date', 'newcases']].sort_index(ascending=False).set_index('date') data_uk_cases_avg = data_uk_cases['newcases'].rolling(7).mean().round()[6:] data_uk_cases_avg_diff = data_uk_cases_avg.diff()[1:] LEN_CASES = len(data_uk_cases_avg_diff) INDEX_CASES = data_uk_cases_avg_diff.index DATA_UK_CASES_LIST = data_uk_cases_avg.tolist() DATA_UK_CASES_DIFF_LIST = data_uk_cases_avg_diff.tolist() DATA_UK_CASES_DIFF_LIST_SCALED = scale(DATA_UK_CASES_DIFF_LIST) data_uk_deaths = df_uk_deaths[['date', 'newdeaths']].sort_index(ascending=False).set_index('date') data_uk_deaths_avg = data_uk_deaths['newdeaths'].rolling(7).mean().round()[6:] data_uk_deaths_avg_diff = data_uk_deaths_avg.diff()[1:] LEN_DEATHS = len(data_uk_deaths_avg_diff) INDEX_DEATHS = data_uk_deaths_avg_diff.index DATA_UK_DEATHS_LIST = data_uk_deaths_avg.tolist() DATA_UK_DEATHS_DIFF_LIST = data_uk_deaths_avg_diff.tolist() DATA_UK_DEATHS_DIFF_LIST_SCALED = scale(DATA_UK_DEATHS_DIFF_LIST) FEATURE_CASES_FOR_DEATHS = DATA_UK_CASES_DIFF_LIST_SCALED[-LEN_DEATHS:] FEATURE_DEATHS_FOR_CASES = [0 for n in range(LEN_CASES-LEN_DEATHS)] + DATA_UK_DEATHS_DIFF_LIST_SCALED url_stringency = 'https://raw.githubusercontent.com/OxCGRT/covid-policy-tracker/master/data/timeseries/stringency_index.csv' df_stringency = pd.read_csv(url_stringency, index_col=0) df_stringency_uk = df_stringency.query('country_code == "GBR"').T[2:] df_stringency_uk.index = pd.to_datetime(df_stringency_uk.index) df_stringency_uk.columns = ['stringency'] df_stringency_uk = df_stringency_uk.fillna(method='pad') stringency_uk = df_stringency_uk['stringency'] stringency_uk_cases, stringency_uk_deaths = to_feature(stringency_uk), to_feature(stringency_uk, False) FEATURE_STRINGENCY_FOR_CASES, FEATURE_STRINGENCY_FOR_DEATHS = scale(stringency_uk_cases), scale(stringency_uk_deaths) url_vaccination_uk = 'https://api.coronavirus.data.gov.uk/v2/data?areaType=overview&metric=cumVaccinationFirstDoseUptakeByPublishDatePercentage&format=csv' df_vaccination_uk = pd.read_csv(url_vaccination_uk, index_col=3) df_vaccination_uk.index = pd.to_datetime(df_vaccination_uk.index) vaccination_uk = df_vaccination_uk['cumVaccinationFirstDoseUptakeByPublishDatePercentage'].copy() vaccination_uk_padding_index = pd.date_range(end=vaccination_uk.index[-1], periods=35) vaccination_uk_padding = np.linspace(0, vaccination_uk[-1], len(vaccination_uk_padding_index)) for i in range(1, len(vaccination_uk_padding_index)+1): vaccination_uk[vaccination_uk_padding_index[-i]] = vaccination_uk_padding[-i] vaccination_uk = vaccination_uk[::-1] vaccination_uk_cases, vaccination_uk_deaths = to_feature(vaccination_uk), to_feature(vaccination_uk, False) FEATURE_VACCINATION_FOR_CASES, FEATURE_VACCINATION_FOR_DEATHS = scale(vaccination_uk_cases), scale(vaccination_uk_deaths) url_tests = 'https://api.coronavirus.data.gov.uk/v2/data?areaType=overview&metric=newTestsByPublishDate&format=csv' df_tests_uk = pd.read_csv(url_tests, index_col=3) df_tests_uk.index = pd.to_datetime(df_tests_uk.index) tests_uk = df_tests_uk['newTestsByPublishDate'].copy() tests_padding_index = pd.date_range(end=tests_uk.index[-1], periods=23) tests_padding = np.linspace(0, tests_uk[-1], len(tests_padding_index)) for i in range(1, len(tests_padding_index)+1): tests_uk[tests_padding_index[-i]] = tests_padding[-i] tests_uk = tests_uk[::-1] tests_uk_cases = to_feature(tests_uk) FEATURE_TESTS_FOR_CASES = scale(tests_uk_cases) ##### MODELS FOR CASES FORECASTING ##### pred_uk_cases_ARIMA, conf_uk_cases_ARIMA = construct_ARIMA() pred_uk_cases_LSTM, min_uk_cases_LSTM, max_uk_cases_LSTM = construct_LSTM() index_pred_uk_cases = pd.date_range(data_uk_cases.index[-1], periods=22, freq='D', closed='right') df_pred_uk_cases = pd.DataFrame({'pred_ARIMA': pred_uk_cases_ARIMA, 'min_ARIMA': conf_uk_cases_ARIMA[:,0], 'max_ARIMA': conf_uk_cases_ARIMA[:,1]}) df_pred_uk_cases['pred_LSTM'] = pred_uk_cases_LSTM df_pred_uk_cases['min_LSTM'] = min_uk_cases_LSTM df_pred_uk_cases['max_LSTM'] = max_uk_cases_LSTM df_pred_uk_cases['pred_ENSEMBLE'] = df_pred_uk_cases[['pred_ARIMA', 'pred_LSTM']].mean(axis=1) df_pred_uk_cases['min_ENSEMBLE'] = df_pred_uk_cases[['min_ARIMA', 'min_LSTM']].mean(axis=1) df_pred_uk_cases['max_ENSEMBLE'] = df_pred_uk_cases[['max_ARIMA', 'max_LSTM']].mean(axis=1) ##### FIGURE FOR CASES FORECASTING ##### df_pred_uk_cases = df_pred_uk_cases.clip(lower=0) average_uk_cases = df_uk_cases['newcases'].rolling(7,center=True).mean().round() fig_uk_cases = go.Figure() fig_uk_cases.add_bar(name='Recorded', x=df_uk_cases['date'], y=df_uk_cases['newcases'], marker={'color':COLORS['case_scatter']}) fig_uk_cases.add_scatter(name='7-Day Average (Recorded)', x=df_uk_cases['date'], y=average_uk_cases, line={'color':COLORS['case'], 'width':3}) fig_uk_cases.add_scatter(name='Max Predicted', x=index_pred_uk_cases, y=df_pred_uk_cases['max_ENSEMBLE'], line={'color':COLORS['pred']}, showlegend=False) fig_uk_cases.add_scatter(name='Min Predicted', x=index_pred_uk_cases, y=df_pred_uk_cases['min_ENSEMBLE'], line={'color':COLORS['pred'], 'width':1}, fill='tonexty', showlegend=False) fig_uk_cases.add_scatter(name='Predicted', x=index_pred_uk_cases, y=df_pred_uk_cases['pred_ENSEMBLE'], line={'color':COLORS['case_pred'], 'width':3}) fig_uk_cases.add_scatter(name='Max Predicted', x=index_pred_uk_cases, y=df_pred_uk_cases['max_ARIMA'], line={'color':COLORS['pred']}, showlegend=False, visible=False) fig_uk_cases.add_scatter(name='Min Predicted', x=index_pred_uk_cases, y=df_pred_uk_cases['min_ARIMA'], line={'color':COLORS['pred'], 'width':1}, fill='tonexty', showlegend=False, visible=False) fig_uk_cases.add_scatter(name='Predicted', x=index_pred_uk_cases, y=df_pred_uk_cases['pred_ARIMA'], line={'color':COLORS['case_pred'], 'width':3}, visible=False) fig_uk_cases.add_scatter(name='Max Predicted', x=index_pred_uk_cases, y=df_pred_uk_cases['max_LSTM'], line={'color':COLORS['pred']}, showlegend=False, visible=False) fig_uk_cases.add_scatter(name='Min Predicted', x=index_pred_uk_cases, y=df_pred_uk_cases['min_LSTM'], line={'color':COLORS['pred'], 'width':1}, fill='tonexty', showlegend=False, visible=False) fig_uk_cases.add_scatter(name='Predicted', x=index_pred_uk_cases, y=df_pred_uk_cases['pred_LSTM'], line={'color':COLORS['case_pred'], 'width':3}, visible=False) fig_uk_cases.update_layout(updatemenus=CASES_UPDATE_MENUS, annotations=UK_CASES_EVENTS + FIXED_ANNOTATIONS, hovermode='x unified', font={'color':COLORS['text']}, plot_bgcolor=COLORS['background'], paper_bgcolor=COLORS['background'], legend={'orientation':'h', 'traceorder':'normal', 'xanchor':'center', 'x':0.5}, title='<b>Covid-19 Cases Forecasting for the UK</b><br><sub>The forecast contains <i>three-week</i> prediction with <i>95%</i> confidence interval</sub>', title_x=0.5) fig_uk_cases.update_xaxes(range=[str(df_uk_cases['date'].iloc[-1].date()), str(index_pred_uk_cases[-1].date())], showline=True, linecolor=COLORS['text'], mirror=True) fig_uk_cases.update_yaxes(showline=True, linecolor=COLORS['text'], mirror=True, title='Daily new cases') ##### MODELS FOR DEATHS FORECASTING ##### pred_uk_deaths_ARIMA, conf_uk_deaths_ARIMA = construct_ARIMA(False) pred_uk_deaths_LSTM, min_uk_deaths_LSTM, max_uk_deaths_LSTM = construct_LSTM(False) index_pred_uk_deaths = pd.date_range(data_uk_deaths.index[-1], periods=22, freq='D', closed='right') df_pred_uk_deaths = pd.DataFrame({'pred_ARIMA': pred_uk_deaths_ARIMA, 'min_ARIMA': conf_uk_deaths_ARIMA[:,0], 'max_ARIMA': conf_uk_deaths_ARIMA[:,1]}) df_pred_uk_deaths['pred_LSTM'] = pred_uk_deaths_LSTM df_pred_uk_deaths['min_LSTM'] = min_uk_deaths_LSTM df_pred_uk_deaths['max_LSTM'] = max_uk_deaths_LSTM df_pred_uk_deaths['pred_ENSEMBLE'] = df_pred_uk_deaths[['pred_ARIMA', 'pred_LSTM']].mean(axis=1) df_pred_uk_deaths['min_ENSEMBLE'] = df_pred_uk_deaths[['min_ARIMA', 'min_LSTM']].mean(axis=1) df_pred_uk_deaths['max_ENSEMBLE'] = df_pred_uk_deaths[['max_ARIMA', 'max_LSTM']].mean(axis=1) ##### FIGURE FOR DEATHS FORECASTING ##### df_pred_uk_deaths = df_pred_uk_deaths.clip(lower=0) average_uk_deaths = df_uk_deaths['newdeaths'].rolling(7,center=True).mean().round() fig_uk_deaths = go.Figure() fig_uk_deaths.add_bar(name='Recorded', x=df_uk_deaths['date'], y=df_uk_deaths['newdeaths'], marker={'color':COLORS['death_scatter']}) fig_uk_deaths.add_scatter(name='7-Day Average (Recorded)', x=df_uk_deaths['date'], y=average_uk_deaths, line={'color':COLORS['death'], 'width':3}) fig_uk_deaths.add_scatter(name='Max Predicted', x=index_pred_uk_deaths, y=df_pred_uk_deaths['max_ENSEMBLE'], line={'color':COLORS['pred']}, showlegend=False) fig_uk_deaths.add_scatter(name='Min Predicted', x=index_pred_uk_deaths, y=df_pred_uk_deaths['min_ENSEMBLE'], line={'color':COLORS['pred'], 'width':1}, fill='tonexty', showlegend=False) fig_uk_deaths.add_scatter(name='Predicted', x=index_pred_uk_deaths, y=df_pred_uk_deaths['pred_ENSEMBLE'], line={'color':COLORS['death_pred'], 'width':3}) fig_uk_deaths.add_scatter(name='Max Predicted', x=index_pred_uk_deaths, y=df_pred_uk_deaths['max_ARIMA'], line={'color':COLORS['pred']}, showlegend=False, visible=False) fig_uk_deaths.add_scatter(name='Min Predicted', x=index_pred_uk_deaths, y=df_pred_uk_deaths['min_ARIMA'], line={'color':COLORS['pred'], 'width':1}, fill='tonexty', showlegend=False, visible=False) fig_uk_deaths.add_scatter(name='Predicted', x=index_pred_uk_deaths, y=df_pred_uk_deaths['pred_ARIMA'], line={'color':COLORS['death_pred'], 'width':3}, visible=False) fig_uk_deaths.add_scatter(name='Max Predicted', x=index_pred_uk_deaths, y=df_pred_uk_deaths['max_LSTM'], line={'color':COLORS['pred']}, showlegend=False, visible=False) fig_uk_deaths.add_scatter(name='Min Predicted', x=index_pred_uk_deaths, y=df_pred_uk_deaths['min_LSTM'], line={'color':COLORS['pred'], 'width':1}, fill='tonexty', showlegend=False, visible=False) fig_uk_deaths.add_scatter(name='Predicted', x=index_pred_uk_deaths, y=df_pred_uk_deaths['pred_LSTM'], line={'color':COLORS['death_pred'], 'width':3}, visible=False) fig_uk_deaths.update_layout(updatemenus=DEATHS_UPDATE_MENUS, annotations=UK_DEATHS_EVENTS + FIXED_ANNOTATIONS, hovermode='x unified', font={'color':COLORS['text']}, plot_bgcolor=COLORS['background'], paper_bgcolor=COLORS['background'], legend={'orientation':'h', 'traceorder':'normal', 'xanchor':'center', 'x':0.5}, title='<b>Covid-19 Deaths Forecasting for the UK</b><br><sub>The forecast contains <i>three-week</i> prediction with <i>95%</i> confidence interval</sub>', title_x=0.5) fig_uk_deaths.update_xaxes(range=[str(df_uk_deaths['date'].iloc[-1].date()), str(index_pred_uk_deaths[-1].date())], showline=True, linecolor=COLORS['text'], mirror=True) fig_uk_deaths.update_yaxes(showline=True, linecolor=COLORS['text'], mirror=True, title='Daily new deahts')
{"hexsha": "3823ff308d4818e381654aed783a93fa728cc392", "size": 23831, "ext": "py", "lang": "Python", "max_stars_repo_path": "figures/figures_uk.py", "max_stars_repo_name": "josephlyu/Covid19-UK-Dashboard", "max_stars_repo_head_hexsha": "e6b0ac4c01d4a6426172589a4b8fe927aeed6901", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "figures/figures_uk.py", "max_issues_repo_name": "josephlyu/Covid19-UK-Dashboard", "max_issues_repo_head_hexsha": "e6b0ac4c01d4a6426172589a4b8fe927aeed6901", "max_issues_repo_licenses": ["Apache-2.0"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "figures/figures_uk.py", "max_forks_repo_name": "josephlyu/Covid19-UK-Dashboard", "max_forks_repo_head_hexsha": "e6b0ac4c01d4a6426172589a4b8fe927aeed6901", "max_forks_repo_licenses": ["Apache-2.0"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 70.0911764706, "max_line_length": 197, "alphanum_fraction": 0.7072720406, "include": true, "reason": "import numpy", "num_tokens": 6962}
import numpy as np import keras import tensorflow as tf import keras.backend as K from keras.activations import tanh, softmax from keras.layers import LSTM, Dense, Layer, Lambda class PointerAttention(Layer): ''' https://www.tensorflow.org/text/tutorials/nmt_with_attention ''' def __init__(self, units, **kwargs): super(PointerAttention, self).__init__(**kwargs) self.W1 = Dense(units, use_bias=False) self.W2 = Dense(units, use_bias=False) self.V = Dense(1, use_bias=False) self.supports_masking = True def _extract_context_vector(self, value, weights): idx = K.expand_dims( K.argmax(weights) ) r = K.expand_dims( K.arange(idx.shape[0], dtype=idx.dtype) ) indices = K.concatenate([r, idx]) return tf.gather_nd(value, indices) def call(self, value, query, mask=None): w1_key = self.W1(value) w2_query = self.W2(query) w2_query = K.repeat(w2_query, w1_key.shape[1]) u = self.V( tanh(w1_key + w2_query) ) u = K.squeeze(u, axis=2) if mask is not None: mask_values = K.cast(mask, u.dtype) u += (1-mask_values) * K.constant(-1e20) # -np.infty a = softmax(u, axis=1) context = self._extract_context_vector(value, a) return context, a class PointerDecoder(Layer): ''' The cell abstraction, together with the generic keras.layers.RNN class, make it very easy to implement custom RNN architectures for your research. https://www.tensorflow.org/guide/keras/rnn https://blog.keras.io/a-ten-minute-introduction-to-sequence-to-sequence-learning-in-keras.html https://hyperscience.com/tech-blog/power-of-pointer-networks/ ''' def __init__(self, units, output_size, **kwargs): super(PointerDecoder, self).__init__(**kwargs) self.units = units self.output_size = output_size self.lstm = LSTM(self.units, return_sequences=True, return_state=True) self.attention = self.attention = PointerAttention(units) self.supports_masking = True def call(self, enc_outputs, initial_state=None, mask=None, *args, **kwargs): # print(mask) probs_outputs = [] # Use the last state of the encoder as the first inputs and use its states as initial states inputs = enc_outputs[:, -1:] states = initial_state for t in range(self.output_size): # Run the decoder on one timestep outputs, state_h, state_c = self.lstm(inputs, initial_state=states) # Query with the hidden state and store the current probs context, probs = self.attention(enc_outputs, state_h, mask) # Mask the probabilities mask_values = K.cast(mask[:, t], dtype=probs.dtype) mask_values = K.expand_dims(mask_values) probs_unmasked = probs[:, :-1] * mask_values probs_masked = K.constant(1.0, dtype=probs.dtype) - mask_values probs_adjusted = K.concatenate([probs_masked, probs_unmasked]) probs_adjusted = probs_adjusted # print(probs_adjusted) # Keep the step probs probs_outputs.append( K.expand_dims(probs_adjusted, axis=1) ) # Reinject the pointed context as inputs for the next timestep and update the state inputs = K.expand_dims(context, axis=1) states = [state_h, state_c] # Concatenate all probs concat = Lambda(lambda x: K.concatenate(x, axis=1)) outputs = concat(probs_outputs) # outputs = K.concatenate(probs_outputs, axis=1) return outputs
{"hexsha": "4801103bc406477478cb444cf1e4d78737a626b9", "size": 3689, "ext": "py", "lang": "Python", "max_stars_repo_path": "pointer_lstm.py", "max_stars_repo_name": "hakeemta/pointer-networks", "max_stars_repo_head_hexsha": "8c0e80fd63d25c560a9b5f8eb0d4a0354fc32e6a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "pointer_lstm.py", "max_issues_repo_name": "hakeemta/pointer-networks", "max_issues_repo_head_hexsha": "8c0e80fd63d25c560a9b5f8eb0d4a0354fc32e6a", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "pointer_lstm.py", "max_forks_repo_name": "hakeemta/pointer-networks", "max_forks_repo_head_hexsha": "8c0e80fd63d25c560a9b5f8eb0d4a0354fc32e6a", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 38.4270833333, "max_line_length": 150, "alphanum_fraction": 0.640010843, "include": true, "reason": "import numpy", "num_tokens": 870}
#include <boost/property_tree/ptree.hpp> #include <boost/property_tree/json_parser.hpp> #include <boost/foreach.hpp> #include <iostream> #include <libnotify.h> #ifdef __clang__ # define COMPILER "clang++" #else # define COMPILER "g++" #endif using namespace std; struct coordinate_t { double x; double y; double z; auto operator<=>(const coordinate_t&) const = default; friend ostream& operator<< (ostream &out, const coordinate_t &point) { out << "coordinate_t {x: " << point.x << ", y: " << point.y << ", z: " << point.z << "}"; return out; } }; void read_file(string filename, stringstream &buffer) { ifstream file(filename.c_str()); if (file) { buffer << file.rdbuf(); file.close(); } } coordinate_t calc(stringstream& text) { boost::property_tree::ptree jobj; boost::property_tree::read_json(text, jobj); auto x = 0.0, y = 0.0, z = 0.0; auto len = 0; BOOST_FOREACH(boost::property_tree::ptree::value_type &coord, jobj.get_child("coordinates")) { len += 1; x += coord.second.get<double>("x"); y += coord.second.get<double>("y"); z += coord.second.get<double>("z"); } return coordinate_t{x / len, y / len, z / len}; } int main() { auto right = coordinate_t{2.0, 0.5, 0.25}; for (auto v : { "{\"coordinates\":[{\"x\":2.0,\"y\":0.5,\"z\":0.25}]}", "{\"coordinates\":[{\"y\":0.5,\"x\":2.0,\"z\":0.25}]}"}) { auto json = stringstream(v); auto left = calc(json); if (left != right) { cerr << left << " != " << right << endl; exit(EXIT_FAILURE); } } stringstream text; read_file("/tmp/1.json", text); notify_with_pid("C++/" COMPILER " (Boost.PropertyTree)"); const auto& results = calc(text); notify("stop"); cout << results << endl; }
{"hexsha": "4883ef5fb8101bb66e28f7ad82b34c3e2497c7e1", "size": 1812, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "json/test_boost_ptree.cpp", "max_stars_repo_name": "mkitto/benchmarks", "max_stars_repo_head_hexsha": "070e222ef648c23e645a8c3fafcb25fe2288d817", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2317.0, "max_stars_repo_stars_event_min_datetime": "2015-01-01T19:49:01.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-31T20:51:14.000Z", "max_issues_repo_path": "json/test_boost_ptree.cpp", "max_issues_repo_name": "mkitto/benchmarks", "max_issues_repo_head_hexsha": "070e222ef648c23e645a8c3fafcb25fe2288d817", "max_issues_repo_licenses": ["MIT"], "max_issues_count": 230.0, "max_issues_repo_issues_event_min_datetime": "2015-02-01T12:22:41.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-31T20:27:51.000Z", "max_forks_repo_path": "json/test_boost_ptree.cpp", "max_forks_repo_name": "mkitto/benchmarks", "max_forks_repo_head_hexsha": "070e222ef648c23e645a8c3fafcb25fe2288d817", "max_forks_repo_licenses": ["MIT"], "max_forks_count": 322.0, "max_forks_repo_forks_event_min_datetime": "2015-02-01T00:06:37.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-31T17:25:25.000Z", "avg_line_length": 23.5324675325, "max_line_length": 72, "alphanum_fraction": 0.5855408389, "num_tokens": 519}
function RBMs.sample_h_from_v(rbm::CenteredRBM, v::AbstractArray; β::Real = true) inputs = RBMs.inputs_v_to_h(rbm, v) return RBMs.transfer_sample(hidden(rbm), inputs; β) end function RBMs.sample_v_from_h(rbm::CenteredRBM, h::AbstractArray; β::Real = true) inputs = RBMs.inputs_h_to_v(rbm, h) return RBMs.transfer_sample(visible(rbm), inputs; β) end function RBMs.sample_v_from_v(rbm::CenteredRBM, v::AbstractArray; β::Real = true, steps::Int = 1) @assert size(visible(rbm)) == size(v)[1:ndims(visible(rbm))] v1 = copy(v) for _ in 1:steps v1 .= RBMs.sample_v_from_v_once(rbm, v1; β) end return v1 end function RBMs.sample_h_from_h(rbm::CenteredRBM, h::AbstractArray; β::Real = true, steps::Int = 1) @assert size(rbm.hidden) == size(h)[1:ndims(hidden(rbm))] h1 = copy(h) for _ in 1:steps h1 .= RBMs.sample_h_from_h_once(rbm, h1; β) end return h1 end function RBMs.sample_v_from_v_once(rbm::CenteredRBM, v::AbstractArray; β::Real = true) h = RBMs.sample_h_from_v(rbm, v; β) v = RBMs.sample_v_from_h(rbm, h; β) return v end function RBMs.sample_h_from_h_once(rbm::CenteredRBM, h::AbstractArray; β::Real = true) v = RBMs.sample_v_from_h(rbm, h; β) h = RBMs.sample_h_from_v(rbm, v; β) return h end
{"hexsha": "7591dc54db1ddd3257a66c158eb00447499fd5f7", "size": 1293, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/sampling.jl", "max_stars_repo_name": "cossio/CenteredRBMs.jl", "max_stars_repo_head_hexsha": "20076d5c4c5c1a95fbdf098e9616caa400b8d2f8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/sampling.jl", "max_issues_repo_name": "cossio/CenteredRBMs.jl", "max_issues_repo_head_hexsha": "20076d5c4c5c1a95fbdf098e9616caa400b8d2f8", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/sampling.jl", "max_forks_repo_name": "cossio/CenteredRBMs.jl", "max_forks_repo_head_hexsha": "20076d5c4c5c1a95fbdf098e9616caa400b8d2f8", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 32.325, "max_line_length": 97, "alphanum_fraction": 0.6844547564, "num_tokens": 438}
[STATEMENT] lemma omega_subid: "\<Omega> x (d y) \<le> d y" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<Omega> x (d y) \<le> d y [PROOF STEP] by (simp add: Omega_def local.a_subid_aux2)
{"llama_tokens": 91, "file": "KAD_Modal_Kleene_Algebra_Applications", "length": 1}
#ifndef TRIPS_HPP #define TRIPS_HPP #include <vector> #include <boost/unordered_set.hpp> //struct Trip { // // last attribute is the index // // So should be size + 1 // uint64_t * attributes; //}; //struct TripKey { // uint64_t * attributes; //}; typedef uint64_t Trip; typedef uint64_t TripKey; typedef std::vector<const Trip*> TripVector; //typedef boost::unordered_set<const Trip*> TripSet; #endif
{"hexsha": "508b1239dc328279868e7eed4ce058e4a6f09999", "size": 409, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/mongo/db/kdtree/Trip.hpp", "max_stars_repo_name": "harishd10/mongodb", "max_stars_repo_head_hexsha": "69dd944e2e7cac2a3f56c99f2a20d45651b8db24", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 24.0, "max_stars_repo_stars_event_min_datetime": "2015-10-15T00:03:57.000Z", "max_stars_repo_stars_event_max_datetime": "2021-04-25T18:21:31.000Z", "max_issues_repo_path": "src/mongo/db/kdtree/Trip.hpp", "max_issues_repo_name": "harishd10/mongodb", "max_issues_repo_head_hexsha": "69dd944e2e7cac2a3f56c99f2a20d45651b8db24", "max_issues_repo_licenses": ["Apache-2.0"], "max_issues_count": 1.0, "max_issues_repo_issues_event_min_datetime": "2015-06-02T12:19:19.000Z", "max_issues_repo_issues_event_max_datetime": "2015-06-02T12:19:19.000Z", "max_forks_repo_path": "src/mongo/db/kdtree/Trip.hpp", "max_forks_repo_name": "harishd10/mongodb", "max_forks_repo_head_hexsha": "69dd944e2e7cac2a3f56c99f2a20d45651b8db24", "max_forks_repo_licenses": ["Apache-2.0"], "max_forks_count": 3.0, "max_forks_repo_forks_event_min_datetime": "2017-07-26T11:17:11.000Z", "max_forks_repo_forks_event_max_datetime": "2021-11-30T00:11:32.000Z", "avg_line_length": 16.36, "max_line_length": 52, "alphanum_fraction": 0.7090464548, "num_tokens": 106}
import numpy as np from scipy.stats import kurtosis, skew class descriptor_stats(object): ''' A class containing standardized statistics to compute over each representation These statistics include: mean, standard deviation, kurtosis, and skewness Population covariance is also considered separately Args: data: a 2-D array to compute these statistics over axis: the axis of the array to compute the stats along Methods: get_stats: calculates the mean, std, kurtosis and skewness of a 2-D array mean: see numpy.mean standard_deviation: see numpy.std kurtosis: see scipy.stats.kurtosis skewness: see scipy.stats.skewness covariance: calculates the population covariance using numpy see np.cov for details ''' def __init__(self, data, axis=0): ''' Populate 2-D array attribute and axis attribute ''' self._axis = axis ''' The data array should be at least 2 dimensional if it is 1-dimensional, simply add an axis. If the data is a scalar or 0-dimensional, in our case this corresponds to a structure with a single periodic site then we must copy the data in another manner ''' if type(data) != np.ndarray: data = np.array(data) if len(np.shape(data)) > 1: self.data = data else: if np.shape(data) == (): data = np.array([data, data]) self.data = data[:, np.newaxis] def mean(self): ''' Calculates the mean of a 2-D array along a specified axis ''' return np.mean(self.data, axis=self._axis) def min(self): ''' Calculates the minimum value of an array along a specied axis ''' return np.amin(self.data, axis=self._axis) def max(self): ''' Calculates the maximum value of an array along a specied axis ''' return np.amax(self.data, axis=self._axis) def standard_deviation(self): ''' Calculates the standard deviation of a 2-D array along a specified axis if the array length is 1, return 0 for standard deviation this fix is to ensure that no NaN values effect the ML models ''' if np.shape(self.data) == 1: return 0 else: return np.std(self.data, axis=self._axis) def kurtosis(self): ''' Calculates the kurtosis of a 2-D array ''' return kurtosis(self.data, axis=self._axis) def skewness(self): ''' Calculates the skewness of a 2-D array ''' return skew(self.data, axis=self._axis) def get_stats(self): ''' Computes standardized stats over the representation array ''' stats = np.hstack([[self.mean()], [self.min()], [self.max()], [self.standard_deviation()], [self.kurtosis()], [self.skewness()]]) if self._axis == 0: return np.reshape(stats, (6, np.shape(self.data)[1])).T elif self._axis == 1: return np.reshape(stats, (6, np.shape(self.data)[0])).T def covariance(self, comparison_data): ''' Computes the covariance of two feature arrays If the feature arrays are not of equal shape, the shorter feature array will be padded with zeros such that they are then equal length. Note that the covaraince matrix is symmetric, thus we only need the upper triangular portion of the matrix Args: comparison data: np.float, the arrays to compute the covariance matrix over ''' if type(comparison_data) != np.ndarray: comparison_data = np.array(comparison_data) if len(np.shape(comparison_data)) > 1: comparison_data = comparison_data else: if np.shape(comparison_data) == (): comparison_data = np.array([comparison_data, comparison_data]) comparison_data = comparison_data[:, np.newaxis] if (np.shape(self.data) == np.array([1,1])).all() and (np.shape(comparison_data) == np.array([1,1])).all(): print('Covariance not defined for scalars') raise ValueError elif np.shape(self.data) == np.shape(comparison_data): # covariance matrix cov_mat = np.cov(self.data, comparison_data, rowvar=False) # flatten upper triangular covariance matrix return cov_mat[0,1] elif np.shape(self.data)[0] >= np.shape(comparison_data)[0] and np.shape(self.data)[1] >= np.shape(comparison_data)[1]: # pad comparison vector with zeros new_array = np.zeros_like(self.data) new_array[:np.shape(comparison_data)[0], :np.shape(comparison_data)[1]] = comparison_data # covariance matrix cov_mat = np.cov(self.data, new_array, rowvar=False) # flatten the upper triangular covariance matrix return cov_mat[0,1] elif np.shape(self.data)[0] <= np.shape(comparison_data)[0] and np.shape(self.data)[1] >= np.shape(comparison_data)[1]: # pad self.data with necessary zeros new_data_array = np.zeros([np.shape(comparison_data)[0], np.shape(self.data)[1]]) new_data_array[:np.shape(self.data)[0], :np.shape(self.data)[1]] = self.data # pad comparison data with necessary zeroes new_comparison_array = np.zeros([np.shape(comparison_data)[0], np.shape(self.data)[1]]) new_comparison_array[:np.shape(comparison_data)[0], :np.shape(comparison_data)[1]] = comparison_data cov_mat = np.cov(new_data_array, new_comparison_array, rowvar=False) return cov_mat[0,1] elif np.shape(self.data)[0] >= np.shape(comparison_data)[0] and np.shape(self.data)[1] <= np.shape(comparison_data)[1]: # pad with necessary zeros new_data_array = np.zeros([np.shape(self.data)[0], np.shape(comparison_data)[1]]) new_data_array[:np.shape(self.data)[0], :np.shape(self.data)[1]] = self.data new_comparison_array = np.zeros([np.shape(self.data)[0], np.shape(comparison_data)[1]]) new_comparison_array[:np.shape(comparison_data)[0], :np.shape(comparison_data)[1]] = comparison_data cov_mat = np.cov(new_data_array, new_comparison_array, rowvar=False) return cov_mat[0,1] else: # pad self.data with zeros new_array = np.zeros_like(comparison_data) new_array[:np.shape(self.data)[0], :np.shape(self.data)[1]] = self.data # covariance matrix cov_mat = np.cov(new_array, comparison_data, rowvar=False) # flatten the upper triangular covariance matrix return cov_mat[0,1]
{"hexsha": "03a1c41524b7d401567623489a4be3002f7906b3", "size": 7027, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyxtal_ml/descriptors/stats.py", "max_stars_repo_name": "qzhu2017/ML-DOS", "max_stars_repo_head_hexsha": "c58ebdfc77746175771af0862ed5737c4eaa3eec", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 11, "max_stars_repo_stars_event_min_datetime": "2018-11-18T21:57:16.000Z", "max_stars_repo_stars_event_max_datetime": "2021-07-20T12:23:28.000Z", "max_issues_repo_path": "pyxtal_ml/descriptors/stats.py", "max_issues_repo_name": "qzhu2017/ML-DOS", "max_issues_repo_head_hexsha": "c58ebdfc77746175771af0862ed5737c4eaa3eec", "max_issues_repo_licenses": ["MIT"], "max_issues_count": 34, "max_issues_repo_issues_event_min_datetime": "2018-10-23T14:54:48.000Z", "max_issues_repo_issues_event_max_datetime": "2019-03-26T18:07:09.000Z", "max_forks_repo_path": "pyxtal_ml/descriptors/stats.py", "max_forks_repo_name": "qzhu2017/ML-Materials", "max_forks_repo_head_hexsha": "c58ebdfc77746175771af0862ed5737c4eaa3eec", "max_forks_repo_licenses": ["MIT"], "max_forks_count": 3, "max_forks_repo_forks_event_min_datetime": "2018-11-15T06:34:37.000Z", "max_forks_repo_forks_event_max_datetime": "2019-01-04T02:04:25.000Z", "avg_line_length": 31.9409090909, "max_line_length": 137, "alphanum_fraction": 0.600967696, "include": true, "reason": "import numpy,from scipy", "num_tokens": 1558}
# inference with mxnet import mxnet as mx from tensorflow.keras.preprocessing import image import numpy as np from collections import namedtuple Batch = namedtuple('Batch', ['data']) ctx = mx.gpu() # load model sym, arg_params, aux_params = mx.model.load_checkpoint('models/retinaface-R50', 0) mod = mx.mod.Module(symbol = sym, context= ctx, label_names= None) mod.bind(for_training=False, data_shapes=[('data', (1, 3, 112, 112))], label_shapes= mod._label_shapes) mod.set_params(arg_params, aux_params, allow_missing= True) path = 'thao.png' # load image with BGRTranspose=True img = image.load_img(path, target_size = (112, 112)) img = image.img_to_array(img) img = img[..., ::-1] # channel first in mxnet img = np.expand_dims(img, 0).transpose((0,3,1,2)) # compute the predict probabilities mod.forward(Batch([mx.nd.array(img)])) prob = mod.get_outputs()[0].asnumpy() prob = np.squeeze(prob) print("----------") print(prob) print("----------") print(np.sum(np.square(prob)))
{"hexsha": "b5ae768d822ab300d8222f73c3c96d67d8f3c47e", "size": 988, "ext": "py", "lang": "Python", "max_stars_repo_path": "mxnet_inference.py", "max_stars_repo_name": "pmathewjacob/insightface-attendance", "max_stars_repo_head_hexsha": "447b669e3d176bb1c78a6108334d6470a8fb25a8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 5, "max_stars_repo_stars_event_min_datetime": "2019-12-02T03:32:29.000Z", "max_stars_repo_stars_event_max_datetime": "2020-06-14T19:22:40.000Z", "max_issues_repo_path": "mxnet_inference.py", "max_issues_repo_name": "pmathewjacob/insightface-attendance", "max_issues_repo_head_hexsha": "447b669e3d176bb1c78a6108334d6470a8fb25a8", "max_issues_repo_licenses": ["MIT"], "max_issues_count": 13, "max_issues_repo_issues_event_min_datetime": "2020-03-24T17:53:27.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-10T00:49:34.000Z", "max_forks_repo_path": "mxnet_inference.py", "max_forks_repo_name": "pmathewjacob/insightface-attendance", "max_forks_repo_head_hexsha": "447b669e3d176bb1c78a6108334d6470a8fb25a8", "max_forks_repo_licenses": ["MIT"], "max_forks_count": 6, "max_forks_repo_forks_event_min_datetime": "2019-12-02T16:35:57.000Z", "max_forks_repo_forks_event_max_datetime": "2020-08-21T08:44:27.000Z", "avg_line_length": 26.0, "max_line_length": 103, "alphanum_fraction": 0.70951417, "include": true, "reason": "import numpy", "num_tokens": 263}
"""Deep Dreaming using Caffe and Google's Inception convolutional neural network.""" # pylint: disable=invalid-name, wrong-import-position from collections import namedtuple, OrderedDict import logging import multiprocessing as mp import os from pathlib import Path import queue import re import sys os.environ['GLOG_minloglevel'] = '1' import caffe import numpy as np from PIL import Image from scipy import ndimage try: from tqdm import tqdm except ImportError: pass from .tile_worker import TileRequest, TileWorker class TQDMStream: def __init__(self, stream): self.stream = stream self.redirected = False def write(self, s): if 'tqdm' in globals() and self.redirected: s.rstrip() and tqdm.write(s, file=self.stream) else: self.stream.write(s) def flush(self): self.stream.flush() logger = logging.getLogger(__name__) stream = TQDMStream(sys.stderr) CTX = mp.get_context('spawn') EPS = np.finfo(np.float32).eps # Note that the per-channel mean values are in BGR order. CNNData = namedtuple('CNNData', 'deploy model mean categories') CNNData.__new__.__defaults__ = (None,) # Make categories optional. _BASE_DIR = Path(__file__).parent.parent GOOGLENET_BVLC = CNNData( _BASE_DIR/'bvlc_googlenet/deploy.prototxt', _BASE_DIR/'bvlc_googlenet/bvlc_googlenet.caffemodel', (104, 117, 123), categories=_BASE_DIR/'bvlc_googlenet/categories.txt') GOOGLENET_PLACES205 = CNNData( _BASE_DIR/'googlenet_places205/deploy_places205.prototxt', _BASE_DIR/'googlenet_places205/googlelet_places205_train_iter_2400000.caffemodel', (105.417, 113.753, 116.047), categories=_BASE_DIR/'googlenet_places205/categories.txt') GOOGLENET_PLACES365 = CNNData( _BASE_DIR/'googlenet_places365/deploy_googlenet_places365.prototxt', _BASE_DIR/'googlenet_places365/googlenet_places365.caffemodel', (104.051, 112.514, 116.676), categories=_BASE_DIR/'googlenet_places365/categories_places365.txt') RESNET_50 = CNNData( _BASE_DIR/'resnet/ResNet-50-deploy.prototxt', _BASE_DIR/'resnet/ResNet-50-model.caffemodel', (104, 117, 123), categories=_BASE_DIR/'bvlc_googlenet/categories.txt') def normf(arr, *args, **kwargs): return np.linalg.norm(arr.flatten(), *args, **kwargs) def call_normalized(fn, arr, *args, **kwargs): normed = arr.copy() offset = normed.min() normed -= offset scale = normed.max() normed /= scale ret = fn(normed, *args, **kwargs) if isinstance(ret, np.ndarray): return ret * scale + offset return ret def save_as_hdr(arr, filename, gamma=2.2, allow_negative=True): """Saves a float32 ndarray to a high dynamic range (OpenEXR or float32 TIFF) file. Args: arr (ndarray): The input array. filename (str | Path): The output filename. gamma (Optional[float]): The encoding gamma of arr. allow_negative (Optional[bool]): Clip negative values to zero if false.""" arr = arr.astype(np.float32)/255 if not allow_negative: arr[arr < 0] = 0 if gamma != 1: arr = np.sign(arr)*np.abs(arr)**gamma filename = str(filename) extension = filename.rpartition('.')[2].lower() if extension == 'exr': import OpenEXR exr = OpenEXR.OutputFile(filename, OpenEXR.Header(arr.shape[1], arr.shape[0])) exr.writePixels({'R': arr[..., 0].tobytes(), 'G': arr[..., 1].tobytes(), 'B': arr[..., 2].tobytes()}) exr.close() elif extension == 'tif' or extension == 'tiff': import tifffile tiff = tifffile.TiffWriter(filename) tiff.save(arr, photometric='rgb') tiff.close() else: raise Exception('Unknown HDR file format.') def to_image(arr): """Clips the values in a float32 ndarray to 0-255 and converts it to a PIL image. Args: arr (ndarray): The input array.""" return Image.fromarray(np.uint8(np.clip(np.round(arr), 0, 255))) def _resize(arr, size, method=Image.BICUBIC): h, w = size arr = np.float32(arr) if arr.ndim == 3: planes = [arr[i, :, :] for i in range(arr.shape[0])] else: raise TypeError('Only 3D CxHxW arrays are supported') imgs = [Image.fromarray(plane) for plane in planes] imgs_resized = [img.resize((w, h), method) for img in imgs] return np.stack([np.array(img) for img in imgs_resized]) def roll2(arr, xy): x, y = xy return np.roll(np.roll(arr, x, 2), y, 1) def tv_norm(x, beta=2): """Computes the total variation norm and its gradient. From jcjohnson/cnn-vis.""" x_diff = ndimage.convolve1d(x, [-1, 1], axis=2, mode='wrap') y_diff = ndimage.convolve1d(x, [-1, 1], axis=1, mode='wrap') grad_norm2 = x_diff**2 + y_diff**2 + EPS grad_norm_beta = grad_norm2**(beta/2) loss = np.sum(grad_norm_beta) dgrad_norm2 = (beta/2) * grad_norm2**(beta/2 - 1) dx_diff = 2 * x_diff * dgrad_norm2 dy_diff = 2 * y_diff * dgrad_norm2 dxy_diff = dx_diff + dy_diff dx_diff = roll2(dx_diff, (1, 0)) dy_diff = roll2(dy_diff, (0, 1)) grad = dxy_diff - dx_diff - dy_diff return loss, grad class ShapeError(Exception): """Raised by CNN when an invalid layer shape is requested which would otherwise crash Caffe.""" def __str__(self): return 'bad shape %s' % self.args class CaffeStateError(Exception): """Raised by CNN when the worker processes have died or malfunctioned, or Caffe is otherwise in a bad state. This error is only dealable with by creating a new CNN instance.""" def __str__(self): return 'Bad Caffe state: %s' % self.args class _LayerIndexer: def __init__(self, net, attr): self.net, self.attr = net, attr def __getitem__(self, key): return getattr(self.net.blobs[key], self.attr)[0] def __setitem__(self, key, value): getattr(self.net.blobs[key], self.attr)[0] = value class CNN: """Represents an instance of a Caffe convolutional neural network.""" def __init__(self, cnndata, cpu_workers=0, gpus=[]): """Initializes a CNN. Example: CNN(GOOGLENET_PLACES365, cpu_workers=0, gpus=[0]) Args: cpu_workers (Optional[int]): The number of CPU workers to start. The default is 1 if no other compute devices are specified. gpus (Optional[list[int]]): The GPU device numbers to start GPU workers on. """ caffe.set_mode_cpu() self.net = caffe.Net(str(cnndata.deploy), 1, weights=str(cnndata.model)) self.mean = np.float32(cnndata.mean) self.data = _LayerIndexer(self.net, 'data') self.diff = _LayerIndexer(self.net, 'diff') try: self.categories = [str(i) for i in range(self.data['prob'].size)] except KeyError: self.categories = [] if cnndata.categories is not None: self.categories = open(str(cnndata.categories)).read().splitlines() self.img = np.zeros_like(self.data['data']) self.step = 0 self.total_px = 0 self.progress_bar = None self.req_q = CTX.JoinableQueue() self.resp_q = CTX.Queue() self.workers = [] self.is_healthy = True if not cpu_workers and not gpus: cpu_workers = 1 for _ in range(cpu_workers): self.workers.append(TileWorker(self.req_q, self.resp_q, cnndata, None)) for gpu in gpus: self.workers.append(TileWorker(self.req_q, self.resp_q, cnndata, gpu)) def __del__(self): self.is_healthy = False for worker in self.workers: worker.__del__() def ensure_healthy(self): """Ensures that the worker subprocesses are healthy. If one has terminated, it will terminate the others, set self.is_healthy to False, and raise a CaffeStateError.""" if not self.is_healthy: raise CaffeStateError( 'The worker processes were terminated. Please make a new CNN instance.') for worker in self.workers: if worker.proc.exitcode: logger.error('Tile worker %s (pid %d) crashed.', worker.proc.name, worker.proc.pid) self.__del__() raise CaffeStateError('Worker process malfunction detected; terminating others.') return True def _preprocess(self, img): """Converts from HxWx3 RGB to 3xHxW BGR and subtracts the network per-channel mean.""" return np.rollaxis(np.float32(img), 2)[::-1] - self.mean[:, None, None] def _deprocess(self, img): """Converts from 3xHxW BGR to HxWx3 RGB and adds the network per-channel mean.""" return np.dstack((img + self.mean[:, None, None])[::-1]) def get_features(self, input_img, layers=None, max_tile_size=512): """Retrieve feature maps from the classification (forward) phase of operation. Example: cnn.get_features(img, ['prob'])['prob'] classifies 'img' and returns the predicted probability distribution over the network's categories. Returns: A dict which maps each layer in layers to a retrieved feature map. """ input_arr = self._preprocess(np.float32(input_img)) h = min(max_tile_size, input_arr.shape[1]) w = min(max_tile_size, input_arr.shape[2]) if max(*input_arr.shape[1:]) > max_tile_size: input_arr = _resize(input_arr, (h, w)) self.net.blobs['data'].reshape(1, 3, h, w) self.data['data'] = input_arr end = self.layers()[-1] self.net.forward(end=end) if not layers: layers = self.layers() features = OrderedDict() for layer in layers: features[layer] = self.data[layer].copy() return features def _grad_tiled(self, layers, progress=True, max_tile_size=512, **kwargs): # pylint: disable=too-many-locals if 'tqdm' in globals() and progress: if not self.progress_bar: stream.redirected = True self.progress_bar = tqdm( total=self.total_px, unit='pix', unit_scale=True, ncols=80, dynamic_ncols=True, smoothing=0.1) h, w = self.img.shape[1:] # Height and width of input image ny, nx = (h-1)//max_tile_size+1, (w-1)//max_tile_size+1 # Number of tiles per dimension g = np.zeros_like(self.img) for y in range(ny): th = h//ny if y == ny-1: th += h - th*ny for x in range(nx): tw = w//nx if x == nx-1: tw += w - tw*nx sy, sx = h//ny*y, w//nx*x data = self.img[:, sy:sy+th, sx:sx+tw] self.ensure_healthy() self.req_q.put(TileRequest((sy, sx), data, layers, self.step == 0)) for _ in range(ny*nx): while True: try: self.ensure_healthy() resp, grad = self.resp_q.get(True, 1) break except queue.Empty: continue sy, sx = resp g[:, sy:sy+grad.shape[1], sx:sx+grad.shape[2]] = grad if 'tqdm' in globals() and progress: self.progress_bar.update(np.prod(grad.shape[-2:])) return g def _step(self, n=1, step_size=1, g_weight=1, l2_reg=0, tv_reg=0, p=2, beta=2, jitter=32, seed=0, save_intermediates=False, **kwargs): np.random.seed(self.img.size + seed) for t in range(1, n+1): xy = np.random.randint(-jitter, jitter+1, 2) self.img = roll2(self.img, xy) # Compute normalized gradients and update image g = self._grad_tiled(**kwargs) g /= np.mean(np.abs(g)) + EPS _, tv_g = tv_norm(self.img, beta) tv_g /= 255**(beta-1) l2_g = p * np.sign(self.img) * np.abs(self.img / 127.5)**(p-1) grad = g_weight*g - l2_reg*l2_g - tv_reg*tv_g self.img += step_size * grad self.img = roll2(self.img, -xy) if save_intermediates: to_image(self._deprocess(self.img)).save('out%04d.bmp' % self.step) self.step += 1 def _octave_detail(self, base, min_size=128, per_octave=2, fn=None, **kwargs): if 'n' not in kwargs: kwargs['n'] = 10 n = kwargs['n'] fnargs = {} if fn: fnargs.update(fn(base.shape[-2:])) if 'n' in fnargs: n = fnargs['n'] if min(base.shape[1:]) < 32: raise ShapeError(base.shape) factor = 2**(1/per_octave) detail = np.zeros_like(base, dtype=np.float32) self.total_px += base.shape[1] * base.shape[2] * n hf, wf = np.int32(np.round(np.array(base.shape)[-2:]/factor)) if min(hf, wf) >= min_size: smaller_base = _resize(base, (hf, wf)) smaller_detail = self._octave_detail(smaller_base, min_size, per_octave, fn, **kwargs) detail = _resize(smaller_detail, base.shape[-2:]) self.img = base + detail kwargs.update(fnargs) self._step(**kwargs) return self.img - base def layers(self, pattern='.*'): """Returns a list of layer names matching a regular expression.""" layers = [] for i, layer in enumerate(self.net.blobs.keys()): if i == 0 or layer.partition('_split_')[1]: continue if re.fullmatch(pattern, layer): layers.append(layer) if not layers: raise KeyError('no layers found') return layers def classify(self, input_img, n=1, **kwargs): """Classifies the input image and returns the n most probable categories. Args: input_img: The image to process (PIL images or Numpy arrays are accepted). n: The n most probable categories to return. max_tile_size: Does not allow the image dimension to exceed this. Returns: A list containing the n most probable categories.""" prob = self.get_features(input_img, ['prob'], **kwargs)['prob'] indices = prob.argsort()[::-1][:n] return [(prob[i], self.categories[i]) for i in indices] def prepare_layer_list(self, layers): if isinstance(layers, str): layers = [layers] if isinstance(layers, list): layers = {layer: 1 for layer in layers} _layers = OrderedDict() for layer in reversed(self.net.blobs.keys()): if layer in layers: _layers[layer] = layers[layer] return _layers def prepare_guide_weights(self, guide_img, layers=None, max_guide_size=512): if not layers: layers = self.layers() if isinstance(layers, str): layers = [layers] guide_features = self.get_features(guide_img, layers, max_tile_size=max_guide_size) weights = {} for layer in layers: if guide_features[layer].ndim != 3: continue v = np.sum(guide_features[layer], axis=(1, 2), keepdims=True) weights[layer] = v/normf(v, 1) return self.prepare_layer_list(weights) def subset_layers(self, layers, new_layers): _layers = OrderedDict() for layer in new_layers: _layers[layer] = layers[layer] return _layers def dream(self, input_img, layers, progress=True, save_intermediates=False, **kwargs): """Runs the Deep Dream multiscale gradient ascent algorithm on the input image. Args: input_img: The image to process (PIL images or Numpy arrays are accepted) layers (dict): The layer/feature weights to use in the objective function for gradient ascent. progress (Optional[bool]): Display a progress bar while computing. min_size (Optional[int]): Don't permit the small edge of the image to go below this. per_octave (Optional[int]): Determines the difference between each scale; for instance, the default of 2 means that a 1000x1000 input image will get processed as 707x707 and 500x500. n (Optional[int]): The number of gradient ascent steps per scale. Defaults to 10. step_size (Optional[float]): The strength of each individual gradient ascent step. max_tile_size (Optional[int]): Defaults to 512, suitable for a GPU with 2 GB RAM. Higher values perform better; if Caffe runs out of GPU memory and crashes then it should be lowered. Returns: The unclipped processed image as a float32 ndarray which has a valid range of 0-255 but which may contain components that are less than 0 or greater than 255. deep_dream.to_image() can be used to convert the ndarray to a PIL image. """ self.ensure_healthy() _layers = self.prepare_layer_list(layers) input_arr = self._preprocess(np.float32(input_img)) self.total_px = 0 self.progress_bar = None self.step = 0 try: detail = self._octave_detail(input_arr, layers=_layers, progress=progress, save_intermediates=save_intermediates, **kwargs) except KeyboardInterrupt: self.__del__() raise CaffeStateError('Worker processes left in inconsistent states. Terminating them.') finally: if self.progress_bar: self.progress_bar.close() stream.redirected = False output = self._deprocess(detail + input_arr) if save_intermediates: to_image(output).save('out%04d.bmp' % self.step) return output def dream_guided(self, input_img, guide_img, layers, max_guide_size=512, **kwargs): """Performs guided gradient ascent on input_img, weighted by the feature map channel sums of guide_img. This algorithm works best using a relatively large number of layers, such as (for googlenet) anything matching the regular expression 'inception_../output'. The relative weights of the layers are determined automatically.""" self.ensure_healthy() weights = self.prepare_guide_weights(guide_img, layers, max_guide_size) return self.dream(input_img, weights, **kwargs)
{"hexsha": "db6bc89eee48e160d7d46e5de3dc53e687ea8443", "size": 18584, "ext": "py", "lang": "Python", "max_stars_repo_path": "deep_dream/deep_dream.py", "max_stars_repo_name": "THinnerichs/deep_dream", "max_stars_repo_head_hexsha": "ae4dafb4128cbda4b4a8bbdcb4aa69c2d2cdf7f0", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 99, "max_stars_repo_stars_event_min_datetime": "2016-06-18T04:43:33.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-04T09:21:45.000Z", "max_issues_repo_path": "deep_dream/deep_dream.py", "max_issues_repo_name": "THinnerichs/deep_dream", "max_issues_repo_head_hexsha": "ae4dafb4128cbda4b4a8bbdcb4aa69c2d2cdf7f0", "max_issues_repo_licenses": ["MIT"], "max_issues_count": 10, "max_issues_repo_issues_event_min_datetime": "2016-07-16T18:39:52.000Z", "max_issues_repo_issues_event_max_datetime": "2020-01-17T11:36:48.000Z", "max_forks_repo_path": "deep_dream/deep_dream.py", "max_forks_repo_name": "THinnerichs/deep_dream", "max_forks_repo_head_hexsha": "ae4dafb4128cbda4b4a8bbdcb4aa69c2d2cdf7f0", "max_forks_repo_licenses": ["MIT"], "max_forks_count": 20, "max_forks_repo_forks_event_min_datetime": "2016-10-16T20:40:26.000Z", "max_forks_repo_forks_event_max_datetime": "2022-02-28T12:20:51.000Z", "avg_line_length": 39.1242105263, "max_line_length": 100, "alphanum_fraction": 0.612892811, "include": true, "reason": "import numpy,from scipy", "num_tokens": 4577}
# -*- coding: utf-8 -*- """ Created on Mon Mar 05 13:41:23 2018 @author: DanielM """ from neuron import h import numpy as np import net_globalrev from burst_generator_inhomogeneous_poisson import inhom_poiss import os import argparse import scipy.stats as stats # Parse command line inputs # Command line signature: # python script -runs n n n -savedir str -scale n -seed n pr = argparse.ArgumentParser(description='Local pattern separation paradigm') pr.add_argument('-runs', nargs=3, type=int, help='start stop range for the range of runs', default=[0, 1, 1], dest='runs') pr.add_argument('-savedir', type=str, help='complete directory where data is saved', default=os.getcwd(), dest='savedir') pr.add_argument('-scale', type=int, help='standard deviation of gaussian distribution', default=1000, dest='input_scale') pr.add_argument('-seed', type=int, help='standard deviation of gaussian distribution', default=10000, dest='seed') args = pr.parse_args() runs = range(args.runs[0], args.runs[1], args.runs[2]) savedir = args.savedir input_scale = args.input_scale seed = args.seed # Locate a nrnmech.dll file containig the mechanisms required by the network # adapt path for your own machine. dll_files = [("C:\\Users\\DanielM\\Repos\\models_dentate\\" "dentate_gyrus_Santhakumar2005_and_Yim_patterns\\" "dentategyrusnet2005\\nrnmech.dll"), "C:\\Users\\daniel\\Repos\\nrnmech.dll", ("C:\\Users\\Holger\\danielm\\models_dentate\\" "dentate_gyrus_Santhakumar2005_and_Yim_patterns\\" "dentategyrusnet2005\\nrnmech.dll"), ("C:\\Users\\Daniel\\repos\\" "dentate_gyrus_Santhakumar2005_and_Yim_patterns\\" "dentategyrusnet2005\\nrnmech.dll")] for x in dll_files: if os.path.isfile(x): dll_dir = x print("DLL loaded from: " + dll_dir) h.nrn_load_dll(dll_dir) # Seed the numpy random number generator for replication np.random.seed(seed) nw = net_globalrev.TunedNetwork(seed)
{"hexsha": "e63634bada9a69952abe5c892a56362210213224", "size": 2352, "ext": "py", "lang": "Python", "max_stars_repo_path": "rd/nw_testing.py", "max_stars_repo_name": "danielmk/pyDentateeLife2020", "max_stars_repo_head_hexsha": "b4a9f2beaa0c74dbc9583e2cf228856612596f8a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_stars_repo_stars_event_min_datetime": "2022-02-24T20:39:46.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-24T20:39:46.000Z", "max_issues_repo_path": "rd/nw_testing.py", "max_issues_repo_name": "danielmk/pyDentateeLife2020", "max_issues_repo_head_hexsha": "b4a9f2beaa0c74dbc9583e2cf228856612596f8a", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "rd/nw_testing.py", "max_forks_repo_name": "danielmk/pyDentateeLife2020", "max_forks_repo_head_hexsha": "b4a9f2beaa0c74dbc9583e2cf228856612596f8a", "max_forks_repo_licenses": ["MIT"], "max_forks_count": 4, "max_forks_repo_forks_event_min_datetime": "2020-02-18T09:25:20.000Z", "max_forks_repo_forks_event_max_datetime": "2021-11-20T23:52:29.000Z", "avg_line_length": 33.6, "max_line_length": 77, "alphanum_fraction": 0.606292517, "include": true, "reason": "import numpy,import scipy", "num_tokens": 556}
# -*- coding: utf-8 -*- """ Hosmer-Lemeshow test @author: Alex (stackoverflow) """ import pandas as pd import numpy as np from scipy.stats import chi2 def hosmer_lemeshow_test(pihat,real_label): # pihat=model.predict() pihatcat=pd.cut(pihat, np.percentile(pihat,[0,25,50,75,100]),labels=False,include_lowest=True) #here I've chosen only 4 groups meanprobs =[0]*4 expevents =[0]*4 obsevents =[0]*4 meanprobs2=[0]*4 expevents2=[0]*4 obsevents2=[0]*4 for i in range(4): meanprobs[i]=np.mean(pihat[pihatcat==i]) expevents[i]=np.sum(pihatcat==i)*np.array(meanprobs[i]) obsevents[i]=np.sum(real_label[pihatcat==i]) meanprobs2[i]=np.mean(1-pihat[pihatcat==i]) expevents2[i]=np.sum(pihatcat==i)*np.array(meanprobs2[i]) obsevents2[i]=np.sum(1-real_label[pihatcat==i]) data1={'meanprobs':meanprobs,'meanprobs2':meanprobs2} data2={'expevents':expevents,'expevents2':expevents2} data3={'obsevents':obsevents,'obsevents2':obsevents2} m=pd.DataFrame(data1) e=pd.DataFrame(data2) o=pd.DataFrame(data3) # The statistic for the test, which follows, under the null hypothesis, # The chi-squared distribution with degrees of freedom equal to amount of groups - 2. Thus 4 - 2 = 2 tab = pd.DataFrame((np.array(o)-np.array(e))**2/np.array(e)).fillna(value=0).values tt=sum(sum(tab)) pvalue=1-chi2.cdf(tt,2) return pd.DataFrame([[chi2.cdf(tt,2).round(2), pvalue.round(2)]],columns = ["Chi2", "p - value"]) if __name__ == "__main__": pred = np.array([0.6,0.7,0.1,0.6, 0.8, 0.2,0.1, 0.0,0.2,0.3]) y = np.array([1,1,1,1,1,0,0,0,0,0,]) dd=hosmer_lemeshow_test(pred, y) print(dd)
{"hexsha": "7270b5a0c11d85091d6ef7a76f0cd6710fb00897", "size": 1713, "ext": "py", "lang": "Python", "max_stars_repo_path": "eslearn/statistical_analysis/el_hosmer_lemeshow_test.py", "max_stars_repo_name": "lichao312214129/easylearn", "max_stars_repo_head_hexsha": "e77b51b26e0c75b3a4d59dd5a71cf1b63ac4347d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 19, "max_stars_repo_stars_event_min_datetime": "2020-02-29T06:00:18.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-24T01:30:14.000Z", "max_issues_repo_path": "statistical_analysis/el_hosmer_lemeshow_test.py", "max_issues_repo_name": "easylearn-fmri/easylearn", "max_issues_repo_head_hexsha": "102ff264a7672b246244a489e0fbde8e3897c52f", "max_issues_repo_licenses": ["MIT"], "max_issues_count": 7, "max_issues_repo_issues_event_min_datetime": "2020-04-02T03:05:21.000Z", "max_issues_repo_issues_event_max_datetime": "2020-11-11T11:45:05.000Z", "max_forks_repo_path": "statistical_analysis/el_hosmer_lemeshow_test.py", "max_forks_repo_name": "easylearn-fmri/easylearn", "max_forks_repo_head_hexsha": "102ff264a7672b246244a489e0fbde8e3897c52f", "max_forks_repo_licenses": ["MIT"], "max_forks_count": 11, "max_forks_repo_forks_event_min_datetime": "2020-03-03T03:02:15.000Z", "max_forks_repo_forks_event_max_datetime": "2020-11-11T14:09:55.000Z", "avg_line_length": 32.9423076923, "max_line_length": 130, "alphanum_fraction": 0.6503210741, "include": true, "reason": "import numpy,from scipy", "num_tokens": 612}
from classes.trainers.Trainer import Trainer from classes.cv.FeatureSelector import FeatureSelector from classes.factories.ClassifiersFactory import ClassifiersFactory from classes.handlers.ParamsHandler import ParamsHandler from classes.factories.DataSplitterFactory import DataSplitterFactory import numpy as np import random import os import pandas as pd class TaskFusionTrainer(Trainer): def __init__(self): super().__init__() @staticmethod def average_results(data: list, model) -> object: """ :param data: list of Trainer objects that contain attributes pred_probs, preds, etc. :param model: classifier for which the aggregation is to be done (only used to refer to a particular entry in the dictionary) :return: Trainer object with updated values """ method = 'task_fusion' avg_preds = {} avg_pred_probs = {} sub_data = None num = 0 new_data = None # This portion gets activated when across_tasks or across modalities aggregation is required # since the model being passed is a single model (either GNB, or RF, or LR) if type(model) == str: new_data = data[-1][model] num = len(data) sub_data = np.array([data[t][model] for t in range(num)]) # This portion gets activated when within_tasks aggregation is required # since the models being passed will be more than one elif type(model) == list: new_data = data[model[-1]] num = len(model) sub_data = np.array([data[m] for m in model]) # Find the union of all pids across all tasks union_pids = np.unique(np.concatenate([list(sub_data[i].pred_probs[method].keys()) for i in range(num)])) pred_probs_dict = {} # averaging the pred_probs for a certain PID whenever it's seen across all tasks for i in union_pids: pred_probs_sum_list = np.zeros(3) for t in range(num): if i in sub_data[t].pred_probs[method]: pred_probs_sum_list[0] += sub_data[t].pred_probs[method][i][0] pred_probs_sum_list[1] += sub_data[t].pred_probs[method][i][1] pred_probs_sum_list[2] += 1 pred_probs_dict[i] = np.array( [pred_probs_sum_list[0] / pred_probs_sum_list[2], pred_probs_sum_list[1] / pred_probs_sum_list[2]]) avg_pred_probs[method] = pred_probs_dict new_data.pred_probs = avg_pred_probs # preds ------------------------------------------------------------------------------------------------------ # assigning True or False for preds based on what the averaged pred_probs were found in the previous step preds_dict = {} for i in avg_pred_probs[method]: preds_dict[i] = avg_pred_probs[method][i][0] < avg_pred_probs[method][i][1] avg_preds[method] = preds_dict new_data.preds = avg_preds # Return the updated new_data - only pred_probs and preds are changed, the rest are the same as the initially chosen new_data return new_data def train(self, data: dict, clf: str, seed: int, feature_set: str = '', feature_importance: bool = True): self._clf = clf self._method = 'task_fusion' self._seed = seed self._x = data['x'] self._y = data['y'] self._labels = np.array(data['labels']) feature_names = list(self._x.columns.values) splitter = DataSplitterFactory().get(mode=self._mode) self._splits = splitter.make_splits(data=data, seed=self._seed) # defining metrics acc = [] fms = [] roc = [] precision = [] recall = [] specificity = [] pred = {} pred_prob = {} k_range = None print("Model %s" % self._clf) print("=========================") for idx, fold in enumerate(self._splits): print("Processing fold: %i" % idx) x_train, y_train = fold['x_train'], fold['y_train'].ravel() x_test, y_test = fold['x_test'], fold['y_test'].ravel() labels_train, labels_test = fold['train_labels'], fold['test_labels'] acc_scores = [] fms_scores = [] roc_scores = [] p_scores = [] # precision r_scores = [] # recall spec_scores = [] # getting feature selected x_train, x_test and the list of selected features x_train_fs, x_test_fs, selected_feature_names, k_range = \ FeatureSelector().select_features(fold_data=fold, feature_names=feature_names, k_range=k_range) # fit the model model = ClassifiersFactory.get_model(clf) model = model.fit(x_train_fs, y_train) # make predictions yhat = model.predict(x_test_fs) yhat_probs = model.predict_proba(x_test_fs) for i in range(labels_test.shape[0]): pred[labels_test[i]] = yhat[i] pred_prob[labels_test[i]] = yhat_probs[i] # calculating metrics for each fold acc_scores, fms_scores, roc_scores, p_scores, r_scores, spec_scores = \ self.compute_save_results(y_true=y_test, y_pred=yhat, y_prob=yhat_probs[:, 1], acc_saved=acc_scores, fms_saved=fms_scores, roc_saved=roc_scores, precision_saved=p_scores, recall_saved=r_scores, spec_saved=spec_scores) # adding every fold metric to the bigger list of metrics acc.append(acc_scores) fms.append(fms_scores) roc.append(roc_scores) precision.append(p_scores) recall.append(r_scores) specificity.append(spec_scores) self._save_results(method=self._method, acc=acc, fms=fms, roc=roc, precision=precision, recall=recall, specificity=specificity, pred=pred, pred_prob=pred_prob, k_range=k_range) return self def calculate_task_fusion_results(self, data): acc = [] fms = [] roc = [] precision = [] recall = [] specificity = [] params = ParamsHandler.load_parameters('settings') output_folder = params["output_folder"] extraction_method = params["PID_extraction_method"] nfolds = params['folds'] # get list of superset_ids from the saved file super_pids_file_path = os.path.join('results', output_folder, extraction_method + '_super_pids.csv') superset_ids = list(pd.read_csv(super_pids_file_path)['interview']) # random shuffle based on random seed random.Random(self._seed).shuffle(superset_ids) splits = np.array_split(superset_ids, nfolds) method = 'task_fusion' pred = data.preds[method] pred_prob = data.pred_probs[method] k_range = data._best_k[method]['k_range'] # compute performance measures for each of the splits for i in splits: acc_scores = [] fms_scores = [] roc_scores = [] p_scores = [] # precision r_scores = [] # recall spec_scores = [] # specificity # get the prediction probabilities, predicted outcomes, and labels for each of the PIDs in this split y_true_sub = [] y_pred_sub = [] y_prob_sub = [] for j in i: if j in data.y.keys(): y_true_sub.append(data.y[j]) y_pred_sub.append(data.preds[method][j]) y_prob_sub.append(data.pred_probs[method][j]) y_true_sub = np.array(y_true_sub) y_pred_sub = np.array(y_pred_sub) y_prob_sub = np.array(y_prob_sub) # calculate the performance metrics at the fold level acc_scores, fms_scores, roc_scores, p_scores, r_scores, spec_scores = \ self.compute_save_results(y_true=y_true_sub, y_pred=y_pred_sub, y_prob=y_prob_sub[:, 1], acc_saved=acc_scores, fms_saved=fms_scores, roc_saved=roc_scores, precision_saved=p_scores, recall_saved=r_scores, spec_saved=spec_scores) # saving performance metrics for each fold acc.append(acc_scores) fms.append(fms_scores) roc.append(roc_scores) precision.append(p_scores) recall.append(r_scores) specificity.append(spec_scores) # save performance metrics self._save_results(method, acc=acc, fms=fms, roc=roc, precision=precision, recall=recall, specificity=specificity, pred=pred, pred_prob=pred_prob, k_range=k_range) return self
{"hexsha": "a51b81c354e7fb78730c380680aaac0f3d102923", "size": 9092, "ext": "py", "lang": "Python", "max_stars_repo_path": "classes/trainers/TaskFusionTrainer.py", "max_stars_repo_name": "canary-for-cognition/multimodal-ml-framework", "max_stars_repo_head_hexsha": "379963e2815165b28a28c983d32dd17656fba9a9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_stars_repo_stars_event_min_datetime": "2021-11-10T10:28:01.000Z", "max_stars_repo_stars_event_max_datetime": "2021-11-10T10:28:01.000Z", "max_issues_repo_path": "classes/trainers/TaskFusionTrainer.py", "max_issues_repo_name": "canary-for-cognition/multimodal-ml-framework", "max_issues_repo_head_hexsha": "379963e2815165b28a28c983d32dd17656fba9a9", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "classes/trainers/TaskFusionTrainer.py", "max_forks_repo_name": "canary-for-cognition/multimodal-ml-framework", "max_forks_repo_head_hexsha": "379963e2815165b28a28c983d32dd17656fba9a9", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 40.2300884956, "max_line_length": 133, "alphanum_fraction": 0.586449626, "include": true, "reason": "import numpy", "num_tokens": 1934}
#!/usr/bin/env python3 from matplotlib import pyplot as plt from matplotlib.patches import Rectangle import numpy as np from mpl_tools.helpers import add_to_labeled_items, add_colorbar, savefig from matplotlib.colors import LinearSegmentedColormap import pickle import itertools as it dchi2 = r'$\Delta \chi^2$' colors = [(0.4, 0.4, 0.4), (0.8, 0.8, 0.8), (0.4, 0.8, 0.4)] # cm = LinearSegmentedColormap.from_list('cmsimple', colors, N=3) def MakeEqualScale(edges): """Convert any set of ticks to evenly spaced ticks""" widths = edges[1:] - edges[:-1] def forward(values): idxs = np.searchsorted(edges, values, side='right') ret = np.zeros_like(values) idxs-=1 idxs[idxs<0]=0 idxs[idxs>=widths.size]=widths.size-1 ret = idxs + (values - edges[idxs])/widths[idxs] return ret def inverse(values): idxs = np.array(values, dtype='i') idxs[idxs<0]=0 idxs[idxs>=widths.size]=widths.size-1 return edges[idxs] + widths[idxs]*(values - idxs) return forward, inverse def show_values(pc, fmt="%.2f", **kw): pc.update_scalarmappable() ax = plt.gca() for p, color, value in zip(pc.get_paths(), pc.get_facecolors(), pc.get_array()): x, y = p.vertices[:3:2].mean(0) if np.mean(color[:3]) > 0.5: color = (0.0, 0.0, 0.0) else: color = (1.0, 1.0, 1.0) ax.text(x, y, fmt % value, ha="center", va="center", color=color, **kw) def plot_boxes(dataall=None, title=None, scale=False, low=None, high=None, output=None, suffix=()): if dataall is None: assert low is not None assert high is not None data = None else: low, high, data = dataall['scan'] split = dataall['split'] xlabel='E low' ylabel='E high' eminimal = low[0] emaximal = high[-1] if scale: fwd_x, inv_x = MakeEqualScale(low) fwd_y, inv_y = MakeEqualScale(high) # Prepare data L, H = np.meshgrid(low, high, indexing='ij') W = np.around(H[1:, 1:] - L[:-1, :-1], 6) Center = np.around(H[1:, 1:] + L[:-1, :-1], 6)*0.5 emin, emax, ew = 1.5, 4.0, 0.5 gridopts=dict(color='red', alpha=0.4, linestyle='dashed') # # Make figure # fig = plt.figure(figsize=(8, 6)) ax = plt.subplot(111, xlabel=xlabel, ylabel=ylabel, title='Energy limits map: '+title) if scale: ax.set_xscale('function', functions=(fwd_x, inv_x)) ax.set_yscale('function', functions=(fwd_y, inv_y)) ax.xaxis.set_tick_params(top=True, labeltop=True, which='both') ax.set_xticks(low) ax.set_yticks(high) # # Plot stuff # zorder=10 if data is None: # Helper rectangle rpos = (0.60, 0.05) rwidth, rheight = 0.1, 0.1 hlen = rwidth*0.1 hwidth = hlen rcenter_x = rpos[0]+rwidth*0.5 rcenter_y = rpos[1]+rheight*0.5 rect_example = Rectangle(rpos, rwidth, rheight, color='white', zorder=zorder, transform=ax.transAxes) ax.add_artist(rect_example) # Arrows opts = dict(zorder=zorder+2, head_width=hwidth, head_length=hlen, ec='black', fc='black', transform=ax.transAxes) ax.arrow(rpos[0], rcenter_y, rwidth*0.4-hlen, 0.0, **opts) ax.arrow(rcenter_x, rcenter_y+rheight*0.1, 0.0, rheight*0.4-hlen, **opts) # # # Highlight sides opts = dict(linewidth=2.5, color='black', zorder=zorder+1, transform=ax.transAxes, head_width=0.0, head_length=0.0) ax.arrow(rpos[0], rpos[1], 0.0, rheight, **opts) ax.arrow(rpos[0], rpos[1]+rheight, rwidth, 0.0, **opts) if data is None: # Total rect_total = Rectangle((eminimal, 10.0), 0.3, 2.0, color='magenta', zorder=zorder) ax.add_artist(rect_total) # Minimal if data is None: rect_min = Rectangle((emin, emax-ew), ew, ew, color='green', zorder=zorder) ax.add_artist(rect_min) goodlineopts = dict(zorder=zorder+1, linestyle='--', color='yellow', alpha=0.5) goodline = ax.vlines(emin, emax, emaximal, **goodlineopts) ax.hlines(emax, eminimal, emin, **goodlineopts) else: # rect_min = Rectangle((emin, emax-ew), ew, ew, fc='none', ec='yellow', linestyle='dashed', zorder=zorder) pass if data is None: # # Legend # rect_forbidden = Rectangle((emin, emax-ew), ew, ew, color=cm(0)) rect_bad = Rectangle((emin, emax-ew), ew, ew, color=cm(1)) rect_acceptable = Rectangle((emin, emax-ew), ew, ew, color=cm(2)) handles = [rect_example, rect_total, rect_min, rect_acceptable, rect_forbidden, rect_bad] labels = ['Example', 'Total: {:.1f}$-${:.0f}'.format(eminimal, 12.0), 'Minimal: {:.1f}$-${:.0f}'.format(emin, emax), 'Acceptable', 'Acceptable', 'Forbidden', 'Bad'] ax.legend(handles, labels, loc='lower right') # # Example plot # data = np.ones_like(L, dtype='i')*2.0 data[L>emin] = 1 data[H<emax-ew] = 1 data[L>H] = 0 data=data[:-1,:-1] ax.pcolormesh(L, H, data, vmin=0.1, cmap=cm) ax.grid(**gridopts) return # # Data # Data = np.ma.array(np.zeros_like(L, dtype='d'), mask=np.zeros_like(L, dtype='i'))[:-1,:-1] for emin, emax, fun, success in data: imin = np.searchsorted(low, emin) imax = np.searchsorted(high, emax)-1 Data[imin, imax] = fun Data.mask[imin, imax] = not success if fun>12.5: # Data[imin, imax] = -1 print('Strange value below:') print( '{index1:02d} {emin} in ({emin1}, {emin2})' '\t' '{index2:02d} {emax} in ({emax1}, {emax2})' '\t' '{fun}'.format( index1=imin, emin=emin, emin1=low[imin] if len(low)>imin else -1, emin2=low[imin+1] if len(low)-1>imin else -1, index2=imax, emax=emax, emax1=high[imax] if len(high)>imax else -1, emax2=high[imax+1] if len(high)-1>imax else -1, fun=fun ) ) c = ax.pcolormesh(L, H, Data, vmin=0.1) add_colorbar(c, label=dchi2) if scale: show_values(c, fontsize='x-small') ax.grid(**gridopts) lines2opts = dict(color='red', linewidth=1, linestyle='-') ax.axvline(low[1], **lines2opts) ax.axhline(high[-2], **lines2opts) axd = ax ax.set_xlim(right=3.4) savefig(output, suffix=suffix+('zoom',)) if not scale: return axd, None, None # # Test data # # fig = plt.figure() # ax = plt.subplot(111, xlabel=xlabel, ylabel=ylabel, title='Range, MeV') # ax.minorticks_on() # ax.grid() # ax.set_xscale('function', functions=(fwd_x, inv_x)) # ax.set_yscale('function', functions=(fwd_y, inv_y)) # ax.set_xticks(low) # ax.set_yticks(high) # c = ax.pcolormesh(L, H, W) # add_colorbar(c) # show_values(c, fontsize='x-small') # # Combination # fig = plt.figure() axc = plt.subplot(111, xlabel='E split, MeV', ylabel=dchi2, title='Split test: '+title) axc.xaxis.set_tick_params(top=True, labeltop=True, which='both') axc.minorticks_on() axc.grid() left_x, left_y = split['left'] right_x, right_y = split['right'] left_x = np.around(left_x, 6) axc.plot(left_x, left_y, label='left: [0.7, x] MeV') axc.plot(right_x, right_y, label='right: [x, 12] MeV') idx_right = np.in1d(right_x, left_x) idx_left = np.in1d(left_x, right_x) both_x = left_x[idx_left] both_y = left_y[idx_left] + right_y[idx_right] axc.plot(both_x, both_y, label='combined: uncorrelated sum') idx = np.argmin(both_y) worst_split_low_idx = np.argwhere(low==both_x[idx])[0,0] worst_split_high_idx = np.argwhere(high==both_x[idx])[0,0]-1 worst_dchi2 = both_x[idx] worst_split = both_y[idx] axc.axvline(both_x[idx], linestyle='--', alpha=0.5, label='worst split: {}={:.2f} at {} MeV'.format(dchi2, worst_split, worst_dchi2)) axc.legend() savefig(output, suffix=suffix+('split',)) # # Moving window # fig = plt.figure() ax = plt.subplot(111, xlabel='Window center', ylabel=dchi2, title='Moving window: '+title) ax.xaxis.set_tick_params(top=True, labeltop=True, which='both') ax.minorticks_on() ax.grid() plt.subplots_adjust(right=0.81) Wunique = np.unique(W) maxpath_x = [] maxpath_y = [] maxpath_fun = [] counter = 0 for w in Wunique: if w<=0.0: continue mask = W==w x = Center[mask] y = Data[mask] imax = np.argmax(y) xmax, ymax = x[imax], y[imax] if mask.sum()>=3: maxpath_fun.append(ymax) if mask.sum()>=3: color = ax.plot(x, y, label=str(w))[0].get_color() # if mask.sum()>=4: # eopts=dict(alpha=0.4, linewidth=3) # else: eopts=dict(alpha=1, linewidth=0.5, capsize=3) ax.errorbar([xmax], [ymax], xerr=w*0.5, fmt='o-', markerfacecolor='none', color=color, **eopts) counter+=1 if counter%5==0: handles, labels = ax.get_legend_handles_labels() ax.legend(handles[::-1], labels[::-1], title='Width:', bbox_to_anchor=(1.0, 1.15), loc='upper left', labelspacing=0.1) savefig(output, suffix=suffix+('window',str(counter))) if counter==8: ax.axhline(worst_dchi2, linestyle='--', label='Min split', alpha=0.6, color='blue') ax.axhline(np.max(Data), linestyle='--', label='Full') handles, labels = ax.get_legend_handles_labels() ax.legend(handles[::-1], labels[::-1], title='Width:', bbox_to_anchor=(1.0, 1.15), loc='upper left', labelspacing=0.1) savefig(output, suffix=suffix+('window',)) # # Max path on the main plot # plt.sca(axd) maxpath_fun = sorted(maxpath_fun) fun_prev = None while True: fun = maxpath_fun[-1] mask = np.isclose(Data, fun) idxs = np.argwhere(mask) cmpto=[] for idx in idxs: if idx[0]>0: app = Data[idx[0]-1, idx[1]] if app!=fun and app!=fun_prev: cmpto.append(app) if idx[1]<Data.shape[1]-1: app = Data[idx[0], idx[1]+1] if app!=fun and app!=fun_prev: cmpto.append(app) if not cmpto: break maxpath_fun.append(max(cmpto)) fun_prev = fun Lcenter = 0.85*L[1:,1:] +0.15*L[:-1,1:] Hcenter = 0.80*H[:-1,1:]+0.20*H[:-1,:-1] for fun in maxpath_fun: mask = np.isclose(Data, fun) maxpath_x.append(Lcenter[mask][0]) maxpath_y.append(Hcenter[mask][0]) # Max path xworst = [Lcenter[0, 0], Lcenter[worst_split_low_idx, -1]] yworst = [Hcenter[0, worst_split_high_idx], Hcenter[0, -1]] equiv_idx = np.argmin((Data-worst_dchi2)**2) equiv_idx = np.unravel_index(equiv_idx, Data.shape) equiv_idx1 = np.argmin((maxpath_fun-worst_dchi2)**2) x = [Lcenter[equiv_idx[0], equiv_idx[1]], maxpath_x[equiv_idx1]] y = [Hcenter[equiv_idx[0], equiv_idx[1]], maxpath_y[equiv_idx1]] # plot axd.plot(xworst, yworst, 'o', color='cyan', markerfacecolor='none', label='Worst split') axd.legend(bbox_to_anchor=(1.2, -0.15), loc='lower right', ncol=3, fontsize='small', numpoints=2) savefig(output, suffix=suffix+('zoom_2',)) axd.plot(maxpath_x, maxpath_y, 'o', color='red', markerfacecolor='none', label='Moving window maximum position') axd.plot(x, y, 'o', color='red', alpha=0.8, markerfacecolor='red', label='Closest to worst split') axd.legend(bbox_to_anchor=(1.2, -0.15), loc='lower right', ncol=3, fontsize='small', numpoints=2) savefig(output, suffix=suffix+('zoom_3',)) def load_data(args): data = {} threshold, ceiling = 0.7, 12.0 for i, inp in enumerate(args.input): dataset = [] emin_all = set() emax_all = set() split_left = () split_right = () for name in inp: with open(name, 'rb') as f: d=pickle.load(f, encoding='latin1')['fitresult']['min'] emin, emax = d['info']['emin'], d['info']['emax'] fun = d['fun'] if np.isclose(emax, 9.0): continue emin_all.add(emin) emax_all.add(emax) dataset.append((emin, emax, fun, d['success'])) if np.isclose(emin, threshold): split_left += (emax, fun), if np.isclose(emax, ceiling): split_right += (emin, fun), emin_all = list(sorted(emin_all)) emax_all = list(sorted(emax_all)) emin_all.append(emax_all[-1]) emax_all = [emin_all[0]] + emax_all emin_all, emax_all = np.array(emin_all), np.array(emax_all) idata = data[str(i)] = {} idata['scan'] = (emin_all, emax_all, dataset) split = idata['split'] = {} split['left'] = np.array(split_left).T split['right'] = np.array(split_right).T return data def main(args): if args.plot_map: low = np.concatenate( ( [0.7], np.arange(1.0, 8.0, 0.5) ) ) high = np.concatenate( (np.arange(1.5, 6.0, 0.5), [9.0, 12.0] ) ) plot_boxes(low=low, high=high) savefig(args.output, suffix='_map') plt.close() plot_boxes(low=low, high=high, scale=True) savefig(args.output, suffix='_map_scaled') plt.close() data = load_data(args) for i, (idata, title) in enumerate(it.zip_longest(data.values(), args.title)): plot_boxes(idata, title=title, scale=True, output=args.output, suffix=('_{}_scaled'.format(i),)) plt.show() if __name__ == "__main__": from argparse import ArgumentParser parser = ArgumentParser() parser.add_argument('--input', nargs='+', action='append', help='input files') parser.add_argument('--title', default=[], action='append', help='titles') parser.add_argument('-o', '--output', help='output file') parser.add_argument('--plot-map', '--map', action='store_true', help='plot map') args=parser.parse_args() main(args)
{"hexsha": "31afb5d4d3485165777a032f401f19d70bc3a733", "size": 14368, "ext": "py", "lang": "Python", "max_stars_repo_path": "packages/junosens-v2/macro/plot-scanedges-v1.py", "max_stars_repo_name": "gnafit/gna", "max_stars_repo_head_hexsha": "c1a58dac11783342c97a2da1b19c97b85bce0394", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 5, "max_stars_repo_stars_event_min_datetime": "2019-10-14T01:06:57.000Z", "max_stars_repo_stars_event_max_datetime": "2021-02-02T16:33:06.000Z", "max_issues_repo_path": "packages/junosens-v2/macro/plot-scanedges-v1.py", "max_issues_repo_name": "gnafit/gna", "max_issues_repo_head_hexsha": "c1a58dac11783342c97a2da1b19c97b85bce0394", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "packages/junosens-v2/macro/plot-scanedges-v1.py", "max_forks_repo_name": "gnafit/gna", "max_forks_repo_head_hexsha": "c1a58dac11783342c97a2da1b19c97b85bce0394", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 33.9669030733, "max_line_length": 173, "alphanum_fraction": 0.574610245, "include": true, "reason": "import numpy", "num_tokens": 4367}
module GraphKernels using Graphs using SimpleValueGraphs using SimpleValueGraphs: AbstractValGraph using LinearAlgebra: dot, diag using Statistics: mean, std using LIBSVM using Random: MersenneTwister, randperm using ThreadsX import LIBSVM: svmtrain, svmpredict using KernelFunctions: kernelmatrix, kernelmatrix_diag import KernelFunctions export AbstractGraphKernel, NoGraphBaselineGraphKernel, ShortestPathGraphKernel, PyramidMatchGraphKernel, WeisfeilerLehmanGraphKernel, ConstVertexKernel, DiracVertexKernel, DotVertexKernel, k_fold_cross_validation, # reexport from KernelFunctions kernelmatrix, kernelmatrix_diag, # overridden methods from LIBSVM svmtrain, svmpredict include("utils.jl") include("replacedvertexvals.jl") include("vertex_kernels.jl") include("graph-kernels/abstract-graph-kernel.jl") include("graph-kernels/baseline-graph-kernel.jl") include("graph-kernels/pyramid-match-graph-kernel.jl") include("graph-kernels/shortest-path-graph-kernel.jl") include("graph-kernels/weisfeiler-lehman-graph-kernel.jl") include("integrations/LIBSVM.jl") # ================================================================ # utilities # ================================================================ """ k_fold_cross_validation Simple k-fold cross validation implementation for quick testing during development. """ function k_fold_cross_validation(kernel::KernelFunctions.Kernel, graphs::AbstractVector{<:AbstractGraph}; k_folds=5, class_key=1, kwargs...) n = length(graphs) indices = randperm(MersenneTwister(123), n) acc_train = Float64[] acc_valid = Float64[] # TODO there should be better partition function that # ensures that not only the last partition is smaller for valid_indices in Iterators.partition(1:n, ceil(Int, n // k_folds)) train_x = [graphs[indices[i]] for i in 1:n if i ∉ valid_indices] valid_x = [graphs[indices[i]] for i in valid_indices] train_y = [get_graphval(g, class_key) for g in train_x] valid_y = [get_graphval(g, class_key) for g in valid_x] model = svmtrain(train_x, train_y, kernel; kwargs...) train_y_pred = svmpredict(model, train_x) valid_y_pred = svmpredict(model, valid_x) push!(acc_train, mean(train_y_pred .== train_y)) push!(acc_valid, mean(valid_y_pred .== valid_y)) end return (mean_train_accuracy=mean(acc_train), std_train_accuracy=std(acc_train), mean_valid_accuracy=mean(acc_valid), std_valid_accuracy=std(acc_valid)) end end
{"hexsha": "e415f6fc2194b0e57adc72a5335b6241bfc79d6b", "size": 2588, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/GraphKernels.jl", "max_stars_repo_name": "simonschoelly/GraphKernels.jl", "max_stars_repo_head_hexsha": "f04797de0b86a39172b6adbcfcee35ec4b39f91b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max_stars_repo_stars_event_min_datetime": "2021-09-03T10:09:48.000Z", "max_stars_repo_stars_event_max_datetime": "2021-11-10T00:21:35.000Z", "max_issues_repo_path": "src/GraphKernels.jl", "max_issues_repo_name": "simonschoelly/GraphKernels.jl", "max_issues_repo_head_hexsha": "f04797de0b86a39172b6adbcfcee35ec4b39f91b", "max_issues_repo_licenses": ["MIT"], "max_issues_count": 1, "max_issues_repo_issues_event_min_datetime": "2021-04-08T20:38:47.000Z", "max_issues_repo_issues_event_max_datetime": "2021-06-24T13:49:39.000Z", "max_forks_repo_path": "src/GraphKernels.jl", "max_forks_repo_name": "simonschoelly/GraphKernels.jl", "max_forks_repo_head_hexsha": "f04797de0b86a39172b6adbcfcee35ec4b39f91b", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 29.4090909091, "max_line_length": 140, "alphanum_fraction": 0.7044049459, "num_tokens": 628}
MODULE m_brzone use m_juDFT ! ! This subroutine finds the corner-points, the edges, and the ! faces of the irreducible wedge of the brillouin zone (IBZ). ! CONTAINS SUBROUTINE brzone( > rcmt,nsym,idrot,mface,nbsz,nv48, = cpoint, < xvec,ncorn,nedge,nface,fnorm,fdist) USE m_constants IMPLICIT NONE INTEGER, PARAMETER :: ibfile = 42 INTEGER, INTENT (IN) :: mface,nbsz,nv48 INTEGER, INTENT (IN) :: nsym ! number of symmetry elements REAL, INTENT (IN) :: rcmt(3,3) ! reciprocal lattice basis (2\pi/a.u.) REAL, INTENT (IN) :: idrot(3,3,48) ! rotation matrices in cartesian repr. INTEGER, INTENT (OUT) :: ncorn,nedge,nface ! number of corners, faces and edges of the IBZ REAL, INTENT (OUT) :: fnorm(3,mface) ! normal vector of the planes bordering the IBZ REAL, INTENT (OUT) :: fdist(mface) ! distance vector of the planes bordering the IBZ REAL, INTENT (OUT) :: cpoint(3,mface) ! cartesian coordinates of corner points of IBZ REAL, INTENT (OUT) :: xvec(3) ! arbitrary vector lying in the IBZ C C LOCAL variables C REAL pi REAL scale,sum,amin,alpha REAL bmin,beta,cmin,cmax,gamma REAL sx,xmin INTEGER ntl,krecip(3),ntot,ip,i,j,l,n,m,nfp INTEGER nmin,mmin,lmin,lmax,nf,ncf INTEGER n1,n2,n3,nn,k,ii C C Local working arrays and pointers C REAL epoint(3,mface),fpoint(3,mface),cstart(3,2,mface) REAL fvec(3),evec(3),dir(3),c0(3),c1(3),c2(3),csum(3) REAL sk(3),yvec(3),ddist(nv48),dvec(3,nv48) INTEGER nplane(mface) C C-----> Intrinsic Functions C INTRINSIC min,sqrt C OPEN (ibfile,form='formatted',status='scratch') c WRITE (ibfile,'('' brzone '')') ntot = (2*nbsz + 1)**3 WRITE (ibfile,'('' ntot = '',i4,'' nsym = '',i4)') ntot,nsym ntl = ntot + nsym - 2 WRITE (ibfile,'('' ntl = '',i4)') ntl WRITE (ibfile,'('' rcmt '',/)') c WRITE (ibfile,*) rcmt WRITE (ibfile,101) ((rcmt(i,j),j=1,3),i=1,3) 101 FORMAT(/5x,3(f10.6,3x),2(/5x,3(f10.6,3x))) C C construct all boundary-planes C first the planes that determine the first brillouin zone C that is, the planes bisecting the line connecting the C origin with a reciprocal lattice vector ( <> 0 ) C pi = pimach() DO i = 1,3 sk(i) = 0.0 DO j = 1,3 sk(i)=sk(i)+rcmt(j,i)*rcmt(j,i) ENDDO ENDDO WRITE (ibfile,'('' sk(1) = j=1,3 of rcmt(j,1)**2 '')') WRITE (ibfile,97) (sk (ii),ii=1,3) 97 FORMAT (/5x,' sk(i) ',3(f13.6,2x)) scale = sqrt(min(sk(1),sk(2),sk(3)))*0.1 xvec(1) = scale xvec(2) = scale/sqrt(pi) xvec(3) = scale/pi WRITE (ibfile,98) (xvec(ii),ii=1,3) 98 FORMAT (/5x,' xvec(i) ',3(f13.6,2x)) n = 0 DO n1 = -nbsz,nbsz krecip(1) = n1 DO n2 = -nbsz,nbsz krecip(2) = n2 DO n3 = -nbsz,nbsz IF ( .NOT.(n1.EQ.0.AND.n2.EQ.0.AND.n3.EQ.0) ) THEN krecip(3) = n3 n = n + 1 DO i = 1,3 dvec(i,n) = 0.0 DO j = 1,3 dvec(i,n) = dvec(i,n) + rcmt(i,j)*krecip(j) ENDDO ENDDO WRITE (ibfile,99) n,(dvec(k,n),k=1,3) 99 FORMAT(/5x,' dvec(k,',i4,') ',3(f13.6,2x)) sum = 0.0 DO i = 1,3 sum = sum + dvec(i,n)**2 WRITE (ibfile,'('' sum = dvec**2 = '',f13.6)') sum ENDDO sum = sqrt(sum) ddist(n) = 0.5*sum WRITE (ibfile,'(/'' ddist('',i3,'')=(.5*sum**.5) '',f13.6)') > n,ddist(n) sum = 1.0/sum WRITE (ibfile,'(/'' sum = ( 1/(.5*sum**.5) )'',f13.6)') sum DO i = 1,3 dvec(i,n) = dvec(i,n)*sum ENDDO WRITE (ibfile,'('' dvec(i,n) * latest sum '')') WRITE (ibfile,99) n,(dvec(k,n),k=1,3) ENDIF ENDDO ENDDO ENDDO C C construct the planes that determine the irreducible wedge C that is, the planes bisecting the line connecting xvec C with an element of the star of xvec ( <> xvec ) C WRITE (ibfile,'('' working on star of xvec '')') WRITE (ibfile,'('' ntot = '',i4,'' ntl = '',i4,/)') ntot,ntl DO n = ntot,ntl ddist(n) = 0.0 WRITE (ibfile,'(/)') DO i = 1,3 dvec(i,n)=-xvec(i) WRITE (ibfile,'('' dvec('',i3,i4,'')=(here-xvec('',i2,'') '', + f13.6)') i,n,i,dvec(i,n) DO j=1,3 dvec(i,n) = dvec(i,n) + idrot(i,j,n+2-ntot)*xvec(j) WRITE (ibfile,'('' idrot('',i3,i3,i4,'') = '',f10.6)') + i,j,n+2-ntot,idrot(i,j,n+2-ntot) WRITE (ibfile,'('' xvec('',i3,'') = '',f6.4)') j,xvec(j) WRITE (ibfile,'('' dvec('',i3,i4,'') = '',f13.6,/)') + i,n,dvec(i,n) ENDDO ENDDO sum = 0.0 DO i = 1,3 sum =sum + dvec(i,n)**2 WRITE (ibfile,'('' sum = dvec**2 = '',f13.6)') sum ENDDO sum = 1.0/sqrt(sum) WRITE (ibfile,'(/'' sum = ( 1/(sum**.5) )'',f13.6)') sum DO i = 1,3 dvec(i,n)=dvec(i,n)*sum ENDDO WRITE (ibfile,'('' dvec(i,n) * latest sum '')') WRITE (ibfile,99) n,(dvec(k,n),k=1,3) ENDDO nn = ntl - ntot + 1 C C find the point on the line determined by the origin and xvec C which is on the nearest boundary plane C WRITE (ibfile,'(/,'' find points on nearest boundary plane '')') amin = scale*99999.9 nmin = 0 DO n = 1,ntl sum = 0.0 DO i = 1,3 sum = sum + xvec(i)*dvec(i,n) ENDDO WRITE (ibfile,'('' sum('',i4,'') = '',f13.6)') n,sum IF ( abs(sum).GT.1.0e-10 ) THEN alpha=ddist(n)/sum WRITE (ibfile,'('' alpha('',i4,'') = '',f13.6)') n,alpha IF ( .NOT.((alpha.LE.0.0).OR.(alpha.GT.amin)) ) THEN amin = alpha nmin = n WRITE (ibfile,'('' nmin = '',i4)') n ENDIF ENDIF ENDDO IF ( nmin==0 ) CALL juDFT_error("bzone1",calledby ="brzone") WRITE (ibfile,'('' amin = '',f13.6)') amin DO i = 1,3 fvec(i) = amin*xvec(i) ENDDO WRITE (ibfile,'('' fvec('',i3,'') = '',f13.6)') (i,fvec(i),i=1,3) nplane(1) = nmin C C find the nearest edge in this plane, along the line connecting C fvec and the center of the plane, given by dvec*ddist C WRITE (ibfile,'(/,'' find nearest edge in this plane '')') bmin = scale*99999.9 mmin = 0 DO m = 1,ntl IF ( m.NE.nmin ) THEN sum=0.0 DO i = 1,3 sum = sum + dvec(i,m)*(fvec(i)-dvec(i,nmin)*ddist(nmin)) ENDDO WRITE (ibfile,'('' sum('',i4,'') = '',f13.6)') m,sum IF ( abs(sum).GT.1.0e-10 ) THEN beta = ddist(m) WRITE (ibfile,'('' beta('',i4,'') = '',f13.6)') m,ddist(m) DO i = 1,3 beta=beta-fvec(i)*dvec(i,m) ENDDO WRITE (ibfile,'('' beta-fvec(i)*dvec(i,m) = '',f13.6)') beta beta = beta/sum IF ( .NOT.((beta.LT.0.0).OR.(beta.GT.bmin)) ) THEN bmin=beta mmin=m ENDIF ENDIF ENDIF ENDDO IF ( mmin==0 ) CALL juDFT_error("bzone2",calledby ="brzone") DO i = 1,3 evec(i) = fvec(i) + bmin*(fvec(i)-dvec(i,nmin)*ddist(nmin)) ENDDO WRITE (ibfile,'(/,'' evec('',i3,'') = '',f13.6)') + (i,evec(i),i=1,3) C C find innermost boundary plane for this edge C WRITE (ibfile,'(/,'' find innermost boundary plane '')') xmin = scale*99999.9 mmin = 0 DO m = 1,ntl IF ( m.NE.nmin ) THEN sum = ddist(m) sx = 0.0 DO i = 1,3 sum = sum - dvec(i,m)*evec(i) sx = sx + dvec(i,m)*dvec(i,nmin) ENDDO IF ( .NOT.((abs(sum).GT.1.e-10).OR.(sx.GT.xmin)) ) THEN xmin = sx mmin = m ENDIF ENDIF ENDDO IF ( mmin.EQ.0 ) CALL juDFT_error("bzone25",calledby="brzone") nplane(2) = mmin C C find direction of the edge C dir(1) = dvec(2,nmin)*dvec(3,mmin) - dvec(3,nmin)*dvec(2,mmin) dir(2) = dvec(3,nmin)*dvec(1,mmin) - dvec(1,nmin)*dvec(3,mmin) dir(3) = dvec(1,nmin)*dvec(2,mmin) - dvec(2,nmin)*dvec(1,mmin) WRITE (ibfile,'('' dir('',i3,'') = '',f13.6)') (i,dir(i),i=1,3) C C find the corner points on this edge C WRITE (ibfile,'('' find corner points on this edge '')') cmin = scale*99999.9 cmax = -cmin lmin = 0 lmax = 0 DO l=1,ntl IF ( (l.EQ.nmin).OR.(l.EQ.mmin) ) GOTO 2700 sum = 0.0 DO i=1,3 sum = sum + dir(i)*dvec(i,l) ENDDO IF ( abs(sum).LT.1.0e-10 ) GOTO 2700 gamma=ddist(l) DO i = 1,3 gamma = gamma - evec(i)*dvec(i,l) ENDDO gamma = gamma/sum IF ( gamma.GE.0.0 ) THEN IF (gamma.gt.cmin) GOTO 2700 cmin=gamma lmin=l GOTO 2700 ENDIF IF ( gamma.GE.cmax ) THEN cmax=gamma lmax=l ENDIF 2700 CONTINUE ENDDO IF ( lmax*lmin.EQ.0 ) CALL juDFT_error("bzone3",calledby="brzone") WRITE (ibfile,'('' cmax = '',f13.6)') cmax WRITE (ibfile,'('' cmin = '',f13.6)') cmin DO i=1,3 c0(i) = evec(i)+cmax*dir(i) WRITE (ibfile,'('' dir('',i3,'') = '',f13.6)') i,dir(i) WRITE (ibfile,'('' evec('',i3,'') = '',f13.6)') i,evec(i) WRITE (ibfile,'('' c0('',i3,'') = '',f13.6)') i,c0(i) c1(i)=evec(i)+cmin*dir(i) WRITE (ibfile,'('' c1('',i3,'') = '',f13.6)') i,c1(i) ENDDO C C prepare the list of corner points, etc, for the C general scheme of finding the boundaries of the C irreducible wedge of the first brillouin zone C WRITE (ibfile,'(/,'' prepare list of corner points '')') DO i = 1,3 cstart(i,1,1) = c0(i) cstart(i,2,1) = c1(i) cstart(i,1,2) = c1(i) cstart(i,2,2) = c0(i) cpoint(i,1) = c0(i) cpoint(i,2) = c1(i) epoint(i,1) = 0.5*(c0(i)+c1(i)) WRITE (ibfile,'('' cstart('',i2,'',1,1) = '',f13.6)') i,c0(i) WRITE (ibfile,'('' cstart('',i2,'',2,1) = '',f13.6)') i,c1(i) WRITE (ibfile,'('' cstart('',i2,'',1,2) = '',f13.6)') i,c1(i) WRITE (ibfile,'('' cstart('',i2,'',2,2) = '',f13.6)') i,c0(i) WRITE (ibfile,'('' cpoint('',i2,'',1) = '',f13.6)') i,c0(i) WRITE (ibfile,'('' cpoint('',i2,'',2) = '',f13.6)') i,c1(i) WRITE (ibfile,'('' epoint('',i2,'',1) = '',f13.6)')i,epoint(i,1) ENDDO ncorn = 2 nedge = 1 nface = 2 nf = 0 C C enter general loop which determines all corners and all edges C of all faces , new faces are added to the list nplane C 4000 CONTINUE nf = nf + 1 nfp = nplane(nf) C C we consider face number nf C start with the corner points of cstart , notice that the order C of the corner points is important and is determined by the C order in the outer product of the vectors dvec C DO i=1,3 c0(i) = cstart(i,1,nf) c1(i) = cstart(i,1,nf) c2(i) = cstart(i,2,nf) csum(i) = cstart(i,1,nf) + cstart(i,2,nf) ENDDO ncf = 2 4200 CONTINUE C C determine the point fvec C fvec(1) = dvec(2,nfp)*(c2(3)-c1(3))-dvec(3,nfp)*(c2(2)-c1(2)) fvec(2) = dvec(3,nfp)*(c2(1)-c1(1))-dvec(1,nfp)*(c2(3)-c1(3)) fvec(3) = dvec(1,nfp)*(c2(2)-c1(2))-dvec(2,nfp)*(c2(1)-c1(1)) c WRITE (ibfile,'('' pt fvec('',i3,'') = '',f13.6)') (i,fvec(i),i=1,3) DO i = 1,3 fvec(i) = 0.5*(c2(i)+c1(i)) + 0.001*fvec(i) ENDDO C C determine the edge connected to c2 by moving outwards on c2-c1 C and finding the nearest intersection with a boundary plane C on the line connecting this point and fvec , which is C on the correct side of the line c2-c1 , by construction , C because of the way we order the corner points C DO i = 1,3 yvec(i) = c2(i) + 1.0e-5*(c2(i)-c1(i)) ENDDO C C find nearest boundary plane C bmin = scale*99999.9 mmin = 0 DO m = 1,ntl IF ( m.NE.nplane(nf) ) THEN sum = 0.0 DO i = 1,3 sum = sum + dvec(i,m)*(yvec(i)-fvec(i)) ENDDO IF ( abs(sum).GE.1.0e-10 ) THEN beta=ddist(m) DO i = 1,3 beta = beta - fvec(i)*dvec(i,m) ENDDO beta = beta/sum IF ( .NOT.((beta.LT.0.0).OR.(beta.GT.bmin)) ) THEN bmin = beta mmin = m ENDIF ENDIF ENDIF ENDDO IF ( mmin.EQ.0 ) CALL juDFT_error("bzone4",calledby="brzone") C C construct direction of this edge C dir(1) = dvec(2,nfp)*dvec(3,mmin) - dvec(3,nfp)*dvec(2,mmin) dir(2) = dvec(3,nfp)*dvec(1,mmin) - dvec(1,nfp)*dvec(3,mmin) dir(3) = dvec(1,nfp)*dvec(2,mmin) - dvec(2,nfp)*dvec(1,mmin) WRITE (ibfile,'(''2 dir('',i3,'') = '',f13.6)') (i,dir(i),i=1,3) C C find other corner point on this edge C cmin = scale*99999.9 lmin = 0 DO l = 1,ntl IF ( .NOT.((l.EQ.nplane(nf)).OR.(l.EQ.mmin)) ) THEN sum = 0.0 DO i = 1,3 sum = sum + dir(i)*dvec(i,l) ENDDO IF ( abs(sum).GE.1.0e-10 ) THEN gamma=ddist(l) DO i = 1,3 gamma = gamma - dvec(i,l)*c2(i) ENDDO gamma = gamma/sum IF ( .NOT.((gamma.LT.1.0e-9).OR.(gamma.GT.cmin)) ) THEN cmin = gamma lmin = l ENDIF ENDIF ENDIF ENDDO IF ( lmin.EQ.0 ) CALL juDFT_error("bzone5",calledby="brzone") C C move c2 and c1 C DO i = 1,3 c1(i) = c2(i) c2(i) = c1(i) + cmin*dir(i) evec(i) = 0.5*( c1(i)+c2(i) ) ENDDO WRITE (ibfile,'(''corner c1('',i3,'')='',f13.6)') (i,c1(i),i=1,3) WRITE (ibfile,'(''corner c2('',i3,'')='',f13.6)') (i,c2(i),i=1,3) WRITE (ibfile,'(''evec('',i3,'') = '',f13.6)') (i,evec(i),i=1,3) C C find innermost boundary plane for this edge C xmin = scale*99999.9 mmin = 0 WRITE (ibfile,'(/,''bzone55 loop ntl='',i4,'' nfp='',i4)') ntl,nfp DO m = 1,ntl IF ( m.NE.nfp ) THEN sum = ddist(m) sx = 0.0 DO i=1,3 sum = sum - dvec(i,m)*evec(i) sx = sx + dvec(i,m)*dvec(i,nfp) ENDDO IF ( .NOT.((abs(sum).GT.1.0e-6).OR.(sx.GT.xmin)) ) THEN xmin = sx mmin = m WRITE (ibfile,'('' m = '',i4,'' xmin = '',f16.12,'' nfp = '' + ,i4)') m,xmin,nfp ENDIF ENDIF ENDDO WRITE (ibfile,'('' m = '',i4,'' xmin = '',f16.12,'' nfp = '',i4)') + m,xmin,nfp IF ( mmin.EQ.0 ) CALL juDFT_error("bzone55",calledby="brzone") C C check if we have found a new face or not C DO ip = 1,nface IF (nplane(ip).EQ.mmin) GOTO 5400 ENDDO nface = nface + 1 WRITE (ibfile,'('' nface = '',i4)') nface nplane(nface) = mmin DO i = 1,3 cstart(i,1,nface) = c2(i) cstart(i,2,nface) = c1(i) WRITE (ibfile,'('' cstart('',i3,'', 1,'',i3,'') = '',f13.6)') + i,nface,c2(i) WRITE (ibfile,'('' cstart('',i3,'', 2,'',i3,'') = '',f13.6)') + i,nface,c1(i) ENDDO 5400 CONTINUE C C check if the new corner and edge points are contained C in the list of existing points C DO ip = 1,ncorn sum = 0.00 DO i = 1,3 sum = sum + (c2(i) - cpoint(i,ip))**2 ENDDO IF ( abs(sum).LT.1.0e-10 ) GOTO 6300 ENDDO ncorn = ncorn + 1 WRITE (ibfile,'('' ncorn = '',i5)') ncorn DO i = 1,3 cpoint(i,ncorn) = c2(i) ENDDO 6300 CONTINUE c DO ip = 1,nedge sum = 0.0 DO i = 1,3 sum = sum + (evec(i) - epoint(i,ip))**2 ENDDO IF ( abs(sum).LT.1.0e-10 ) GOTO 6700 ENDDO nedge = nedge + 1 WRITE (ibfile,'('' nedge = '',i5)') nedge DO i = 1,3 epoint(i,nedge) = evec(i) ENDDO 6700 CONTINUE C C check if we have all points on this face C sum = 0.0 DO i = 1,3 sum = sum + ( c2(i) - c0(i) )**2 ENDDO IF ( abs(sum).GT.1.0e-10 ) THEN ncf = ncf + 1 WRITE (ibfile,'('' nface = '',i4)') nface GOTO 4200 ENDIF C C we have found all corner points on this face C determine the center of gravity of this face C DO i = 1,3 fpoint(i,nf) = csum(i)/ncf ENDDO IF ( nf.LT.nface ) GOTO 4000 c DO ip =1,nface nf = nplane(ip) fdist(ip) = ddist(nf) DO i=1,3 fnorm(i,ip) = dvec(i,nf) ENDDO ENDDO c ! WRITE(*,*) 'ncorn', ncorn ! WRITE(*,*) 'nedge', nedge ! WRITE(*,*) 'nface', nface ! WRITE(*,*) 'faces:' ! DO ip =1,nface ! WRITE(*,'(4f20.13)') fnorm(:,ip), fdist(ip) ! END DO ! WRITE(*,*) 'coners:' ! DO ip = 1,ncorn ! WRITE(*,'(3f20.13)') cpoint(:,ip) ! END DO WRITE (oUnit,7100) ncorn,nedge,nface WRITE (ibfile,7100) ncorn,nedge,nface 7100 FORMAT (///,' the irreducible wedge of the first brillouin' $,' zone has : ',/, $ i10,' corner points ',/, $ i10,' edges ',/, $ i10,' faces ') IF ( (ncorn + nface - nedge)/=2 ) CALL juDFT_error("bzone6" + ,calledby ="brzone") WRITE (oUnit,7200) ((cpoint(i,ip),i=1,3),ip=1,ncorn) WRITE (ibfile,7200) ((cpoint(i,ip),i=1,3),ip=1,ncorn) 7200 FORMAT(//,' corner points in cartesian units ', $ 99(/,3f10.5)) CLOSE (ibfile) RETURN END SUBROUTINE brzone END MODULE m_brzone
{"hexsha": "73dec495b2e1e9fb00d26c029f5f376c17b5f287", "size": 18291, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "kpoints/brzone.f", "max_stars_repo_name": "MRedies/FLEUR", "max_stars_repo_head_hexsha": "84234831c55459a7539e78600e764ff4ca2ec4b6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "kpoints/brzone.f", "max_issues_repo_name": "MRedies/FLEUR", "max_issues_repo_head_hexsha": "84234831c55459a7539e78600e764ff4ca2ec4b6", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "kpoints/brzone.f", "max_forks_repo_name": "MRedies/FLEUR", "max_forks_repo_head_hexsha": "84234831c55459a7539e78600e764ff4ca2ec4b6", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 31.9772727273, "max_line_length": 98, "alphanum_fraction": 0.4811109289, "num_tokens": 6897}
#!/usr/bin/env python import rospy from std_msgs.msg import Int32 from geometry_msgs.msg import PoseStamped, Pose from styx_msgs.msg import TrafficLightArray, TrafficLight from styx_msgs.msg import Lane from sensor_msgs.msg import Image from cv_bridge import CvBridge from light_classification.tl_classifier import TLClassifier import tf import cv2 import yaml import uuid from scipy.spatial import KDTree STATE_COUNT_THRESHOLD = 3 class TLDetector(object): def __init__(self): rospy.init_node('tl_detector') self.pose = None self.waypoints = None self.xy_waypoints = None self.kdt_waypoints = None self.camera_image = None self.lights = [] sub1 = rospy.Subscriber('/current_pose', PoseStamped, self.pose_cb) sub2 = rospy.Subscriber('/base_waypoints', Lane, self.waypoints_cb) ''' /vehicle/traffic_lights provides you with the location of the traffic light in 3D map space and helps you acquire an accurate ground truth data source for the traffic light classifier by sending the current color state of all traffic lights in the simulator. When testing on the vehicle, the color state will not be available. You'll need to rely on the position of the light and the camera image to predict it. ''' sub3 = rospy.Subscriber('/vehicle/traffic_lights', TrafficLightArray, self.traffic_cb) sub6 = rospy.Subscriber('/image_color', Image, self.image_cb) config_string = rospy.get_param("/traffic_light_config") self.config = yaml.load(config_string) self.upcoming_red_light_pub = rospy.Publisher('/traffic_waypoint', Int32, queue_size=1) self.bridge = CvBridge() self.light_classifier = TLClassifier() self.listener = tf.TransformListener() self.state = TrafficLight.UNKNOWN self.last_state = TrafficLight.UNKNOWN self.last_wp = -1 self.state_count = 0 # Variables for data collection self.save_path = "/home/workspace/CarND-Capstone/ros/src/tl_detector/light_classification/data/" self.green_path = self.save_path + 'green/' self.yellow_path = self.save_path + 'yellow/' self.red_path = self.save_path + 'red/' # Used to determine which colors of light we want to save pictures of # Set all to false if we don't need any more data self.cap_green = False self.cap_yellow = False self.cap_red = False rospy.spin() def pose_cb(self, msg): self.pose = msg def waypoints_cb(self, waypoints): self.waypoints = waypoints # If the 2d waypoints and kd tree waypoints haven't been created yet then create them if not self.xy_waypoints: # Grab just the x and y values from the pose of the waypoints in the list self.xy_waypoints = [[waypoint.pose.pose.position.x, waypoint.pose.pose.position.y] for waypoint in waypoints.waypoints] # Use the x,y coordinates to create a KDTree that can be efficiently searched in nearest neighbor calculations self.kdt_waypoints = KDTree(self.xy_waypoints) def traffic_cb(self, msg): self.lights = msg.lights def image_cb(self, msg): """Identifies red lights in the incoming camera image and publishes the index of the waypoint closest to the red light's stop line to /traffic_waypoint Args: msg (Image): image from car-mounted camera """ self.has_image = True self.camera_image = msg # Gets the index closest light waypoint and it's current state light_wp, state = self.process_traffic_lights() ''' Publish upcoming red lights at camera frequency. Each predicted state has to occur `STATE_COUNT_THRESHOLD` number of times till we start using it. Otherwise the previous stable state is used. ''' if self.state != state: self.state_count = 0 self.state = state elif self.state_count >= STATE_COUNT_THRESHOLD: self.last_state = self.state # If the upcoming light is either red or yellow set the light_wp equal to that light index light_wp = light_wp if (state == TrafficLight.RED or state == TrafficLight.YELLOW) else -1 self.last_wp = light_wp self.upcoming_red_light_pub.publish(Int32(light_wp)) else: self.upcoming_red_light_pub.publish(Int32(self.last_wp)) self.state_count += 1 def get_closest_waypoint(self, x, y): """Identifies the closest path waypoint to the given position https://en.wikipedia.org/wiki/Closest_pair_of_points_problem Args: pose (Pose): position to match a waypoint to Returns: int: index of the closest waypoint in self.waypoints """ # Query the KD Tree of waypoints to get the index of the one closest to the car closest_wp_idx = self.kdt_waypoints.query([x, y], 1)[1] # Index 1 grabs the index of the result instead of the result point return closest_wp_idx def get_light_state(self, img, light): """Determines the current color of the traffic light Args: light (TrafficLight): light to classify Returns: int: ID of traffic light color (specified in styx_msgs/TrafficLight) """ # If we're doing data collection then use the passed in light's state if self.cap_green or self.cap_yellow or self.cap_red: return light.state # Otherwise get the classificaiton from our classifier return self.light_classifier.get_classification(img) def process_traffic_lights(self): """Finds closest visible traffic light, if one exists, and determines its location and color Returns: int: index of waypoint closes to the upcoming stop line for a traffic light (-1 if none exists) int: ID of traffic light color (specified in styx_msgs/TrafficLight) """ # This will all be different once the images are actually checked intead of the raw data from the traffic light topic # The location of the traffic light and the stop line for it are different so we need to store both closest_light = None line_wp_idx = None # List of positions that correspond to the line to stop in front of for a given intersection stop_line_positions = self.config['stop_line_positions'] if(self.pose): # Get the closest waypoint to the car car_nearest_wp_idx = self.get_closest_waypoint(self.pose.pose.position.x, self.pose.pose.position.y) # Find the closest traffic light waypoint to the car's wp # Do this by finding the two waypoints with the fewest number of waypoints between them diff = len(self.waypoints.waypoints) # Loop through the lights to find the closest one for i, light in enumerate(self.lights): # Get the stop line position stop_line = stop_line_positions[i] # Find the waypoint closest to the stop line by querying the KD Tree closest_wp_idx = self.get_closest_waypoint(stop_line[0], stop_line[1]) # Get the number of waypoints between the car and the stop line dist = closest_wp_idx - car_nearest_wp_idx # If the stop line is in front of the car and there are fewer waypoints in between than the current best then update if dist >= 0 and dist < diff: diff = dist closest_light = light line_wp_idx = closest_wp_idx if closest_light: # Check if the car is close enough to see the traffic light if line_wp_idx - car_nearest_wp_idx < 100 and self.has_image: # Convert to an opencv image so we can save it nicely cv_img = self.bridge.imgmsg_to_cv2(self.camera_image, "bgr8") # Get the state of the closest light state = self.get_light_state(cv_img, light) # Generate a unique identifier for the image name so we save a unique name every time img_id = str(uuid.uuid1()) # Use the state of the light to save it to the correct subfolder if state == TrafficLight.GREEN and self.cap_green: cv2.imwrite(self.green_path + img_id + '.jpg', cv_img) #self.green_num = self.green_num + 1 elif state == TrafficLight.YELLOW and self.cap_yellow: cv2.imwrite(self.yellow_path + img_id + '.jpg', cv_img) #self.yellow_num = self.yellow_num + 1 elif state == TrafficLight.RED and self.cap_red: cv2.imwrite(self.red_path + img_id + '.jpg', cv_img) #self.red_num = self.red_num + 1 return line_wp_idx, state #self.waypoints = None # If no traffic light is detected or we can't determine its state then return -1 return -1, TrafficLight.UNKNOWN if __name__ == '__main__': try: TLDetector() except rospy.ROSInterruptException: rospy.logerr('Could not start traffic node.')
{"hexsha": "d39b1292efffab60d87febd858743d52b35a7921", "size": 9707, "ext": "py", "lang": "Python", "max_stars_repo_path": "ros/src/tl_detector/tl_detector.py", "max_stars_repo_name": "roshea6/CarND-Capstone", "max_stars_repo_head_hexsha": "aec95e200dccad5488df269353b04fc067557890", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "ros/src/tl_detector/tl_detector.py", "max_issues_repo_name": "roshea6/CarND-Capstone", "max_issues_repo_head_hexsha": "aec95e200dccad5488df269353b04fc067557890", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "ros/src/tl_detector/tl_detector.py", "max_forks_repo_name": "roshea6/CarND-Capstone", "max_forks_repo_head_hexsha": "aec95e200dccad5488df269353b04fc067557890", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 41.8405172414, "max_line_length": 132, "alphanum_fraction": 0.6305758731, "include": true, "reason": "from scipy", "num_tokens": 2022}
(* Title: Inductive definition of termination Author: Tobias Nipkow, 2001/2006 Maintainer: Tobias Nipkow *) theory PsTermi imports PsLang begin subsection\<open>Termination\<close> inductive termi :: "com \<Rightarrow> state \<Rightarrow> bool" (infixl "\<down>" 50) where Do[iff]: "f s \<noteq> {} \<Longrightarrow> Do f \<down> s" | Semi[intro!]: "\<lbrakk> c1 \<down> s0; \<And>s1. s0 -c1\<rightarrow> s1 \<Longrightarrow> c2 \<down> s1 \<rbrakk> \<Longrightarrow> (c1;c2) \<down> s0" | IfTrue[intro,simp]: "\<lbrakk> b s; c1 \<down> s \<rbrakk> \<Longrightarrow> IF b THEN c1 ELSE c2 \<down> s" | IfFalse[intro,simp]: "\<lbrakk> \<not>b s; c2 \<down> s \<rbrakk> \<Longrightarrow> IF b THEN c1 ELSE c2 \<down> s" | WhileFalse: "\<not>b s \<Longrightarrow> WHILE b DO c \<down> s" | WhileTrue: "\<lbrakk> b s; c \<down> s; \<And>t. s -c\<rightarrow> t \<Longrightarrow> WHILE b DO c \<down> t \<rbrakk> \<Longrightarrow> WHILE b DO c \<down> s" | "body p \<down> s \<Longrightarrow> CALL p \<down> s" | Local: "c \<down> f s \<Longrightarrow> LOCAL f;c;g \<down> s" lemma [iff]: "((c1;c2) \<down> s0) = (c1 \<down> s0 \<and> (\<forall>s1. s0 -c1\<rightarrow> s1 \<longrightarrow> c2 \<down> s1))" apply(rule iffI) prefer 2 apply(best intro:termi.intros) apply(erule termi.cases) apply blast+ done lemma [iff]: "(IF b THEN c1 ELSE c2 \<down> s) = ((if b s then c1 else c2) \<down> s)" apply simp apply(rule conjI) apply(rule impI) apply(rule iffI) prefer 2 apply(blast intro:termi.intros) apply(erule termi.cases) apply blast+ apply(rule impI) apply(rule iffI) prefer 2 apply(blast intro:termi.intros) apply(erule termi.cases) apply blast+ done lemma [iff]: "(CALL p \<down> s) = (body p \<down> s)" by(fast elim: termi.cases intro:termi.intros) lemma [iff]: "(LOCAL f;c;g \<down> s) = (c \<down> f s)" by(fast elim: termi.cases intro:termi.intros) lemma termi_while_lemma[rule_format]: "w\<down>fk \<Longrightarrow> (\<forall>k b c. fk = f k \<and> w = WHILE b DO c \<and> (\<forall>i. f i -c\<rightarrow> f(Suc i)) \<longrightarrow> (\<exists>i. \<not>b(f i)))" apply(erule termi.induct) apply simp_all apply blast apply blast done lemma termi_while: "\<lbrakk> (WHILE b DO c) \<down> f k; \<forall>i. f i -c\<rightarrow> f(Suc i) \<rbrakk> \<Longrightarrow> \<exists>i. \<not>b(f i)" by(blast intro:termi_while_lemma) lemma wf_termi: "wf {(t,s). WHILE b DO c \<down> s \<and> b s \<and> s -c\<rightarrow> t}" apply(subst wf_iff_no_infinite_down_chain) apply(rule notI) apply clarsimp apply(insert termi_while) apply blast done end
{"author": "data61", "repo": "PSL", "sha": "2a71eac0db39ad490fe4921a5ce1e4344dc43b12", "save_path": "github-repos/isabelle/data61-PSL", "path": "github-repos/isabelle/data61-PSL/PSL-2a71eac0db39ad490fe4921a5ce1e4344dc43b12/SeLFiE/Example/afp-2020-05-16/thys/Abstract-Hoare-Logics/Procs/PsTermi.thy"}
### ============== ### ============== ### ## Behavioural Rules Model ## ## Martin Zumaya Hernandez ## ## EXAMPLE SIMULATION SCRIPT ## ### ============== ### ============== ### ### ============ INCLUDE PACKAGES ============ ### @everywhere using CollectiveDynamics.BehaviouralRules ### ============ SYSTEM'S PARAMETERS ============ ### @everywhere dt = 1.0 # time step @everywhere ρ = 0.3 # initial density @everywhere v0 = 1.0 # speed @everywhere η = 0.15 # noise intensity @everywhere θ = 40.0 # maximum turn @everywhere δ = 0.05 # deviation from aligned velocity ### ============ METRIC BEHAVIORAL THRESHOLDS ============ ### n = parse(Int64, ARGS[1]) # number of particles o = parse(Float64, ARGS[2]) # size of the orientation zone relative to system size a = parse(Float64, ARGS[3]) # size of the attraction zone relative to system size T = parse(Int64, ARGS[4]) # 10 ^ T iterations rep = parse(Int64, ARGS[5]) # ensemble index init = ARGS[6] # random or aligned initial velocities @eval @everywhere init_e = $init @eval @everywhere N = $n @eval @everywhere Δo = $o @eval @everywhere Δa = $a @everywhere L = cbrt(N / ρ) # size of box @everywhere zor = 0.1 # zone of repulsion # @everywhere zor = 1.0 # zone of repulsion @everywhere zoo = zor + Δo*L # zone of orientation @everywhere zoa = zoo + Δa*L # zone of attraction println("rep:\t", zor, "\torient:\t", zoo, "\tattr:\t", zoa ) ### ============ SHARED ARRAY INITIALIZATION ============ ### pos = SharedArray{Float64}(3N) # particles positions vel = SharedArray{Float64}(3N) # array of particles' velocities v_int = SharedArray{Float64}(3N) # total signal v_r = SharedArray{Float64}(3N) # repulsion metric interactions v_o = SharedArray{Float64}(3N) # orientation metric interactions v_a = SharedArray{Float64}(3N) # attraction metric interactions Rij = SharedArray{Float64}(N,N) output_path = "" if init_e == "R" # random initial conditions output_path = set_output_data_structure("BEHAV_R_01_N_015", N, ARGS[2], ARGS[3]) println(output_path) ### ============ RANDOM INITIAL CONDITIONS ============ ### for i in 1:length(pos) pos[i] = 2*rand()*L - L vel[i] = 2*rand() - 1 end elseif init_e == "A" # ordered state initial condition output_path = set_output_data_structure("BEHAV_R_01_N_015_AL", N, ARGS[2], ARGS[3]) println(output_path) ### ============ RANDOM POSITIONS BUT ALIGNED VELOCITIES ============ ### vel_0 = [2*rand() - 1, 2*rand() - 1, 2*rand() - 1] for i in 1:3:length(pos) pos[i] = 2*rand()*L - L pos[i+1] = 2*rand()*L - L pos[i+2] = 2*rand()*L - L vel[i] = vel_0[1] + δ*rand() - δ vel[i+1] = vel_0[2] + δ*rand() - δ vel[i+2] = vel_0[3] + δ*rand() - δ end end ### ============ VELOCITY NORMALIZATION ============ ### for i in 1:3:length(vel) norm = sqrt(vel[i]^2 + vel[i+1]^2 + vel[i+2]^2) vel[i] /= norm vel[i+1] /= norm vel[i+2] /= norm end ### ============ SET OUTPUT ============ ### pos_file = open(joinpath(output_path,"pos_$(rep).dat"), "w+") vel_file = open(joinpath(output_path,"vel_$(rep).dat"), "w+") # write initial conditions  write(pos_file, pos) write(vel_file, vel) println("//////// ", 1) ### ============ TIME EVOLUTION ============ ### times = [convert(Int, exp10(i)) for i in 0:T] for i in 1:(length(times) - 1) for t in (times[i]+1):times[i+1] evolve_system(pos, vel, v_int, v_r, v_o, v_a, Rij, N, zor, zoo, zoa, η, θ, v0) if t % times[i] == 0 || t % div(times[i], exp10(1)) == 0 println("//////// ", t) write(pos_file, pos) write(vel_file, vel) end end end close(pos_file) close(vel_file) rmprocs(workers()) println("Done all") ### ============== ### ============== ### ============== ###
{"hexsha": "a6d92368e874818b38d3061801777ea7bc8c971f", "size": 3868, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/behavioural_rules_simulation.jl", "max_stars_repo_name": "carterian8/CollectiveDynamics.jl", "max_stars_repo_head_hexsha": "add9604e8132646da5a1f66a41239c8fa86c363a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4, "max_stars_repo_stars_event_min_datetime": "2018-06-02T15:04:25.000Z", "max_stars_repo_stars_event_max_datetime": "2020-07-03T14:44:20.000Z", "max_issues_repo_path": "examples/behavioural_rules_simulation.jl", "max_issues_repo_name": "carterian8/CollectiveDynamics.jl", "max_issues_repo_head_hexsha": "add9604e8132646da5a1f66a41239c8fa86c363a", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "examples/behavioural_rules_simulation.jl", "max_forks_repo_name": "carterian8/CollectiveDynamics.jl", "max_forks_repo_head_hexsha": "add9604e8132646da5a1f66a41239c8fa86c363a", "max_forks_repo_licenses": ["MIT"], "max_forks_count": 3, "max_forks_repo_forks_event_min_datetime": "2017-07-27T16:06:36.000Z", "max_forks_repo_forks_event_max_datetime": "2021-03-02T16:53:26.000Z", "avg_line_length": 27.2394366197, "max_line_length": 87, "alphanum_fraction": 0.5610134436, "num_tokens": 1203}
/** * @file descartes_tesseract_kinematics.h * @brief Implememntatino of a wrapper around tesseract kinematics for the descartes_light kinematics interface * * @author Matthew Powelson * @author Levi Armstrong * @date September 17, 2019 * @version TODO * @bug No known bugs * * @copyright Copyright (c) 2019, Southwest Research Institute * * @par License * Software License Agreement (Apache License) * @par * 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 * @par * 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. */ #ifndef TESSERACT_MOTION_PLANNERS_DESCARTES_TESSERACT_KINEMATICS_HPP #define TESSERACT_MOTION_PLANNERS_DESCARTES_TESSERACT_KINEMATICS_HPP #include <tesseract_motion_planners/descartes/descartes_tesseract_kinematics.h> TESSERACT_COMMON_IGNORE_WARNINGS_PUSH #include <Eigen/Eigen> #include <console_bridge/console.h> TESSERACT_COMMON_IGNORE_WARNINGS_POP namespace tesseract_motion_planners { template <typename FloatType> bool DescartesTesseractKinematics<FloatType>::ik(const Eigen::Transform<FloatType, 3, Eigen::Isometry>& p, std::vector<FloatType>& solution_set) const { return ik(p, is_valid_fn_, redundant_sol_fn_, solution_set); } template <typename FloatType> bool DescartesTesseractKinematics<FloatType>::ik( const Eigen::Transform<FloatType, 3, Eigen::Isometry>& p, const descartes_light::IsValidFn<FloatType>& is_valid_fn, const descartes_light::GetRedundantSolutionsFn<FloatType>& redundant_sol_fn, std::vector<FloatType>& solution_set) const { auto dof = static_cast<int>(tesseract_ik_->numJoints()); // Convert to appropriate Eigen types Eigen::Isometry3d p_double; p_double = p.template cast<double>(); Eigen::VectorXd solution_eigen; // Solve IK if (!tesseract_ik_->calcInvKin(solution_eigen, p_double, ik_seed_)) return false; // Convert back to a float array Eigen::Matrix<FloatType, Eigen::Dynamic, 1> solution_float_type; solution_float_type = solution_eigen.template cast<FloatType>(); FloatType* sol = solution_float_type.data(); // Apply is_valid_fn and redundant_sol_fn if (is_valid_fn && redundant_sol_fn) { if (is_valid_fn_(sol)) solution_set.insert(end(solution_set), sol, sol + dof); // If good then add to solution set std::vector<FloatType> redundant_sols = redundant_sol_fn(sol); if (!redundant_sols.empty()) { int num_sol = static_cast<int>(redundant_sols.size()) / dof; for (int s = 0; s < num_sol; ++s) { FloatType* redundant_sol = redundant_sols.data() + dof * s; if (is_valid_fn_(redundant_sol)) solution_set.insert(end(solution_set), redundant_sol, redundant_sol + dof); // If good then add to solution // set } } } else if (is_valid_fn && !redundant_sol_fn) { if (is_valid_fn(sol)) solution_set.insert(end(solution_set), sol, sol + dof); // If good then add to solution set else { // If it failed the is_valid_fn get solution that is +/-pi and retry descartes_light::harmonizeTowardZero<FloatType>(sol, dof); if (is_valid_fn(sol)) solution_set.insert(end(solution_set), sol, sol + dof); } } else if (!is_valid_fn && redundant_sol_fn) { solution_set.insert(end(solution_set), sol, sol + dof); // If good then add to solution set std::vector<FloatType> redundant_sols = redundant_sol_fn(sol); if (!redundant_sols.empty()) { long num_sol = static_cast<long>(redundant_sols.size()) / dof; for (long s = 0; s < num_sol; ++s) { FloatType* redundant_sol = redundant_sols.data() + dof * s; solution_set.insert(end(solution_set), redundant_sol, redundant_sol + dof); // If good then add to solution // set } } } else { solution_set.insert(end(solution_set), sol, sol + dof); } return !solution_set.empty(); } template <typename FloatType> bool DescartesTesseractKinematics<FloatType>::fk(const FloatType* pose, Eigen::Transform<FloatType, 3, Eigen::Isometry>& solution) const { assert(pose); // Convert the Array to an Eigen VectorXd Eigen::VectorXd joints(tesseract_fk_->numJoints()); for (int i = 0; static_cast<unsigned int>(i) < tesseract_fk_->numJoints(); i++) joints(i, 0) = pose[i]; // Get the solution from the Tesseract Kinematics Eigen::Isometry3d solution_double; bool success = tesseract_fk_->calcFwdKin(solution_double, joints); // Cast from double to FloatType solution = solution_double.cast<FloatType>(); return success; } template <typename FloatType> int DescartesTesseractKinematics<FloatType>::dof() const { assert(tesseract_fk_->numJoints() < std::numeric_limits<int>::max()); return static_cast<int>(tesseract_fk_->numJoints()); } template <typename FloatType> void DescartesTesseractKinematics<FloatType>::analyzeIK(const Eigen::Transform<FloatType, 3, Eigen::Isometry>& p) const { Eigen::IOFormat CommaInitFmt(Eigen::StreamPrecision, Eigen::DontAlignCols, ", ", ", ", "", "", "AnalyzeIK: ", ";"); std::stringstream ss; ss << p.matrix().format(CommaInitFmt); CONSOLE_BRIDGE_logInform(ss.str().c_str()); std::string valid_fn_defined = "\tIs Valid Function: " + std::string(is_valid_fn_ ? "True" : "False"); CONSOLE_BRIDGE_logInform(valid_fn_defined.c_str()); std::string redundant_fn_defined = "\tIs Valid Function: " + std::string(is_valid_fn_ ? "True" : "False"); CONSOLE_BRIDGE_logInform(redundant_fn_defined.c_str()); std::vector<FloatType> solution_set; ik(p, nullptr, nullptr, solution_set); ss.clear(); ss << "\tSampling without functions, found solutions: " << solution_set.size() / 8; CONSOLE_BRIDGE_logInform(ss.str().c_str()); solution_set.clear(); ik(p, is_valid_fn_, nullptr, solution_set); ss.clear(); ss << "\tSampling with only IsValid functions, found solutions: " << solution_set.size() / 8; CONSOLE_BRIDGE_logInform(ss.str().c_str()); solution_set.clear(); ik(p, nullptr, redundant_sol_fn_, solution_set); ss.clear(); ss << "\tSampling with only Redundant Solutions functions, found solutions: " << solution_set.size() / 8; CONSOLE_BRIDGE_logInform(ss.str().c_str()); solution_set.clear(); ik(p, is_valid_fn_, redundant_sol_fn_, solution_set); ss.clear(); ss << "\tSampling with both functions, found solutions: " << solution_set.size() / 8; CONSOLE_BRIDGE_logInform(ss.str().c_str()); } template <typename FloatType> void DescartesTesseractKinematics<FloatType>::setIKSeed( const Eigen::Ref<const Eigen::Matrix<FloatType, Eigen::Dynamic, 1> >& seed) { assert(static_cast<int>(seed.size()) == dof()); ik_seed_ = seed.template cast<double>(); } template <typename FloatType> void DescartesTesseractKinematics<FloatType>::setIKSeed(const std::vector<FloatType>& seed) { assert(static_cast<int>(seed.size()) == dof()); std::vector<double> seed_copy; seed_copy.reserve(seed.size()); for (auto& i : seed) seed_copy.push_back(static_cast<double>(i)); ik_seed_ = Eigen::Map<Eigen::VectorXd>(seed_copy.data(), static_cast<long>(seed_copy.size())); } } // namespace tesseract_motion_planners #endif
{"hexsha": "1319790e02a0d2c88e593941b7b08020b12f0887", "size": 7802, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "tesseract/tesseract_planning/tesseract_motion_planners/include/tesseract_motion_planners/descartes/impl/descartes_tesseract_kinematics.hpp", "max_stars_repo_name": "steviedale/tesseract", "max_stars_repo_head_hexsha": "745a50fca2f7b2ef12458a8da1bb612fb5cd74af", "max_stars_repo_licenses": ["Apache-2.0", "BSD-2-Clause"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "tesseract/tesseract_planning/tesseract_motion_planners/include/tesseract_motion_planners/descartes/impl/descartes_tesseract_kinematics.hpp", "max_issues_repo_name": "steviedale/tesseract", "max_issues_repo_head_hexsha": "745a50fca2f7b2ef12458a8da1bb612fb5cd74af", "max_issues_repo_licenses": ["Apache-2.0", "BSD-2-Clause"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "tesseract/tesseract_planning/tesseract_motion_planners/include/tesseract_motion_planners/descartes/impl/descartes_tesseract_kinematics.hpp", "max_forks_repo_name": "steviedale/tesseract", "max_forks_repo_head_hexsha": "745a50fca2f7b2ef12458a8da1bb612fb5cd74af", "max_forks_repo_licenses": ["Apache-2.0", "BSD-2-Clause"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 37.5096153846, "max_line_length": 119, "alphanum_fraction": 0.6972571136, "num_tokens": 1978}
import sys import pytest import torch import torch.nn as nn import numpy as np from fmoe.gates import NaiveGate from fmoe.layers import FMoE from fmoe.linear import FMoELinear from fmoe.megatron.layers import _megatron_init_method def _assert_numerical(names, moe_out_list, raw_out_list, rank, precision=1e-3): for name, mo, ro in zip(names, moe_out_list, raw_out_list): err = (mo - ro).abs().max() print("Rank {} {} abs err {}".format(rank, name, err)) if err > precision: sys.stderr.write(f"=========== {name} moe out ==============\n") sys.stderr.write("{}\n".format(mo)) sys.stderr.write(f"=========== {name} raw out ==============\n") sys.stderr.write("{}\n".format(ro)) sys.stderr.write(f"=========== {name} diff ==============\n") sys.stderr.write("{}\n{}\n".format((mo - ro).abs(), err)) assert False class MyExpert(nn.Module): r""" An expert using 2 FMoELinear modules to speed up the computation of experts within one worker. """ def __init__(self, num_expert, d_model, d_hidden, activation, rank=0): super().__init__() self.htoh4 = FMoELinear(num_expert, d_model, d_hidden, bias=True, rank=rank) self.h4toh = FMoELinear(num_expert, d_hidden, d_model, bias=True, rank=rank) self.activation = activation def forward(self, inp, fwd_expert_count): r""" First expand input to 4h (the hidden size is variable, but is called h4 for convenience). Then perform activation. Finally shirink back to h. """ if type(inp) == dict: x = inp["x"] y = inp["y"] elif type(inp) == list: x = inp[0] y = inp[1] else: raise NotImplementedError x = self.htoh4(x, fwd_expert_count) x = self.activation(x) x = self.h4toh(x, fwd_expert_count) y = self.htoh4(y, fwd_expert_count) y = self.activation(y) y = self.h4toh(y, fwd_expert_count) if type(inp) == dict: ret = {"x": x, "y": y} elif type(inp) == list: ret = [x, y] return ret class MyGate(NaiveGate): def __init__(self, d_model, num_expert, world_size, top_k=2): super().__init__(d_model, num_expert, world_size, top_k) def forward(self, inp, return_all_scores=False): if type(inp) == dict: x = inp["x"] elif type(inp) == list: x = inp[0] else: raise NotImplementedError return super().forward(x, return_all_scores) class MyMoE(FMoE): def __init__( self, num_expert, d_model, d_hidden, world_size, mp_group, top_k, activation ): super().__init__( num_expert=num_expert, d_model=d_model, gate=MyGate, world_size=world_size, mp_group=mp_group, top_k=top_k, ) self.experts = MyExpert(num_expert, d_model, d_hidden, activation) rng = np.random.default_rng(1234) _megatron_init_method(self.experts.htoh4, rng, 1.0) _megatron_init_method(self.experts.h4toh, rng, 1.0) @pytest.mark.parametrize("num_expert", [4, 8]) @pytest.mark.parametrize("top_k", [2, 3]) @pytest.mark.parametrize("batch_size", [4]) @pytest.mark.parametrize("d_model", [16]) @pytest.mark.parametrize("d_hidden", [32]) @pytest.mark.parametrize("rank", [0]) @pytest.mark.parametrize("world_size", [1]) @pytest.mark.parametrize("mp_group", [None]) @pytest.mark.parametrize("dp_group", [None]) @pytest.mark.parametrize("world_group", [None]) @pytest.mark.parametrize( "data_type", ["torch.FloatTensor", "torch.DoubleTensor", "torch.HalfTensor"] ) @pytest.mark.parametrize("list_input", [False, True]) def test_fmoe_mimo_linear( num_expert, top_k, batch_size, d_model, d_hidden, rank, world_size, mp_group, dp_group, world_group, data_type, list_input, activation=torch.nn.functional.gelu, ): torch.manual_seed(42 + rank) torch.cuda.manual_seed(42 + rank) moe = MyMoE( num_expert=num_expert, d_model=d_model, d_hidden=4 * d_model, world_size=world_size, mp_group=mp_group, top_k=top_k, activation=activation, ).cuda() x = torch.rand(batch_size, d_model).cuda() inp = [x, x.clone()] if list_input else {"x": x, "y": x.clone()} moe_out = moe(inp) if list_input: _assert_numerical(["x"], [moe_out[0]], [moe_out[1]], rank) else: _assert_numerical(["x"], [moe_out["x"]], [moe_out["y"]], rank) if __name__ == "__main__": test_fmoe_mimo_linear( batch_size=2, num_expert=2, d_model=2, top_k=2, d_hidden=16, rank=0, world_size=1, mp_group=None, dp_group=None, world_group=None, data_type=torch.float32, list_input=True )
{"hexsha": "e040d5f9d0ad7469cf012a33f807596d3a329ecd", "size": 4999, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_mimo.py", "max_stars_repo_name": "dumpmemory/fastmoe", "max_stars_repo_head_hexsha": "5083a7367f2defcf5e1022dcdce39022acf5ca11", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 704, "max_stars_repo_stars_event_min_datetime": "2021-03-01T07:02:26.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-31T12:14:42.000Z", "max_issues_repo_path": "tests/test_mimo.py", "max_issues_repo_name": "limin2021/fastmoe", "max_issues_repo_head_hexsha": "53ecd24b983f7bf92eb48fe77e5c944b21e31499", "max_issues_repo_licenses": ["Apache-2.0"], "max_issues_count": 57, "max_issues_repo_issues_event_min_datetime": "2021-03-04T10:41:32.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-24T07:02:22.000Z", "max_forks_repo_path": "tests/test_mimo.py", "max_forks_repo_name": "limin2021/fastmoe", "max_forks_repo_head_hexsha": "53ecd24b983f7bf92eb48fe77e5c944b21e31499", "max_forks_repo_licenses": ["Apache-2.0"], "max_forks_count": 92, "max_forks_repo_forks_event_min_datetime": "2021-03-01T08:19:21.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-31T08:37:17.000Z", "avg_line_length": 29.755952381, "max_line_length": 84, "alphanum_fraction": 0.5939187838, "include": true, "reason": "import numpy", "num_tokens": 1325}
/*============================================================================= Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #if !defined(FUSION_CATEGORY_OF_07202005_0308) #define FUSION_CATEGORY_OF_07202005_0308 #include <boost/fusion/support/config.hpp> #include <boost/fusion/support/tag_of.hpp> #include <boost/type_traits/is_base_of.hpp> namespace boost { namespace fusion { // Special tags: struct boost_tuple_tag; // boost::tuples::tuple tag struct boost_array_tag; // boost::array tag struct mpl_sequence_tag; // mpl sequence tag struct std_pair_tag; // std::pair tag struct incrementable_traversal_tag { }; struct single_pass_traversal_tag : incrementable_traversal_tag { }; struct forward_traversal_tag : single_pass_traversal_tag { }; struct bidirectional_traversal_tag : forward_traversal_tag { }; struct random_access_traversal_tag : bidirectional_traversal_tag { }; struct associative_tag { }; struct unbounded_tag { }; namespace extension { template <typename Tag> struct category_of_impl { template <typename T> struct apply { typedef typename T::category type; }; }; template <> struct category_of_impl<boost_tuple_tag>; template <> struct category_of_impl<boost_array_tag>; template <> struct category_of_impl<mpl_sequence_tag>; template <> struct category_of_impl<std_pair_tag>; } // namespace extension namespace traits { template <typename T> struct category_of : extension::category_of_impl< typename fusion::detail::tag_of<T>::type>::template apply<T> { }; template <typename T> struct is_associative : is_base_of<associative_tag, typename category_of<T>::type> { }; template <typename T> struct is_incrementable : is_base_of<incrementable_traversal_tag, typename category_of<T>::type> { }; template <typename T> struct is_single_pass : is_base_of<single_pass_traversal_tag, typename category_of<T>::type> { }; template <typename T> struct is_forward : is_base_of<forward_traversal_tag, typename category_of<T>::type> { }; template <typename T> struct is_bidirectional : is_base_of<bidirectional_traversal_tag, typename category_of<T>::type> { }; template <typename T> struct is_random_access : is_base_of<random_access_traversal_tag, typename category_of<T>::type> { }; template <typename T> struct is_unbounded : is_base_of<unbounded_tag, typename category_of<T>::type> { }; } // namespace traits } // namespace fusion } // namespace boost #endif
{"hexsha": "797af98ffa6f52d8ffebe491800d36631d8ad4b6", "size": 2698, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/boost/1.69.0-r0/boost_1_69_0/boost/fusion/support/category_of.hpp", "max_stars_repo_name": "sotaoverride/backup", "max_stars_repo_head_hexsha": "ca53a10b72295387ef4948a9289cb78ab70bc449", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/boost/1.69.0-r0/boost_1_69_0/boost/fusion/support/category_of.hpp", "max_issues_repo_name": "sotaoverride/backup", "max_issues_repo_head_hexsha": "ca53a10b72295387ef4948a9289cb78ab70bc449", "max_issues_repo_licenses": ["Apache-2.0"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/boost/1.69.0-r0/boost_1_69_0/boost/fusion/support/category_of.hpp", "max_forks_repo_name": "sotaoverride/backup", "max_forks_repo_head_hexsha": "ca53a10b72295387ef4948a9289cb78ab70bc449", "max_forks_repo_licenses": ["Apache-2.0"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 20.5954198473, "max_line_length": 80, "alphanum_fraction": 0.7179392142, "num_tokens": 611}
[STATEMENT] lemma map_le_on_disj_right: "\<lbrakk> h' \<subseteq>\<^sub>m h ; h\<^sub>0 \<bottom> h\<^sub>1 ; h' = h\<^sub>1 ++ h\<^sub>0 \<rbrakk> \<Longrightarrow> h\<^sub>0 \<subseteq>\<^sub>m h" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>h' \<subseteq>\<^sub>m h; h\<^sub>0 \<bottom> h\<^sub>1; h' = h\<^sub>1 ++ h\<^sub>0\<rbrakk> \<Longrightarrow> h\<^sub>0 \<subseteq>\<^sub>m h [PROOF STEP] by (auto simp: map_le_on_disj_left map_add_ac)
{"llama_tokens": 200, "file": "Separation_Algebra_Map_Extra", "length": 1}
import os import random import sys sys.path.append('../') import pandas as pd import numpy as np import talib from pandas_datareader import data as pdr import fix_yahoo_finance as yf import xgboost as xgb import operator from sklearn.svm import SVC from sklearn.model_selection import GridSearchCV from sklearn.metrics import make_scorer, roc_auc_score, average_precision_score, precision_recall_curve, accuracy_score import matplotlib.pyplot as plt from typing import List, Dict yf.pdr_override() def merge_stock_news(stock_df: pd.DataFrame, news_df: pd.DataFrame) -> pd.DataFrame: news_scores_daily = pd.DataFrame.from_dict({ 'sent_avg': news_df.groupby(['date'])['sentiment'].mean(), 'sent_max': news_df.groupby(['date'])['sentiment'].max(), 'sent_min': news_df.groupby(['date'])['sentiment'].min(), 'sent_sum': news_df.groupby(['date'])['sentiment'].sum(), }) merged_df = stock_df.join(news_scores_daily) return merged_df def extract_features(stock_df: pd.DataFrame) -> pd.DataFrame: # stock_df = stock_df.reindex(pd.date_range(stock_df.first_valid_index(), stock_df.last_valid_index())) # mask = stock_df.isna().as_matrix(['Open']).reshape(-1) stock_df = stock_df.fillna(method='pad') stock_raw = { 'open': stock_df.as_matrix(['Open']).reshape(-1), 'high': stock_df.as_matrix(['High']).reshape(-1), 'low': stock_df.as_matrix(['Low']).reshape(-1), 'close': stock_df.as_matrix(['Adj Close']).reshape(-1), 'volume': stock_df.as_matrix(['Volume']).reshape(-1).astype(np.float64), } feat_data = { 'Adj Close': stock_raw['close'], 'OBV': talib.OBV(stock_raw['close'], stock_raw['volume']), 'Volume': stock_raw['close'], 'RSI6': talib.RSI(stock_raw['close'], timeperiod=6), 'RSI12': talib.RSI(stock_raw['close'], timeperiod=12), 'SMA3': talib.SMA(stock_raw['close'], timeperiod=3), 'EMA6': talib.EMA(stock_raw['close'], timeperiod=6), 'EMA12': talib.EMA(stock_raw['close'], timeperiod=12), 'ATR14': talib.ATR(stock_raw['high'], stock_raw['low'], stock_raw['close'], timeperiod=14), 'MFI14': talib.MFI(stock_raw['high'], stock_raw['low'], stock_raw['close'], stock_raw['volume'], timeperiod=14), 'ADX14': talib.ADX(stock_raw['high'], stock_raw['low'], stock_raw['close'], timeperiod=14), 'ADX20': talib.ADX(stock_raw['high'], stock_raw['low'], stock_raw['close'], timeperiod=20), 'MOM1': talib.MOM(stock_raw['close'], timeperiod=1), 'MOM3': talib.MOM(stock_raw['close'], timeperiod=3), 'CCI12': talib.CCI(stock_raw['high'], stock_raw['low'], stock_raw['close'], timeperiod=12), 'CCI20': talib.CCI(stock_raw['high'], stock_raw['low'], stock_raw['close'], timeperiod=20), 'ROCR3': talib.ROCR(stock_raw['close'], timeperiod=3), 'ROCR12': talib.ROCR(stock_raw['close'], timeperiod=12), 'outMACD': talib.MACD(stock_raw['close'])[0], 'outMACDSignal': talib.MACD(stock_raw['close'])[1], 'outMACDHist': talib.MACD(stock_raw['close'])[2], 'WILLR': talib.WILLR(stock_raw['high'], stock_raw['low'], stock_raw['close']), 'TSF10': talib.TSF(stock_raw['close'], timeperiod=10), 'TSF20': talib.TSF(stock_raw['close'], timeperiod=20), 'TRIX': talib.TRIX(stock_raw['close']), 'BBANDSUPPER': talib.BBANDS(stock_raw['close'])[0], 'BBANDSMIDDLE': talib.BBANDS(stock_raw['close'])[1], 'BBANDSLOWER': talib.BBANDS(stock_raw['close'])[2], } for colname, colval in feat_data.items(): stock_df[colname] = colval # stock_df = stock_df.loc[np.logical_not(mask)] return stock_df def df2array(stock_df: pd.DataFrame, X_feats: List[str], y_feat: str, rescale=False): dataX = stock_df.as_matrix(X_feats) dataY = stock_df.as_matrix([y_feat]).reshape(-1) dataY = np.sign(np.sign(dataY) + 1.0) # float => label dataX = dataX[np.isfinite(dataY), :] dataY = dataY[np.isfinite(dataY)] dataX = np.nan_to_num(dataX) if rescale: X_mean = np.mean(dataX, axis=0) X_std = np.std(dataX, axis=0) dataX = (dataX - X_mean[np.newaxis, :]) / X_std[np.newaxis, :] return dataX, dataY def rank_features(df_train: pd.DataFrame, df_val: pd.DataFrame, X_feats: List[str], y_feat): X_train, Y_train = df2array(df_train, X_feats, y_feat) X_val, Y_val = df2array(df_val, X_feats, y_feat) dtrain = xgb.DMatrix(X_train, Y_train, feature_names=X_feats) dval = xgb.DMatrix(X_val, Y_val, feature_names=X_feats) rank_all = dict(zip(X_feats, [0.0] * len(X_feats))) rank_score = [] for i in range(100): param = { 'objective': 'binary:logistic', 'eta': 0.01, 'max_depth': 5, 'min_child_weight': 5, 'colsample_bytree': 0.3, 'subsample': 0.2, 'gamma': 1.0, 'metric': 'error', 'seed': random.randint(0, 65536), } score = {} bst = xgb.train(param, dtrain, 500, evals=[(dtrain, 'train'), (dval, 'val')], verbose_eval=False, evals_result=score) best_round, score = min(enumerate(score['val']['error']), key=operator.itemgetter(1)) bst = xgb.train(param, dtrain, best_round, evals=[(dtrain, 'train'), (dval, 'val')], verbose_eval=False) rank = bst.get_score(importance_type='gain') rank_score.append((rank, score)) rank_score = sorted(rank_score, key=operator.itemgetter(1), reverse=False) for rank in rank_score[:20]: for feat in rank[0].keys(): rank_all[feat] += rank[0][feat] return sorted(rank_all.items(), key=operator.itemgetter(1), reverse=True) def get_data_yahoo_cached(company: str): root_dir = '/home1/stocks/niyan/stockNN/data/stocks' dump_path = os.path.join(root_dir, company + '.h5') if not os.path.exists(dump_path): data_df = pdr.get_data_yahoo(company) # type: pd.DataFrame data_df.to_hdf(dump_path, key=company) else: data_df = pd.read_hdf(dump_path, key=company) return data_df def prepare_data(company: str, news_df: pd.DataFrame = None): stock_df = get_data_yahoo_cached(company) sp_df = get_data_yahoo_cached('^GSPC') nasdaq_df = get_data_yahoo_cached('^IXIC') stock_df = extract_features(stock_df) sp_df = extract_features(sp_df) nasdaq_df = extract_features(nasdaq_df) sp_df = sp_df.rename(dict([(name, 'SP_' + name) for name in sp_df.columns.values.tolist()]), axis='columns') nasdaq_df = nasdaq_df.rename(dict([(name, 'N_' + name) for name in nasdaq_df.columns.values.tolist()]), axis='columns') all_df = stock_df.join(sp_df).join(nasdaq_df) if news_df is not None: all_df = merge_stock_news(all_df, news_df) return all_df def test_main(company: str, news_df: pd.DataFrame = None): all_df = prepare_data(company, news_df) df_train = all_df.loc['2006-11-18':'2013-11-10'] ranks = rank_features(df_train) gain_all = sum([v[1] for v in ranks]) gain_sum = 0.0 feat_used = set() print('Features') for v in ranks: gain_sum += v[1] print(v[0], '\t', v[1]) if gain_sum > gain_all * 0.7: print('', end='\t') continue feat_used.add(v[0]) if news_df is not None: feat_used.add('sent3') feat_used.add('sent5') feat_used.add('sentiment') df_train = all_df.loc['2006-11-18':'2013-01-01'] X_train, y_train, _, _ = df2array(df_train, feat_list=feat_used, rescale=True) model = SVC() params = { 'C': np.power(10.0, np.arange(-1.0, 1.0, 0.1)), 'kernel': ['rbf'], 'gamma': np.power(10.0, np.arange(-6.0, -2.0, 0.1)), 'cache_size': [2000.0], } model = GridSearchCV(model, params, scoring=make_scorer(roc_auc_score), n_jobs=6, cv=5) model.fit(X_train, y_train) df_test = all_df.loc['2013-01-02':'2013-03-10'] X_test, y_test, _, _ = df2array(df_test, feat_list=feat_used, rescale=True) return pd.DataFrame(model.cv_results_), model.score(X_test, y_test) def plot_pr_curve(y_true: np.ndarray, y_pred: np.ndarray): average_precision = average_precision_score(y_true, y_pred) precision, recall, _ = precision_recall_curve(y_true, y_pred) plt.step(recall, precision, color='b', alpha=0.2, where='post') plt.fill_between(recall, precision, step='post', alpha=0.2, color='b') plt.xlabel('Recall') plt.ylabel('Precision') plt.ylim([0.0, 1.05]) plt.xlim([0.0, 1.0]) plt.title('2-class Precision-Recall curve: AP={0:0.2f}'.format(average_precision)) plt.show() def svm_cv(df_train, df_test, X_feats: List[str], y_feat: str, params: Dict[str, float]): X_train, y_train = df2array(df_train, X_feats, y_feat) X_val, y_val = df2array(df_test, X_feats, y_feat) X = np.concatenate([X_train, X_val], axis=0) y = np.concatenate([y_train, y_val], axis=0) y = y * 2 - 1.0 custom_cv = [(np.arange(0, np.shape(X_train)[0]), np.arange(np.shape(X_train)[0], np.shape(X)[0]))] svm_model = SVC() model = GridSearchCV(svm_model, params, cv=5, scoring=make_scorer(accuracy_score), n_jobs=6) model.fit(X, y) result = pd.DataFrame(model.cv_results_).sort_values(by='mean_test_score', ascending=False) return model.best_params_, result def xgb_cv(X_train: np.ndarray, y_train: np.ndarray, X_val: np.ndarray, y_val: np.ndarray, params: Dict[str, float], w_train: np.ndarray = None, w_val: np.ndarray = None): X = np.concatenate([X_train, X_val], axis=0) y = np.concatenate([y_train, y_val], axis=0) w = np.concatenate([w_train, w_val], axis=0) if w_train is not None else None custom_cv = [(np.arange(0, np.shape(X_train)[0]), np.arange(np.shape(X_train)[0], np.shape(X)[0]))] xgb_model = xgb.XGBClassifier() model = GridSearchCV(xgb_model, params, cv=custom_cv, scoring=make_scorer(roc_auc_score)) model.fit(X, y, eval_metric='auc', early_stopping_rounds=5, eval_set=[(X_train, y_train), (X_val, y_val)], sample_weight=w) result = pd.DataFrame(model.cv_results_).sort_values(by='mean_test_score', ascending=False) return model.best_params_, result def extrace_target(stock_df: pd.DataFrame, colname: str, periods=5)->pd.DataFrame: y_colname = 'y_' + colname + '_' + str(periods) stock_df[y_colname] = -1.0 * stock_df.diff(periods=-periods)[colname] return stock_df
{"hexsha": "3a9fc6280ba3fd4915c90e93a412191d5b7416d4", "size": 10600, "ext": "py", "lang": "Python", "max_stars_repo_path": "source_project/experiments/stock.py", "max_stars_repo_name": "leckie-chn/SemEval17-5", "max_stars_repo_head_hexsha": "5ca1e1f3972c58c32305f8614cfecc5e5de646cd", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "source_project/experiments/stock.py", "max_issues_repo_name": "leckie-chn/SemEval17-5", "max_issues_repo_head_hexsha": "5ca1e1f3972c58c32305f8614cfecc5e5de646cd", "max_issues_repo_licenses": ["Apache-2.0"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "source_project/experiments/stock.py", "max_forks_repo_name": "leckie-chn/SemEval17-5", "max_forks_repo_head_hexsha": "5ca1e1f3972c58c32305f8614cfecc5e5de646cd", "max_forks_repo_licenses": ["Apache-2.0"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 41.2451361868, "max_line_length": 125, "alphanum_fraction": 0.6435849057, "include": true, "reason": "import numpy", "num_tokens": 3047}
#define BOOST_TEST_DYN_LINK #define BOOST_TEST_MODULE "C/C++ Unit Tests for ArangoDB" #include <boost/test/unit_test.hpp>
{"hexsha": "2abd9e17a4cf98f73ba8ee13d77bc1a1d7dba1f7", "size": 122, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "UnitTests/Basics/Runner.cpp", "max_stars_repo_name": "morsdatum/ArangoDB", "max_stars_repo_head_hexsha": "9cfc6d5cd50b8f451ebdedd77e2c5257fa72a573", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 15.0, "max_stars_repo_stars_event_min_datetime": "2019-08-08T02:06:36.000Z", "max_stars_repo_stars_event_max_datetime": "2019-10-15T17:52:58.000Z", "max_issues_repo_path": "UnitTests/Basics/Runner.cpp", "max_issues_repo_name": "asaaki/ArangoDB", "max_issues_repo_head_hexsha": "a1d4f6f33c09ffd6f67744dbe748e83dc0fe6b82", "max_issues_repo_licenses": ["Apache-2.0"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "UnitTests/Basics/Runner.cpp", "max_forks_repo_name": "asaaki/ArangoDB", "max_forks_repo_head_hexsha": "a1d4f6f33c09ffd6f67744dbe748e83dc0fe6b82", "max_forks_repo_licenses": ["Apache-2.0"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 30.5, "max_line_length": 57, "alphanum_fraction": 0.8032786885, "num_tokens": 30}
// Copyright 2014 Jonathan Graehl-http://graehl.org/ // // 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. #ifndef SHELL_JG2012615_HPP #define SHELL_JG2012615_HPP #pragma once #include <boost/filesystem.hpp> #include <graehl/shared/os.hpp> #include <graehl/shared/shell_escape.hpp> namespace graehl { inline void copy_file(std::string const& source, std::string const& dest, bool skip_same_size_and_time = false) { char const* rsync = "rsync -qt"; char const* cp = "/bin/cp -p"; std::stringstream s; s << (skip_same_size_and_time ? rsync : cp) << ' '; out_shell_quote(s, source); s << ' '; out_shell_quote(s, dest); // INFOQ("copy_file", s.str()); system_safe(s.str()); } inline void mkdir_parents(std::string const& dirname) { boost::filesystem::create_directories(dirname); } inline int system_shell_safe(std::string const& cmd) { char const* shell = "/bin/sh -c "; std::stringstream s; s << shell; out_shell_quote(s, cmd); return system_safe(s.str()); } } #endif
{"hexsha": "5a4cae2af58cb66e41974e9844e32ba04dd0091e", "size": 1508, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "graehl/shared/shell.hpp", "max_stars_repo_name": "graehl/carmel", "max_stars_repo_head_hexsha": "4a5d0990a17d0d853621348272b2f05a0dab3450", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 29.0, "max_stars_repo_stars_event_min_datetime": "2015-01-05T16:52:53.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-14T07:36:10.000Z", "max_issues_repo_path": "graehl/shared/shell.hpp", "max_issues_repo_name": "graehl/carmel", "max_issues_repo_head_hexsha": "4a5d0990a17d0d853621348272b2f05a0dab3450", "max_issues_repo_licenses": ["Apache-2.0"], "max_issues_count": 1.0, "max_issues_repo_issues_event_min_datetime": "2016-04-18T17:20:37.000Z", "max_issues_repo_issues_event_max_datetime": "2016-04-23T07:36:38.000Z", "max_forks_repo_path": "graehl/shared/shell.hpp", "max_forks_repo_name": "graehl/carmel", "max_forks_repo_head_hexsha": "4a5d0990a17d0d853621348272b2f05a0dab3450", "max_forks_repo_licenses": ["Apache-2.0"], "max_forks_count": 7.0, "max_forks_repo_forks_event_min_datetime": "2015-06-11T14:48:13.000Z", "max_forks_repo_forks_event_max_datetime": "2017-08-12T16:06:19.000Z", "avg_line_length": 29.0, "max_line_length": 113, "alphanum_fraction": 0.7148541114, "num_tokens": 386}
# -*- coding: utf-8 -*- import xgboost as xgb import pandas as pd import numpy as np from utils import * from os import path from sklearn.pipeline import Pipeline from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.preprocessing import StandardScaler project_path = path.join(path.dirname(__file__), "..") script_name = path.splitext(path.basename(__file__))[0] # Read train, test = read_data(project_path) # Preprocessing print "Preprocessing..." vectorizer = TfidfVectorizer( preprocessor = stringify_ingredients, analyzer = "word", token_pattern = r"(?u)\b[a-z]{2,40}\b", max_features = 3500, sublinear_tf = True ) vectorizer.fit(np.concatenate([train.ingredients, test.ingredients])) print "Num features:", len(vectorizer.get_feature_names()) # Train clf = xgb.XGBClassifier( max_depth = 25, gamma = 0.3, objective = "multi:softmax", #nround = 200, #num_class = 20 ) model = Pipeline([ ("vectorizer", vectorizer), ("clf", clf) ]) param_grid = { } best_model = training(train.ingredients, train.cuisine, model, param_grid) # Predict test = write_prediction(project_path, script_name, best_model, test)
{"hexsha": "d9edecd16accdaff09cd33c7217bb67cc07ca504", "size": 1169, "ext": "py", "lang": "Python", "max_stars_repo_path": "data/external/repositories/251229/kaggle-cooking-master/script/xgb.py", "max_stars_repo_name": "Keesiu/meta-kaggle", "max_stars_repo_head_hexsha": "87de739aba2399fd31072ee81b391f9b7a63f540", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "data/external/repositories/251229/kaggle-cooking-master/script/xgb.py", "max_issues_repo_name": "Keesiu/meta-kaggle", "max_issues_repo_head_hexsha": "87de739aba2399fd31072ee81b391f9b7a63f540", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "data/external/repositories/251229/kaggle-cooking-master/script/xgb.py", "max_forks_repo_name": "Keesiu/meta-kaggle", "max_forks_repo_head_hexsha": "87de739aba2399fd31072ee81b391f9b7a63f540", "max_forks_repo_licenses": ["MIT"], "max_forks_count": 1, "max_forks_repo_forks_event_min_datetime": "2019-12-04T08:23:33.000Z", "max_forks_repo_forks_event_max_datetime": "2019-12-04T08:23:33.000Z", "avg_line_length": 22.4807692308, "max_line_length": 74, "alphanum_fraction": 0.7296834902, "include": true, "reason": "import numpy", "num_tokens": 292}
import pygame import cmath import math as m from pygame import * from cmath import * import matplotlib as mat import numpy as np xmax = 20 ymax = 16 inter = 1 interx = 1 tmax = 10 intert = 10 j = sqrt(-1) WOUT_Last = [ 0, 0] def ln(x): try: return log(abs(x)) - j * ( atan( x.real / ( .0000001 + x.imag)) - pi / 2) except: return -100 def Integrate(f, x, D): Intout = 0 for i in range( -int( D * abs(x)), int( D * abs(x))): Intout += f(i / D * (x + .00001) / (abs(x) + .00001)) / D return Intout def Dedekind(x): DedeOUT = x if abs(x) <= 1: for i in range(1,101): DedeOUT *= ( 1 - x ** i) else: DedeOUT = 0 return x * DedeOUT def Zeta(z): ZetaOUT = 0 if z.real == 1 and z.imag == 0: return 10000 elif z.real >= 0: for i in range(1,501): ZetaOUT += (-1) ** i / (i ** z) return ZetaOUT / (2 ** (1 - z) - 1) else: return 0 def Eta(x): return Zeta(j * x + 1 / 2) def RiemannZ(n): i = 0 if n > 0: while int(n) != 0: while abs(Eta(i)) > .04: i += abs(Eta(i)) ** 2 / 5 n += -1 i += .1 else: while int(n) != 0: while abs(Eta(-i)) > .04: i += -abs(Eta(i)) ** 2 / 5 n += 1 i += -.1 return i def fact(x): factOUT = 1 for i in range(1, x + 1): factOUT *= i if factOUT == 1: return 1 else: return factOUT def liPart(k): liPOUT = 0 for n in range(0, m.floor((k + 1) / 2)): liPOUT += 1/( 2 * n + 1) return liPOUT def Welliptic(x, w1, w2): global WOUT2 global WOUT_Last WOUT1 = 0 for m_1 in range(-50,51): try: WOUT1 += sin( pi * ( x - 2 * w2 * m_1) / ( 2 * w1)) ** (-2) except: WOUT1 += 100 if WOUT_Last != [ w1, w2]: WOUT2 = 0 for m_2 in range(-50, 51): if m_2 == 0: continue else: WOUT2 += sin(pi * w2 * m_2 / w1) ** (-2) WOUT_Last = [w1, w2] return (pi / (2 * w1)) ** 2 * ( -1 / 3 + WOUT1 - WOUT2) def li( z, p = 1): liOUT = 0 for i in range(1, 100): liOUT += ( p ** i) * ( ln(z) ** i) * liPart(i) / ( fact(i) * (-2) ** ( i -1)) if z.real == 1 and z.imag == 0: return -100 else: return sqrt(z ** p) * liOUT + ln(abs(ln(z))) + ln(p) + np.euler_gamma def Draw(F): for i_1 in range( -400, 401, interx): i_x = i_1 * xmax / 800 draw.line(DisplaySurf, (0, 255, 0), (i_1 + 400, 300 - F(i_x).real * 600 / ymax), (i_1 + interx + 400, 300 - F(i_x + interx * xmax / 800).real * 600 / ymax), 3) draw.line(DisplaySurf, (255, 0, 0), (i_1 + 400, 300 - F(i_x).imag * 600 / ymax), (i_1 + interx + 400, 300 - F(i_x + interx * xmax / 800).imag * 600 / ymax), 3) def DrawP(G, F): for i_1 in range( -tmax * intert, tmax * intert, 1): i_t = i_1 / intert draw.line(DisplaySurf, (0, 255, 0), ( 400 + G(i_t).real * 400 / xmax, 300 + F(i_t).real * 300 / ymax), ( 400 + G(i_t + 1 / intert).real * 400 / xmax, 300 + F(i_t + 1 / intert).real * 300 / ymax), 3) draw.line(DisplaySurf, (255, 0, 0), ( 400 + G(i_t).imag * 400 / xmax, 300 + F(i_t).real * 300 / ymax), ( 400 + G(i_t + 1 / intert).imag * 400 / xmax, 300 + F(i_t + 1 / intert).real * 300 / ymax), 3) def Cloth(x): if x == 0: return 0 else: return tan(x ** 2) + Cloth( x - 1) init() DisplaySurf = pygame.display.set_mode((800, 600), 0, 32) display.set_caption('Graph') DisplaySurf.fill(( 255, 255, 255)) for i_1 in range( -2 * (xmax), 2 * (xmax + inter), inter): draw.line(DisplaySurf, (51, 51, 51), (i_1 / 2 * 400 / xmax + 400, 600), (i_1 / 2 * 400 / xmax + 400, 0), 1) for i_1 in range( -xmax - xmax % inter, xmax + inter, 2 * inter): draw.line(DisplaySurf, (102, 102, 102), ( i_1 * 400 / xmax + 400, 600), ( i_1 * 400 / xmax + 400, 0), 1) for i_1 in range( -2 * (ymax), 2 * (ymax + inter), inter): draw.line(DisplaySurf, (51, 51, 51), ( 0, i_1 / 2 * 300 / ymax + 300), ( 800, i_1 / 2 * 300 / ymax + 300), 1) for i_1 in range( -ymax - ymax % 2, ymax + inter, 2 * inter): draw.line(DisplaySurf, (102, 102, 102), ( 0, i_1 * 300 / ymax + 300), ( 800, i_1 * 300 / ymax + 300), 1) draw.line(DisplaySurf, (0, 0, 0), ( 0, 300), ( 800, 300), 3) draw.line(DisplaySurf, (0, 0, 0), ( 400, 0), ( 400, 600), 3) draw.circle(DisplaySurf, ( 0, 0, 0), ( 400, 300), 8, 2) Draw(lambda x: Integrate( lambda t: t ** 2 * cos(2 * pi * t * int(x)), 30, 10) + j * 5) while True: for event in pygame.event.get(): if event.type == QUIT: quit() exit() display.update()
{"hexsha": "263e7e6620431ac3382f73e246249d2e79bea192", "size": 4831, "ext": "py", "lang": "Python", "max_stars_repo_path": "Test.py", "max_stars_repo_name": "HackersForHarambe/Python-Repository", "max_stars_repo_head_hexsha": "b8c36483e51fe8b48a134ec78e3d3f10eeb49cb9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "Test.py", "max_issues_repo_name": "HackersForHarambe/Python-Repository", "max_issues_repo_head_hexsha": "b8c36483e51fe8b48a134ec78e3d3f10eeb49cb9", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "Test.py", "max_forks_repo_name": "HackersForHarambe/Python-Repository", "max_forks_repo_head_hexsha": "b8c36483e51fe8b48a134ec78e3d3f10eeb49cb9", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 27.9248554913, "max_line_length": 113, "alphanum_fraction": 0.4812668185, "include": true, "reason": "import numpy", "num_tokens": 1875}
function csr_to_sparse_test() i = [1;2;3] j = [3;4;4] v = [8;9;10] (rp,ci,ai,m) = sparse_to_csr(i,j,v) (nzi,nzj,nzv) = csr_to_sparse(rp,ci,ai) A = sparse(nzi,nzj,nzv,length(rp)-1,maximum(ci)) # more tests added here # clique to sparse test rp = collect(1:5:26) ci = vec(reshape(repmat(1:5,5,1)',25,1)) ai = ones(Int64,25) A = csr_to_sparse_matrix(rp,ci,ai,5,5) if !isequal(full(A),ones(5,5)) error("csr_to_sparse_test failed") end # 100 random trials for t = 1:100 A = sprand(100,80,0.01) (rp,ci,ai) = sparse_to_csr(A) A2 = csr_to_sparse_matrix(rp,ci,ai,100,80) if ~isequal(A,A2) error("csr_to_sparse_test failed") end end return true end
{"hexsha": "1ca6750460e662ff3f2f4ee9f8cb95797d47c2a5", "size": 780, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/csr_to_sparse_test.jl", "max_stars_repo_name": "MeherChaitanya04/Julia", "max_stars_repo_head_hexsha": "644e96c3109f7210c6a71898fc61a777ba20d49b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "test/csr_to_sparse_test.jl", "max_issues_repo_name": "MeherChaitanya04/Julia", "max_issues_repo_head_hexsha": "644e96c3109f7210c6a71898fc61a777ba20d49b", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "test/csr_to_sparse_test.jl", "max_forks_repo_name": "MeherChaitanya04/Julia", "max_forks_repo_head_hexsha": "644e96c3109f7210c6a71898fc61a777ba20d49b", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 26.8965517241, "max_line_length": 52, "alphanum_fraction": 0.5679487179, "num_tokens": 286}
""" Copyright 2013 Steven Diamond 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. """ from cvxpy.atoms.affine.affine_atom import AffAtom import cvxpy.utilities as u import cvxpy.interface as intf import cvxpy.lin_ops.lin_utils as lu import numpy as np class conv(AffAtom): """ 1D discrete convolution of two vectors. The discrete convolution :math:`c` of vectors :math:`a` and :math:`b` of lengths :math:`n` and :math:`m`, respectively, is a length-:math:`(n+m-1)` vector where .. math:: c_k = \\sum_{i+j=k} a_ib_j, \\quad k=0, \\ldots, n+m-2. Parameters ---------- lh_expr : Constant A constant 1D vector or a 2D column vector. rh_expr : Expression A 1D vector or a 2D column vector. """ # TODO work with right hand constant. # TODO(akshayka): make DGP-compatible def __init__(self, lh_expr, rh_expr): super(conv, self).__init__(lh_expr, rh_expr) @AffAtom.numpy_numeric def numeric(self, values): """Convolve the two values. """ # Convert values to 1D. values = list(map(intf.from_2D_to_1D, values)) return np.convolve(values[0], values[1]) def validate_arguments(self): """Checks that both arguments are vectors, and the first is constant. """ if not self.args[0].is_vector() or not self.args[1].is_vector(): raise ValueError("The arguments to conv must resolve to vectors.") if not self.args[0].is_constant(): raise ValueError("The first argument to conv must be constant.") def shape_from_args(self): """The sum of the argument dimensions - 1. """ lh_length = self.args[0].shape[0] rh_length = self.args[1].shape[0] return (lh_length + rh_length - 1, 1) def sign_from_args(self): """Same as times. """ return u.sign.mul_sign(self.args[0], self.args[1]) def is_incr(self, idx): """Is the composition non-decreasing in argument idx? """ return self.args[0].is_nonneg() def is_decr(self, idx): """Is the composition non-increasing in argument idx? """ return self.args[0].is_nonpos() def graph_implementation(self, arg_objs, shape, data=None): """Convolve two vectors. Parameters ---------- arg_objs : list LinExpr for each argument. shape : tuple The shape of the resulting expression. data : Additional data required by the atom. Returns ------- tuple (LinOp for objective, list of constraints) """ return (lu.conv(arg_objs[0], arg_objs[1], shape), [])
{"hexsha": "c4564b58af68e78bfb2a664c467fcd74d1fbe272", "size": 3210, "ext": "py", "lang": "Python", "max_stars_repo_path": "cvxpy/atoms/affine/conv.py", "max_stars_repo_name": "jasondark/cvxpy", "max_stars_repo_head_hexsha": "56aaa01b0e9d98ae5a91a923708129a7b37a6f18", "max_stars_repo_licenses": ["ECL-2.0", "Apache-2.0"], "max_stars_count": 7, "max_stars_repo_stars_event_min_datetime": "2015-06-03T01:33:46.000Z", "max_stars_repo_stars_event_max_datetime": "2021-11-15T01:48:49.000Z", "max_issues_repo_path": "cvxpy/atoms/affine/conv.py", "max_issues_repo_name": "Toby-Gao/cvxpy", "max_issues_repo_head_hexsha": "bd6f5142effa8cf883d1a0d7fd46c0d906b2fb93", "max_issues_repo_licenses": ["ECL-2.0", "Apache-2.0"], "max_issues_count": 1, "max_issues_repo_issues_event_min_datetime": "2022-03-09T13:13:44.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-09T13:13:44.000Z", "max_forks_repo_path": "cvxpy/atoms/affine/conv.py", "max_forks_repo_name": "Toby-Gao/cvxpy", "max_forks_repo_head_hexsha": "bd6f5142effa8cf883d1a0d7fd46c0d906b2fb93", "max_forks_repo_licenses": ["ECL-2.0", "Apache-2.0"], "max_forks_count": 2, "max_forks_repo_forks_event_min_datetime": "2020-10-22T01:35:58.000Z", "max_forks_repo_forks_event_max_datetime": "2022-01-19T10:48:51.000Z", "avg_line_length": 30.8653846154, "max_line_length": 78, "alphanum_fraction": 0.630529595, "include": true, "reason": "import numpy,import cvxpy,from cvxpy", "num_tokens": 780}
#!/usr/bin/env python # -*- coding: utf-8 -*- from Bio import SeqIO import re import numpy as np import os import random import matplotlib.pyplot as plt import matplotlib.patches as mpatches from matplotlib.collections import PatchCollection class Region : def __init__(self, start, stop, id) : self.start = start self.stop = stop self.id = id self.length = self.stop - self.start def __str__(self) : return "{}:{}-{} ({}bp)".format(self.id, self.start, self.stop, self.length) def __eq__(self, region) : return self.length == region.length and self.id == region.id def Overlap(self, region) : # Check if same contig and overlap if self.id != region.id : return False # start--------------------------------stop # start ------------stop # start ----------------------------stop # start----stop # ==============A B=============== # A = region.start B = region.stop if (self.start >= A and self.start <= B) or (self.stop >= A and self.stop <= B) or (self.start <= A and self.stop >= B) : return True else : return False class RestrictionProfile : def __init__(self, fasta, site, bed_to_ignore=None) : self.fasta = fasta if os.path.exists(self.fasta) : self.fasta = os.path.abspath(self.fasta) else : raise Exception("ERROR: file does not exist!") self.site = site """ UNWORKING FOR NOW """ self.bed_to_ignore = bed_to_ignore # List of region objects self.regions_to_ignore = [] if self.bed_to_ignore != None and os.path.exists(self.bed_to_ignore) : self.bed_to_ignore = os.path.abspath(self.bed_to_ignore) f = open(self.bed_to_ignore, "r") for line in f : sl = line.strip().split("\t") current_region = Region(int(sl[1]), int(sl[2]), sl[0]) self.regions_to_ignore.append(current_region) self.sequences = [] for record in SeqIO.parse(self.fasta, "fasta") : self.sequences.append([record.id, str(record.seq)]) self.profile = None def __str__(self) : if self.profile == None : return "Restriction is not done yet!" else : return "{} fragments found in perfect restriction situation!".format(len(self.profile)) def SimulateDeletion(self, minsize=100000, maxsize=500000, mincontigsize=10000000, ndel=1) : # 0. Get all sequences longer than size : to_be_deleted = [] for id, seq in self.sequences : if len(seq) > maxsize : to_be_deleted.append([id, seq]) will_be_deleted = [] already_chosen_contig_ids = [] # 1. Choose randomly n_del element in the list for i in range(ndel) : contig = random.choice(to_be_deleted) while len(contig[1]) < mincontigsize or contig[0] in already_chosen_contig_ids: contig = random.choice(to_be_deleted) already_chosen_contig_ids.append(contig[0]) will_be_deleted.append(contig) # 2. delete part of the sequence for id, seq in will_be_deleted : print("{} = {}".format(id, len(seq))) deleted = [] for id, seq in will_be_deleted : undeleted_length = len(seq) # Gets undeleted length of the fragment size = random.randint(minsize, maxsize) # Choose a size to delete start = random.randint(0, undeleted_length-size-1) # Choose a start point on the contig end = start + size # Computes the endpoint of the deletion deleted.append([id, seq[0:start]+seq[end:]]) # Modifies the sequence print("Deletion on {} from {} to {}\n\tDeletion size: {}\n\tSize before: {}\n\tSize after: {}".format(id, start, end, size, undeleted_length, undeleted_length-size)) for id, seq in deleted : print("{} = {}".format(id, len(seq))) # 3. Completes the deleted seq list deleted_ids = [id for id, seq in deleted] for id, seq in self.sequences : if id not in deleted_ids : deleted.append([id, seq]) return self.Restrict(deleted) def Restrict(self, sequences, save_profile=False) : print("Restricting...") all_regions = [] # For each contig in the list for id, seq in sequences : #print(record.id) # Find all coordinates of the restriction site all_coords = [m.start() for m in re.finditer(self.site, seq)] all_coords += [m.start() for m in re.finditer(self.complement(self.site), seq)] all_coords = sorted(list(all_coords)) #print(len(all_coords)) # Loops over all coordinates and get regions of fragmentation last = 0 current = 0 # For each coord : get fragmentation then check if fragment overlaps with regions to exclude if so discard fragment (telomerics) ==> UNDERESTIMATION for coord in all_coords : current = coord current_region = Region(last, current, id) #print(current_region) if len(self.regions_to_ignore) != 0 : for region in self.regions_to_ignore : if not current_region.Overlap(region) : # If region does not overlap with the excluded regions add it to the region to consider list print("not_overlapping!") all_regions.append(current_region) else : all_regions.append(current_region) last = coord print("Done!") if save_profile : self.profile = all_regions return all_regions def complement(self, seq) : base_complement = {'A': 'T', 'C': 'G', 'G': 'C', 'T': 'A'} letters = list(seq) letters = [base_complement[base] for base in letters] return ''.join(letters) def revcom(self, seq) : return self.complement(seq[::-1]) def PlotProfile(self, profile, miny=200000, maxy=2000000) : plt.style.use("default") fig, ax = plt.subplots(figsize=(3,20)) x_pos = [0.5 for r in profile] y_pos = [r.length for r in profile] pcl = [] for x, y in zip(x_pos, y_pos) : pcl.append(mpatches.Rectangle(xy=[x,y], width=1, height=5000)) pc = PatchCollection(pcl, facecolor="k", alpha=0.6) ax.add_collection(pc) ax.set_yticks(y_pos) ax.set_xlim(0,2) ax.set_ylim(miny, maxy) ax.get_xaxis().set_visible(False) plt.show() return fig, ax def PlotMultiProfile(self, profile_list, miny=200000, maxy=2000000, labels=None) : unique_regions, missing_regions = self.CompareProfiles(profile_list) plt.style.use("default") np = len(profile_list) fig, ax = plt.subplots(nrows=1,ncols=np,figsize=(3*np,20)) for n, profile in enumerate(profile_list) : #print(len(unique_regions)) #print(len(profile)) x_pos = [0.5 for r in profile] y_pos = [r.length for r in profile] uniq = [] for r in profile : if r in unique_regions : uniq.append(True) else : uniq.append(False) pclUniq = [] pcl = [] for x, y, isUniq in zip(x_pos, y_pos, uniq) : #print(isUniq) if isUniq : pclUniq.append(mpatches.Rectangle(xy=[x,y], width=1, height=5000)) else : pcl.append(mpatches.Rectangle(xy=[x,y], width=1, height=5000)) pclMissing = [] for r in missing_regions : if r not in profile : pclMissing.append(mpatches.Rectangle(xy=[0.5,r.length], width=1, height=5000)) pcMissing = PatchCollection(pclUniq, facecolor="g", alpha=0.4) pcUniq = PatchCollection(pclUniq, facecolor="r", alpha=0.9) pc = PatchCollection(pcl, facecolor="k", alpha=0.6) ax[n].add_collection(pcMissing) ax[n].add_collection(pcUniq) ax[n].add_collection(pc) ax[n].set_yticks(y_pos) ax[n].set_xlim(0,2) ax[n].set_ylim(miny, maxy) ax[n].get_xaxis().set_visible(False) if labels != None : if len(labels) == len(profile_list) : for n, l in enumerate(labels) : ax[n].set_title(l, fontsize=16) else : print("WARNING: Unmatching label list length: no labels added!") plt.subplots_adjust(wspace=0.5, hspace=None) plt.show() return fig, ax def CompareProfiles(self, profile_list) : all_fragments = [] for profile in profile_list : for region in profile : all_fragments.append(region) missing_regions = [] unique_regions = [] regions_list = [] for region in all_fragments : regions_list.append([region, all_fragments.count(region)]) for r, c in regions_list : if c == 1 : unique_regions.append(r) if c < len(profile_list) : missing_regions.append(r) """ For debugging for region in unique_regions : print(region) """ return unique_regions, missing_regions """ def main(): ### Main program # Code goes over here. return 0 if __name__ == "__main__": main() """
{"hexsha": "68ae03a14211d81fd918b62c634b865c80575506", "size": 9905, "ext": "py", "lang": "Python", "max_stars_repo_path": "Finder.py", "max_stars_repo_name": "AntoineHo/STRIP", "max_stars_repo_head_hexsha": "53a6e9197c0e079c2a1c686d1bf5b8710ced8525", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "Finder.py", "max_issues_repo_name": "AntoineHo/STRIP", "max_issues_repo_head_hexsha": "53a6e9197c0e079c2a1c686d1bf5b8710ced8525", "max_issues_repo_licenses": ["Apache-2.0"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "Finder.py", "max_forks_repo_name": "AntoineHo/STRIP", "max_forks_repo_head_hexsha": "53a6e9197c0e079c2a1c686d1bf5b8710ced8525", "max_forks_repo_licenses": ["Apache-2.0"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 34.2733564014, "max_line_length": 177, "alphanum_fraction": 0.5530540131, "include": true, "reason": "import numpy", "num_tokens": 2248}
import chainer import chainer.functions as F from scipy.misc import imresize class Backprop: """ Backprop """ def __init__(self, model, target_layer="conv5_3", prob_layer="prob"): """ init """ self.model = model self.xp = self.model.xp self.target_layer = target_layer self.prob_layer = prob_layer def forward(self, x): """ forward """ with chainer.using_config("train", False): layers = [self.target_layer, self.prob_layer] activations = self.model.extract(x, layers=layers) return activations def backward(self, target_prob, enable_double_backprop=False): """ backward """ self.model.cleargrads() loss = F.sum(target_prob) loss.backward(retain_grad=True, enable_double_backprop=enable_double_backprop) def select_target(self, prob, label): """ """ n_class = len(prob) target_label = self.xp.zeros((1, n_class), dtype=self.xp.float32) if label == -1: target_label[0, prob.argmax()] = 1. else: target_label[0, label] = 1. return target_label class GradCAM(Backprop): """ Grad-CAM """ def __init__(self, model, target_layer="conv5_3", prob_layer="prob"): """ init """ super(GradCAM, self).__init__(model, target_layer, prob_layer) def feed(self, x, label): """ feed Args: x: list or array: Input image. Only one image can be acceptable. label: int: The number of class label. Return: L_gcam: Grad-CAM result. """ # feed forward activations = self.forward(x) # label selection prob = activations[self.prob_layer][0].data target_label = self.select_target(prob, label) # target loss target_prob = \ chainer.Variable(target_label) * activations[self.prob_layer] # backward self.backward(target_prob) target_activation = activations[self.target_layer] importances = self.xp.mean(target_activation.grad, axis=(2, 3)) L_gcam = self.xp.tensordot(importances[0], target_activation.data[0], axes=(0, 0)) L_gcam = (L_gcam > 0.) * L_gcam / L_gcam.max() * 255. # resize L_gcam = imresize(L_gcam, x[0].size) return L_gcam class GradCAM_PP(Backprop): """ Grad-CAM++ THERE MIGHT BE A BUG... """ def __init__(self, model, target_layer="conv5_3", prob_layer="prob"): """ init """ super(GradCAM_PP, self).__init__(model, target_layer, prob_layer) def feed(self, x, label): """ feed Args: x: list or array: Input image. Only one image can be acceptable. label: int: The number of class label. Return: L_gcam: Grad-CAM++ result. """ # feed forward activations = self.forward(x) # label selection prob = activations[self.prob_layer][0].data target_label = self.select_target(prob, label) # target loss target_prob = \ chainer.Variable(target_label) * activations[self.prob_layer] # backward # self.backward(target_prob, enable_double_backprop=True) target_activation = activations[self.target_layer] label_index = target_label.argmax() coeff = self.xp.exp(target_prob[0][label_index].data) # first_grad = coeff * target_activation.grad_var first_grad, = chainer.grad([coeff * target_prob], [target_activation], enable_double_backprop=True) second_grad, = chainer.grad([first_grad], [target_activation], enable_double_backprop=True) third_grad, = chainer.grad([second_grad], [target_activation], enable_double_backprop=True) global_sum = self.xp.sum(target_activation.data, axis=(2, 3)) global_sum = global_sum.reshape(first_grad.data[0].shape[0], 1, 1) alpha_num = second_grad.data[0] alpha_denom = \ 2.0 * second_grad.data[0] + global_sum[0] * third_grad.data[0] alpha_denom = self.xp.where(alpha_denom != 0.0, alpha_denom, self.xp.ones(alpha_denom.shape)) alphas = alpha_num / alpha_denom alphas /= self.xp.sum(alphas, axis=(1, 2))[:, self.xp.newaxis, self.xp.newaxis] importances = self.xp.sum( alphas * self.xp.maximum(first_grad.data[0], 0), # alphas * first_grad.data[0], axis=(1, 2) ) L_gcam = self.xp.tensordot(importances, target_activation.data[0], axes=(0, 0)) L_gcam = (L_gcam > 0.) * L_gcam / L_gcam.max() * 255. # resize L_gcam = imresize(L_gcam, x[0].size) return L_gcam class GuidedBackprop(Backprop): """ Guided Backpropagation """ def __init__(self, model, target_layer="input", prob_layer="prob"): """ init """ super(GuidedBackprop, self).__init__(model, target_layer, prob_layer) def feed(self, x, label): """ feed Args: x: list or array: Input image. Only one image can be acceptable. label: int: The number of class label. Return: L_gcam: Guided Backpropagation result. """ # feed forward activations = self.forward(x) # label selection prob = activations[self.prob_layer][0].data target_label = self.select_target(prob, label) # target loss target_prob = \ chainer.Variable(target_label) * activations[self.prob_layer] # backward self.backward(target_prob) L_gbp = activations[self.target_layer].grad[0] L_gbp = L_gbp.transpose(1, 2, 0) # resize # L_gbp = imresize(L_gbp, x[0].size) return L_gbp
{"hexsha": "83b0c5632cd1d59beea159e4684305e289b5c8bf", "size": 6350, "ext": "py", "lang": "Python", "max_stars_repo_path": "grad-cam/backprop.py", "max_stars_repo_name": "daisuke-motoki/chainer-practice", "max_stars_repo_head_hexsha": "0e3b8924a61d2926e88e316961077eeac1c8a592", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max_stars_repo_stars_event_min_datetime": "2018-03-07T06:23:39.000Z", "max_stars_repo_stars_event_max_datetime": "2020-10-18T03:38:10.000Z", "max_issues_repo_path": "grad-cam/backprop.py", "max_issues_repo_name": "daisuke-motoki/chainer-practice", "max_issues_repo_head_hexsha": "0e3b8924a61d2926e88e316961077eeac1c8a592", "max_issues_repo_licenses": ["MIT"], "max_issues_count": 7, "max_issues_repo_issues_event_min_datetime": "2020-03-24T15:38:55.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-11T23:18:41.000Z", "max_forks_repo_path": "grad-cam/backprop.py", "max_forks_repo_name": "daisuke-motoki/chainer-practice", "max_forks_repo_head_hexsha": "0e3b8924a61d2926e88e316961077eeac1c8a592", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 32.2335025381, "max_line_length": 79, "alphanum_fraction": 0.5533858268, "include": true, "reason": "from scipy", "num_tokens": 1463}
import sys import re import numpy as np import torch infile='celeba_full_64x64_5bit.npy' img = torch.tensor(np.load(infile)) img = img.permute(0, 3, 1, 2) torch.save(img, re.sub('.npy$', '.pth', infile))
{"hexsha": "1c71b66f494868200f8dc2c6e6533b7efd6ec1a9", "size": 205, "ext": "py", "lang": "Python", "max_stars_repo_path": "Codes/Resflow_Procs/preprocessing/convert_to_pth.py", "max_stars_repo_name": "aahmadian-liu/ood-likefree-invertible", "max_stars_repo_head_hexsha": "977e70eccaa7f2eb09724b5bf6f28156f4940461", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "Codes/Resflow_Procs/preprocessing/convert_to_pth.py", "max_issues_repo_name": "aahmadian-liu/ood-likefree-invertible", "max_issues_repo_head_hexsha": "977e70eccaa7f2eb09724b5bf6f28156f4940461", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "Codes/Resflow_Procs/preprocessing/convert_to_pth.py", "max_forks_repo_name": "aahmadian-liu/ood-likefree-invertible", "max_forks_repo_head_hexsha": "977e70eccaa7f2eb09724b5bf6f28156f4940461", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 20.5, "max_line_length": 48, "alphanum_fraction": 0.712195122, "include": true, "reason": "import numpy", "num_tokens": 68}
import numpy as np import onnx from tests.utils.common import check_onnx_model from tests.utils.common import make_model_from_nodes def _test_gather( input_array: np.ndarray, indices: np.ndarray, opset_version: int, **kwargs, ) -> None: test_inputs = { 'x': input_array, 'indices': indices, } node = onnx.helper.make_node( 'Gather', inputs=list(test_inputs), outputs=['y'], **kwargs, ) model = make_model_from_nodes( nodes=node, initializers={}, inputs_example=test_inputs, opset_version=opset_version, ) check_onnx_model(model, test_inputs) def test_gather() -> None: input_tensor = np.asarray( [ [1.0, 1.2, 1.9], [2.3, 3.4, 3.9], [4.5, 5.7, 5.9], ], dtype=np.float32 ) indices = np.asarray( [ [1, 0], ], dtype=np.int64, ) _test_gather(input_array=input_tensor, indices=indices, axis=0, opset_version=9) _test_gather(input_array=input_tensor, indices=indices, axis=1, opset_version=9) _test_gather(input_array=input_tensor, indices=indices, axis=0, opset_version=13) _test_gather(input_array=input_tensor, indices=indices, axis=1, opset_version=13)
{"hexsha": "42afa36c405d1af2b4ea97d61f3b61b3d63c0ad3", "size": 1325, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/node_converters/gather_test.py", "max_stars_repo_name": "niobeus/onnx2torch", "max_stars_repo_head_hexsha": "d2dc0a0927ced3ac32d4a1dc925a5528874b5c0c", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "tests/node_converters/gather_test.py", "max_issues_repo_name": "niobeus/onnx2torch", "max_issues_repo_head_hexsha": "d2dc0a0927ced3ac32d4a1dc925a5528874b5c0c", "max_issues_repo_licenses": ["Apache-2.0"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "tests/node_converters/gather_test.py", "max_forks_repo_name": "niobeus/onnx2torch", "max_forks_repo_head_hexsha": "d2dc0a0927ced3ac32d4a1dc925a5528874b5c0c", "max_forks_repo_licenses": ["Apache-2.0"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 24.537037037, "max_line_length": 85, "alphanum_fraction": 0.601509434, "include": true, "reason": "import numpy", "num_tokens": 354}
module Term import Data.Fin %logging 1 %logging declare.def 3 mutual data Bdr : (cut : Bool) -> (vars : Nat) -> Type where Lam : Bdr cut vars Pi : Chk cut vars -> Bdr cut vars -- Checkable terms (i.e. introduction forms) data Chk : (cut : Bool) -> (vars : Nat) -> Type where Bnd : Bdr cut vars -> Chk cut (S vars) -> Chk cut vars Emb : Syn cut vars -> Chk cut n -- Synthesisable terms (i.e. elimination forms) data Syn : (cut : Bool) -> (vars : Nat) -> Type where Var : Fin vars -> Syn cut vars App : Syn cut vars -> Chk cut vars -> Syn cut vars Cut : Chk True vars -> Typ True vars -> Syn True vars Typ : (cut : Bool) -> (vars : Nat) -> Type Typ = Chk Term : Nat -> Type Term = Chk True NF : Nat -> Type NF = Chk False
{"hexsha": "481716c5e51382306284fa059bd5000081b46fd8", "size": 773, "ext": "idr", "lang": "Idris", "max_stars_repo_path": "idris2/tests/idris2/basic044/Term.idr", "max_stars_repo_name": "Qqwy/Idris2-Erlang", "max_stars_repo_head_hexsha": "945f9c12d315d73bfda2d441bc5f9f20696b5066", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "idris2/tests/idris2/basic044/Term.idr", "max_issues_repo_name": "Qqwy/Idris2-Erlang", "max_issues_repo_head_hexsha": "945f9c12d315d73bfda2d441bc5f9f20696b5066", "max_issues_repo_licenses": ["BSD-3-Clause"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "idris2/tests/idris2/basic044/Term.idr", "max_forks_repo_name": "Qqwy/Idris2-Erlang", "max_forks_repo_head_hexsha": "945f9c12d315d73bfda2d441bc5f9f20696b5066", "max_forks_repo_licenses": ["BSD-3-Clause"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 22.7352941176, "max_line_length": 58, "alphanum_fraction": 0.595084088, "num_tokens": 252}
# Created on: Jun 01, 2020 # Author: Marek Ryn # Imports from PIL import Image, ImageDraw, ImageFont import numpy as np import matplotlib.pyplot as plt class FontCompressor: @staticmethod def _getm(cc): m = 0 if cc > 10: m = 1 if cc > 92: m = 2 if cc > 174: m = 3 return m @staticmethod def _getcc(m): cc = 0 if m == 1: cc = 91 if m == 2: cc = 173 if m == 3: cc = 255 return cc def __init__(self, fontfile, size, subset=""): # If no subset defined than creating default set of characters to encode if not subset: for j in range(33, 127): subset += chr(j) c_width = 128 c_height = 128 self.fontarray = [] self.maxh = 0 self.outbin = [] # Loading font file print("Loading font file...") try: font = ImageFont.truetype(fontfile, size=size) except: print('ERROR 1: Unable to open font file or unknown format') return # Calculating max height and individual widths for given characters' set print("Calculating max height and individual widths for given characters' set...") self.maxh = 0 canvas = Image.new("L", (c_width, c_height), 0) draw = ImageDraw.Draw(canvas) for c in range(33, 127): self.fontarray.append([0, []]) draw.rectangle([(0, 0), (c_width, c_height)], fill=0, outline=None) draw.text((0, 0), chr(c), fill=255, font=font) for y in range(0, c_height): for x in range(0, c_width): if canvas.getpixel((x, y)) > 0: if (y+1) > self.maxh: self.maxh = y + 1 if (x+1) > self.fontarray[c-33][0]: self.fontarray[c-33][0] = x + 1 # Assuming that space width is the same as 'a' width self.space_width = self.fontarray[97-33][0] # Compressing characters print("Compressing individual characters... ") for c in range(33, 127): if chr(c) not in subset: continue draw.rectangle([(0, 0), (c_width, c_height)], fill=0, outline=None) draw.text((0, 0), chr(c), fill=255, font=font) h = self.maxh w = self.fontarray[c-33][0] if w == 0: continue i = 0 while True: x = i % w y = i // w m = self._getm(canvas.getpixel((x, y))) if (m == 0) or (m == 3): byte = m * 64 cnt = 0 while (self._getm(canvas.getpixel((x, y))) == m) and (cnt < 63): cnt += 1 i += 1 if i > (w * h): break x = i % w y = i // w byte += cnt self.fontarray[c - 33][1].append(byte) if (m == 1) or (m == 2): byte = m cnt = 0 while cnt < 3: byte = byte << 2 cnt += 1 i += 1 if i > (w * h): i = w * h x = i % w y = i // w m = self._getm(canvas.getpixel((x, y))) byte += m self.fontarray[c - 33][1].append(byte) i += 1 if i > (w * h): break print("Encoding data...") adr = 192 self.outbin.append(self.maxh) self.outbin.append(self.space_width) for c in range(33, 127): if (chr(c) in subset) and (self.fontarray[c-33][0] > 0): self.outbin.append(adr % 256) self.outbin.append(adr // 256) adr += len(self.fontarray[c-33][1]) + 1 else: self.outbin.append(adr % 256) self.outbin.append(adr // 256) self.outbin.append(adr % 256) self.outbin.append(adr // 256) for c in range(33, 127): if (chr(c) not in subset) or (self.fontarray[c-33][0] == 0): continue self.outbin.append(self.fontarray[c - 33][0]) self.outbin.extend(self.fontarray[c - 33][1]) def export2bin(self, fname): # Saving encoded binary file print("Exporting to binary file...") with open(fname, "wb") as f: f.write(self.outbin) def export2c(self, fname, varname): # Saving as c/cpp text file print("Exporting to C/CPP file...") with open(fname, "a+") as f: f.write("//------------------------------------------------------------------------------\n") f.write("// File generated by TFT Tools - Font Compressor \n") f.write("// Written by Marek Ryn \n") f.write("//------------------------------------------------------------------------------\n") f.write("\n") f.write("const uint8_t "+varname+" ["+str(len(self.outbin))+"] = {") for i in range(len(self.outbin)): if i % 16 == 0: f.write("\n") f.write("0x{:02x}".format(self.outbin[i])) if i < len(self.outbin) - 1: f.write(", ") f.write("};\n\n")
{"hexsha": "965109cfbd4473a53d1490bdab2bdb9215996830", "size": 5472, "ext": "py", "lang": "Python", "max_stars_repo_path": "TFT Tools/fontcompressor.py", "max_stars_repo_name": "MarekRyn/ILI9341-Toolkit", "max_stars_repo_head_hexsha": "0d494db158d8cc1a328ed97fc5c4f7e5f11a74e0", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 6, "max_stars_repo_stars_event_min_datetime": "2020-06-06T03:26:36.000Z", "max_stars_repo_stars_event_max_datetime": "2021-11-29T01:27:56.000Z", "max_issues_repo_path": "TFT Tools/fontcompressor.py", "max_issues_repo_name": "MarekRyn/ILI9341-Toolkit", "max_issues_repo_head_hexsha": "0d494db158d8cc1a328ed97fc5c4f7e5f11a74e0", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "TFT Tools/fontcompressor.py", "max_forks_repo_name": "MarekRyn/ILI9341-Toolkit", "max_forks_repo_head_hexsha": "0d494db158d8cc1a328ed97fc5c4f7e5f11a74e0", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 32.1882352941, "max_line_length": 105, "alphanum_fraction": 0.4360380117, "include": true, "reason": "import numpy", "num_tokens": 1395}
# -*- coding: utf-8 -*- import logging import numpy as np from mit_d3m import load_dataset from mlblocks import MLPipeline from sklearn.model_selection import KFold, StratifiedKFold LOGGER = logging.getLogger(__name__) def get_split(X, y, indexes): if hasattr(X, 'iloc'): X = X.iloc[indexes] else: X = X[indexes] if y is not None: if hasattr(y, 'iloc'): y = y.iloc[indexes] else: y = y[indexes] return X, y def pipeline_score(pipeline_dict, X, y, scorer, context=None, n_splits=5, cv=None, random_state=0): context = context or dict() LOGGER.debug('CV Scoring pipeline %s') cv_scores = list() if not cv: metadata = pipeline_dict.get('metadata', pipeline_dict.get('loader', dict())) if metadata.get('task_type') == 'classification': cv = StratifiedKFold(n_splits=n_splits, shuffle=True, random_state=random_state) else: cv = KFold(n_splits=n_splits, shuffle=True, random_state=random_state) for fold, (train_index, test_index) in enumerate(cv.split(X, y)): LOGGER.debug('Scoring fold: %s', fold) X_train, y_train = get_split(X, y, train_index) pipeline = MLPipeline.from_dict(pipeline_dict) pipeline.fit(X_train, y_train, **context) X_test, y_test = get_split(X, y, test_index) pred = pipeline.predict(X_test, **context) score = scorer(pred, y_test) cv_scores.append(score) LOGGER.debug('Fold %s score: %s', fold, score) return np.mean(cv_scores), np.std(cv_scores) def pipeline_dataset_score(pipeline_dict, dataset_name, n_splits=5, cv=None, random_state=0): dataset = load_dataset(dataset_name) X = dataset.X y = dataset.y scorer = dataset.scorer context = dataset.context return pipeline_score(pipeline_dict, X, y, scorer, context, n_splits, cv, random_state) def score_pipeline(pipeline_dict, n_splits=5, cv=None, random_state=0): return pipeline_dataset_score( pipeline_dict, pipeline_dict['dataset'], n_splits, cv, random_state )
{"hexsha": "fb08e3143afaf6a85985b4fb3ae008b0d7f1b953", "size": 2167, "ext": "py", "lang": "Python", "max_stars_repo_path": "piex/scoring.py", "max_stars_repo_name": "HDI-Project/PiEx", "max_stars_repo_head_hexsha": "fdc2167fe7b7007c178499a9062c2ff07fe7c31c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 8, "max_stars_repo_stars_event_min_datetime": "2018-11-05T07:06:10.000Z", "max_stars_repo_stars_event_max_datetime": "2019-05-29T15:43:53.000Z", "max_issues_repo_path": "piex/scoring.py", "max_issues_repo_name": "HDI-Project/PiEx", "max_issues_repo_head_hexsha": "fdc2167fe7b7007c178499a9062c2ff07fe7c31c", "max_issues_repo_licenses": ["MIT"], "max_issues_count": 6, "max_issues_repo_issues_event_min_datetime": "2019-02-02T18:10:56.000Z", "max_issues_repo_issues_event_max_datetime": "2019-08-08T17:52:49.000Z", "max_forks_repo_path": "piex/scoring.py", "max_forks_repo_name": "HDI-Project/PiEx", "max_forks_repo_head_hexsha": "fdc2167fe7b7007c178499a9062c2ff07fe7c31c", "max_forks_repo_licenses": ["MIT"], "max_forks_count": 4, "max_forks_repo_forks_event_min_datetime": "2018-11-26T09:48:38.000Z", "max_forks_repo_forks_event_max_datetime": "2020-01-02T13:42:40.000Z", "avg_line_length": 26.7530864198, "max_line_length": 93, "alphanum_fraction": 0.6465159206, "include": true, "reason": "import numpy", "num_tokens": 527}
import os import numpy from numpy import * import math from scipy import integrate, linalg from matplotlib import pyplot from pylab import * def build_freestream_rhs(panels, freestream): """ Builds the right-hand side of the system arising from the freestream contribution. Parameters ---------- panels: 1D array of Panel objects List of panels.MMTBMS4N6 freestream: Freestream object Freestream conditions. Returns ------- b: 1D Numpy array of floats Freestream contribution on each panel and on the Kutta condition. """ b = numpy.empty(panels.size+1,dtype=float) # freestream contribution on each panel for i, panel in enumerate(panels): b[i] = -freestream.u_inf * numpy.cos(freestream.alpha - panel.beta) # freestream contribution on the Kutta condition b[-1] = -freestream.u_inf*( numpy.sin(freestream.alpha-panels[0].beta) +numpy.sin(freestream.alpha-panels[-1].beta) ) print(b) return b
{"hexsha": "5b28fb5f4321469e4b80d82e8268908451643240", "size": 1045, "ext": "py", "lang": "Python", "max_stars_repo_path": "steapy/build_rhs.py", "max_stars_repo_name": "Sparsh-Sharma/SteaPy", "max_stars_repo_head_hexsha": "d6f3bee7eb1385c83f65f345d466ef740db4ed3b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_stars_repo_stars_event_min_datetime": "2017-04-28T13:05:13.000Z", "max_stars_repo_stars_event_max_datetime": "2017-04-28T13:05:13.000Z", "max_issues_repo_path": "steapy/build_rhs.py", "max_issues_repo_name": "Sparsh-Sharma/SteaPy", "max_issues_repo_head_hexsha": "d6f3bee7eb1385c83f65f345d466ef740db4ed3b", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "steapy/build_rhs.py", "max_forks_repo_name": "Sparsh-Sharma/SteaPy", "max_forks_repo_head_hexsha": "d6f3bee7eb1385c83f65f345d466ef740db4ed3b", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 29.0277777778, "max_line_length": 77, "alphanum_fraction": 0.6593301435, "include": true, "reason": "import numpy,from numpy,from scipy", "num_tokens": 266}
#include <boost/compute/container/mapped_view.hpp>
{"hexsha": "7bfde59977bd0d60d0400aa0795532e726896a05", "size": 51, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_compute_container_mapped_view.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_repo_licenses": ["BSL-1.0"], "max_stars_count": 10.0, "max_stars_repo_stars_event_min_datetime": "2018-03-17T00:58:42.000Z", "max_stars_repo_stars_event_max_datetime": "2021-07-06T02:48:49.000Z", "max_issues_repo_path": "src/boost_compute_container_mapped_view.hpp", "max_issues_repo_name": "miathedev/BoostForArduino", "max_issues_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_issues_repo_licenses": ["BSL-1.0"], "max_issues_count": 2.0, "max_issues_repo_issues_event_min_datetime": "2021-03-26T15:17:35.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-20T23:55:08.000Z", "max_forks_repo_path": "src/boost_compute_container_mapped_view.hpp", "max_forks_repo_name": "miathedev/BoostForArduino", "max_forks_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_forks_repo_licenses": ["BSL-1.0"], "max_forks_count": 4.0, "max_forks_repo_forks_event_min_datetime": "2019-05-28T21:06:37.000Z", "max_forks_repo_forks_event_max_datetime": "2021-07-06T03:06:52.000Z", "avg_line_length": 25.5, "max_line_length": 50, "alphanum_fraction": 0.8235294118, "num_tokens": 11}
// ----------------------------------------------------------------------------- // Fern © Geoneric // // This file is part of Geoneric Fern which is available under the terms of // the GNU General Public License (GPL), version 2. If you do not want to // be bound by the terms of the GPL, you may purchase a proprietary license // from Geoneric (http://www.geoneric.eu/contact). // ----------------------------------------------------------------------------- #define BOOST_TEST_MODULE fern io netcdf coards read #include <boost/test/unit_test.hpp> #include "fern/core/data_customization_point/scalar.h" #include "fern/algorithm/policy/dont_mark_no_data.h" #include "fern/io/netcdf/coards/read.h" namespace fa = fern::algorithm; namespace fi = fern::io; namespace fin = fern::io::netcdf; BOOST_AUTO_TEST_CASE(file_does_no_exist) { bool exception_thrown{false}; try { fa::DontMarkNoData output_no_data_policy; fern::DataName data_name{"does_not_exist.nc:/age"}; double age; fin::read_coards(output_no_data_policy, data_name, age); } catch(fern::IOError const& exception) { std::string message = exception.message(); BOOST_CHECK_EQUAL(message, "I/O error handling does_not_exist.nc: " "Does not exist"); exception_thrown = true; } BOOST_CHECK(exception_thrown); } BOOST_AUTO_TEST_CASE(is_not_readable) { bool exception_thrown{false}; try { fa::DontMarkNoData output_no_data_policy; fern::DataName data_name{"unreadable.nc:/age"}; BOOST_CHECK(fi::file_exists("unreadable.nc")); double age; fin::read_coards(output_no_data_policy, data_name, age); } catch(fern::IOError const& exception) { std::string message = exception.message(); BOOST_CHECK_EQUAL(message, "I/O error handling unreadable.nc: " "Cannot be read"); exception_thrown = true; } BOOST_CHECK(exception_thrown); } BOOST_AUTO_TEST_CASE(invalid_netcdf) { bool exception_thrown{false}; try { fa::DontMarkNoData output_no_data_policy; fern::DataName data_name{"invalid_netcdf.nc:/age"}; BOOST_CHECK(fi::file_exists("invalid_netcdf.nc")); double age; fin::read_coards(output_no_data_policy, data_name, age); } catch(fern::IOError const& exception) { std::string message = exception.message(); BOOST_CHECK_EQUAL(message, "I/O error handling invalid_netcdf.nc: " "Cannot be read"); exception_thrown = true; } BOOST_CHECK(exception_thrown); } BOOST_AUTO_TEST_CASE(invalid_netcdf_coards) { bool exception_thrown{false}; try { fa::DontMarkNoData output_no_data_policy; fern::DataName data_name{"invalid_netcdf_coards.nc:/age"}; BOOST_CHECK(fi::file_exists("invalid_netcdf_coards.nc")); double age; fin::read_coards(output_no_data_policy, data_name, age); } catch(fern::IOError const& exception) { std::string message = exception.message(); BOOST_CHECK_EQUAL(message, "I/O error handling invalid_netcdf_coards.nc: " "Does not conform to convention: COARDS"); exception_thrown = true; } BOOST_CHECK(exception_thrown); } BOOST_AUTO_TEST_CASE(scalar) { fa::DontMarkNoData output_no_data_policy; fern::DataName data_name{"earth.nc:/age"}; std::string pathname{data_name.database_pathname().native_string()}; BOOST_REQUIRE(fi::file_exists(pathname)); double age; fin::read_coards(output_no_data_policy, data_name, age); BOOST_CHECK_CLOSE(age, 4.54e9, 7); }
{"hexsha": "f556055f0ee6e6c32589f6235d54b9d947b7939b", "size": 3723, "ext": "cc", "lang": "C++", "max_stars_repo_path": "pcraster/pcraster-4.2.0/pcraster-4.2.0/source/fern/source/fern/io/netcdf/coards/test/read_test.cc", "max_stars_repo_name": "quanpands/wflow", "max_stars_repo_head_hexsha": "b454a55e4a63556eaac3fbabd97f8a0b80901e5a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "pcraster/pcraster-4.2.0/pcraster-4.2.0/source/fern/source/fern/io/netcdf/coards/test/read_test.cc", "max_issues_repo_name": "quanpands/wflow", "max_issues_repo_head_hexsha": "b454a55e4a63556eaac3fbabd97f8a0b80901e5a", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "pcraster/pcraster-4.2.0/pcraster-4.2.0/source/fern/source/fern/io/netcdf/coards/test/read_test.cc", "max_forks_repo_name": "quanpands/wflow", "max_forks_repo_head_hexsha": "b454a55e4a63556eaac3fbabd97f8a0b80901e5a", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 29.784, "max_line_length": 80, "alphanum_fraction": 0.6411496105, "num_tokens": 847}
\title{SCOREC Fall 2015 URP Projects} \author{ Dan Zaide, Brian Granzow, Dan Ibanez, and Cameron Smith \\ } \date{\today} \documentclass[12pt]{article} \usepackage{hyperref} \usepackage{graphicx} \begin{document} \maketitle Let's begin with a little bit about meshes. We can look at the world around us. Everything is made up of building blocks, from atoms and upward. If we were to look at their shapes, we have similar building blocks. We have points, curves, and surfaces, and volumes. We can simplify it even more. We can represent curves by straight lines, surfaces by triangles and quadrilaterals, volumes by tetrahedra and prisms. This representation is our mesh, as illustrated for a guitar in Figure \ref{fig:guitar} \begin{figure} \includegraphics[width=1.0\textwidth]{images/guitarCAD.png}\\\includegraphics[width=1.0\textwidth]{images/guitarMESH.png} \caption{Geometry (top) and Mesh (bottom) of a guitar.} \label{fig:guitar} \end{figure} While our application is for the simulation of physical phenomena, meshes are also commonly used for graphics applications, for example, to represent the geometry of objects in video games (resolution is loosely like number of triangles). For more info, a video (in French) by a former post-doc is up here \url{https://www.rocq.inria.fr/gamma/Frederic.Alauzet/} \section{Curved Meshes} Consider the geometry and initial mesh in Figure \ref{fig:initcurv}. \begin{figure} \includegraphics[width=0.5\textwidth]{images/curvedgeom.png} \includegraphics[width=0.5\textwidth]{images/curved1.png} \caption{Geometry (left) and initial triangulation (right).} \label{fig:initcurv} \end{figure} We can improve our approximation of the geometry in two ways. We can use the conventional approach, and increase the number of triangles. We can also use curved triangles, representing the triangle by a spline or approximate surface, as in Figure \ref{fig:endcurv}. \begin{figure} \includegraphics[width=0.5\textwidth]{images/uniform2.png} \includegraphics[width=0.5\textwidth]{images/curved3.png} \label{fig:endcurv} \caption{Improving by the approximation of the geometry with more triangles (left) and curved triangles (right).} \end{figure} This can reduce the number of triangles used to represent the geometry while improving the geometric approximation, reducing simulation time and improving solution accuracy. Unlike their linear counterparts, guaranteeing validity (no self intersections) is a challenge, and determining validity itself is a non-trivial process. As such, we have several ideas for quality checking and verification and understanding curved elements. This project is simple coding and a fair amount of math (splines, curved surfaces, etc) and is a mix of software, algorithms, and geometry. The goal would be to understand these methods and find the best method(s) for analyzing curved meshes. This could also lead to looking at using these estimates to improve mesh quality, and other aspects of curved meshing. \section{Automatic Differentiation} As part of moving the vector/matrix math into its own component, and supporting work that Brian and I are doing (separate things), we would like to develop our own automatic differentiation system and integrate that with apf::Vector, apf::Matrix and so on. It could also be used to make it easier to add shape functions to APF. Brian would like to be the “mentor” for this student, this project is a good mix of math and C++ experience. \url{https://github.com/bgranzow/diff} \section{ParaView VTK} This project involves augmenting the capabilities of our visualization file output code. We would like to switch from decimal number representations to binary-exact representations. We would also like to use compression algorithms on the data to reduce disk usage and improve write speeds. Finally, we would like to use a directory hierarchy to try to improve write speeds in parallel. \url{http://www.paraview.org/} \url{http://www.vtk.org/wp-content/uploads/2015/04/file-formats.pdf} \url{https://github.com/SCOREC/core/blob/master/apf/apfVtk.cc} \section{Parameter Studies} We are developing a new mesh adaptation code, which uses local operations to modify a mesh until the edges are the desired length and the elements (triangles for example) are the desired shape. These operations rely on some parameters like what the minimum acceptable quality is and so on. We would like to study the variation of both output quality and program runtime on those parameters, and in particular identify reasons why certain parameters make the program faster and/or more effective. \url{https://github.com/ibaned/august} \section{Porting Python to Modelica} We are working with architecture (CASE, the center for architecture science and ecology) to model dynamic building facades (smart windows). We are currently modeling one of their systems using an in house python code. This will be converted into component in Modelica, a popular tool for analysis of energy/building systems. This project involves interfacing our model with Modelica, or possibly working on a GUI or other tools to allow Architecture researchers/developers to use our models. \section{Performance Profiling} Define and implement convenient, low-overhead, portable mechanisms to measure and compute statistics of run time, memory consumption, and communication data. Performance data will be collected with identifying meta-data such that human- and machine- readable output can be produced. Development will require writing, debugging, and testing C/C++ data structures with functional interfaces (API). For example, PETSc, a popular mathematical toolkit in scientific computing, has very rich embedded profiling support. See the user API: \\ \url{http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Profiling/} \\ and Section 3.3 of the developers manual \\ \url{http://www.mcs.anl.gov/petsc/developers/developers.pdf} \\ for details on their system. \section{GPU Graph Operations} The Department of Energy is increasingly building machines that have most of their computing power available in GPUs (link to Titan or something). This project involves working on a GPU-capable version of a mesh adapt code. The special thing about this software is it is doing graph operations on the GPU, which traditionally is not a good fit but we think we have good algorithms for it. The project specifically involves developing the CUDA portion of a general-purpose shared memory parallelism system and doing performance tests on various GPUs, plus performance optimization as necessary. \url{https://github.com/ibaned/flounder} \url{https://www.youtube.com/watch?v=vYA0f6R5KAI} \end{document} This is never printed
{"hexsha": "ae1d747ebd9224be124d267dcbebdf722e2a82c0", "size": 6718, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "projectsF15.tex", "max_stars_repo_name": "SCOREC/urp", "max_stars_repo_head_hexsha": "53a8a8469e46597b19448603ae6399d86cdcfa39", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": 1, "max_stars_repo_stars_event_min_datetime": "2020-10-10T11:51:23.000Z", "max_stars_repo_stars_event_max_datetime": "2020-10-10T11:51:23.000Z", "max_issues_repo_path": "projectsF15.tex", "max_issues_repo_name": "SCOREC/urp", "max_issues_repo_head_hexsha": "53a8a8469e46597b19448603ae6399d86cdcfa39", "max_issues_repo_licenses": ["BSD-3-Clause"], "max_issues_count": 1, "max_issues_repo_issues_event_min_datetime": "2015-09-04T01:57:05.000Z", "max_issues_repo_issues_event_max_datetime": "2015-09-04T02:00:18.000Z", "max_forks_repo_path": "projectsF15.tex", "max_forks_repo_name": "SCOREC/urp", "max_forks_repo_head_hexsha": "53a8a8469e46597b19448603ae6399d86cdcfa39", "max_forks_repo_licenses": ["BSD-3-Clause"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 49.3970588235, "max_line_length": 121, "alphanum_fraction": 0.798600774, "num_tokens": 1572}
\section{Definitions, Families of Curves} \subsection{Definitions} \begin{definition}[Order] Order of a DE is the highest-ordered derivative appearing in it. So \begin{equation} \frac{d^2y}{dx^2}+2b(\frac{dy}{dx})^3+y=0 \end{equation} is a 2nd order DE. In general, \begin{equation} F(x,y,y',y'',\ldots,y^{(n)})=0. \end{equation} is an $n$-th order DE. Under restrictions on $F$, can find a solution in terms of the other $n+1$ variables \begin{equation} y^{(n)}=f(x,y,y',\ldots,y^{(n-1)}).\label{DESoln} \end{equation} \end{definition} \begin{definition}[Solution] A function $\phi$ on interval $x\in (a,b)$ is a solution to the DE (\ref{DESoln}) if the $n$ derivatives exist on $x\in(a,b)$ and $\phi^{(n)}(x)=f(x,\phi(x),\ldots,\phi^{(n-1)}(x))$. \end{definition} \begin{definition}[First order DE] A first order DE is of the form \begin{equation} \frac{dy}{dx}=f(x,y) \end{equation} with solution of the form $y=f(x)$. Can be rewritten for convenience in the form \begin{equation} M(x,y)dx+N(x,y)dy=0 \end{equation} \end{definition} \begin{definition}[Linear ODE] An ODE of order $n$ is linear if it can be written in the form \begin{equation} b_0(x)\frac{d^ny}{dx^n}+b_1(x)\frac{d^{n-1}y}{dx^{n-1}}+\cdots+b_{n-1}(x)\frac{dy}{dx}+b_{n}(x)y=R(x) \end{equation} \end{definition} \begin{definition}[Partial DE] Is of the form, for example \begin{equation} b_0(x,y)\frac{\pr w}{\pr x}+b_x(x,y)\frac{\pr w}{\pr y}=R(x,y) \end{equation} \end{definition} \subsection{Families of Solutions} Solutions to the DE \begin{equation} \frac{dy}{dx}=f(x,y)\Leftrightarrow y=\int f(x)dx+c \end{equation} exist as one-parameter families with parameter $c$. \subsection{Isoclines} Let there be the DE \begin{equation} \frac{dy}{dx}=y \end{equation} Isoclines are lines $f(x,y)=y=c$. Example: \begin{figure}[H] \centering \includegraphics[scale=0.75]{figures/Screen Shot 2021-09-27 at 3.25.57 PM.png} \caption{Isoclines of $\frac{dy}{dx}=y$} \end{figure} \subsection{Existence Theorem} Consider equation \begin{equation} \frac{dy}{dx}=f(x,y) \end{equation} Further, let $T$ denote the rectangle defined by \begin{eqnarray} |x-x_0|\leq a\\ |y-y_0|\leq b \end{eqnarray} with the point $(x_0,y_0)$ as the center. Also let $f,\frac{\pr f}{\pr y}$ be continuous functions of $x,y$ in $T$. With these conditions an interval exists for $x_0$ where $|x-x_0|\leq h$, and function $y(x)$ which has properties \begin{enumerate} \item $y=y(x)$ is a sol'n of the DE on interval $|x-x_0|\leq h$ \item On this interval, $|y(x)-y_0|\leq b$ \item $y=y(x_0)=y_0$ at $x=x_0$ \item $y(x)$ is unique on interval $|x-x_0|\leq h$ where it is the only function with above 3 properties \end{enumerate}
{"hexsha": "3182a009152181a5e794461eea97c08aefc7d6ba", "size": 2887, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "differential-equations/tex/unit-1.tex", "max_stars_repo_name": "sidnb13/latex-notes", "max_stars_repo_head_hexsha": "bbd935b7ff9781169775c052625b1917a47d5dcc", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "differential-equations/tex/unit-1.tex", "max_issues_repo_name": "sidnb13/latex-notes", "max_issues_repo_head_hexsha": "bbd935b7ff9781169775c052625b1917a47d5dcc", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "differential-equations/tex/unit-1.tex", "max_forks_repo_name": "sidnb13/latex-notes", "max_forks_repo_head_hexsha": "bbd935b7ff9781169775c052625b1917a47d5dcc", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 28.5841584158, "max_line_length": 109, "alphanum_fraction": 0.640457222, "num_tokens": 1035}
#!/usr/bin/python """ """ import numpy as np import time import h5py import sys import os from larch import Group def read_xrd_hdf5(fname, verbose=False, _larch=None): # Reads a HDF5 file created for XRD mapping h5file = h5py.File(fname, 'r') addr = 'entry/data/data' for section in ('entry/data/data_000001', 'entry/instrument/detector/data'): if section in h5file: addr = section break xrd_data = h5file[addr][()] ## Forces data into 3D shape shape = xrd_data.shape ## (no_images,pixels_x,pixels_y) if len(shape) == 2: print('Reshaping to (%i, %i, %i)' % (1, shape[0], shape[1])) xrd_data.shape = (1, shape[0], shape[1]) return xrd_data def test_read(fname): print( fname, os.stat(fname)) fd = read_xrd_hdf5(fname, verbose=True) print(fd.counts.shape)
{"hexsha": "d4a3368a56c34b95224bea0e93f142e19c0d9d15", "size": 877, "ext": "py", "lang": "Python", "max_stars_repo_path": "larch/io/xrd_hdf5.py", "max_stars_repo_name": "kbuc/xraylarch", "max_stars_repo_head_hexsha": "3abb0d6bdc65cf2747a03dd114d98df317c0ac9f", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_count": 90, "max_stars_repo_stars_event_min_datetime": "2015-01-10T21:57:25.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-29T15:21:52.000Z", "max_issues_repo_path": "larch/io/xrd_hdf5.py", "max_issues_repo_name": "maurov/xraylarch", "max_issues_repo_head_hexsha": "b76f2ce29b6d183f69a7586ea8daccbe0a89ace3", "max_issues_repo_licenses": ["BSD-2-Clause"], "max_issues_count": 225, "max_issues_repo_issues_event_min_datetime": "2015-01-09T19:08:47.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-31T15:55:54.000Z", "max_forks_repo_path": "larch/io/xrd_hdf5.py", "max_forks_repo_name": "maurov/xraylarch", "max_forks_repo_head_hexsha": "b76f2ce29b6d183f69a7586ea8daccbe0a89ace3", "max_forks_repo_licenses": ["BSD-2-Clause"], "max_forks_count": 51, "max_forks_repo_forks_event_min_datetime": "2015-03-13T10:03:28.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-17T07:54:38.000Z", "avg_line_length": 24.3611111111, "max_line_length": 68, "alphanum_fraction": 0.6180159635, "include": true, "reason": "import numpy", "num_tokens": 258}
function test_pull1412 % MEM 2gb % WALLTIME 00:10:00 % DEPENDENCY ft_heartrate cd(dccnpath('/home/common/matlab/fieldtrip/data/test/pull1412')); %% % this corresponds to the preprocessed dataset 006_3013065.02_rest1 from bug3433 load datappg cfg = []; cfg.channel = 'HR'; cfg.threshold = 0.7; cfg.method = 'findpeaks'; % cfg.method = 'pantompkin'; this does not work very well on the PPG data heartrate0 = ft_heartrate(cfg, data); figure plot(heartrate0.time{1}, heartrate0.trial{1}(1,:), '-'); %% % this corresponds to the ECG channel from ArtifactMEG.ds as documented on % http://www.fieldtriptoolbox.org/example/use_independent_component_analysis_ica_to_remove_ecg_artifacts/ load dataecg cfg = []; cfg.channel = 'ECG'; cfg.threshold = 1.2; cfg.method = 'findpeaks'; cfg.flipsignal = 'no'; heartrate1 = ft_heartrate(cfg, data); cfg = []; cfg.channel = 'ECG'; cfg.method = 'pantompkin'; heartrate2 = ft_heartrate(cfg, data); figure plot(heartrate1.time{1}, heartrate1.trial{1}(1,:), 'b-'); hold on plot(heartrate2.time{1}, heartrate2.trial{1}(1,:), 'rx'); legend({'findpeaks', 'pantompkin'});
{"author": "fieldtrip", "repo": "fieldtrip", "sha": "c2039be598a02d86b39aae76bfa7aaa720f9801c", "save_path": "github-repos/MATLAB/fieldtrip-fieldtrip", "path": "github-repos/MATLAB/fieldtrip-fieldtrip/fieldtrip-c2039be598a02d86b39aae76bfa7aaa720f9801c/test/test_pull1412.m"}
''' Created on 2020. 4. 16. @author: Inwoo Chung (gutomitai@gmail.com) ''' import numpy as np import pandas as pd import os from abc import ABC, abstractmethod import time import json import platform from tqdm import tqdm from tensorflow.keras.models import Model, load_model from tensorflow.keras.layers import Input, Dense, Lambda import tensorflow.keras.backend as K from tensorflow.keras import optimizers from tensorflow.keras.utils import CustomObjectScope #os.environ["CUDA_DEVICE_ORDER"] = 'PCI_BUS_ID' #os.environ["CUDA_VISIBLE_DEVICES"] = '0' # Constants. DEBUG = True def create_scaling_func(a, b): return lambda x: (b - a) * x + a def policy_loss(y_true, y_pred): return y_pred class Critic(ABC): """Abstract critic class.""" @abstractmethod def __init__(self, hps, resource_path, model_loading, *args, **keywords): pass @abstractmethod def train(self, state, action, td_target): pass @abstractmethod def predict_action_value(self, state, action): pass class Actor(ABC): """Abstract actor class.""" @abstractmethod def __init__(self, hps, resource_path, model_loading, *args, **keywords): pass @abstractmethod def train(self, state, action, td_error): pass @abstractmethod def act(self, state): pass class RLModel(ABC): """Abstract reinforcement learning model.""" @abstractmethod def __init__(self, config_path, resource_path, model_loading, *args, **keywords): pass @abstractmethod def learn(self, *args, **keywords): pass @abstractmethod def act(self, *args, **keywords): pass class Learner(): """Abstract learner.""" pass class Trainer(): """Abstract trainer.""" pass class StyleBasedGANTrainer(Trainer): """Style based GAN optimization via RL.""" class OptCritic(Critic): """Critic.""" # Constants. MODEL_PATH = 'opt_critic.h5' def __init__(self, resource_path, conf): """ Parameters ---------- resource_path: String. Resource path. conf: Dictionary. Configuration. """ # Initialize. self.resource_path = resource_path self.conf = conf self.hps = conf['hps'] self.nn_arch = conf['nn_arch'] self.model_loading = conf['model_loading'] if self.model_loading: self.model = load_model(os.path.join(self.MODEL_PATH)) # Check exception. else: # Design action value function. # Input. input_a = Input(shape=(self.nn_arch['action_dim'],), name='input_a') # Get action value. x = input_a for i in range(self.nn_arch['num_layers']): x = Dense(self.nn_arch['dense_layer_dim'], activation='relu', name='dense' + str(i + 1))(x) action_value = Dense(1, activation='linear', name='action_value_dense')(x) self.model = Model(inputs=[input_a], outputs = [action_value], name='opt_critic') opt = optimizers.Adam(lr=self.hps['lr'] , beta_1=self.hps['beta_1'] , beta_2=self.hps['beta_2'] , decay=self.hps['decay']) self.model.compile(optimizer=opt, loss='mse') #self.model.summary() def train(self, s, a, td_target): # learning rate? """Train critic. Parameters ---------- a: 2D numpy array. Action, a. td_target : 2D numpy array. TD target array, batch size (value)? """ # Train model online. if self.conf['multi_gpu']: self.parallel_model.train_on_batch([a] , [td_target]) else: self.model.train_on_batch([a] , [td_target]) # Save the model. self.model.save(os.path.join(self.MODEL_PATH)) def predict_action_value(self, s, a): """Predict action value. Parameters ---------- a: 2D numpy array. Action, a. Returns ------- Action value. 2D numpy array. """ # Predict action value. action_value = self.model.predict([a]) return action_value class OptActor(Actor): """Actor.""" # Constants. MODEL_PATH = 'opt_actor.h5' def __init__(self, resource_path, conf): """ Parameters ---------- resource_path: String. Raw data path. conf: Dictionary. Configuration. """ # Initialize. self.resource_path = resource_path self.conf = conf self.hps = conf['hps'] self.nn_arch = conf['nn_arch'] self.model_loading = conf['model_loading'] if self.model_loading: with CustomObjectScope({'policy_loss': policy_loss}): self.model = load_model(os.path.join(self.MODEL_PATH)) # Check exception. else: # Design actor. # Input. input_s = Input(shape=(self.nn_arch['state_dim'], ), name='input_s') # Get action. x = input_s for i in range(self.nn_arch['num_layers']): x = Dense(self.nn_arch['dense_layer_dim'], activation='relu', name='dense' + str(i + 1))(x) action = Dense(self.nn_arch['action_dim'], activation='tanh', name='action_value_dense')(x) input_td_error = Input(shape=(1,)) action = Lambda(lambda x: K.log(x))(action) #? action = Lambda(lambda x: -1.0 * x[0] * x[1])([input_td_error, action]) self.model = Model(inputs=[input_s, input_td_error], outputs = [action]) opt = optimizers.Adam(lr=self.hps['lr'] , beta_1=self.hps['beta_1'] , beta_2=self.hps['beta_2'] , decay=self.hps['decay']) self.model.compile(optimizer='adam', loss=policy_loss) #self.model.summary() self._make_action_model() def _make_action_model(self): """Make action model.""" input_s = Input(shape=(self.nn_arch['state_dim'], ), name='input_s') # Get action. x = input_s for i in range(self.nn_arch['num_layers']): x = self.model.get_layer('dense' + str(i + 1))(x) action = self.model.get_layer('action_value_dense')(x) self.action_model = Model(inputs=[input_s], outputs=[action]) def train(self, s, a, td_error): """Train actor. Parameters ---------- s: 2D numpy array. State, s. a: 2D numpy array. Action, a. td_errors: 2D numpy array. TD error value. """ # Train. if self.conf['multi_gpu']: self.parallel_model.train_on_batch([s, td_error] # td_error dimension? , [a]) else: self.model.train_on_batch([s, td_error] # td_error dimension? , [a]) # Save the model. self.model.save(os.path.join(self.MODEL_PATH)) def act(self, s): # Both same function? """Get hyper-parameters and neural network architecture information. Parameters ---------- s: 2D numpy array. State, s. Returns ------ 2D numpy array. Bound model configuration. """ return self.action_model.predict(s) #? def __init__(self, config_path): """ Parameters ---------- config_path: String. Configuration file path. """ # Initialize. np.random.seed(int(time.time())) # Load configuration. with open(os.path.join(config_path), 'r') as f: self.conf = json.load(f) self.resource_path = self.conf['resource_path'] self.hps = self.conf['hps'] self.nn_arch = self.conf['nn_arch'] self.critic_conf = self.conf['critic_conf'] self.actor_conf = self.conf['actor_conf'] # Instantiate critic, actor. self.critic = self.OptCritic(self.resource_path, self.critic_conf) self.actor= self.OptActor(self.resource_path, self.actor_conf) # Initial state and action. self.state = np.random.normal(size = (self.hps['batch_size'], self.nn_arch['state_dim'])) # Optimal initializer. ? self.action = self.actor.act(self.state) def learn(self, feedback): """Learn.""" # Train critic and actor for reward and state. # Get rewards, states. state_p = feedback['state'] reward = feedback['reward'] # Sample next actions. action_p = self.actor.act(state_p) # Train. Dimension? td_target = reward + self.hps['gamma'] * self.critic.predict_action_value(state_p, action_p) td_error = td_target - self.critic.predict_action_value(self.state, self.action) self.critic.train(self.state, self.action, td_target) #? self.actor.train(self.state, self.action, td_error) #? self.state = state_p self.action = action_p def act(self, s): # Both same function? """Get a weight value. Parameters ---------- s: 2D numpy array. State, s. Returns ------ Float32. A weight value. """ return np.mean(self.actor.act(s), axis=0) def optimize(self, f_conf): """Optimize the style based GAN model via RL.""" rs_mean = 1. for i in tqdm(range(self.hps['steps'])): # Convert normalized hyper-parameters and NN architecture information to original values. action = (self.action + 1.0) * 0.5 # -1.0 ~ 1.0 -> 0.0 ~ 1.0. rs = [] # Create scaling functions for each parameter. s_funcs = [] s_funcs.append(create_scaling_func(2.0, 8.0)) # batch_size. s_funcs.append(create_scaling_func(100.0, 1000.0)) # lambda. s_funcs.append(create_scaling_func(1e-1, 1e-7)) # disc_ext_hps: lr. s_funcs.append(create_scaling_func(0.0, 1.0)) # disc_ext_hps: beta_1. s_funcs.append(create_scaling_func(0.0, 1.0)) # disc_ext_hps: beta_2. s_funcs.append(create_scaling_func(0.0, 1.0)) # disc_ext_hps: decay. s_funcs.append(create_scaling_func(1e-1, 1e-7)) # gen_disc_hps: lr. s_funcs.append(create_scaling_func(0.0, 1.0)) # gen_disc_hps: beta_1. s_funcs.append(create_scaling_func(0.0, 1.0)) # gen_disc_hps: beta_2. s_funcs.append(create_scaling_func(0.0, 1.0)) # gen_disc_hps: decay. for j in range(self.hps['batch_size']): # hps. f_conf['hps']['batch_size'] = int(s_funcs[0](action[j][0])) * inpainting.NUM_PUNCHED_IMAGES_PER_IMAGE f_conf['hps']['lambda'] = s_funcs[1](action[j][1]) # disc_ext_hps. f_conf['disc_ext_hps']['lr'] = s_funcs[2](action[j][2]) f_conf['disc_ext_hps']['beta_1'] = s_funcs[3](action[j][3]) f_conf['disc_ext_hps']['beta_2'] = s_funcs[4](action[j][4]) f_conf['disc_ext_hps']['decay'] = s_funcs[5](action[j][5]) # disc_ext_hps. f_conf['gen_disc_hps']['lr'] = s_funcs[6](action[j][6]) f_conf['gen_disc_hps']['beta_1'] = s_funcs[7](action[j][7]) f_conf['gen_disc_hps']['beta_2'] = s_funcs[8](action[j][8]) f_conf['gen_disc_hps']['decay'] = s_funcs[9](action[j][9]) # Train. cf = COVID19Forecastor(f_conf) ts = time.time() cf.train() te = time.time() #print('Elapsed time: {0:f}s'.format(te-ts)) # Calculate reward. r = -1.0 * cf.evaluate() # Check exception. if np.isnan(r): continue rs.append(r) rs = np.asarray(rs) # Check exception. if len(rs) == 0: self.state = np.random.normal(size =(self.hps['batch_size'], self.nn_arch['state_dim'])) # Optimal initializer. ? self.action = self.actor.act(self.state) continue if rs < rs_mean: print('Save the model.') cf.model.save(os.path.join(self.resource_path, cf.MODEL_FILE_NAME)) rs = rs.mean() print(f_conf, rs.mean()) self.state = np.random.normal(size =(self.hps['batch_size'], self.nn_arch['state_dim'])) # Optimal initializer. ? feedback = {'state': self.state, 'reward': rs} self.learn(feedback) self.action = self.actor.act(self.state) def main(): # Optimize the style based GAN model via RL. # Create the optimization RL entity. config_path = 'style_based_gan_opt_via_rl_conf.json' style_GAN_opt = StyleBasedGANTrainer(config_path) with open("style_based_gan_conf.json", 'r') as f: f_conf = json.load(f) style_GAN_opt.optimize(f_conf) if __name__ == '__main__': main()
{"hexsha": "41c19d040de711b5638b43ad37330fdcf1ed58d6", "size": 15504, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/style_based_gan/style_based_gan_trainer.py", "max_stars_repo_name": "tonandr/keras_unsupervised", "max_stars_repo_head_hexsha": "fd2a2494bca2eb745027178e220b42b5e5882f94", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": 4, "max_stars_repo_stars_event_min_datetime": "2019-07-28T11:56:01.000Z", "max_stars_repo_stars_event_max_datetime": "2021-11-06T02:50:58.000Z", "max_issues_repo_path": "examples/style_based_gan/style_based_gan_trainer.py", "max_issues_repo_name": "tonandr/keras_unsupervised", "max_issues_repo_head_hexsha": "fd2a2494bca2eb745027178e220b42b5e5882f94", "max_issues_repo_licenses": ["BSD-3-Clause"], "max_issues_count": 2, "max_issues_repo_issues_event_min_datetime": "2021-06-30T01:00:07.000Z", "max_issues_repo_issues_event_max_datetime": "2021-07-21T08:04:40.000Z", "max_forks_repo_path": "examples/style_based_gan/style_based_gan_trainer.py", "max_forks_repo_name": "tonandr/keras_unsupervised", "max_forks_repo_head_hexsha": "fd2a2494bca2eb745027178e220b42b5e5882f94", "max_forks_repo_licenses": ["BSD-3-Clause"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 35.5596330275, "max_line_length": 130, "alphanum_fraction": 0.4807791538, "include": true, "reason": "import numpy", "num_tokens": 3252}
import networkx as nx from networkx.drawing.nx_agraph import graphviz_layout import pandas as pd from ..utils import dict_to_repr class PSSTNetwork(object): def __init__(self, case, prog='sfdp'): self._case = case self.regenerate_network() self.recalculate_positions(prog=prog) @property def swing_bus(self): case = self._case swing_bus = case.bus[case.bus['TYPE'] == 3].index[0] return swing_bus @property def positions(self): return self._pos @positions.setter def positions(self, pos): self._pos = pos @property def graph(self): return self._G @graph.setter def graph(self, G): self._G = G def create_profile_graph(self, y_values): self.regenerate_network(load_names=False, gen_names=False) swing_bus = self.swing_bus bus_distance_matrix_df = pd.DataFrame(nx.shortest_path_length(self.graph)) pos = dict() for k, v in bus_distance_matrix_df.loc[swing_bus].sort_values().to_dict().items(): pos[k] = (v, y_values[k]) self.positions = pos def __repr__(self): d = { 'nodes': len(self._G.nodes()), 'edges': len(self._G.edges()) } repr_string = dict_to_repr(d) return '<{}.{}({})>'.format( self.__class__.__module__, self.__class__.__name__, repr_string ) def regenerate_network(self, gen_names=None, load_names=None, branch_names=None, bus_names=None): case = self._case if bus_names is None or bus_names is True: bus_names = case.bus_name else: bus_names = list() if gen_names is None or gen_names is True: gen_names = case.gen_name elif gen_names is False: gen_names = list() if branch_names is None or branch_names is True: branch_names = case.branch_name elif branch_names is False: branch_names = list() if load_names is None or load_names is True: load_names = case.load.columns elif load_names is False: load_names = list() G = nx.Graph() for bus_name in bus_names: bus = case.bus.loc[bus_name].to_dict() bus['kind'] = 'bus' G.add_node(bus_name, attr_dict=bus) for gen_name in gen_names: gen = case.gen.loc[gen_name].to_dict() gen['kind'] = 'gen' G.add_node(gen_name, attr_dict=gen) bus_name = gen['GEN_BUS'] connection = {'kind': 'gen_to_bus'} G.add_edge(gen_name, bus_name, attr_dict=connection) for branch_name in branch_names: branch = case.branch.loc[branch_name].to_dict() branch['kind'] = 'branch' G.add_edge(branch['F_BUS'], branch['T_BUS'], attr_dict=branch) for load_name in load_names: G.add_node('Load_' + load_name) G.add_edge('Load_' + load_name, load_name, attr_dict={'kind': 'load_to_bus'}) self._G = G self.recalculate_positions() def recalculate_positions(self, prog='sfdp', *args, **kwargs): try: self.positions = graphviz_layout(self._G, prog=prog, *args, **kwargs) except ImportError: import warnings warnings.warn("Unable to use graphviz, please install pygraphviz. Using networkx spring layout by default") self.positions = nx.spring_layout(self._G, *args, **kwargs) return self.positions def draw_buses(self, **kwargs): nodelist = kwargs.pop('nodelist', list(self._case.bus.index)) return self._draw_nodes(nodelist, **kwargs) def draw_generators(self, **kwargs): nodelist = kwargs.pop('nodelist', list(self._case.gen.index)) return self._draw_nodes(nodelist, **kwargs) def draw_loads(self, **kwargs): nodelist = kwargs.pop('nodelist', ['Load_{}'.format(b) for b in self._case.load.columns]) return self._draw_nodes(nodelist, **kwargs) def draw_branches(self, **kwargs): edgelist = kwargs.pop('edgelist', [(f, t) for f, t, e in self._G.edges(data=True) if 'kind' in e and e['kind'] == 'branch']) return self._draw_edges(edgelist, **kwargs) def draw_connections(self, connection_kind, **kwargs): edgelist = kwargs.pop('edgelist', [(f, t) for f, t, e in self._G.edges(data=True) if 'kind' in e and e['kind'] == connection_kind]) return self._draw_edges(edgelist, **kwargs) def _draw_nodes(self, nodelist, **kwargs): node_color = kwargs.get('node_color', 'r') if isinstance(node_color, dict): node_color = [node_color[n] for n in nodelist] kwargs['node_color'] = node_color labels = kwargs.get('labels', {k: k for k in nodelist}) if labels is not False: self._draw_node_labels(labels) return nx.draw_networkx_nodes(self._G, self._pos, nodelist=nodelist, **kwargs) def _draw_node_labels(self, labels, **kwargs): pos = kwargs.pop('pos', self._pos) return nx.draw_networkx_labels(self._G, pos, labels=labels, **kwargs) def _draw_edges(self, edgelist, **kwargs): edge_labels = kwargs.get('edge_labels', False) if edge_labels is not False: if edge_labels is True: edge_labels = {(f, t): '({},{})'.format(f, t) for f, t in edgelist} self._draw_edge_labels(edge_labels) return nx.draw_networkx_edges(self._G, self._pos, edgelist=edgelist, **kwargs) def _draw_edge_labels(self, edge_labels, **kwargs): pos = kwargs.pop('pos', self._pos) return nx.draw_networkx_edge_labels(self._G, pos, edge_labels=edge_labels, **kwargs) def draw(self, *args, **kwargs): ax = kwargs.get('ax', None) if ax is None: import matplotlib.pyplot as plt fig, axs = plt.subplots(1, 1, figsize=(8, 5)) ax = axs ax.axis('off') kwargs['ax'] = ax self.draw_loads(*args, **kwargs) self.draw_generators(*args, **kwargs) self.draw_buses(*args, **kwargs) self.draw_branches(*args, **kwargs) self.draw_connections('gen_to_bus', *args, **kwargs) self.draw_connections('load_to_bus', *args, **kwargs) @classmethod def _create_network(cls, case, prog='sfdp'): return cls(case, prog=prog) create_network = PSSTNetwork._create_network
{"hexsha": "68fc911dd69ff503dcc80f5af8da6b204d40d2f8", "size": 6545, "ext": "py", "lang": "Python", "max_stars_repo_path": "psst/network/__init__.py", "max_stars_repo_name": "djinnome/psst", "max_stars_repo_head_hexsha": "f86019adaa0440fbfbadd1068eb7dac78e5640e7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "psst/network/__init__.py", "max_issues_repo_name": "djinnome/psst", "max_issues_repo_head_hexsha": "f86019adaa0440fbfbadd1068eb7dac78e5640e7", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "psst/network/__init__.py", "max_forks_repo_name": "djinnome/psst", "max_forks_repo_head_hexsha": "f86019adaa0440fbfbadd1068eb7dac78e5640e7", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 35.5706521739, "max_line_length": 139, "alphanum_fraction": 0.6091673033, "include": true, "reason": "import networkx,from networkx", "num_tokens": 1599}
# ------------------------------------------------------------------------------ # Copyright (c) Microsoft # Licensed under the MIT License. # Written by Ke Sun (sunk@mail.ustc.edu.cn) # ------------------------------------------------------------------------------ """ Modified by Myung-Joon Kwon mjkwon2021@gmail.com July 14, 2020 """ import logging import os import time import numpy as np from tqdm import tqdm import os import torch import torch.nn as nn import torch.distributed as dist from torch.nn import functional as F from lib.utils.utils import AverageMeter from lib.utils.utils import get_confusion_matrix from lib.utils.utils import adjust_learning_rate from lib.utils.utils import get_world_size, get_rank def reduce_tensor(inp): """ Reduce the loss from all processes so that process with rank 0 has the averaged results. """ world_size = get_world_size() if world_size < 2: return inp with torch.no_grad(): reduced_inp = inp dist.reduce(reduced_inp, dst=0) return reduced_inp def train(config, epoch, num_epoch, epoch_iters, base_lr, num_iters, trainloader, optimizer, model, writer_dict, final_output_dir): # Training model.train() batch_time = AverageMeter() ave_loss = AverageMeter() tic = time.time() cur_iters = epoch*epoch_iters writer = writer_dict['writer'] global_steps = writer_dict['train_global_steps'] world_size = get_world_size() for i_iter, (images, labels, qtable) in enumerate(trainloader): # images, labels, _, _ = batch images = images.cuda() labels = labels.long().cuda() losses, _ = model(images, labels, qtable) # _ : output of the model (see utils.py) loss = losses.mean() reduced_loss = reduce_tensor(loss) model.zero_grad() loss.backward() optimizer.step() # measure elapsed time batch_time.update(time.time() - tic) tic = time.time() # update average loss ave_loss.update(reduced_loss.item()) lr = adjust_learning_rate(optimizer, base_lr, num_iters, i_iter+cur_iters) if i_iter % config.PRINT_FREQ == 0: print_loss = ave_loss.average() / world_size msg = 'Epoch: [{}/{}] Iter:[{}/{}], Time: {:.2f}, ' \ 'lr: {:.6f}, Loss: {:.6f}' .format( epoch, num_epoch, i_iter, epoch_iters, batch_time.average(), lr, print_loss) logging.info(msg) writer.add_scalar('train_loss', print_loss, global_steps) global_steps += 1 writer_dict['train_global_steps'] = global_steps def validate(config, testloader, model, writer_dict, valid_set="valid"): rank = get_rank() world_size = get_world_size() model.eval() ave_loss = AverageMeter() confusion_matrix = np.zeros( (config.DATASET.NUM_CLASSES, config.DATASET.NUM_CLASSES)) avg_mIoU = AverageMeter() avg_p_mIoU = AverageMeter() with torch.no_grad(): for _, (image, label, qtable) in enumerate(tqdm(testloader)): size = label.size() image = image.cuda() label = label.long().cuda() losses, pred = model(image, label, qtable) pred = F.upsample(input=pred, size=( size[-2], size[-1]), mode='bilinear') loss = losses.mean() reduced_loss = reduce_tensor(loss) ave_loss.update(reduced_loss.item()) current_confusion_matrix = get_confusion_matrix( label, pred, size, config.DATASET.NUM_CLASSES, config.TRAIN.IGNORE_LABEL) confusion_matrix += current_confusion_matrix # mIoU pos = current_confusion_matrix.sum(1) # ground truth label count res = current_confusion_matrix.sum(0) # prediction count tp = np.diag(current_confusion_matrix) # Intersection part IoU_array = (tp / np.maximum(1.0, pos + res - tp)) # Union part mean_IoU = IoU_array.mean() avg_mIoU.update(mean_IoU) TN = current_confusion_matrix[0, 0] FN = current_confusion_matrix[1, 0] FP = current_confusion_matrix[0, 1] TP = current_confusion_matrix[1, 1] p_mIoU = 0.5 * (FN / np.maximum(1.0, FN + TP + TN)) + 0.5 * (FP / np.maximum(1.0, FP + TP + TN)) avg_p_mIoU.update(np.maximum(mean_IoU, p_mIoU)) confusion_matrix = torch.from_numpy(confusion_matrix).cuda() reduced_confusion_matrix = reduce_tensor(confusion_matrix) confusion_matrix = reduced_confusion_matrix.cpu().numpy() pos = confusion_matrix.sum(1) res = confusion_matrix.sum(0) tp = np.diag(confusion_matrix) pixel_acc = tp.sum() / pos.sum() mean_acc = (tp / np.maximum(1.0, pos)).mean() IoU_array = (tp / np.maximum(1.0, pos + res - tp)) mean_IoU = IoU_array.mean() print_loss = ave_loss.average()/world_size if rank == 0: writer = writer_dict['writer'] global_steps = writer_dict['valid_global_steps'] writer.add_scalar(valid_set+'_loss', print_loss, global_steps) writer.add_scalar(valid_set+'_mIoU', mean_IoU, global_steps) writer.add_scalar(valid_set+'_avg_mIoU', avg_mIoU.average(), global_steps) writer.add_scalar(valid_set+'_avg_p-mIoU', avg_p_mIoU.average(), global_steps) writer.add_scalar(valid_set+'_pixel_acc', pixel_acc, global_steps) writer_dict['valid_global_steps'] = global_steps + 1 return print_loss, mean_IoU, avg_mIoU.average(), avg_p_mIoU.average(), IoU_array, pixel_acc, mean_acc, confusion_matrix
{"hexsha": "4a9fb5974d7e2e20ccbd4e6c54aeb894feead54e", "size": 5882, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/core/function.py", "max_stars_repo_name": "mjkwon2021/CAT-Net", "max_stars_repo_head_hexsha": "d7054580e30f99bd6adc05f5c5e39feee9fd1fcb", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 50, "max_stars_repo_stars_event_min_datetime": "2021-06-06T18:52:47.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-12T16:11:41.000Z", "max_issues_repo_path": "lib/core/function.py", "max_issues_repo_name": "mjkwon2021/CAT-Net", "max_issues_repo_head_hexsha": "d7054580e30f99bd6adc05f5c5e39feee9fd1fcb", "max_issues_repo_licenses": ["MIT"], "max_issues_count": 19, "max_issues_repo_issues_event_min_datetime": "2021-08-25T07:29:26.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-29T07:07:46.000Z", "max_forks_repo_path": "lib/core/function.py", "max_forks_repo_name": "mjkwon2021/CAT-Net", "max_forks_repo_head_hexsha": "d7054580e30f99bd6adc05f5c5e39feee9fd1fcb", "max_forks_repo_licenses": ["MIT"], "max_forks_count": 7, "max_forks_repo_forks_event_min_datetime": "2021-10-05T07:29:51.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-24T08:15:33.000Z", "avg_line_length": 35.4337349398, "max_line_length": 123, "alphanum_fraction": 0.6030261816, "include": true, "reason": "import numpy", "num_tokens": 1373}
// // Copyright © 2017 Arm Ltd. All rights reserved. // SPDX-License-Identifier: MIT // #include <boost/test/unit_test.hpp> #include "ParserFlatbuffersSerializeFixture.hpp" #include "../Deserializer.hpp" #include <string> BOOST_AUTO_TEST_SUITE(Deserializer) struct PadFixture : public ParserFlatbuffersSerializeFixture { explicit PadFixture(const std::string &inputShape, const std::string &padList, const std::string &outputShape, const std::string &dataType) { m_JsonString = R"( { inputIds: [0], outputIds: [2], layers: [ { layer_type: "InputLayer", layer: { base: { layerBindingId: 0, base: { index: 0, layerName: "InputLayer", layerType: "Input", inputSlots: [{ index: 0, connection: {sourceLayerIndex:0, outputSlotIndex:0 }, }], outputSlots: [{ index: 0, tensorInfo: { dimensions: )" + inputShape + R"(, dataType: )" + dataType + R"( } }] } } } }, { layer_type: "PadLayer", layer: { base: { index: 1, layerName: "PadLayer", layerType: "Pad", inputSlots: [{ index: 0, connection: {sourceLayerIndex:0, outputSlotIndex:0 }, }], outputSlots: [{ index: 0, tensorInfo: { dimensions: )" + outputShape + R"(, dataType: )" + dataType + R"( } }] }, descriptor: { padList: )" + padList + R"(, } } }, { layer_type: "OutputLayer", layer: { base:{ layerBindingId: 2, base: { index: 2, layerName: "OutputLayer", layerType: "Output", inputSlots: [{ index: 0, connection: {sourceLayerIndex:1, outputSlotIndex:0 }, }], outputSlots: [{ index: 0, tensorInfo: { dimensions: )" + outputShape + R"(, dataType: )" + dataType + R"( }, }], } } }, } ] } )"; SetupSingleInputSingleOutput("InputLayer", "OutputLayer"); } }; struct SimplePadFixture : PadFixture { SimplePadFixture() : PadFixture("[ 2, 2, 2 ]", "[ 0, 1, 2, 1, 2, 2 ]", "[ 3, 5, 6 ]", "QuantisedAsymm8") {} }; BOOST_FIXTURE_TEST_CASE(SimplePadQuantisedAsymm8, SimplePadFixture) { RunTest<3, armnn::DataType::QuantisedAsymm8>(0, { 0, 4, 2, 5, 6, 1, 5, 2 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 2, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 1, 0, 0, 0, 0, 5, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }); } BOOST_AUTO_TEST_SUITE_END()
{"hexsha": "b18710a38162c02a56d6f2e836967fb532345f96", "size": 5429, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/armnnDeserializer/test/DeserializePad.cpp", "max_stars_repo_name": "VinayKarnam/armnn", "max_stars_repo_head_hexsha": "98525965c7cfecd9bf48297b433b2122cd1b4a1d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1.0, "max_stars_repo_stars_event_min_datetime": "2019-06-26T23:00:46.000Z", "max_stars_repo_stars_event_max_datetime": "2019-06-26T23:00:46.000Z", "max_issues_repo_path": "src/armnnDeserializer/test/DeserializePad.cpp", "max_issues_repo_name": "VinayKarnam/armnn", "max_issues_repo_head_hexsha": "98525965c7cfecd9bf48297b433b2122cd1b4a1d", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/armnnDeserializer/test/DeserializePad.cpp", "max_forks_repo_name": "VinayKarnam/armnn", "max_forks_repo_head_hexsha": "98525965c7cfecd9bf48297b433b2122cd1b4a1d", "max_forks_repo_licenses": ["MIT"], "max_forks_count": 1.0, "max_forks_repo_forks_event_min_datetime": "2021-09-15T04:31:21.000Z", "max_forks_repo_forks_event_max_datetime": "2021-09-15T04:31:21.000Z", "avg_line_length": 41.7615384615, "max_line_length": 96, "alphanum_fraction": 0.2573217904, "num_tokens": 975}
[STATEMENT] lemma invertible_left_cancel [simp]: "\<lbrakk> invertible x; x \<in> M; y \<in> M; z \<in> M \<rbrakk> \<Longrightarrow> x \<cdot> y = x \<cdot> z \<longleftrightarrow> y = z" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>invertible x; x \<in> M; y \<in> M; z \<in> M\<rbrakk> \<Longrightarrow> (x \<cdot> y = x \<cdot> z) = (y = z) [PROOF STEP] by (metis associative invertible_def left_unit)
{"llama_tokens": 172, "file": "Jacobson_Basic_Algebra_Group_Theory", "length": 1}
Require Import Blech.Defaults. Require Import Coq.Setoids.Setoid. Require Import Coq.Classes.SetoidClass. Require Import Blech.Bishop. Require Import Blech.Proset. Require Import Blech.Proset.Heyting. Import ProsetNotations. Import HeytingNotations. (* Ostensibly, a first order system of logic is a free heyting algebra over the set of free variables *) Inductive free (T: Type) := | var (_: T) | top | bot | meet (_ _: free T) | join (_ _: free T) | impl (_ _: free T) . Arguments var [T]. Arguments top {T}. Arguments bot {T}. Arguments meet {T}. Arguments join {T}. Arguments impl {T}. Inductive entails {T}: relation (free T) := | reflexive: reflexive (free T) entails | transitive: transitive (free T) entails | bang {A}: entails A top | fanout {C A B}: entails C A → entails C B → entails C (meet A B) | fst {A B}: entails (meet A B) A | snd {A B}: entails (meet A B) B | absurd {A}: entails top A | fanin {C A B}: entails A C → entails B C → entails (join A B) C | inl {A B}: entails A (join A B) | inr {A B}: entails B (join A B) | curry {A B C}: entails (meet A B) C → entails A (impl B C) | eval {A B}: entails (meet (impl A B) A) B . #[program] Definition Free (S: Type) : Heyting := {| P := {| T := free S ; preorder := entails ; |} ; Heyting.top := top ; Heyting.bot := bot ; Heyting.meet := meet ; Heyting.join := join ; Heyting.impl := impl ; |}. Next Obligation. Proof. admit. Admitted.
{"author": "mstewartgallus", "repo": "category-fun", "sha": "436a90c0f9e8a729da6416a2c0e54611ca5e4575", "save_path": "github-repos/coq/mstewartgallus-category-fun", "path": "github-repos/coq/mstewartgallus-category-fun/category-fun-436a90c0f9e8a729da6416a2c0e54611ca5e4575/theories/Proset/Heyting/Free.v"}
function iterative_probabilistic_improvement(tuning_run::Run, reference::RemoteChannel; threshold::AbstractFloat = 2.) cost_calls = tuning_run.cost_evaluations iteration = 1 name = "Iterative Probabilistic Improvement" stopping_criterion = @task tuning_run.stopping_criterion(tuning_run.duration) stop = consume(stopping_criterion) while !stop iteration += 1 result = probabilistic_improvement(tuning_run, threshold = threshold) cost_calls += result.cost_calls result.cost_calls = cost_calls result.start = tuning_run.starting_point result.technique = name result.iterations = iteration result.current_iteration = iteration tuning_run.starting_point = result.minimum tuning_run.starting_cost = result.cost_minimum stop = consume(stopping_criterion) put!(reference, result) end end
{"hexsha": "989104114941c5b35c8e83a0965ebb1f4d352e72", "size": 1224, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/core/search/techniques/iterative_probabilistic_improvement.jl", "max_stars_repo_name": "JuliaPackageMirrors/StochasticSearch.jl", "max_stars_repo_head_hexsha": "58e48c8812fb402e4a46ffff1d5bcb87fca3fd05", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max_stars_repo_stars_event_min_datetime": "2018-03-06T07:56:08.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-22T13:06:59.000Z", "max_issues_repo_path": "src/core/search/techniques/iterative_probabilistic_improvement.jl", "max_issues_repo_name": "JuliaPackageMirrors/StochasticSearch.jl", "max_issues_repo_head_hexsha": "58e48c8812fb402e4a46ffff1d5bcb87fca3fd05", "max_issues_repo_licenses": ["MIT"], "max_issues_count": 1, "max_issues_repo_issues_event_min_datetime": "2018-03-09T09:07:06.000Z", "max_issues_repo_issues_event_max_datetime": "2018-03-13T12:51:03.000Z", "max_forks_repo_path": "src/core/search/techniques/iterative_probabilistic_improvement.jl", "max_forks_repo_name": "JuliaPackageMirrors/StochasticSearch.jl", "max_forks_repo_head_hexsha": "58e48c8812fb402e4a46ffff1d5bcb87fca3fd05", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 47.0769230769, "max_line_length": 85, "alphanum_fraction": 0.533496732, "num_tokens": 216}
DGTTRF Example Program Results Details of factorization Second superdiagonal of U -1.0000 1.9000 8.0000 First superdiagonal of U 2.3000 -5.0000 -0.9000 7.1000 Main diagonal of U 3.4000 3.6000 7.0000 -6.0000 -1.0154 Multipliers 0.8824 0.0196 0.1401 -0.0148 Vector of interchanges 2 3 4 5 5
{"hexsha": "baacf48cafbf6bc5344e514eaf0326f388dd21aa", "size": 378, "ext": "r", "lang": "R", "max_stars_repo_path": "examples/baseresults/dgttrf_example.r", "max_stars_repo_name": "numericalalgorithmsgroup/LAPACK_examples", "max_stars_repo_head_hexsha": "0dde05ae4817ce9698462bbca990c4225337f481", "max_stars_repo_licenses": ["BSD-3-Clause-Open-MPI"], "max_stars_count": 28, "max_stars_repo_stars_event_min_datetime": "2018-01-28T15:48:11.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-18T09:26:43.000Z", "max_issues_repo_path": "examples/baseresults/dgttrf_example.r", "max_issues_repo_name": "numericalalgorithmsgroup/LAPACK_examples", "max_issues_repo_head_hexsha": "0dde05ae4817ce9698462bbca990c4225337f481", "max_issues_repo_licenses": ["BSD-3-Clause-Open-MPI"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "examples/baseresults/dgttrf_example.r", "max_forks_repo_name": "numericalalgorithmsgroup/LAPACK_examples", "max_forks_repo_head_hexsha": "0dde05ae4817ce9698462bbca990c4225337f481", "max_forks_repo_licenses": ["BSD-3-Clause-Open-MPI"], "max_forks_count": 18, "max_forks_repo_forks_event_min_datetime": "2019-04-19T12:22:40.000Z", "max_forks_repo_forks_event_max_datetime": "2022-02-18T03:32:12.000Z", "avg_line_length": 19.8947368421, "max_line_length": 46, "alphanum_fraction": 0.5899470899, "num_tokens": 161}
C$Procedure ZZDIV ( Safer division ) DOUBLE PRECISION FUNCTION ZZDIV ( NUMR, DENOM ) C$ Abstract C C Safely calculate the value NUMR/DENOM, avoiding the possibility C of floating point exceptions (FPE), due to numeric underflow, C numeric overflow, or divide-by-zero. C C$ Disclaimer C C THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE C CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. C GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE C ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE C PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" C TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY C WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A C PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC C SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE C SOFTWARE AND RELATED MATERIALS, HOWEVER USED. C C IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA C BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT C LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, C INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, C REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE C REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. C C RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF C THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY C CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE C ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. C C$ Required_Reading C C None. C C$ Keywords C C MATH C C$ Declarations IMPLICIT NONE DOUBLE PRECISION NUMR DOUBLE PRECISION DENOM C$ Brief_I/O C C Variable I/O Description C -------- --- -------------------------------------------------- C NUMR I Numerator of division. C DENOM I Denominator of division. C C$ Detailed_Input C C NUMR Numerator for the division operation. C C DENOM Denominator for the division operation. C C$ Detailed_Output C C ZZDIV The value NUMR/DENOM. C C$ Parameters C C None. C C$ Exceptions C C 1) SPICE(DIVIDEBYZERO) signals if DENOM equals zero. This C signal occurs for NUMR/0 and 0/0 cases. C C 2) SPICE(NUMERICOVERFLOW) signals if the logarithm base 10 C of the division is greater than EXPNT (defined C below). C C$ Files C C None. C C$ Particulars C C We want to avoid a floating point exception signal from C the platform. This routine does not trap exceptions, C the intended purpose is to prevent exceptions. C C Given, for the IEEE 754 double-precision binary C floating-point format, the order of magnitude of the minimum C normal positive double equals -307 and the order of magnitude of C the maximum double equals 308. C C -307 <= LOG10(|NUMR|) - LOG10(|DENOM|) <= 308 C C or C C -307 308 C 10 <= |NUMR|/|DENOM| <= 10 C C Satisfying this condition should guarantee no floating C point exceptions. C C Underflow returns zero without an error signal as per SPICE C convention. C C Important, this routine does not calculate or enforce a C precision on the division evaluation. A safe evaluation C may result in a result unusable due to precision loss. C C The routine does not depend on platform-specific arithmetic C exception handling, even though the bound for the computed C ratio is platform-specific. C C The range [-307,308] is valid for IEEE double precision. C It may occur this routine runs on a non compliant platform, C so calculate the range based on the DPMAX() value. C C Assign a parameter EXPNT such that EXPNT equals the order of C DPMAX. The routine uses the range [-(EXPNT-1), EXPNT]. C C This routine checks the difference between the base 10 logarithms C of NUMR and DENOM to ensure the magnitude of NUMR/DENOM is C within the range [-(EXPNT-1), EXPNT]. C C$ Examples C C Demonstrate the use of ZZDIV with DPMAX and zero as the C numerator and denominator. C C PROGRAM ZZDIV_T C IMPLICIT NONE C C DOUBLE PRECISION NUMR C DOUBLE PRECISION DENOM C DOUBLE PRECISION DIV C C C C C SPICE functions. C C C DOUBLE PRECISION ZZDIV C DOUBLE PRECISION DPMAX C C C C C C Set error reporting to REPORT. C C C CALL ERRACT( 'SET', 'REPORT' ) C C C C C C Standard, safe evaluation. C C C NUMR = 1.D0 C DENOM = 10.D0 C C DIV = ZZDIV( NUMR, DENOM ) C WRITE(*,*) 'DIV 1/10 = ', DIV C C C C C C C A numeric underflow event as defined in ZZDIV. C C C NUMR = 1.D0 C DENOM = DPMAX() C C DIV = ZZDIV( NUMR, DENOM ) C WRITE(*,*) 'DIV 1/DPMAX() = ', DIV C C C C C C C A numeric overflow event as defined in ZZDIV. C C C NUMR = DPMAX() C DENOM = 1.D0 C C DIV = ZZDIV( NUMR, DENOM ) C WRITE(*,*) 'DIV DPMAX()/1 = ', DIV C C C C C C A divide by zero event. C C C NUMR = 1.D0 C DENOM = 0.D0 C C DIV = ZZDIV( NUMR, DENOM ) C WRITE(*,*) 'DIV 1/0 = ', DIV C C C C C C A 0/0 event. ZZDIV treats this as a divide by zero C C event. C C C NUMR = 0.D0 C DENOM = 0.D0 C C DIV = ZZDIV( NUMR, DENOM ) C WRITE(*,*) 'DIV 0/0 = ', DIV C C C END C C The program outputs: C C -The function returns the evaluation value. No error. C C DIV 1/10 = 0.10000000000000001 C C C C -The function returns zero for an underflow state. No error. C C DIV 1/DPMAX() = 0.0000000000000000 C C C C -The function signals a NUMERICOVERFLOW error, and sets the C return value to zero. C C ================================================================= C C Toolkit version: N0064 C C SPICE(NUMERICOVERFLOW) -- C C Numerical overflow event. Numerator value 1.7976931348623E+308, C denominator value 1.0000000000000E+00. C C A traceback follows. The name of the highest level module is C first. C ZZDIV C C ================================================================= C DIV DPMAX()/1 = 0.0000000000000000 C C C C -The function signals a DIVIDEBYZERO error, and sets the C return value to zero. C C ================================================================= C C Toolkit version: N0064 C C SPICE(DIVIDEBYZERO) -- C C Numerical divide by zero event. Numerator value C 1.0000000000000E+00. C C A traceback follows. The name of the highest level module is C first. C ZZDIV C C ================================================================= C DIV 1/0 = 0.0000000000000000 C C C C -The function signals a DIVIDEBYZERO error, and sets the C return value to zero. C C ================================================================= C C Toolkit version: N0064 C C SPICE(DIVIDEBYZERO) -- C C Numerical divide by zero event. Numerator value C 0.0000000000000E+00. C C A traceback follows. The name of the highest level module is C first. C ZZDIV C C ================================================================= C DIV 0/0 = 0.0000000000000000 C C$ Restrictions C C None. C C$ Literature_References C C None. C C$ Author_and_Institution C C E.D. Wright (JPL) C C$ Version C C- SPICELIB Version 1.0.0, 31-JAN-2014 (EDW) C C-& C$ Index_Entries C C division, avoid floating point exception C C-& C C SPICELIB functions C LOGICAL RETURN DOUBLE PRECISION DPMAX C C Local variables C DOUBLE PRECISION LOGNUM DOUBLE PRECISION LOGDEN C C The bounds on the potential result of the calculation. C DOUBLE PRECISION EXPNT C C First entry flag. C LOGICAL FIRST SAVE DATA FIRST / .TRUE. / C C Return on error. C IF ( RETURN() ) THEN ZZDIV = 0.D0 RETURN END IF C C Participate in error tracing. C CALL CHKIN ( 'ZZDIV' ) C C Calculate the bounds parameter on first entry. C The double precision maximum value has the form C "d*(10**EXPNT)." The value of interest is "EXPNT." C IF (FIRST) THEN FIRST = .FALSE. C C A "floor" evaluation. C EXPNT = DBLE( INT( LOG10( DPMAX() ) ) ) END IF C C If the denominator is zero, return zero and signal an error. C This is equivalent to a signaling NaN (not-a-number) for C the 0/0 case. C IF ( DENOM .EQ. 0.D0 ) THEN ZZDIV = 0.D0 CALL SETMSG ( 'Numerical divide by zero event. ' . // 'Numerator value #1.' ) CALL ERRDP ( '#1', NUMR ) CALL SIGERR ( 'SPICE(DIVIDEBYZERO)' ) CALL CHKOUT ( 'ZZDIV' ) RETURN END IF C C If the numerator is zero, the division is zero. DENOM C is known non-zero. C IF ( NUMR .EQ. 0.D0 ) THEN ZZDIV = 0.D0 CALL CHKOUT ( 'ZZDIV' ) RETURN END IF C C Calculate base 10 logarithms of the absolute value of the C numerator and denominator. Recall the base 10 log of a negative C real is a complex number (an irritating reality). Our interest C is the magnitude of the result, not the sign. C C An earlier check returned if NUMR or DENOM equals zero, so the C LOG10 call is safe from an infinite return value. An infinite C return value defeats the purpose of this routine. C LOGNUM = LOG10( DABS(NUMR) ) LOGDEN = LOG10( DABS(DENOM) ) C C Local possible overflow check. C IF ( (LOGNUM - LOGDEN) .GT. EXPNT ) THEN ZZDIV = 0.D0 CALL SETMSG ( 'Numerical overflow event. ' . // 'Numerator value #1, denominator value #2.') CALL ERRDP ( '#1', NUMR ) CALL ERRDP ( '#2', DENOM ) CALL SIGERR ( 'SPICE(NUMERICOVERFLOW)' ) CALL CHKOUT ( 'ZZDIV' ) RETURN END IF C C Local possible underflow check. Accept this may occur, C return a zero. C IF ( (LOGNUM - LOGDEN) .LT. -(EXPNT-1.D0) ) THEN ZZDIV = 0.D0 CALL CHKOUT ( 'ZZDIV' ) RETURN END IF C C This operation should be safe. Probably. C ZZDIV = NUMR/DENOM CALL CHKOUT ( 'ZZDIV' ) RETURN END
{"hexsha": "b3dc04249550d6480634393fa3486ef12dd9bc32", "size": 10994, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "source/nasa_f/zzdiv.f", "max_stars_repo_name": "agforero/FTFramework", "max_stars_repo_head_hexsha": "6caf0bc7bae8dc54a62da62df37e852625f0427d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 6, "max_stars_repo_stars_event_min_datetime": "2020-08-19T21:43:50.000Z", "max_stars_repo_stars_event_max_datetime": "2021-07-20T02:57:25.000Z", "max_issues_repo_path": "source/nasa_f/zzdiv.f", "max_issues_repo_name": "agforero/fortran-testing-framework", "max_issues_repo_head_hexsha": "6caf0bc7bae8dc54a62da62df37e852625f0427d", "max_issues_repo_licenses": ["MIT"], "max_issues_count": 1, "max_issues_repo_issues_event_min_datetime": "2020-08-07T21:17:16.000Z", "max_issues_repo_issues_event_max_datetime": "2020-08-09T02:18:07.000Z", "max_forks_repo_path": "source/nasa_f/zzdiv.f", "max_forks_repo_name": "agforero/fortran-testing-framework", "max_forks_repo_head_hexsha": "6caf0bc7bae8dc54a62da62df37e852625f0427d", "max_forks_repo_licenses": ["MIT"], "max_forks_count": 1, "max_forks_repo_forks_event_min_datetime": "2022-03-31T08:41:53.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-31T08:41:53.000Z", "avg_line_length": 24.5950782998, "max_line_length": 71, "alphanum_fraction": 0.587502274, "num_tokens": 3158}
# -*- coding: utf-8 -*- # MegEngine is Licensed under the Apache License, Version 2.0 (the "License") # # Copyright (c) 2014-2020 Megvii Inc. All rights reserved. # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. import numpy as np from ..core.tensor.utils import make_shape_tuple from ..tensor import Tensor from .elemwise import abs, equal, exp, log, maximum, pow, relu from .nn import indexing_one_hot, logsigmoid, logsumexp from .tensor import where __all__ = [ "l1_loss", "square_loss", "cross_entropy", "binary_cross_entropy", "hinge_loss", ] def l1_loss(pred: Tensor, label: Tensor) -> Tensor: r"""Calculates the mean absolute error (MAE) between each element in the pred :math:`x` and label :math:`y`. The mean absolute error can be described as: .. math:: \ell(x,y) = mean\left(L \right) where .. math:: L = \{l_1,\dots,l_N\}, \quad l_n = \left| x_n - y_n \right|, :math:`x` and :math:`y` are tensors of arbitrary shapes with a total of :math:`N` elements each. :math:`N` is the batch size. :param pred: predicted result from model. :param label: ground truth to compare. :return: loss value. Examples: .. testcode:: import numpy as np import megengine as mge import megengine.functional as F ipt = mge.tensor(np.array([3, 3, 3, 3]).astype(np.float32)) tgt = mge.tensor(np.array([2, 8, 6, 1]).astype(np.float32)) loss = F.nn.l1_loss(ipt, tgt) print(loss.numpy()) Outputs: .. testoutput:: [2.75] """ diff = pred - label return abs(diff).mean() def square_loss(pred: Tensor, label: Tensor) -> Tensor: r"""Calculates the mean squared error (squared L2 norm) between each element in the pred :math:`x` and label :math:`y`. The mean squared error can be described as: .. math:: \ell(x, y) = mean\left( L \right) where .. math:: L = \{l_1,\dots,l_N\}, \quad l_n = \left( x_n - y_n \right)^2, :math:`x` and :math:`y` are tensors of arbitrary shapes with a total of :math:`N` elements each. :math:`N` is the batch size. :param pred: predicted result from model. :param label: ground truth to compare. :return: loss value. Shape: - pred: :math:`(N, *)` where :math:`*` means any number of additional dimensions. - label: :math:`(N, *)`. Same shape as ``pred``. Examples: .. testcode:: import numpy as np import megengine as mge import megengine.functional as F ipt = mge.tensor(np.array([3, 3, 3, 3]).astype(np.float32)) tgt = mge.tensor(np.array([2, 8, 6, 1]).astype(np.float32)) loss = F.nn.square_loss(ipt, tgt) print(loss.numpy()) Outputs: .. testoutput:: [9.75] """ diff = pred - label return (diff ** 2).mean() def cross_entropy( pred: Tensor, label: Tensor, axis: int = 1, with_logits: bool = True, label_smooth: float = 0, ) -> Tensor: r"""Compute the multi-class cross entropy loss (using logits by default). By default, prediction is assumed to be logits, whose softmax gives probabilities. It has better numerical stability compared with sequential calls to :func:`~.softmax` and :func:`~.cross_entropy`. When using label smoothing, the label distribution is as follows: .. math:: y^{LS}_{k}=y_{k}\left(1-\alpha\right)+\alpha/K where :math:`y^{LS}` and :math:`y` are new label distribution and origin label distribution respectively. k is the index of label distribution. :math:`\alpha` is ``label_smooth`` and :math:`K` is the number of classes. :param pred: input tensor representing the predicted probability. :param label: input tensor representing the classification label. :param axis: an axis along which softmax will be applied. Default: 1 :param with_logits: whether to apply softmax first. Default: True :param label_smooth: a label smoothing of parameter that can re-distribute target distribution. Default: 0 :return: loss value. Examples: .. testcode:: import numpy as np from megengine import tensor import megengine.functional as F data_shape = (1, 2) label_shape = (1, ) pred = tensor(np.array([0, 0], dtype=np.float32).reshape(data_shape)) label = tensor(np.ones(label_shape, dtype=np.int32)) loss = F.nn.cross_entropy(pred, label) print(loss.numpy()) Outputs: .. testoutput:: [0.6931] """ n0 = pred.ndim n1 = label.ndim assert n0 == n1 + 1, ( "target ndim must be one less than input ndim; input_ndim={} " "target_ndim={}".format(n0, n1) ) num_classes = pred.shape[axis] no_label_smooth = ( label_smooth is None or type(label_smooth) in (int, float) and label_smooth == 0 ) if not with_logits: if no_label_smooth: return -log(indexing_one_hot(pred, label, axis)).mean() pred = log(pred) return ( label_smooth * pred.mean() - (1 - label_smooth) * indexing_one_hot(pred, label, axis).mean() ) # Denominator of the softmax down = logsumexp(pred, axis=axis, keepdims=True) up = indexing_one_hot(pred, label, axis) if not no_label_smooth: factor = label_smooth / num_classes up = up * (1 - label_smooth) + pred.sum(axis=axis, keepdims=True) * factor return (down - up).mean() def binary_cross_entropy( pred: Tensor, label: Tensor, with_logits: bool = True ) -> Tensor: r"""Compute the binary cross entropy loss (using logits by default). By default, prediction is assumed to be logits, whose sigmoid gives probabilities. :param pred: `(N, *)`, where `*` means any number of additional dimensions. :param label: `(N, *)`, same shape as the input. :param with_logits: bool, whether to apply sigmoid first. Default: True :return: loss value. Examples: .. testcode:: import numpy as np from megengine import tensor import megengine.functional as F pred = tensor(np.array([0, 0], dtype=np.float32).reshape(1, 2)) label = tensor(np.ones((1, 2), dtype=np.float32)) loss = F.nn.binary_cross_entropy(pred, label) print(loss.numpy()) Outputs: .. testoutput:: [0.6931] """ if not with_logits: return -(label * log(pred) + (1 - label) * log(1 - pred)).mean() # logsigmoid(pred) and logsigmoid(-pred) has common sub-expression # hopefully the backend would optimize this return -(label * logsigmoid(pred) + (1 - label) * logsigmoid(-pred)).mean() def hinge_loss(pred: Tensor, label: Tensor, norm: str = "L1") -> Tensor: r"""Caculates the hinge loss which is often used in SVM. The hinge loss can be described as: .. math:: loss(x, y) = \frac{1}{N}\sum_i\sum_j(max(0, 1 - x_{ij}*y_{ij})) :param pred: input tensor representing the predicted probability, shape is `(N, C)`. :param label: input tensor representing the binary classification label, shape is `(N, C)`. :param norm: specify the norm to caculate the loss, should be "L1" or "L2". :return: loss value. Examples: .. testcode:: from megengine import tensor import megengine.functional as F pred = tensor([[0.5, -0.5, 0.1], [-0.6, 0.7, 0.8]], dtype="float32") label = tensor([[1, -1, -1], [-1, 1, 1]], dtype="float32") loss = F.nn.hinge_loss(pred, label) print(loss.numpy()) Outputs: .. testoutput:: [1.5] """ assert norm in ["L1", "L2"], "norm must be L1 or L2" # Converts binary labels to -1/1 labels. loss = relu(1.0 - pred * label) if norm == "L1": return loss.sum(axis=1).mean() else: return (loss ** 2).sum(axis=1).mean()
{"hexsha": "40da78d8cf41cc3d9a6dc7957b58580b0dde21bf", "size": 8105, "ext": "py", "lang": "Python", "max_stars_repo_path": "imperative/python/megengine/functional/loss.py", "max_stars_repo_name": "chenbo123222/MegEngine", "max_stars_repo_head_hexsha": "8230ea2d0b16422136ad27b4073d523b524aa4e6", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 3, "max_stars_repo_stars_event_min_datetime": "2020-10-23T06:33:57.000Z", "max_stars_repo_stars_event_max_datetime": "2020-10-23T06:34:06.000Z", "max_issues_repo_path": "imperative/python/megengine/functional/loss.py", "max_issues_repo_name": "chenbo123222/MegEngine", "max_issues_repo_head_hexsha": "8230ea2d0b16422136ad27b4073d523b524aa4e6", "max_issues_repo_licenses": ["Apache-2.0"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "imperative/python/megengine/functional/loss.py", "max_forks_repo_name": "chenbo123222/MegEngine", "max_forks_repo_head_hexsha": "8230ea2d0b16422136ad27b4073d523b524aa4e6", "max_forks_repo_licenses": ["Apache-2.0"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 28.7411347518, "max_line_length": 118, "alphanum_fraction": 0.6212214682, "include": true, "reason": "import numpy", "num_tokens": 2183}
from collections import namedtuple import os from gym import spaces from typing import Callable, Dict, List, Optional import numpy as np from lanro.simulation import PyBulletSimulation from lanro.utils import RGBCOLORS DEBUG = int("DEBUG" in os.environ and os.environ["DEBUG"]) JointInfo = namedtuple('JointInfo', [ 'id', 'name', 'type', 'damping', 'friction', 'lowerLimit', 'upperLimit', 'maxForce', 'maxVelocity', 'controllable' ]) GRIPPER_VEL: int = 4 class PyBulletRobot: NEUTRAL_JOINT_VALUES: List NEUTRAL_FINGER_VALUES: List default_arm_orn_RPY: List num_DOF: int action_space = None ee_link: int gripper_obs_left_z_offset = 0.0 gripper_obs_right_z_offset = 0.0 left_finger_id = -1 right_finger_id = -1 def __init__(self, sim: PyBulletSimulation, body_name, file_name, base_position, base_orientation, action_type, full_state, fixed_gripper, finger_friction, camera_mode, **kwargs): """ :param sim: Simulation class :param fixed_gripper: The boolean variable to lock the gripper :param base_position: The [x, y, z] base coordinates for the end-effector :param fingers_friction: The amount of finger friction of the gripper :param full state: If the full state should be returned :param action_type: How actions are calculated One of ['absolute_quat', 'relative_quat', 'relative_joints', 'absolute_joints', 'absolute_rpy', 'relative_rpy'] """ self.sim = sim self.body_name = body_name self.action_type = action_type self.full_state = full_state self.fixed_gripper = fixed_gripper self.max_joint_change = sim.dt # gripper change is four times faster than joint changes. This in # combination with the force increase was necessary to achieve a # good success rate for pick and place self.max_gripper_change = sim.dt * GRIPPER_VEL self.camera_mode = camera_mode self.action_functions: Dict[str, Callable[[np.ndarray, np.ndarray], Optional[np.ndarray]]] = { 'absolute_quat': self.absolute_quat_step, 'relative_quat': self.relative_quat_step, 'relative_joints': self.relative_joint_step, 'absolute_joints': self.absolute_joint_step, 'absolute_rpy': self.absolute_rpy_step, 'relative_rpy': self.relative_rpy_step, 'end_effector': self.end_effector_step, } with self.sim.no_rendering(): self._load_robot(file_name, base_position, base_orientation, **kwargs) self._parse_joint_info() self.setup(finger_friction) def _load_robot(self, file_name, base_position, base_orientation, **kwargs): if 'urdf' in file_name: self._uid = self.sim.loadURDF(body_name=self.body_name, fileName=file_name, basePosition=base_position, baseOrientation=base_orientation, useFixedBase=True, **kwargs) elif 'sdf' in file_name: self._uid = self.sim.loadSDF(body_name=self.body_name, sdfFileName=file_name) self.sim.set_base_pose(self.body_name, base_position, base_orientation) def _parse_joint_info(self): num_joints = self.sim.get_num_joints(self.body_name) self.joints = [] self.controllable_joints = [] for i in range(num_joints): info = self.sim.get_joint_info(self.body_name, i) jointID = info[0] jointName = info[1].decode("utf-8") jointType = info[2] # JOINT_REVOLUTE, JOINT_PRISMATIC, JOINT_SPHERICAL, JOINT_PLANAR, JOINT_FIXED jointDamping = info[6] jointFriction = info[7] jointLowerLimit = info[8] jointUpperLimit = info[9] jointMaxForce = info[10] jointMaxVelocity = info[11] controllable = (jointType != self.sim.bclient.JOINT_FIXED) if controllable: self.controllable_joints.append(jointID) info = JointInfo(jointID, jointName, jointType, jointDamping, jointFriction, jointLowerLimit, jointUpperLimit, jointMaxForce, jointMaxVelocity, controllable) self.joints.append(info) self.arm_joints = self.controllable_joints[:self.num_DOF] self.ee_joints = self.controllable_joints[self.num_DOF:] self.arm_lower_limits = [info.lowerLimit for info in self.joints if info.controllable][:self.num_DOF] self.arm_upper_limits = [info.upperLimit for info in self.joints if info.controllable][:self.num_DOF] self.arm_joint_ranges = [info.upperLimit - info.lowerLimit for info in self.joints if info.controllable][:self.num_DOF] self.ee_lower_limits = [info.lowerLimit for info in self.joints if info.controllable][self.num_DOF:] self.ee_upper_limits = [info.upperLimit for info in self.joints if info.controllable][self.num_DOF:] self.ee_joint_ranges = [info.upperLimit - info.lowerLimit for info in self.joints if info.controllable][self.num_DOF:] self.arm_max_force = [self.joints[arm_id].maxForce for arm_id in self.arm_joints] self.ee_max_force = [self.joints[ee_id].maxForce for ee_id in self.ee_joints] def get_ee_position(self) -> np.ndarray: """Returns the position of the end-effector as (x, y, z)""" return self.get_link_position(self.ee_link) def get_ee_velocity(self) -> np.ndarray: """Returns the velocity of the end-effector as (vx, vy, vz)""" return self.get_link_velocity(self.ee_link) def reset(self) -> None: self.sim.set_joint_angles(self.body_name, joints=self.arm_joints + self.ee_joints, angles=self.NEUTRAL_JOINT_VALUES + self.NEUTRAL_FINGER_VALUES) def setup(self, finger_friction): """Setup robot's action space and finger friction""" # XYZ relative end-effector change in position if self.action_type == 'end_effector': action_high = np.array([1] * 3) action_low = -action_high.copy() # relative joint change elif self.action_type == 'relative_joints': action_high = np.array([1] * self.num_DOF) action_low = -action_high.copy() # absolute joint values and elif self.action_type == 'absolute_joints': action_high = np.array(self.arm_upper_limits) action_low = np.array(self.arm_lower_limits) # absolute rpy values elif self.action_type == 'absolute_rpy': action_high = np.array(self.arm_upper_limits[:6]) action_low = np.array(self.arm_lower_limits[:6]) # relative joint and rpy change elif self.action_type == 'relative_rpy': action_high = np.array([1] * 6) action_low = -action_high.copy() # relative quaternion change elif self.action_type == 'relative_quat': action_high = np.array([1] * 7) action_low = -action_high.copy() # absolute quaternion elif self.action_type == 'absolute_quat': action_high = np.array([1] * 7) action_low = -action_high.copy() else: raise ValueError("Unknown action type") # add gripper to action space if not self.fixed_gripper: action_high = np.concatenate((action_high, [1])) action_low = np.concatenate((action_low, [-1])) self.action_space = spaces.Box(low=action_low, high=action_high, dtype='float32') # set lateral and spinning friction for fingers self.sim.set_lateral_friction(self.body_name, self.ee_joints[0], lateral_friction=finger_friction) self.sim.set_lateral_friction(self.body_name, self.ee_joints[1], lateral_friction=finger_friction) self.sim.set_spinning_friction(self.body_name, self.ee_joints[0], spinning_friction=0.05) self.sim.set_spinning_friction(self.body_name, self.ee_joints[1], spinning_friction=0.05) def set_action(self, action) -> None: ''' Takes in the action and uses the appropriate function to determine the joint angles for execution in the environment ''' raw_action = np.copy(action) if self.fixed_gripper: gripper = None else: action = raw_action[:-1] gripper = raw_action[-1] self.action_functions[self.action_type](action, gripper) def absolute_quat_step(self, action, gripper) -> None: """apply absolute quaternions to the joints""" assert len(action) == 7 # (x,y,z) (qx, qy, qz, qw) new_pos = action[0:3] new_orn = action[3:7] # as quaternions self.goto(pos=new_pos, orn=new_orn, gripper=gripper) def relative_quat_step(self, action, gripper) -> None: """apply relative quaternions to the joints""" assert len(action) == 7 # (Δx,Δy,Δz) (Δqx, Δqy, Δqz, Δqw) state = self.sim.get_link_state(self.body_name, self.ee_link) current_pos, current_orn = state[0], state[1] new_pos = action[0:3] * self.max_joint_change + current_pos new_orn = action[3:7] * self.max_joint_change + current_orn # as quaternions self.goto(new_pos, new_orn, gripper) def absolute_rpy_step(self, action, gripper) -> None: """apply absolute roll, pitch, and yaw to the joints""" assert len(action) == 6 new_pos = action[0:3] new_orn = action[3:6] self.goto(new_pos, self.sim.get_quaternion_from_euler(new_orn), gripper) def relative_rpy_step(self, action, gripper) -> None: """apply relative action to roll, pitch, yaw, and the joints""" assert len(action) == 6 # (Δx,Δy,Δz) (Δr, Δp, Δy) state = self.sim.get_link_state(self.body_name, self.ee_link) current_pos, current_orn = state[0], state[1] current_orn = self.sim.get_euler_from_quaternion(current_orn) new_pos = action[0:3] * self.max_joint_change + current_pos new_orn = action[3:6] * self.max_joint_change + current_orn self.goto(new_pos, self.sim.get_quaternion_from_euler(new_orn), gripper) def relative_joint_step(self, action, gripper) -> None: """apply relative values to the joints""" assert len(action) == self.num_DOF # Δx_i current_poses = self.get_current_pos() jointPoses = action * self.max_joint_change + current_poses self.goto_joint_poses(jointPoses, gripper) def absolute_joint_step(self, action, gripper) -> None: """apply absolute values to the joints""" self.goto_joint_poses(action, gripper) def end_effector_step(self, action, gripper): assert len(action) == 3 ee_ctrl = action * self.max_joint_change ee_position = self.get_ee_position() ee_target_position = ee_position + ee_ctrl self.goto(ee_target_position, self.default_arm_orn_RPY, gripper) def goto(self, pos=None, orn=None, gripper=None) -> None: ''' Uses PyBullet IK to solve for desired joint angles ''' joint_poses = self.sim.bclient.calculateInverseKinematics( bodyUniqueId=self._uid, endEffectorLinkIndex=self.ee_link, targetPosition=pos, targetOrientation=orn, # IK requires all 4 lists (lowerLimits, upperLimits, jointRanges, restPoses). # Otherwise regular IK will be used. lowerLimits=self.arm_lower_limits + self.ee_lower_limits, upperLimits=self.arm_upper_limits + self.ee_upper_limits, jointRanges=self.arm_joint_ranges + self.ee_joint_ranges, restPoses=self.NEUTRAL_JOINT_VALUES + self.NEUTRAL_FINGER_VALUES, maxNumIterations=100, residualThreshold=1e-5) joint_poses = list(joint_poses[0:self.num_DOF]) self.goto_joint_poses(joint_poses, gripper) def goto_joint_poses(self, joint_target_angles: List, gripper: float) -> None: if gripper is not None: # call robot-specific gripper function finger_target_angles = self.gripper_control(gripper) else: finger_target_angles = self.gripper_control(None) self.control_joints(np.concatenate([joint_target_angles, finger_target_angles])) def gripper_control(self, amount) -> List: raise NotImplementedError def get_camera_img(self): raise NotImplementedError def get_link_position(self, link: int) -> np.ndarray: """Returns the position of a link as (x, y, z)""" return np.array(self.sim.get_link_position(self.body_name, link)) def get_link_velocity(self, link: int) -> np.ndarray: """Returns the velocity of a link as (vx, vy, vz)""" return np.array(self.sim.get_link_velocity(self.body_name, link)) def get_current_pos(self) -> np.ndarray: return np.array([self.sim.get_joint_angle(self.body_name, j) for j in self.arm_joints]) def control_joints(self, target_angles: List) -> None: self.sim.bclient.setJointMotorControlArray( bodyUniqueId=self._uid, jointIndices=self.arm_joints + self.ee_joints, controlMode=self.sim.bclient.POSITION_CONTROL, targetPositions=target_angles, forces=self.arm_max_force + self.ee_max_force, ) def get_fingers_width(self) -> float: """Returns the distance between the fingers.""" finger1 = self.sim.get_joint_angle(self.body_name, self.left_finger_id) finger2 = self.sim.get_joint_angle(self.body_name, self.right_finger_id) return finger1 + finger2 def gripper_ray_obs(self): """ This method performs a single raycast to determine which object is between the robot's grippers with a specific z-offset accounting for detection between the fingertips. """ leftg = self.get_link_position(self.left_finger_id) rightg = self.get_link_position(self.right_finger_id) leftg[-1] -= self.gripper_obs_left_z_offset rightg[-1] -= self.gripper_obs_right_z_offset leftg = tuple(leftg) rightg = tuple(rightg) hit_obj_id, link_idx, hit_fraction, hit_pos, hit_normal = self.sim.bclient.rayTest(leftg, rightg)[0] if DEBUG: line_color = RGBCOLORS.MAGENTA.value self.sim.bclient.addUserDebugLine(leftg, rightg, line_color, 0.5, 1, replaceItemUniqueId=0) return hit_obj_id, link_idx, hit_fraction, hit_pos, hit_normal def get_obs(self): if not self.fixed_gripper: gripper_state = np.concatenate((self.get_ee_position(), self.get_ee_velocity(), [self.get_fingers_width()])) else: gripper_state = np.concatenate((self.get_ee_position(), self.get_ee_velocity())) if self.full_state: state = self.sim.get_link_state(self.body_name, self.ee_link) pos, orn, vel, orn_vel = state[0], state[1], state[-2], state[-1] return np.concatenate((gripper_state, pos, vel, self.sim.get_euler_from_quaternion(orn))).copy() else: return gripper_state.copy() def get_default_controls(self): if self.action_type == 'absolute_joints': default_values = { _key: _val for _key, _val in zip([str(_idx) for _idx in range(len(self.NEUTRAL_JOINT_VALUES))], self.NEUTRAL_JOINT_VALUES) } elif self.action_type == 'relative_joints': default_values = { _key: _val for _key, _val in zip([str(_idx) for _idx in range(len(self.NEUTRAL_JOINT_VALUES))], [0] * len(self.NEUTRAL_JOINT_VALUES)) } else: default_values = {"X": 0.0, "Y": 0.0, "Z": 0.0, "1": 0.0, "2": 0.0, "3": 0.0, "4": 0.0} return default_values def get_xyz_rpy_controls(self): default_values = self.get_default_controls() controls = [] as_low = self.action_space.low as_high = self.action_space.high if self.action_type in ['relative_joints', 'absolute_joints']: for _idx, _dv in enumerate(list(default_values.values())): controls.append(self.sim.bclient.addUserDebugParameter(str(_idx), as_low[_idx], as_high[_idx], _dv)) else: ## if action_type == 'end_effector' controls.append(self.sim.bclient.addUserDebugParameter("X", as_low[0], as_high[0], default_values['X'])) controls.append(self.sim.bclient.addUserDebugParameter("Y", as_low[1], as_high[1], default_values['Y'])) controls.append(self.sim.bclient.addUserDebugParameter("Z", as_low[2], as_high[2], default_values['Z'])) if self.action_type in ['relative_rpy', 'absolute_rpy']: # RPY controls.append(self.sim.bclient.addUserDebugParameter("Rx", as_low[3], as_high[3], default_values['1'])) controls.append(self.sim.bclient.addUserDebugParameter("Px", as_low[4], as_high[4], default_values['2'])) controls.append(self.sim.bclient.addUserDebugParameter("Yx", as_low[5], as_high[5], default_values['3'])) elif self.action_type in ['relative_quat', 'absolute_quat']: # quaternions controls.append(self.sim.bclient.addUserDebugParameter("Qx", as_low[3], as_high[3], default_values['1'])) controls.append(self.sim.bclient.addUserDebugParameter("Qy", as_low[4], as_high[4], default_values['2'])) controls.append(self.sim.bclient.addUserDebugParameter("Qz", as_low[5], as_high[5], default_values['3'])) controls.append(self.sim.bclient.addUserDebugParameter("Qw", as_low[6], as_high[6], default_values['4'])) if not self.fixed_gripper: controls.append(self.sim.bclient.addUserDebugParameter("grip", as_low[-1], as_high[-1], 0)) return controls
{"hexsha": "f40688449d41149301c01e371b8340bf2aa38858", "size": 18829, "ext": "py", "lang": "Python", "max_stars_repo_path": "lanro/robots/pybrobot.py", "max_stars_repo_name": "knowledgetechnologyuhh/lannro-gym", "max_stars_repo_head_hexsha": "ac3afcf7d8ed854d75368135b023edf055644dd2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "lanro/robots/pybrobot.py", "max_issues_repo_name": "knowledgetechnologyuhh/lannro-gym", "max_issues_repo_head_hexsha": "ac3afcf7d8ed854d75368135b023edf055644dd2", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "lanro/robots/pybrobot.py", "max_forks_repo_name": "knowledgetechnologyuhh/lannro-gym", "max_forks_repo_head_hexsha": "ac3afcf7d8ed854d75368135b023edf055644dd2", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 49.55, "max_line_length": 123, "alphanum_fraction": 0.6269584152, "include": true, "reason": "import numpy", "num_tokens": 4388}
// Copyright 2015-2018 Hans Dembinski // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_HISTOGRAM_AXIS_CATEGORY_HPP #define BOOST_HISTOGRAM_AXIS_CATEGORY_HPP #include <algorithm> #include <boost/histogram/axis/iterator.hpp> #include <boost/histogram/axis/option.hpp> #include <boost/histogram/detail/compressed_pair.hpp> #include <boost/histogram/detail/meta.hpp> #include <boost/histogram/fwd.hpp> #include <boost/throw_exception.hpp> #include <stdexcept> #include <type_traits> #include <utility> #include <vector> namespace boost { namespace histogram { namespace axis { /** Maps at a set of unique values to bin indices. The axis maps a set of values to bins, following the order of arguments in the constructor. The optional overflow bin for this axis counts input values that are not part of the set. Binning has O(N) complexity, but with a very small factor. For small N (the typical use case) it beats other kinds of lookup. @tparam Value input value type, must be equal-comparable. @tparam MetaData type to store meta data. @tparam Options see boost::histogram::axis::option. @tparam Allocator allocator to use for dynamic memory management. The options `underflow` and `circular` are not allowed. The options `growth` and `overflow` are mutually exclusive. */ template <class Value, class MetaData, class Options, class Allocator> class category : public iterator_mixin<category<Value, MetaData, Options, Allocator>> { using value_type = Value; using metadata_type = detail::replace_default<MetaData, std::string>; using options_type = detail::replace_default<Options, option::overflow>; static_assert(!test<options_type, option::underflow>::value, "category axis cannot have underflow"); static_assert(!test<options_type, option::circular>::value, "category axis cannot be circular"); static_assert(!test<options_type, option::growth>::value || !test<options_type, option::overflow>::value, "growing category axis cannot have overflow"); using allocator_type = Allocator; using vector_type = std::vector<value_type, allocator_type>; public: explicit category(allocator_type alloc = {}) : vec_meta_(vector_type(alloc)) {} /** Construct from iterator range of unique values. * * \param begin begin of category range of unique values. * \param end end of category range of unique values. * \param meta description of the axis. * \param alloc allocator instance to use. */ template <class It, class = detail::requires_iterator<It>> category(It begin, It end, metadata_type meta = {}, allocator_type alloc = {}) : vec_meta_(vector_type(begin, end, alloc), std::move(meta)) { if (size() == 0) BOOST_THROW_EXCEPTION(std::invalid_argument("bins > 0 required")); } /** Construct axis from iterable sequence of unique values. * * \param iterable sequence of unique values. * \param meta description of the axis. * \param alloc allocator instance to use. */ template <class C, class = detail::requires_iterable<C>> category(const C& iterable, metadata_type meta = {}, allocator_type alloc = {}) : category(std::begin(iterable), std::end(iterable), std::move(meta), std::move(alloc)) {} /** Construct axis from an initializer list of unique values. * * \param list `std::initializer_list` of unique values. * \param meta description of the axis. * \param alloc allocator instance to use. */ template <class U> category(std::initializer_list<U> list, metadata_type meta = {}, allocator_type alloc = {}) : category(list.begin(), list.end(), std::move(meta), std::move(alloc)) {} /// Constructor used by algorithm::reduce to shrink and rebin. category(const category& src, index_type begin, index_type end, unsigned merge) : category(src.vec_meta_.first().begin() + begin, src.vec_meta_.first().begin() + end, src.metadata()) { if (merge > 1) BOOST_THROW_EXCEPTION(std::invalid_argument("cannot merge bins for category axis")); } /// Return index for value argument. index_type index(const value_type& x) const noexcept { const auto beg = vec_meta_.first().begin(); const auto end = vec_meta_.first().end(); return static_cast<index_type>(std::distance(beg, std::find(beg, end, x))); } /// Returns index and shift (if axis has grown) for the passed argument. auto update(const value_type& x) { const auto i = index(x); if (i < size()) return std::make_pair(i, 0); vec_meta_.first().emplace_back(x); return std::make_pair(i, -1); } /// Return value for index argument. /// Throws `std::out_of_range` if the index is out of bounds. decltype(auto) value(index_type idx) const { if (idx < 0 || idx >= size()) BOOST_THROW_EXCEPTION(std::out_of_range("category index out of range")); return vec_meta_.first()[idx]; } /// Return value for index argument. decltype(auto) bin(index_type idx) const noexcept { return value(idx); } /// Returns the number of bins, without over- or underflow. index_type size() const noexcept { return static_cast<index_type>(vec_meta_.first().size()); } /// Returns the options. static constexpr unsigned options() noexcept { return options_type::value; } /// Returns reference to metadata. metadata_type& metadata() noexcept { return vec_meta_.second(); } /// Returns reference to const metadata. const metadata_type& metadata() const noexcept { return vec_meta_.second(); } template <class V, class M, class O, class A> bool operator==(const category<V, M, O, A>& o) const noexcept { const auto& a = vec_meta_.first(); const auto& b = o.vec_meta_.first(); return std::equal(a.begin(), a.end(), b.begin(), b.end()) && detail::relaxed_equal(metadata(), o.metadata()); } template <class V, class M, class O, class A> bool operator!=(const category<V, M, O, A>& o) const noexcept { return !operator==(o); } allocator_type get_allocator() const { return vec_meta_.first().get_allocator(); } template <class Archive> void serialize(Archive&, unsigned); private: detail::compressed_pair<vector_type, metadata_type> vec_meta_; template <class V, class M, class O, class A> friend class category; }; #if __cpp_deduction_guides >= 201606 template <class T> category(std::initializer_list<T>)->category<T>; category(std::initializer_list<const char*>)->category<std::string>; template <class T> category(std::initializer_list<T>, const char*)->category<T>; template <class T, class M> category(std::initializer_list<T>, const M&)->category<T, M>; #endif } // namespace axis } // namespace histogram } // namespace boost #endif
{"hexsha": "f5d63a3b5819d3badabcf5a3be437ff423af9e3f", "size": 6925, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/boost/histogram/axis/category.hpp", "max_stars_repo_name": "henryiii/histogram", "max_stars_repo_head_hexsha": "d9f000cb86a4b4ac5ebfcb395616fa9aaa28e06c", "max_stars_repo_licenses": ["BSL-1.0"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "include/boost/histogram/axis/category.hpp", "max_issues_repo_name": "henryiii/histogram", "max_issues_repo_head_hexsha": "d9f000cb86a4b4ac5ebfcb395616fa9aaa28e06c", "max_issues_repo_licenses": ["BSL-1.0"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "include/boost/histogram/axis/category.hpp", "max_forks_repo_name": "henryiii/histogram", "max_forks_repo_head_hexsha": "d9f000cb86a4b4ac5ebfcb395616fa9aaa28e06c", "max_forks_repo_licenses": ["BSL-1.0"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 37.4324324324, "max_line_length": 90, "alphanum_fraction": 0.6979061372, "num_tokens": 1636}
import numpy as np import cv2 import matplotlib.pyplot as plt import os import random import sys import tensorflow as tf from tensorflow import keras # BUILDING MODEL def down_conv_block(x, filters, kernel_size=(3, 3), padding='SAME', strides=1): c = keras.layers.Conv2D(filters, kernel_size=kernel_size, padding=padding, strides=strides, activation='relu')(x) c = keras.layers.Conv2D(filters, kernel_size=kernel_size, padding=padding, strides=strides, activation='relu')(c) p = keras.layers.MaxPool2D(pool_size=(2, 2), strides=(2, 2))(c) return c, p def up_conv_block(x, skip, filters, kernel_size=(3, 3), padding='SAME', strides=1): us = keras.layers.UpSampling2D(size=(2, 2))(x) concat = keras.layers.Concatenate()([us, skip]) c = keras.layers.Conv2D(filters, kernel_size=kernel_size, padding=padding, strides=strides, activation='relu')(concat) c = keras.layers.Conv2D(filters, kernel_size=kernel_size, padding=padding, strides=strides, activation='relu')(c) return c def bottleneck(x, filters, kernel_size=(3, 3), padding='SAME', strides=1): c = keras.layers.Conv2D(filters=filters, kernel_size=kernel_size, padding=padding, strides=strides, activation='relu')(x) c = keras.layers.Conv2D(filters=filters, kernel_size=kernel_size, padding=padding, strides=strides, activation='relu')(c) return c def UNET(): input = keras.layers.Input((128, 128, 3)) c1, p1 = down_conv_block(x=input, filters=16) c2, p2 = down_conv_block(x=p1, filters=32) c3, p3 = down_conv_block(x=p2, filters=64) c4, p4 = down_conv_block(x=p3, filters=128) bn = bottleneck(x=p4, filters=256) u1 = up_conv_block(x=bn, skip=c4, filters=128) u2 = up_conv_block(x=u1, skip=c3, filters=64) u3 = up_conv_block(x=u2, skip=c2, filters=32) u4 = up_conv_block(x=u3, skip=c1, filters=16) outputs = keras.layers.Conv2D(filters=1, kernel_size=(1,1), padding='SAME', activation='sigmoid')(u4) model = keras.models.Model(input, outputs) return model
{"hexsha": "7e55f7db77533b2acd256c109281181e4750d4ce", "size": 2044, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/model.py", "max_stars_repo_name": "RaghavPrabhakar66/Kaggle-Data-Science-Bowl-2018", "max_stars_repo_head_hexsha": "fd30fc30d438faaf22bf054da911e7b698fc8f41", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "scripts/model.py", "max_issues_repo_name": "RaghavPrabhakar66/Kaggle-Data-Science-Bowl-2018", "max_issues_repo_head_hexsha": "fd30fc30d438faaf22bf054da911e7b698fc8f41", "max_issues_repo_licenses": ["MIT"], "max_issues_count": 1, "max_issues_repo_issues_event_min_datetime": "2021-04-30T21:18:51.000Z", "max_issues_repo_issues_event_max_datetime": "2021-04-30T21:18:51.000Z", "max_forks_repo_path": "scripts/model.py", "max_forks_repo_name": "RaghavPrabhakar66/Kaggle-Data-Science-Bowl-2018", "max_forks_repo_head_hexsha": "fd30fc30d438faaf22bf054da911e7b698fc8f41", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 36.5, "max_line_length": 129, "alphanum_fraction": 0.7035225049, "include": true, "reason": "import numpy", "num_tokens": 592}
{- Byzantine Fault Tolerant Consensus Verification in Agda, version 0.9. Copyright (c) 2020, 2021, Oracle and/or its affiliates. Licensed under the Universal Permissive License v 1.0 as shown at https://opensource.oracle.com/licenses/upl -} -- This module proves the two "VotesOnce" proof obligations for our fake handler open import Optics.All open import LibraBFT.Prelude open import LibraBFT.Lemmas open import LibraBFT.Base.KVMap open import LibraBFT.Base.PKCS import LibraBFT.Concrete.Properties.VotesOnce as VO open import LibraBFT.Impl.Base.Types open import LibraBFT.Impl.Consensus.Types open import LibraBFT.Impl.Consensus.RoundManager.Properties open import LibraBFT.Impl.Handle open import LibraBFT.Impl.Handle.Properties open import LibraBFT.Impl.NetworkMsg open import LibraBFT.Impl.Util.Crypto open import LibraBFT.Impl.Util.Util open import LibraBFT.Concrete.System open import LibraBFT.Concrete.System.Parameters open EpochConfig open import LibraBFT.Yasm.Types open import LibraBFT.Yasm.Yasm ℓ-RoundManager ℓ-VSFP ConcSysParms PeerCanSignForPK (λ {st} {part} {pk} → PeerCanSignForPK-stable {st} {part} {pk}) open WithSPS impl-sps-avp open Structural impl-sps-avp -- In this module, we prove the two implementation obligations for the VotesOnce rule. Note -- that it is not yet 100% clear that the obligations are the best definitions to use. See comments -- in Concrete.VotesOnce. We will want to prove these obligations for the fake/simple -- implementation (or some variant on it) and streamline the proof before we proceed to tackle more -- ambitious properties. module LibraBFT.Impl.Properties.VotesOnce where -- This is the information we can establish about the state after the first time a signature is -- sent, and that we can carry forward to subsequent states, so we can use it to prove -- VO.ImplObligation₁. LvrProp : CarrierProp LvrProp v rm = ( v ^∙ vEpoch ≢ (₋rmEC rm) ^∙ rmEpoch ⊎ (v ^∙ vEpoch ≡ (₋rmEC rm) ^∙ rmEpoch × v ^∙ vRound ≤ (₋rmEC rm) ^∙ rmLastVotedRound)) LvrCarrier = PropCarrier LvrProp firstSendEstablishes : Vote → PK → (origSt : SystemState) → SystemStateRel Step firstSendEstablishes _ _ _ (step-peer (step-cheat _)) = Lift (ℓ+1 ℓ-RoundManager) ⊥ firstSendEstablishes v' pk origSt sysStep@(step-peer {pid'} {pre = pre} pstep@(step-honest _)) = ( ReachableSystemState pre × ¬ MsgWithSig∈ pk (signature v' unit) (msgPool pre) × LvrCarrier pk (₋vSignature v') (StepPeer-post pstep) ) open PeerCanSignForPK isValidNewPart⇒fSE : ∀ {pk v'}{pre : SystemState} {post : SystemState} {theStep : Step pre post} → Meta-Honest-PK pk → (ivnp : IsValidNewPart (₋vSignature v') pk theStep) → firstSendEstablishes v' pk pre theStep isValidNewPart⇒fSE {pre = pre} {theStep = step-peer {pid = β} {outs = outs} pstep} hpk (_ , ¬init , ¬sentb4 , mws , _) with Any-++⁻ (actionsToSentMessages β outs) (msg∈pool mws) -- TODO-1 : Much of this proof is not specific to the particular property being proved, and could be -- refactored into Yasm.Properties. See proof of unwind and refactor to avoid redundancy? ...| inj₂ furtherBack = ⊥-elim (¬sentb4 (MsgWithSig∈-transp mws furtherBack)) ...| inj₁ thisStep with pstep ...| step-cheat isCheat with thisStep ...| here refl with isCheat (msg⊆ mws) (msgSigned mws) (transp-¬∈GenInfo₁ ¬init mws) ...| inj₁ dis = ⊥-elim (hpk dis) ...| inj₂ sentb4 rewrite msgSameSig mws = ⊥-elim (¬sentb4 sentb4) isValidNewPart⇒fSE {pk}{v'}{pre}{theStep = step-peer {β} {postst} {outs} {.pre} pstep} hpk (r , ¬init , ¬sentb4 , mws , refl , zefl , vpk) | inj₁ thisStep | step-honest {.β} hstep with senderMsgPair∈⇒send∈ outs thisStep ...| nm∈outs , refl with hstep ...| step-msg {_ , P m} m∈pool ini with impl-sps-avp {m = msgWhole mws} r hpk hstep nm∈outs (msg⊆ mws) (msgSigned mws) (transp-¬∈GenInfo₁ ¬init mws ) ...| inj₂ sentb4 rewrite msgSameSig mws = ⊥-elim (¬sentb4 sentb4) ...| inj₁ (vpk' , _) with noEpochIdChangeYet {ppre = peerStates pre β} r refl hstep ini ...| eids≡ with newVoteSameEpochGreaterRound r hstep (¬subst ¬init (msgSameSig mws)) hpk (msg⊆ mws) nm∈outs (msgSigned mws) (¬subst ¬sentb4 (msgSameSig mws)) ...| refl , refl , newlvr with StepPeer-post-lemma pstep ...| post≡ = r , ¬sentb4 , mkCarrier (step-s r (step-peer (step-honest hstep))) mws (override-target-≡ {a = β}) vpk' (inj₂ ( trans eids≡ (auxEid post≡) , ≤-reflexive (trans newlvr (auxLvr post≡)))) where auxEid = cong (_^∙ rmEpoch ∘ ₋rmEC) auxLvr = cong (_^∙ rmLastVotedRound ∘ ₋rmEC) ImplPreservesLvr : PeerStepPreserves LvrProp -- We don't have a real model for the initial peer state, so we can't prove this case yet. -- Eventually, we'll prove something like a peer doesn't initialize to an epoch for which -- it has already sent votes. ImplPreservesLvr r prop (step-init uni) = ⊥-elim (uninitd≢initd (trans (sym uni) (carrInitd prop))) ImplPreservesLvr {pre = pre} r prop (step-msg {m} m∈pool inited) with carrProp prop ...| preprop with noEpochIdChangeYet r refl (step-msg m∈pool inited) (carrInitd prop) ...| eids≡ with preprop ...| inj₁ diffEpoch = inj₁ λ x → diffEpoch (trans x (sym eids≡)) ...| inj₂ (sameEpoch , rnd≤ppre) with (msgPart (carrSent prop)) ^∙ vEpoch ≟ (₋rmEC (peerStates pre (msgSender (carrSent prop)))) ^∙ rmEpoch ...| no neq = ⊥-elim (neq sameEpoch) ...| yes refl with lastVoteRound-mono r refl (step-msg m∈pool inited) (carrInitd prop) ...| es≡⇒lvr≤ = inj₂ (eids≡ , ≤-trans rnd≤ppre (es≡⇒lvr≤ eids≡)) LvrCarrier-transp* : ∀ {pk sig} {start : SystemState}{final : SystemState} → LvrCarrier pk sig start → (step* : Step* start final) → LvrCarrier pk sig final LvrCarrier-transp* lvrc step-0 = lvrc LvrCarrier-transp* lvrc (step-s s* s) = Carrier-transp LvrProp ImplPreservesLvr s (LvrCarrier-transp* lvrc s*) fSE⇒rnd≤lvr : ∀ {v' pk} → {final : SystemState} → Meta-Honest-PK pk → ∀ {pre : SystemState}{post : SystemState}{theStep : Step pre post} → firstSendEstablishes v' pk post theStep → Step* post final → LvrCarrier pk (signature v' unit) final fSE⇒rnd≤lvr hpk {theStep = step-peer (step-honest _)} (_ , _ , lvrc) step* = LvrCarrier-transp* lvrc step* vo₁ : VO.ImplObligation₁ -- Initialization doesn't send any messages at all so far; Agda figures that out so no proof -- required here. In future it may send messages, but any verifiable Signatures for honest PKs -- they contain will be from GenesisInfo. vo₁ {pid} {pk = pk} {pre = pre} r sm@(step-msg {(_ , nm)} m∈pool pidini) {m = m} {v'} hpk v⊂m m∈outs sig ¬init ¬sentb4 vpb v'⊂m' m'∈pool sig' ¬init' refl rnds≡ with msgsToSendWereSent {pid} {nm} m∈outs ...| _ , vm , _ , refl , _ with newVoteSameEpochGreaterRound r (step-msg m∈pool pidini) ¬init hpk v⊂m m∈outs sig ¬sentb4 ...| eIds≡' , suclvr≡v'rnd , _ -- Use unwind to find the step that first sent the signature for v', then Any-Step-elim to -- prove that going from the poststate of that step to pre results in a state in which the -- round of v' is at most the last voted round recorded in the peerState of the peer that -- sent v' with Any-Step-elim {Q = LvrCarrier pk (₋vSignature v') pre} (fSE⇒rnd≤lvr {v'} hpk) (Any-Step-map (λ _ ivnp → isValidNewPart⇒fSE {v' = v'} hpk ivnp) (unwind r hpk v'⊂m' m'∈pool sig' ¬init')) ...| mkCarrier r' mws ini vpf' preprop -- The fake/trivial handler always sends a vote for its current epoch, but for a -- round greater than its last voted round with sameSig⇒sameVoteData (msgSigned mws) sig' (msgSameSig mws) ...| inj₁ hb = ⊥-elim (PerState.meta-sha256-cr pre r hb) ...| inj₂ refl with msgSender mws ≟NodeId pid ...| no neq = -- We know that *after* the step, pid can sign v (vpb is about the post-state). For v', we -- know it about state "pre"; we transport this to the post-state using -- PeerCanSignForPK-Stable. Because EpochConfigs known in a system state are consistent with -- each other (i.e., trivially, for now because only the initial EpochConfig is known), we can -- use PK-inj to contradict the assumption that v and v' were sent by different peers (neq). let theStep = step-peer (step-honest sm) vpf'' = PeerCanSignForPK-stable r theStep vpf' 𝓔s≡ = availEpochsConsistent {pid} {msgSender mws} (step-s r theStep) vpb vpf'' in ⊥-elim (neq (trans (trans (sym (nid≡ vpf'')) (PK-inj-same-ECs (sym 𝓔s≡) (trans (pk≡ vpf'') (sym (pk≡ vpb))))) (nid≡ vpb))) vo₁ {pid} {pk = pk} {pre = pre} r sm@(step-msg m∈pool ps≡) {v' = v'} hpk v⊂m m∈outs sig ¬init ¬sentb4 vpb v'⊂m' m'∈pool sig' _ refl rnds≡ | _ , vm , _ , refl , _ | eIds≡' , suclvr≡v'rnd , _ | mkCarrier r' mws ini vpf' preprop | inj₂ refl | yes refl with preprop ...| inj₁ diffEpoch = ⊥-elim (diffEpoch eIds≡') ...| inj₂ (sameEpoch , v'rnd≤lvr) -- So we have proved both that the round of v' is ≤ the lastVotedRound of -- the peer's state and that the round of v' is one greater than that value, -- which leads to a contradiction = ⊥-elim (1+n≰n (≤-trans (≤-reflexive suclvr≡v'rnd) (≤-trans (≤-reflexive rnds≡) v'rnd≤lvr))) -- TODO-1: This proof should be refactored to reduce redundant reasoning about the two votes. The -- newVoteSameEpochGreaterRound property uses similar reasoning. vo₂ : VO.ImplObligation₂ vo₂ {pid = pid} {pk = pk} {pre = pre} r (step-msg {_ , nm} m∈pool pinit) {v = v} {m} hpk v⊂m m∈outs sig ¬init vnew vpk v'⊂m' m'∈outs sig' ¬init' v'new vpk' es≡ rnds≡ with msgsToSendWereSent {pid} {nm} m∈outs ...| _ , vm , pm , refl , refl with proposalHandlerSentVote {pid} {0} {pm} {vm} {peerStates pre pid} m∈outs ...| _ , v∈outs with v⊂m -- Rebuilding keeps the same signature, and the SyncInfo included with the -- VoteMsg sent comprises QCs from the peer's state. Votes represented in -- those QCS have signatures that have been sent before, contradicting the -- assumption that v's signature has not been sent before. ...| vote∈qc {vs = vs} {qc} vs∈qc v≈rbld (inV qc∈m) rewrite cong ₋vSignature v≈rbld | procPMCerts≡ {0} {pm} {peerStates pre pid} {vm} v∈outs | SendVote-inj-v (Any-singleton⁻ v∈outs) with qcVotesSentB4 r pinit (VoteMsgQCsFromRoundManager r (step-msg m∈pool pinit) hpk v⊂m m∈outs qc∈m) vs∈qc ¬init ...| mws = ⊥-elim (vnew mws) vo₂ {pid = pid} {pk = pk} {pre = pre} r (step-msg {_ , nm} m∈pool pinit) {v = v} {m} {v'} {m'} hpk v⊂m m∈outs sig ¬init vnew vpk v'⊂m' m'∈outs sig' ¬init' v'new vpk' es≡ rnds≡ | _ , vm , pm , refl , refl | _ , v∈outs | vote∈vm with msgsToSendWereSent {pid} {nm} {m'} {st = peerStates pre pid} m'∈outs ...| _ , vm' , pm , refl , refl with proposalHandlerSentVote {pid} {0} {pm} {vm'} {peerStates pre pid} m'∈outs ...| _ , v'∈outs rewrite cong ₋vmVote (SendVote-inj-v (trans (Any-singleton⁻ v∈outs) (sym (Any-singleton⁻ v'∈outs)))) with v'⊂m' ...| vote∈vm = refl ...| vote∈qc {vs = vs} {qc} vs∈qc v≈rbld (inV qc∈m) rewrite cong ₋vSignature v≈rbld | procPMCerts≡ {0} {pm} {peerStates pre pid} {vm} v∈outs | SendVote-inj-v (Any-singleton⁻ v∈outs) | cong ₋vmVote (SendVote-inj-v (trans (Any-singleton⁻ v∈outs) (sym (Any-singleton⁻ v'∈outs)))) with qcVotesSentB4 r pinit (VoteMsgQCsFromRoundManager r (step-msg m∈pool pinit) hpk v'⊂m' m'∈outs qc∈m) vs∈qc ¬init' ...| mws = ⊥-elim (v'new mws)
{"hexsha": "aa4fe33f6c3f2379b58ec9fcbb7d316955dc8d26", "size": 12674, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "LibraBFT/Impl/Properties/VotesOnce.agda", "max_stars_repo_name": "cwjnkins/bft-consensus-agda", "max_stars_repo_head_hexsha": "71aa2168e4875ffdeece9ba7472ee3cee5fa9084", "max_stars_repo_licenses": ["UPL-1.0"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "LibraBFT/Impl/Properties/VotesOnce.agda", "max_issues_repo_name": "cwjnkins/bft-consensus-agda", "max_issues_repo_head_hexsha": "71aa2168e4875ffdeece9ba7472ee3cee5fa9084", "max_issues_repo_licenses": ["UPL-1.0"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "LibraBFT/Impl/Properties/VotesOnce.agda", "max_forks_repo_name": "cwjnkins/bft-consensus-agda", "max_forks_repo_head_hexsha": "71aa2168e4875ffdeece9ba7472ee3cee5fa9084", "max_forks_repo_licenses": ["UPL-1.0"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 53.9319148936, "max_line_length": 146, "alphanum_fraction": 0.610699069, "num_tokens": 4146}
SUBROUTINE STR_GET_ITEM & (item_number,string,item,first_character,last_character) c*********************************************************************** c subroutine str_get_item c*********************************************************************** c Program Source: Naval Ocean Systems Center - Code 542 c Date: c 05 Apr 1990 c Function: c Returns the specified item encoded in a character string; c the values are separated by commas and spaces c Parameters passed: c item_number [i] number of the item to be returned c string [s] data string c Parameters returned: c item [s] string containing the item c first_character [i] character at which the item starts c last_character [i] character at which the item ends c Common blocks referenced: c Functions and subroutines referenced: c len c min c str_length c References: c Change History: c 08 May 96 Added test for TAB character. c*******************!*************************************************** character*(*) string,item character, parameter :: TAB = char(9) character*256 temporary integer str_length,first_character,last_character c Get dimension of the strings len_item =LEN(item) len_string =LEN(string) length_string=STR_LENGTH(string) if (length_string .eq. 0 .or. item_number .eq. 0) RETURN jf=1 item_count=0 do while (jf .le. length_string .and. & item_count .lt. item_number) c Find the starting location of the value do while (string(jf:jf) .eq. ' ' .or. & string(jf:jf) .eq. TAB) jf=jf+1 end do c Check for null items do while (string(jf:jf) .eq. ',') item_count=item_count+1 if (item_count .eq. item_number) then first_character=jf last_character=jf RETURN else & if (jf .eq. length_string) then first_character=jf last_character=jf RETURN end if jf=jf+1 end do c Find the last character of the item jl=jf+1 do while (jl .le. length_string .and. & string(jl:jl) .ne. ' ' .and. & string(jl:jl) .ne. TAB .and. & string(jl:jl) .ne. ',') jl=jl+1 end do item_count=item_count+1 temporary=string(jf:MIN(jl,jf+len_item)-1) first_character=jf last_character=jl-1 jf=jl+1 end do if (item_count .eq. item_number) item=temporary RETURN END ! STR_GET_ITEM
{"hexsha": "d4ff5abdc11cf081461b45e671211c3ab7ef17f6", "size": 2786, "ext": "for", "lang": "FORTRAN", "max_stars_repo_path": "LWPCv21/lib/str_get_item.for", "max_stars_repo_name": "spinorkit/LWPC", "max_stars_repo_head_hexsha": "6144eac3b1ac1322d0ee363ec689bf8123bdeebd", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 5, "max_stars_repo_stars_event_min_datetime": "2019-10-17T17:13:28.000Z", "max_stars_repo_stars_event_max_datetime": "2021-10-01T03:29:27.000Z", "max_issues_repo_path": "LWPCv21/lib/str_get_item.for", "max_issues_repo_name": "spinorkit/LWPC", "max_issues_repo_head_hexsha": "6144eac3b1ac1322d0ee363ec689bf8123bdeebd", "max_issues_repo_licenses": ["MIT"], "max_issues_count": 2, "max_issues_repo_issues_event_min_datetime": "2021-07-07T10:52:53.000Z", "max_issues_repo_issues_event_max_datetime": "2021-07-12T11:01:31.000Z", "max_forks_repo_path": "LWPCv21/lib/str_get_item.for", "max_forks_repo_name": "spinorkit/LWPC", "max_forks_repo_head_hexsha": "6144eac3b1ac1322d0ee363ec689bf8123bdeebd", "max_forks_repo_licenses": ["MIT"], "max_forks_count": 7, "max_forks_repo_forks_event_min_datetime": "2019-06-22T01:48:48.000Z", "max_forks_repo_forks_event_max_datetime": "2021-10-01T03:31:50.000Z", "avg_line_length": 28.7216494845, "max_line_length": 72, "alphanum_fraction": 0.5254845657, "num_tokens": 678}
import os import json import pandas as pd import numpy as np import gensim.downloader as api from argparse import ArgumentParser parser = ArgumentParser() parser.add_argument("--data", type=str, default="./train.csv", help="path to training data") parser.add_argument("--approach", type=int, default=1, choices=[1, 2, 3], help="approach to be followed for the task (based on the problem statement)") parser.add_argument("--train", action='store_true', help="flag to indicate that dataset is to be used for training (needed for approaches 2 & 3)") parser.add_argument("--save_data_as", type=str, default="nc_emb.pkl", help="save the created dataset as") class DatasetPreparationApproach1: def __init__(self, data_path): print("Loading glove embeddings...") self.df = pd.read_csv(data_path, header=None, names=["word1", "word2", "interpretation"]) self.model_gigaword = api.load("glove-wiki-gigaword-300") def __getNounCompoundEmbeddings(self, word1, word2): try: emb1 = self.model_gigaword[word1] except Exception: emb1 = np.random.rand(300) try: emb2 = self.model_gigaword[word2] except Exception: emb2 = np.random.rand(300) return (emb1 + emb2) / 2 def prepareCompoundWordEmbeddings(self, save_as): print("Obtaining embeddings for noun compounds...") self.df["embedding"] = self.df.apply(lambda s: self.__getNounCompoundEmbeddings(s["word1"], s["word2"]), axis=1) if not os.path.exists(os.path.join(os.path.dirname(__file__), "data")): os.makedirs(os.path.join(os.path.dirname(__file__), "data")) self.df.to_pickle(os.path.join(os.path.dirname(__file__), "data", save_as)) class DatasetPreparationApproach2_3: def __init__(self, json_path, is_train=True): print("Loading context sentences for noun compounds...") with open(json_path, "r") as fin: self.data = json.loads(fin.read()) self.is_train = is_train if is_train: self.df = pd.DataFrame({"nc": [], "context":[], "label": []}) else: self.df = pd.DataFrame({"nc": [], "context":[]}) def prepareDataframe(self, save_as): print("Preparing dataframe...") for i in range(len(self.data)): if len(self.data[i]["context"]) == 0: if self.is_train: self.df= self.df.append({"nc": self.data[i]["nc"], "context": self.data[i]["nc"], "label": self.data[i]["label"]}, ignore_index = True) else: self.df = self.df.append({"nc": self.data[i]["nc"], "context": self.data[i]["nc"]}, ignore_index = True) for j in range(len(self.data[i]["context"])): if self.is_train: self.df = self.df.append({"nc": self.data[i]["nc"], "context": self.data[i]["context"][j], "label": self.data[i]["label"]}, ignore_index = True) else: self.df = self.df.append({"nc": self.data[i]["nc"], "context": self.data[i]["context"][j]}, ignore_index = True) self.df.to_pickle(os.path.join(os.path.dirname(__file__), "data", save_as)) def main(): args = parser.parse_args() if args.approach == 1: dp = DatasetPreparationApproach1(args.data) dp.prepareCompoundWordEmbeddings(args.save_data_as) else: dp = DatasetPreparationApproach2_3(args.data, args.train) dp.prepareDataframe(args.save_data_as) if __name__ == "__main__": main()
{"hexsha": "3d58cc6a02ecbd28d35c4de1222a63152ddab1f6", "size": 3588, "ext": "py", "lang": "Python", "max_stars_repo_path": "Assignment2/dataset.py", "max_stars_repo_name": "tezansahu/CS728_assignments", "max_stars_repo_head_hexsha": "98d8721b82ddab174b86647f1cd7c412d768b6b9", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "Assignment2/dataset.py", "max_issues_repo_name": "tezansahu/CS728_assignments", "max_issues_repo_head_hexsha": "98d8721b82ddab174b86647f1cd7c412d768b6b9", "max_issues_repo_licenses": ["Apache-2.0"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "Assignment2/dataset.py", "max_forks_repo_name": "tezansahu/CS728_assignments", "max_forks_repo_head_hexsha": "98d8721b82ddab174b86647f1cd7c412d768b6b9", "max_forks_repo_licenses": ["Apache-2.0"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 43.756097561, "max_line_length": 164, "alphanum_fraction": 0.6153846154, "include": true, "reason": "import numpy", "num_tokens": 860}
import numpy as np import pandas as pd import pytest from pandas.testing import assert_index_equal from evalml.pipelines import RegressionPipeline def test_regression_init(): clf = RegressionPipeline( component_graph=["Imputer", "One Hot Encoder", "Random Forest Regressor"] ) assert clf.parameters == { "Imputer": { "categorical_impute_strategy": "most_frequent", "numeric_impute_strategy": "mean", "categorical_fill_value": None, "numeric_fill_value": None, }, "One Hot Encoder": { "top_n": 10, "features_to_encode": None, "categories": None, "drop": "if_binary", "handle_unknown": "ignore", "handle_missing": "error", }, "Random Forest Regressor": {"n_estimators": 100, "max_depth": 6, "n_jobs": -1}, } assert clf.name == "Random Forest Regressor w/ Imputer + One Hot Encoder" assert clf.random_seed == 0 parameters = {"One Hot Encoder": {"top_n": 20}} clf = RegressionPipeline( component_graph=["Imputer", "One Hot Encoder", "Random Forest Regressor"], parameters=parameters, custom_name="Custom Pipeline", random_seed=42, ) assert clf.parameters == { "Imputer": { "categorical_impute_strategy": "most_frequent", "numeric_impute_strategy": "mean", "categorical_fill_value": None, "numeric_fill_value": None, }, "One Hot Encoder": { "top_n": 20, "features_to_encode": None, "categories": None, "drop": "if_binary", "handle_unknown": "ignore", "handle_missing": "error", }, "Random Forest Regressor": {"n_estimators": 100, "max_depth": 6, "n_jobs": -1}, } assert clf.name == "Custom Pipeline" assert clf.random_seed == 42 @pytest.mark.parametrize("target_type", ["category", "string", "bool"]) def test_invalid_targets_regression_pipeline( breast_cancer_local, wine_local, target_type, dummy_regression_pipeline_class ): X, y = wine_local if target_type == "category": y = pd.Series(y).astype("category") if target_type == "bool": X, y = breast_cancer_local y = y.map({"malignant": False, "benign": True}) mock_regression_pipeline = dummy_regression_pipeline_class(parameters={}) with pytest.raises( ValueError, match="Regression pipeline can only handle numeric target data" ): mock_regression_pipeline.fit(X, y) def test_woodwork_regression_pipeline(diabetes_local, linear_regression_pipeline_class): X, y = diabetes_local regression_pipeline = linear_regression_pipeline_class( parameters={"Linear Regressor": {"n_jobs": 1}} ) regression_pipeline.fit(X, y) assert not pd.isnull(regression_pipeline.predict(X)).any() @pytest.mark.parametrize( "index", [ list(range(-5, 0)), list(range(100, 105)), [f"row_{i}" for i in range(5)], pd.date_range("2020-09-08", periods=5), ], ) def test_pipeline_transform_and_predict_with_custom_index( index, linear_regression_pipeline_class, ): X = pd.DataFrame( {"categories": [f"cat_{i}" for i in range(5)], "numbers": np.arange(5)}, index=index, ) X.ww.init(logical_types={"categories": "categorical"}) y = pd.Series([0, 1.0, 1, 1, 0], index=index) pipeline = linear_regression_pipeline_class( parameters={"Linear Regressor": {"n_jobs": 1}} ) pipeline.fit(X, y) predictions = pipeline.predict(X) assert_index_equal(predictions.index, X.index)
{"hexsha": "d82c0f1c5c881435f3627fad48881539f7f6c582", "size": 3713, "ext": "py", "lang": "Python", "max_stars_repo_path": "evalml/tests/pipeline_tests/regression_pipeline_tests/test_regression.py", "max_stars_repo_name": "peterataylor/evalml", "max_stars_repo_head_hexsha": "917f07845c4a319bb08c7aaa8df9e09623df11c8", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "evalml/tests/pipeline_tests/regression_pipeline_tests/test_regression.py", "max_issues_repo_name": "peterataylor/evalml", "max_issues_repo_head_hexsha": "917f07845c4a319bb08c7aaa8df9e09623df11c8", "max_issues_repo_licenses": ["BSD-3-Clause"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "evalml/tests/pipeline_tests/regression_pipeline_tests/test_regression.py", "max_forks_repo_name": "peterataylor/evalml", "max_forks_repo_head_hexsha": "917f07845c4a319bb08c7aaa8df9e09623df11c8", "max_forks_repo_licenses": ["BSD-3-Clause"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 32.8584070796, "max_line_length": 88, "alphanum_fraction": 0.6218691085, "include": true, "reason": "import numpy", "num_tokens": 877}
#!/usr/bin/env python3 import cv2 import numpy as np from pathlib import Path import histogram from matplotlib import pyplot as plt import os import multiprocessing import argparse parser = argparse.ArgumentParser() parser.add_argument('clutter', help='directory containing clutter data') parser.add_argument('out', help='directory to record output') args = parser.parse_args() from yaml import safe_load with open('conf.yaml') as f: conf = safe_load(f.read()) objectsPath = Path(conf['objects']) print('Loading images from {}'.format(str(objectsPath))) def getName(team, obj): with open(str(team) + '/labels.yaml') as f: return safe_load(f.read())[str(obj).split('/')[-1]] objects = {getName(team, obj): [cv2.imread(str(pic), cv2.IMREAD_UNCHANGED) for pic in obj.glob('**/*.png')] for team in objectsPath.iterdir() if team.is_dir() for obj in team.iterdir() if obj.is_dir()} print('Found {} images of {} objects'.format(sum(len(objects[obj]) for obj in objects), len(objects))) histograms = {} for obj in objects: histograms[obj] = [] for img in objects[obj]: alpha = img[:,:,3] img = img[:,:,:3] img = cv2.cvtColor(img, cv2.COLOR_BGR2HSV) _, mask = cv2.threshold(alpha, 0, 255, cv2.THRESH_BINARY) data = histogram.getHistogramData(img, mask) #color = ('b','g','r') #for i,col in enumerate(color): # plt.plot(data[i],color = col) # plt.xlim([0,256]) #plt.show() #cv2.waitKey() histograms[obj].append(data) print('IoU for both first nerf: {}'.format(histogram.compareHistogramData(histograms['nerf'][0], histograms['nerf'][0]))) print('IoU for first and second nerf: {}'.format(histogram.compareHistogramData(histograms['nerf'][0], histograms['nerf'][1]))) print('IoU for nerf and catan: {}'.format(histogram.compareHistogramData(histograms['nerf'][0], histograms['catan'][0]))) print('IoU for nerf and pig: {}'.format(histogram.compareHistogramData(histograms['nerf'][0], histograms['pig'][0]))) # Get a mapping of object names to coco numbers obj2id = {} with open(args.clutter+'/names.txt') as f: mapping = [item for item in f.read().split('\n') if item] for obj in mapping: obj2id[obj] = len(obj2id) for obj in [obj for obj in objects if obj not in obj2id]: obj2id[obj] = len(obj2id) def detectObject(args): xPos, yPos, height, width, clutter = args xOffset = min(span * xPos, width-windowDim) yOffset = min(span * yPos, height-windowDim) mask = np.zeros((height, width), np.uint8) mask[yOffset:yOffset+windowDim, xOffset:xOffset+windowDim] = np.ones((windowDim, windowDim), np.uint8) hist = histogram.getHistogramData(clutter, mask) scores = {obj: 0 for obj in objects} for obj in objects: for objHist in histograms[obj]: scores[obj] = max(scores[obj], histogram.compareHistogramData(hist, objHist)) bestObj = max(scores, key=lambda obj: scores[obj]) if scores[bestObj] > cutoff: print('Detected obj {}, confidence {}, at {},{}'.format(bestObj, scores[bestObj], xPos, yPos)) return {'name': bestObj, 'score': scores[bestObj]} else: print('Did not find object, confidence {}, at {},{}'.format(scores[bestObj], xPos, yPos)) return {'name': '', 'score': scores[bestObj]} # Now we work through the input. windowDim = 100 span = int(windowDim / 2) cutoff = 0.3 p = multiprocessing.Pool(multiprocessing.cpu_count()) clutterPath = Path(args.clutter) for clutterFile in clutterPath.glob('*.jpg'): print('Processing {}'.format(str(clutterFile))) clutter = cv2.imread(str(clutterFile)) clutter = cv2.cvtColor(clutter, cv2.COLOR_BGR2HSV) height, width, _ = clutter.shape IDs = [[{'name': '', 'score': 0} for yPos in range(int(height/span))] for xPos in range(int(width/span))] # Dis get super ug real quick. for xPos in range(len(IDs)): IDs[xPos] = p.map(detectObject, [(xPos, yPos, height, width, clutter) for yPos in range(len(IDs[xPos]))]) # Now that that's done, we can make sense of it all! Yippee! annotations = '' for xPos in range(len(IDs)): for yPos in range(len(IDs[xPos])): name = IDs[xPos][yPos]['name'] if name: # Check if it's part of a region! def walk(x, y, name): if x < 0 or y < 0 or x >= len(IDs) or y >= len(IDs[x]) or IDs[x][y]['name'] != name: return [] parts = [(x*span, y*span)] IDs[x][y]['name'] = '' parts.extend(walk(x-1, y, name)) parts.extend(walk(x+1, y, name)) parts.extend(walk(x, y-1, name)) parts.extend(walk(x, y+1, name)) parts.extend(walk(x+1, y+1, name)) parts.extend(walk(x+1, y-1, name)) parts.extend(walk(x-1, y+1, name)) parts.extend(walk(x-1, y-1, name)) return parts region = walk(xPos, yPos, name) px = [x for x,_ in region] py = [y for _,y in region] minX = min(px) / width minY = min(py) / height maxX = max(px) / width + span/width maxY = max(py) / height + span/height xc = (minX + maxX) / 2 yc = (minY + maxY) / 2 w = maxX - minX h = maxY - minY assert w <= width and h <= height and xc < width and yc < height annotations += '{} {} {} {} {}\n'.format(obj2id[name], xc, yc, w, h) if not os.path.exists(args.out): os.makedirs(args.out) outfile = args.out+'/{}.txt'.format(os.path.splitext(os.path.basename(str(clutterFile)))[0]) with open(outfile, 'w+') as f: f.write(annotations) print('Wrote output to {}'.format(outfile))
{"hexsha": "da9341dcba6a3981bea85472085e7f3e0f050adb", "size": 5940, "ext": "py", "lang": "Python", "max_stars_repo_path": "solution_baseline/solution.py", "max_stars_repo_name": "NathanRVance/cv2", "max_stars_repo_head_hexsha": "fe3ddd56ec8a6010981b3f8861aea53541991028", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "solution_baseline/solution.py", "max_issues_repo_name": "NathanRVance/cv2", "max_issues_repo_head_hexsha": "fe3ddd56ec8a6010981b3f8861aea53541991028", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "solution_baseline/solution.py", "max_forks_repo_name": "NathanRVance/cv2", "max_forks_repo_head_hexsha": "fe3ddd56ec8a6010981b3f8861aea53541991028", "max_forks_repo_licenses": ["MIT"], "max_forks_count": 1, "max_forks_repo_forks_event_min_datetime": "2021-04-15T00:00:43.000Z", "max_forks_repo_forks_event_max_datetime": "2021-04-15T00:00:43.000Z", "avg_line_length": 42.7338129496, "max_line_length": 201, "alphanum_fraction": 0.5936026936, "include": true, "reason": "import numpy", "num_tokens": 1533}