|
| 1 | +/* |
| 2 | + * Licensed to The Apereo Foundation under one or more contributor license |
| 3 | + * agreements. See the NOTICE file distributed with this work for |
| 4 | + * additional information regarding copyright ownership. |
| 5 | + * |
| 6 | + * The Apereo Foundation licenses this file to you under the Apache License, |
| 7 | + * Version 2.0 (the "License"); you may not use this file except in |
| 8 | + * compliance with the License. You may obtain a copy of the License at: |
| 9 | + * |
| 10 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | + * |
| 12 | + * Unless required by applicable law or agreed to in writing, software |
| 13 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | + * |
| 16 | + * See the License for the specific language governing permissions and |
| 17 | + * limitations under the License. |
| 18 | + * |
| 19 | +*/ |
| 20 | + |
| 21 | +update solver_parameter_def set |
| 22 | + description = 'Number of instructors which are teaching a class which is placed to a different location than initial' |
| 23 | + where name = 'Perturbations.AffectedInstructorWeight'; |
| 24 | +update solver_parameter_def set |
| 25 | + default_value = '-1' |
| 26 | + where name = 'SimulatedAnnealing.InitialTemperature' and default_value = '1.5'; |
| 27 | +update solver_parameter_def set |
| 28 | + default_value = '100.0' |
| 29 | + where name = 'Placement.NrConflictsWeight1' and default_value = '1.0'; |
| 30 | +update solver_parameter_def set |
| 31 | + default_value = '200.0' |
| 32 | + where name = 'Placement.WeightedConflictsWeight1' and default_value = '2.0'; |
| 33 | +update solver_parameter_def set |
| 34 | + type = 'boolean' |
| 35 | + where name = 'Precedence.ConsiderDatePatterns' and type = 'text'; |
| 36 | + |
| 37 | +insert into solver_parameter_def (select |
| 38 | + solver_parameter_def_seq.nextval as uniqueid, |
| 39 | + 'Search.MaxIdleIterations' as name, |
| 40 | + '1000' as default_value, |
| 41 | + 'Maximum number of non-improving iterations after which the construction phase is halted (-1 to never halt)' as description, |
| 42 | + 'integer' as type, |
| 43 | + (select count(*) from solver_parameter_def d, solver_parameter_group g where d.solver_param_group_id = g.uniqueid and g.name = 'General') as ord, |
| 44 | + 1 as visible, |
| 45 | + uniqueid as solver_param_group_id from solver_parameter_group where name = 'General'); |
| 46 | +insert into solver_parameter_def (select |
| 47 | + solver_parameter_def_seq.nextval as uniqueid, |
| 48 | + 'Search.MinConstructionTime' as name, |
| 49 | + '10%' as default_value, |
| 50 | + 'Minimum construction time when a complete solution cannot be reached' as description, |
| 51 | + 'integer' as type, |
| 52 | + (select count(*) from solver_parameter_def d, solver_parameter_group g where d.solver_param_group_id = g.uniqueid and g.name = 'General') as ord, |
| 53 | + 1 as visible, |
| 54 | + uniqueid as solver_param_group_id from solver_parameter_group where name = 'General'); |
| 55 | +insert into solver_parameter_def (select |
| 56 | + solver_parameter_def_seq.nextval as uniqueid, |
| 57 | + 'Parallel.NrSolvers' as name, |
| 58 | + '1' as default_value, |
| 59 | + 'Number of parallel solver threads' as description, |
| 60 | + 'integer' as type, |
| 61 | + (select count(*) from solver_parameter_def d, solver_parameter_group g where d.solver_param_group_id = g.uniqueid and g.name = 'General') as ord, |
| 62 | + 1 as visible, |
| 63 | + uniqueid as solver_param_group_id from solver_parameter_group where name = 'General'); |
| 64 | +insert into solver_parameter_def (select |
| 65 | + solver_parameter_def_seq.nextval as uniqueid, |
| 66 | + 'ForwardCheck.MaxDepth' as name, |
| 67 | + '2' as default_value, |
| 68 | + 'Forward Checking: Max Depth' as description, |
| 69 | + 'integer' as type, |
| 70 | + (select count(*) from solver_parameter_def d, solver_parameter_group g where d.solver_param_group_id = g.uniqueid and g.name = 'General') as ord, |
| 71 | + 1 as visible, |
| 72 | + uniqueid as solver_param_group_id from solver_parameter_group where name = 'General'); |
| 73 | +insert into solver_parameter_def (select |
| 74 | + solver_parameter_def_seq.nextval as uniqueid, |
| 75 | + 'ForwardCheck.MaxDomainSize' as name, |
| 76 | + '1000' as default_value, |
| 77 | + 'Forward Checking: Max Domain Size' as description, |
| 78 | + 'integer' as type, |
| 79 | + (select count(*) from solver_parameter_def d, solver_parameter_group g where d.solver_param_group_id = g.uniqueid and g.name = 'General') as ord, |
| 80 | + 1 as visible, |
| 81 | + uniqueid as solver_param_group_id from solver_parameter_group where name = 'General'); |
| 82 | +insert into solver_parameter_def (select |
| 83 | + solver_parameter_def_seq.nextval as uniqueid, |
| 84 | + 'General.AutomaticInstructorConstraints' as name, |
| 85 | + '' as default_value, |
| 86 | + 'Automatic instructor constraints (separated by comma)' as description, |
| 87 | + 'text' as type, |
| 88 | + (select count(*) from solver_parameter_def d, solver_parameter_group g where d.solver_param_group_id = g.uniqueid and g.name = 'General') as ord, |
| 89 | + 1 as visible, |
| 90 | + uniqueid as solver_param_group_id from solver_parameter_group where name = 'General'); |
| 91 | +insert into solver_parameter_def (select |
| 92 | + solver_parameter_def_seq.nextval as uniqueid, |
| 93 | + 'General.LoadCommittedReservations' as name, |
| 94 | + 'false' as default_value, |
| 95 | + 'Load: Consider Reservations for Committed Classes' as description, |
| 96 | + 'boolean' as type, |
| 97 | + (select count(*) from solver_parameter_def d, solver_parameter_group g where d.solver_param_group_id = g.uniqueid and g.name = 'General') as ord, |
| 98 | + 1 as visible, |
| 99 | + uniqueid as solver_param_group_id from solver_parameter_group where name = 'General'); |
| 100 | +insert into solver_parameter_def (select |
| 101 | + solver_parameter_def_seq.nextval as uniqueid, |
| 102 | + 'General.ApplyInstructorDistributionsAcrossAllDepartments' as name, |
| 103 | + 'false' as default_value, |
| 104 | + 'Load: Apply Instructor Distributions Across All Departments' as description, |
| 105 | + 'boolean' as type, |
| 106 | + (select count(*) from solver_parameter_def d, solver_parameter_group g where d.solver_param_group_id = g.uniqueid and g.name = 'General') as ord, |
| 107 | + 1 as visible, |
| 108 | + uniqueid as solver_param_group_id from solver_parameter_group where name = 'General'); |
| 109 | +insert into solver_parameter_def (select |
| 110 | + solver_parameter_def_seq.nextval as uniqueid, |
| 111 | + 'General.StudentGroupCourseDemands' as name, |
| 112 | + 'false' as default_value, |
| 113 | + 'Create additional student demands based on student group reservations' as description, |
| 114 | + 'boolean' as type, |
| 115 | + (select count(*) from solver_parameter_def d, solver_parameter_group g where d.solver_param_group_id = g.uniqueid and g.name = 'General') as ord, |
| 116 | + 1 as visible, |
| 117 | + uniqueid as solver_param_group_id from solver_parameter_group where name = 'General'); |
| 118 | +insert into solver_parameter_def (select |
| 119 | + solver_parameter_def_seq.nextval as uniqueid, |
| 120 | + 'General.MPP.FixedTimes' as name, |
| 121 | + 'false' as default_value, |
| 122 | + 'MPP: Fix All Assigned Times' as description, |
| 123 | + 'boolean' as type, |
| 124 | + (select count(*) from solver_parameter_def d, solver_parameter_group g where d.solver_param_group_id = g.uniqueid and g.name = 'General') as ord, |
| 125 | + 1 as visible, |
| 126 | + uniqueid as solver_param_group_id from solver_parameter_group where name = 'General'); |
| 127 | +insert into solver_parameter_def (select |
| 128 | + solver_parameter_def_seq.nextval as uniqueid, |
| 129 | + 'General.WeakenDistributions' as name, |
| 130 | + 'false' as default_value, |
| 131 | + 'Weaken Hard Distributions (useful for fixed-time MPP)' as description, |
| 132 | + 'boolean' as type, |
| 133 | + (select count(*) from solver_parameter_def d, solver_parameter_group g where d.solver_param_group_id = g.uniqueid and g.name = 'General') as ord, |
| 134 | + 1 as visible, |
| 135 | + uniqueid as solver_param_group_id from solver_parameter_group where name = 'General'); |
| 136 | +insert into solver_parameter_def (select |
| 137 | + solver_parameter_def_seq.nextval as uniqueid, |
| 138 | + 'General.SoftInstructorConstraints' as name, |
| 139 | + '' as default_value, |
| 140 | + 'Soft Instructor Constraints (useful for fixed-time MPP)' as description, |
| 141 | + 'boolean' as type, |
| 142 | + (select count(*) from solver_parameter_def d, solver_parameter_group g where d.solver_param_group_id = g.uniqueid and g.name = 'General') as ord, |
| 143 | + 1 as visible, |
| 144 | + uniqueid as solver_param_group_id from solver_parameter_group where name = 'General'); |
| 145 | +insert into solver_parameter_def (select |
| 146 | + solver_parameter_def_seq.nextval as uniqueid, |
| 147 | + 'General.AllowProhibitedRooms' as name, |
| 148 | + '' as default_value, |
| 149 | + 'Allow Prohibited Rooms (useful for fixed-time MPP)' as description, |
| 150 | + 'boolean' as type, |
| 151 | + (select count(*) from solver_parameter_def d, solver_parameter_group g where d.solver_param_group_id = g.uniqueid and g.name = 'General') as ord, |
| 152 | + 1 as visible, |
| 153 | + uniqueid as solver_param_group_id from solver_parameter_group where name = 'General'); |
| 154 | + |
| 155 | + |
| 156 | +delete from solver_parameter_def where uniqueid in (select d1.uniqueid from |
| 157 | + solver_parameter_def d1 inner join solver_parameter_group g1 on d1.solver_param_group_id = g1.uniqueid, |
| 158 | + solver_parameter_def d2 inner join solver_parameter_group g2 on d2.solver_param_group_id = g2.uniqueid |
| 159 | + where d2.uniqueid < d1.uniqueid and d1.name = d2.name and g1.param_type = g2.param_type); |
| 160 | + |
| 161 | +/* |
| 162 | + * Update database version |
| 163 | + */ |
| 164 | + |
| 165 | +update application_config set value='271' where name='tmtbl.db.version'; |
| 166 | + |
| 167 | +commit; |
0 commit comments